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
36
flake.nix
36
flake.nix
@ -206,24 +206,12 @@
|
|||||||
nixos-modules.nixosModule
|
nixos-modules.nixosModule
|
||||||
sops-nix.nixosModules.sops
|
sops-nix.nixosModules.sops
|
||||||
{ config.networking.hostName = "${hostname}"; }
|
{ config.networking.hostName = "${hostname}"; }
|
||||||
|
./systems/${hostname}/hardware.nix
|
||||||
|
./systems/${hostname}/configuration.nix
|
||||||
]
|
]
|
||||||
++ (
|
|
||||||
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"
|
++ fileList "modules"
|
||||||
++ modules
|
++ modules
|
||||||
++ lib.optional home home-manager.nixosModules.home-manager
|
++ 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
|
if home then
|
||||||
(map (user: { home-manager.users.${user} = import ./users/${user}/home.nix; }) users)
|
(map (user: { home-manager.users.${user} = import ./users/${user}/home.nix; }) users)
|
||||||
@ -273,26 +261,6 @@
|
|||||||
]
|
]
|
||||||
);
|
);
|
||||||
}) (lsdir "systems")
|
}) (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 (
|
devShell = lib.mapAttrs (
|
||||||
|
Loading…
x
Reference in New Issue
Block a user