NixOS-Config/flake.nix

96 lines
2.9 KiB
Nix

{
inputs = {
nixpkgs.url = "nixpkgs/nixos-24.05";
unstable.url = "nixpkgs/nixos-unstable";
home-manager = {
url = "github:nix-community/home-manager/release-24.05";
inputs.nixpkgs.follows = "nixpkgs";
};
nur.url = "github:nix-community/NUR";
chaotic = {
url = "github:chaotic-cx/nyx/nyxpkgs-unstable";
inputs.nixpkgs.follows = "unstable";
};
blender-bin.url = "https://flakehub.com/f/edolstra/blender-bin/1.0.9.tar.gz";
hardware.url = "github:nixos/nixos-hardware/master";
lanzaboote = {
url = "github:nix-community/lanzaboote/v0.4.1";
inputs.nixpkgs.follows = "nixpkgs";
};
mailserver.url = "gitlab:simple-nixos-mailserver/nixos-mailserver/nixos-24.05";
minecraft.url = "github:Infinidoge/nix-minecraft";
};
outputs = {
nixpkgs,
unstable,
home-manager,
nur,
chaotic,
blender-bin,
hardware,
lanzaboote,
mailserver,
minecraft,
...
}:
let
mkNix = modules: nixpkgs.lib.nixosSystem {
inherit modules;
specialArgs = {
inherit
unstable
chaotic
hardware
lanzaboote
mailserver
minecraft
;
};
};
mkHome = modules: pkgs: home-manager.lib.homeManagerConfiguration {
inherit modules pkgs;
extraSpecialArgs = {
inherit
unstable
nur
blender-bin
;
};
};
in {
# nixos-rebuild switch --flake .#hostname
nixosConfigurations = {
firefly = mkNix [ ./hosts/firefly/system ]; # Main Desktop
detritus = mkNix [ ./hosts/detritus/system ]; # Acer Desktop
shuttle = mkNix [ ./hosts/shuttleworth/system ]; # Pinebook Pro
lacros = mkNix [ ./hosts/lacros/system ]; # Dell Chromebook
redmond = mkNix [ ./hosts/redmond/system ]; # Lenovo Laptop
treefruit = mkNix [ ./hosts/treefruit/system ]; # Macbook Pro 14,1
cyberspark = mkNix [ ./hosts/cyberspark/system ]; # Dell Optiplex 7010
bomberman = mkNix [ ./hosts/bomberman/system ]; # Oracle ARM
};
# home-manager switch --flake .#username@hostname
homeConfigurations = {
"jimbo@firefly" = mkHome [ ./hosts/firefly/home ] nixpkgs.legacyPackages.x86_64-linux;
"jimbo@detritus" = mkHome [ ./hosts/detritus/home ] nixpkgs.legacyPackages.x86_64-linux;
"jimbo@shuttle" = mkHome [ ./hosts/shuttleworth/home ] nixpkgs.legacyPackages.aarch64-linux;
"jimbo@lacros" = mkHome [ ./hosts/lacros/home ] nixpkgs.legacyPackages.x86_64-linux;
"jimbo@redmond" = mkHome [ ./hosts/redmond/home ] nixpkgs.legacyPackages.x86_64-linux;
"jimbo@treefruit" = mkHome [ ./hosts/treefruit/home ] nixpkgs.legacyPackages.x86_64-linux;
"jimbo@cyberspark" = mkHome [ ./hosts/cyberspark/home ] nixpkgs.legacyPackages.x86_64-linux;
"jimbo@bomberman" = mkHome [ ./hosts/bomberman/home ] nixpkgs.legacyPackages.aarch64-linux;
};
};
}