flocon/hosts/default.nix
Anthony Rodriguez 2b77ac239e
treewide: config/nixos/services -> modules/nix/services
Moved every service in their own module, and conditionally enable them
based on profiles.
2025-01-14 15:10:49 +01:00

82 lines
1.8 KiB
Nix

{
self,
inputs,
...
}: let
lib' = import ../shared/lib inputs.nixpkgs.lib;
mkSystem = args:
inputs.nixpkgs.lib.nixosSystem {
specialArgs = {inherit inputs lib';};
modules = (args.modules or []) ++ [../modules];
};
base = [
({
config,
specialArgs,
...
}: {
home-manager = {
users.${config.local.systemVars.username}.imports = [
"${self}/config/home-manager"
"${self}/config/home-manager/services/udiskie.nix"
"${self}/config/home-manager/services/syncthing.nix"
];
extraSpecialArgs = specialArgs;
};
})
];
graphical = [
({config, ...}: {
home-manager.users.${config.local.systemVars.username}.imports = [
"${self}/config/home-manager/programs/waybar"
"${self}/config/home-manager/programs/walker.nix"
"${self}/config/home-manager/programs/hypr"
"${self}/config/home-manager/programs/wlogout.nix"
"${self}/config/home-manager/services/swaync"
"${self}/config/home-manager/terminal/emulators/foot.nix"
"${self}/config/home-manager/services/gammastep.nix"
];
})
];
gaming = [
({config, ...}: {
home-manager.users.${config.local.systemVars.username}.imports = [
"${self}/config/home-manager/programs/games"
"${self}/config/home-manager/services/flatpak.nix"
];
})
];
in {
vamos = mkSystem {
modules =
[
./vamos
inputs.nixos-hardware.nixosModules.framework-13-7040-amd
]
++ base
++ graphical;
};
solaire = mkSystem {
modules =
[
./solaire
]
++ base
++ graphical
++ gaming;
};
anastacia = mkSystem {
modules = [
./anastacia
];
};
}