130 lines
3.5 KiB
Nix
130 lines
3.5 KiB
Nix
{
|
|
description = "SecureBoot-enabled NixOS config";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
nixpkgs-stable.url = "github:NixOS/nixpkgs/nixos-25.05";
|
|
home-manager = {
|
|
url = "github:nix-community/home-manager/master";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
home-manager-stable = {
|
|
url = "github:nix-community/home-manager/release-25.05";
|
|
inputs.nixpkgs.follows = "nixpkgs-stable";
|
|
};
|
|
nur = {
|
|
url = "github:nix-community/NUR";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
lanzaboote = {
|
|
url = "github:nix-community/lanzaboote/v0.4.2";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
sops-nix = {
|
|
url = "github:Mic92/sops-nix";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
catppuccin.url = "github:catppuccin/nix";
|
|
hyprland.url = "github:hyprwm/Hyprland";
|
|
plasma-manager = {
|
|
url = "github:nix-community/plasma-manager";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
inputs.home-manager.follows = "home-manager";
|
|
};
|
|
};
|
|
|
|
outputs = {
|
|
self,
|
|
catppuccin,
|
|
lanzaboote,
|
|
nur,
|
|
plasma-manager,
|
|
sops-nix,
|
|
...
|
|
} @ inputs: let
|
|
hosts = import ./hosts/hosts.nix;
|
|
|
|
# Make config for non-NixOS hosts
|
|
mkHomeConfiguration = {
|
|
host,
|
|
nixpkgs,
|
|
home-manager,
|
|
modules ? [],
|
|
}:
|
|
home-manager.lib.homeManagerConfiguration {
|
|
pkgs = import nixpkgs {
|
|
system = host.arch;
|
|
config = {
|
|
allowUnfree = true;
|
|
};
|
|
overlays = [
|
|
nur.overlay
|
|
];
|
|
};
|
|
modules =
|
|
[
|
|
./hosts/${host.dir}/home.nix
|
|
catppuccin.homeModules.catppuccin
|
|
sops-nix.homeManagerModules.sops
|
|
]
|
|
++ modules;
|
|
};
|
|
|
|
# Make config for NixOS hosts
|
|
mkNixOSConfigurations = {
|
|
host,
|
|
nixpkgs,
|
|
home-manager,
|
|
modules ? [],
|
|
}:
|
|
nixpkgs.lib.nixosSystem {
|
|
system = host.arch;
|
|
specialArgs = {inherit inputs;};
|
|
modules =
|
|
[
|
|
./hosts/${host.dir}/configuration.nix
|
|
nur.modules.nixos.default
|
|
catppuccin.nixosModules.catppuccin
|
|
sops-nix.nixosModules.sops
|
|
home-manager.nixosModules.home-manager
|
|
{
|
|
home-manager.backupFileExtension = "backup";
|
|
home-manager.useGlobalPkgs = true;
|
|
home-manager.useUserPackages = true;
|
|
home-manager.sharedModules = [
|
|
plasma-manager.homeManagerModules.plasma-manager
|
|
sops-nix.homeManagerModules.sops
|
|
];
|
|
home-manager.users."${host.user}".imports = [
|
|
./hosts/${host.dir}/home.nix
|
|
catppuccin.homeModules.catppuccin
|
|
];
|
|
}
|
|
]
|
|
++ modules;
|
|
};
|
|
in {
|
|
# Please replace my-nixos with your hostname
|
|
nixosConfigurations = {
|
|
anzu = mkNixOSConfigurations {
|
|
host = hosts.anzu;
|
|
nixpkgs = inputs.nixpkgs;
|
|
home-manager = inputs.home-manager;
|
|
modules = [lanzaboote.nixosModules.lanzaboote];
|
|
};
|
|
ichigo = mkNixOSConfigurations {
|
|
host = hosts.ichigo;
|
|
nixpkgs = inputs.nixpkgs;
|
|
home-manager = inputs.home-manager;
|
|
modules = [];
|
|
};
|
|
kuromi = mkNixOSConfigurations {
|
|
host = hosts.kuromi;
|
|
nixpkgs = inputs.nixpkgs-stable;
|
|
home-manager = inputs.home-manager-stable;
|
|
modules = [];
|
|
};
|
|
};
|
|
};
|
|
}
|