150 lines
5.1 KiB
Nix
150 lines
5.1 KiB
Nix
{
|
|
description = "NixOS configuration for all hosts";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.11";
|
|
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
nur = {
|
|
url = "github:nix-community/NUR";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
nur-unstable = {
|
|
url = "github:nix-community/NUR";
|
|
inputs.nixpkgs.follows = "nixpkgs-unstable";
|
|
};
|
|
home-manager = {
|
|
url = "github:nix-community/home-manager/release-25.11";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
stylix = {
|
|
url = "github:danth/stylix";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
nix-minecraft.url = "github:Infinidoge/nix-minecraft";
|
|
};
|
|
|
|
outputs = inputs @ { self, nixpkgs, nixpkgs-unstable, nur, nur-unstable, home-manager, stylix, nix-minecraft, ... }:
|
|
let
|
|
system = "x86_64-linux";
|
|
pkgs = import nixpkgs {
|
|
inherit system;
|
|
config.allowUnfree = true;
|
|
flake.setFlakeRegistry = true;
|
|
overlays = [ nur.overlays.default ];
|
|
};
|
|
pkgs-unstable = import nixpkgs-unstable {
|
|
inherit system;
|
|
config.allowUnfree = true;
|
|
flake.setFlakeRegistry = true;
|
|
overlays = [ nur-unstable.overlays.default ];
|
|
};
|
|
sharedSpecialArgs = {
|
|
inherit pkgs-unstable;
|
|
inherit inputs;
|
|
};
|
|
sharedModules = [
|
|
./hosts/common/default.nix
|
|
stylix.nixosModules.stylix
|
|
home-manager.nixosModules.home-manager
|
|
({ config, ...}: {
|
|
home-manager.useGlobalPkgs = true;
|
|
home-manager.useUserPackages = true;
|
|
home-manager.extraSpecialArgs = {
|
|
inherit (config.networking) hostName;
|
|
inherit pkgs pkgs-unstable;
|
|
}; # end extraSpecialArgs
|
|
home-manager.backupFileExtension = "backup";
|
|
}) # end home manager
|
|
]; # end sharedModules
|
|
in
|
|
{
|
|
nixosConfigurations = {
|
|
electra = nixpkgs.lib.nixosSystem {
|
|
inherit system;
|
|
inherit pkgs;
|
|
specialArgs = sharedSpecialArgs // {};
|
|
modules = sharedModules ++ [
|
|
./hosts/electra/configuration.nix
|
|
./hosts/common/workstation.nix
|
|
./hosts/common/wm/sway.nix
|
|
./hosts/common/stylix.nix
|
|
home-manager.nixosModules.home-manager
|
|
({ config, ...}: {
|
|
home-manager.users.alisceon.imports = [
|
|
./home/alisceon/base.nix
|
|
./home/alisceon/workstation.nix
|
|
./home/wm/sway.nix
|
|
./home/alisceon/hosts/electra.nix
|
|
];
|
|
home-manager.users.root.imports = [
|
|
./home/root/base.nix
|
|
];
|
|
}) # end home-manager
|
|
]; # end modules
|
|
}; # end electra
|
|
tower = nixpkgs.lib.nixosSystem {
|
|
inherit system;
|
|
inherit pkgs;
|
|
specialArgs = sharedSpecialArgs // {};
|
|
modules = sharedModules ++ [
|
|
./hosts/tower/configuration.nix
|
|
./hosts/common/workstation.nix
|
|
./hosts/common/wm/sway.nix
|
|
./hosts/common/stylix.nix
|
|
home-manager.nixosModules.home-manager
|
|
({ config, ...}: {
|
|
home-manager.users.alisceon.imports = [
|
|
./home/alisceon/base.nix
|
|
./home/alisceon/workstation.nix
|
|
./home/wm/sway.nix
|
|
./home/alisceon/hosts/tower.nix
|
|
];
|
|
home-manager.users.root.imports = [
|
|
./home/root/base.nix
|
|
];
|
|
}) # end home-manager
|
|
]; # end modules
|
|
}; # end tower
|
|
tesla-nixos = nixpkgs.lib.nixosSystem {
|
|
inherit system;
|
|
inherit pkgs;
|
|
specialArgs = sharedSpecialArgs // {};
|
|
modules = sharedModules ++ [
|
|
./hosts/common/server.nix
|
|
./hosts/tesla-nixos/configuration.nix
|
|
nix-minecraft.nixosModules.minecraft-servers
|
|
{ nixpkgs.overlays = [ inputs.nix-minecraft.overlay ]; }
|
|
home-manager.nixosModules.home-manager
|
|
({ config, ...}: {
|
|
home-manager.users.alisceon.imports = [
|
|
./home/alisceon/base.nix
|
|
./home/alisceon/server.nix
|
|
];
|
|
home-manager.users.root.imports = [
|
|
./home/root/base.nix
|
|
];
|
|
}) # end home-manager
|
|
]; # end modules
|
|
}; # end tesla-nixos
|
|
nuc = nixpkgs.lib.nixosSystem {
|
|
inherit system;
|
|
inherit pkgs;
|
|
specialArgs = sharedSpecialArgs // {};
|
|
modules = sharedModules ++ [
|
|
./hosts/common/server.nix
|
|
./hosts/nuc/configuration.nix
|
|
home-manager.nixosModules.home-manager
|
|
({ config, ...}: {
|
|
home-manager.users.alisceon.imports = [
|
|
./home/alisceon/base.nix
|
|
./home/alisceon/server.nix
|
|
];
|
|
home-manager.users.root.imports = [
|
|
./home/root/base.nix
|
|
];
|
|
}) # end home-manager
|
|
]; # end modules
|
|
}; # end tesla-nixos
|
|
}; # end nixos conf
|
|
}; # end "in"
|
|
} # end file
|