tidy up a bunch of flake.nix, remove user machine functionality
Signed-off-by: ahuston-0 <aliceghuston@gmail.com>
This commit is contained in:
parent
3c86d6ab1c
commit
d60a95f938
32
flake.nix
32
flake.nix
@ -206,24 +206,12 @@
|
||||
nixos-modules.nixosModule
|
||||
sops-nix.nixosModules.sops
|
||||
{ config.networking.hostName = "${hostname}"; }
|
||||
]
|
||||
++ (
|
||||
if server then
|
||||
[
|
||||
./systems/${hostname}/hardware.nix
|
||||
./systems/${hostname}/configuration.nix
|
||||
]
|
||||
else
|
||||
[
|
||||
./users/${builtins.head users}/systems/${hostname}/configuration.nix
|
||||
./users/${builtins.head users}/systems/${hostname}/hardware.nix
|
||||
]
|
||||
)
|
||||
++ fileList "modules"
|
||||
++ modules
|
||||
++ lib.optional home home-manager.nixosModules.home-manager
|
||||
++ lib.optional (builtins.elem "minimal" iso) "${toString nixpkgs}/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix"
|
||||
++ lib.optional (builtins.elem "sd" iso) "${toString nixpkgs}/nixos/modules/installer/sd-card/sd-image-aarch64.nix"
|
||||
++ (
|
||||
if home then
|
||||
(map (user: { home-manager.users.${user} = import ./users/${user}/home.nix; }) users)
|
||||
@ -273,26 +261,6 @@
|
||||
]
|
||||
);
|
||||
}) (lsdir "systems")
|
||||
))
|
||||
// (builtins.listToAttrs (
|
||||
builtins.concatMap (
|
||||
user:
|
||||
map (system: {
|
||||
name = "${user}.${system}";
|
||||
value = constructSystem (
|
||||
{
|
||||
hostname = system;
|
||||
server = false;
|
||||
users = [ user ];
|
||||
}
|
||||
// builtins.removeAttrs (import ./users/${user}/systems/${system} { inherit inputs; }) [
|
||||
"hostname"
|
||||
"server"
|
||||
"users"
|
||||
]
|
||||
);
|
||||
}) (lsdir "users/${user}/systems")
|
||||
) (lsdir "users")
|
||||
));
|
||||
|
||||
devShell = lib.mapAttrs (
|
||||
|
Loading…
x
Reference in New Issue
Block a user