nixfiles/flake.nix
NullBite 531445e1f0
re-add init function for home manager
my stupid ass in b979657 thought that
home-manager.nixosModules.home-manager was a function that returned a
module instead of just a module (which is also a function but that's
besides the point). i forgot to consider that the home-manager module
adds a custom home-manager option set, nor did i realize that a flake
module could be a plain attribute set.
2024-01-12 11:35:57 +01:00

64 lines
1.7 KiB
Nix

{
description = "NixOS Configuration";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11";
# ^^^^^^^^^^^^^ this part is optional
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
home-manager = {
url = "github:nix-community/home-manager/release-23.11";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { self, nixpkgs, nixpkgs-unstable, ... }@inputs:
let
lib = nixpkgs.lib;
username = "nullbite";
homeManagerModule = inputs.home-manager.nixosModules.home-manager;
homeManagerInit = user: module: {
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
users.${user} = module;
};
};
in {
# for repl debugging via :lf .
inherit inputs;
vars = {
inherit lib username;
};
nixosConfigurations = {
slab = lib.nixosSystem {
system = "x86_64-linux";
modules = [
./hosts/slab/configuration.nix
./hosts/slab/nvidia-optimus.nix
./system/remote.nix
./system/plasma.nix
./system/fragments/opengl.nix
./system/gaming.nix
# ./system/hyprland.nix
homeManagerModule
(homeManagerInit username (import ./hosts/slab/home.nix))
];
};
nullbox = lib.nixosSystem {
system = "x86_64-linux";
modules = [
./hosts/nullbox/configuration.nix
./system/remote.nix
./system/plasma.nix
./system/fragments/hardware/nvidia-modeset.nix
./system/gaming.nix
homeManagerModule
(homeManagerInit username (import ./hosts/nullbox/home.nix))
];
};
};
};
}