This commit is contained in:
2023-03-01 14:18:49 +00:00
parent 1b8c106166
commit 25be0d06f4
6 changed files with 17 additions and 20 deletions

View File

@@ -62,9 +62,19 @@
packages = forEachPkgs (pkgs: import ./pkgs { inherit pkgs; }); packages = forEachPkgs (pkgs: import ./pkgs { inherit pkgs; });
devShells = forEachPkgs (pkgs: import ./shell.nix { inherit pkgs; }); devShells = forEachPkgs (pkgs: import ./shell.nix { inherit pkgs; });
overlays = import ./overlays { inherit inputs; }; overlays = import ./overlays { inherit inputs; };
nixosModules = import ./modules/nixos; nixosModules = builtins.listToAttrs (map
homeManagerModules = import ./modules/home-manager; (x: {
name = x;
value = import (./modules/nixos + "/${x}");
})
(builtins.attrNames (builtins.readDir ../modules/nixos)));
homeManagerModules = builtins.listToAttrs (map
(name: {
inherit name;
value = import (./modules/home-manager + "/${name}");
})
(builtins.attrNames (builtins.readDir ./modules/home-manager)));
# NixOS configuration entrypoint # NixOS configuration entrypoint
# Available through 'nixos-rebuild --flake .#your-hostname' # Available through 'nixos-rebuild --flake .#your-hostname'
@@ -73,12 +83,14 @@
specialArgs = { inherit inputs outputs; }; specialArgs = { inherit inputs outputs; };
modules = [ modules = [
./hosts/WSL/Go3 ./hosts/WSL/Go3
{ imports = builtins.attrValues self.nixosModules; }
]; ];
}; };
StuPC = nixpkgs.lib.nixosSystem { StuPC = nixpkgs.lib.nixosSystem {
specialArgs = { inherit inputs outputs; }; specialArgs = { inherit inputs outputs; };
modules = [ modules = [
./hosts/WSL/StuPC ./hosts/WSL/StuPC
{ imports = builtins.attrValues self.nixosModules; }
]; ];
}; };
@@ -95,7 +107,7 @@
# > Our main home-manager configuration file < # > Our main home-manager configuration file <
./home-manager/users/sstent ./home-manager/users/sstent
inputs.sops-nix.homeManagerModules.sops inputs.sops-nix.homeManagerModules.sops
]; ]++ (builtins.attrValues self.homeManagerModules);
}; };
"sstent@StuPC" = home-manager.lib.homeManagerConfiguration { "sstent@StuPC" = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.x86_64-linux; # Home-manager requires 'pkgs' instance pkgs = nixpkgs.legacyPackages.x86_64-linux; # Home-manager requires 'pkgs' instance
@@ -104,7 +116,7 @@
# > Our main home-manager configuration file < # > Our main home-manager configuration file <
./home-manager/users/sstent ./home-manager/users/sstent
inputs.sops-nix.homeManagerModules.sops inputs.sops-nix.homeManagerModules.sops
]; ]++ (builtins.attrValues self.homeManagerModules);
}; };
}; };

View File

@@ -53,7 +53,6 @@
# beets # beets
# qemu_kvm # qemu_kvm
# nixos-generators # nixos-generators
nixfmt
nixpkgs-fmt nixpkgs-fmt
# deploy-rs # deploy-rs
]; ];

View File

@@ -1,7 +0,0 @@
# Add your reusable home-manager modules to this directory, on their own file (https://nixos.wiki/wiki/Module).
# These should be stuff you would like to share with others, not your personal configurations.
{
# List your module files here
ssh-proxy = import ./ssh-proxy.nix;
}

View File

@@ -1,7 +0,0 @@
# Add your reusable NixOS modules to this directory, on their own file (https://nixos.wiki/wiki/Module).
# These should be stuff you would like to share with others, not your personal configurations.
{
# List your module files here
# my-module = import ./my-module.nix;
}