NixOS-Config/flake.nix
2024-11-19 13:20:34 -05:00

94 lines
2.4 KiB
Nix

{
inputs = {
# System inputs
nixpkgs.url = "nixpkgs/nixos-24.11";
unstable.url = "nixpkgs/nixos-unstable";
hardware.url = "github:nixos/nixos-hardware/master";
lanzaboote = {
url = "github:nix-community/lanzaboote/v0.4.1";
inputs.nixpkgs.follows = "nixpkgs";
};
disko = {
url = "github:nix-community/disko";
inputs.nixpkgs.follows = "nixpkgs";
};
impermanence.url = "github:nix-community/impermanence";
mailserver.url = "gitlab:simple-nixos-mailserver/nixos-mailserver/nixos-24.05";
minecraft.url = "github:Infinidoge/nix-minecraft";
# Home inputs
home-manager = {
url = "github:nix-community/home-manager/release-24.11";
inputs.nixpkgs.follows = "nixpkgs";
};
nur.url = "github:nix-community/NUR";
blender-bin.url = "https://flakehub.com/f/edolstra/blender-bin/1.0.9.tar.gz";
};
outputs = {
nixpkgs,
unstable,
hardware,
lanzaboote,
disko,
impermanence,
mailserver,
minecraft,
home-manager,
nur,
blender-bin,
...
}:
let
mkNix = modules: nixpkgs.lib.nixosSystem {
inherit modules;
specialArgs = {
inherit
unstable
hardware
lanzaboote
disko
impermanence
mailserver
minecraft
home-manager
nur
blender-bin
;
};
};
mkHome = modules: pkgs: home-manager.lib.homeManagerConfiguration {
inherit modules pkgs;
extraSpecialArgs = {
inherit
unstable
nur
blender-bin
;
};
};
in {
# nixos-rebuild switch --flake /etc/nixos#hostname
nixosConfigurations = {
tower = mkNix [ ./hosts/tower ]; # Main Desktop
axolotl = mkNix [ ./hosts/axolotl ]; # PineBook Pro
lacros = mkNix [ ./hosts/lacros ]; # Dell Chromebook
redmond = mkNix [ ./hosts/redmond ]; # Lenovo Dual-Boot Laptop
pomme = mkNix [ ./hosts/treefruit ]; # Macbook Pro 14,1
extern = mkNix [ ./hosts/extern ]; # Portable Hard-Drive
kitty = mkNix [ ./hosts/kitty ]; # Dell Optiplex 7010
xenia = mkNix [ ./hosts/xenia ]; # Acer Veriton X2611G
prophet = mkNix [ ./hosts/prophet ]; # Oracle Neoverse-N1
};
# home-manager switch --flake /etc/nixos#username
homeConfigurations."jimbo" = mkHome [ ./modules/home ] nixpkgs.legacyPackages.x86_64-linux;
};
}