nixos-config/flake.nix

76 lines
2 KiB
Nix

{
inputs = {
# System inputs
stable.url = "nixpkgs/nixos-24.11";
unstable.url = "nixpkgs/nixos-unstable";
lanzaboote = {
url = "github:nix-community/lanzaboote/v0.4.1";
inputs.nixpkgs.follows = "stable";
};
disko = {
url = "github:nix-community/disko";
inputs.nixpkgs.follows = "stable";
};
impermanence.url = "github:nix-community/impermanence";
mailserver.url = "gitlab:simple-nixos-mailserver/nixos-mailserver/nixos-24.11";
minecraft.url = "github:Infinidoge/nix-minecraft";
# Home inputs
hm = {
url = "github:nix-community/home-manager/release-24.11";
inputs.nixpkgs.follows = "stable";
};
nur.url = "github:nix-community/NUR";
blender.url = "https://flakehub.com/f/edolstra/blender-bin/1.0.12.tar.gz";
};
outputs = {
stable,
unstable,
lanzaboote,
disko,
impermanence,
mailserver,
minecraft,
hm,
nur,
blender,
...
}@inputs:
let
mkNix = modules: stable.lib.nixosSystem {
inherit modules;
specialArgs = inputs;
};
mkHome = modules: pkgs: hm.lib.homeManagerConfiguration {
inherit modules pkgs;
extraSpecialArgs = inputs;
};
in {
# nh os switch /path --hostname=host
nixosConfigurations = {
tower = mkNix [ ./hosts/tower ]; # Main Desktop
qemu = mkNix [ ./hosts/qemu ]; # Virtualization Testing
envy = mkNix [ ./hosts/envy ]; # HP Convertable
pear = mkNix [ ./hosts/pear ]; # MacBook Pro
intuos = mkNix [ ./hosts/intuos ]; # Wacom Intuos Tablet
redmond = mkNix [ ./hosts/redmond ]; # Lenovo Dual-Boot
midas = mkNix [ ./hosts/midas ]; # Dell Optiplex 5040
kitty = mkNix [ ./hosts/kitty ]; # Dell Optiplex 7010
prophet = mkNix [ ./hosts/prophet ]; # Oracle Neoverse-N1
};
# nh home switch /path -c arch
homeConfigurations = {
x86 = mkHome [ ./modules/home ] stable.legacyPackages.x86_64-linux;
aarch = mkHome [ ./modules/home ] stable.legacyPackages.aarch64-linux;
};
};
}