87 lines
2 KiB
Nix
87 lines
2 KiB
Nix
{
|
|
description = "Main Flake: LuminiferousLilith";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
|
nixpkgs-stable.url = "github:NixOS/nixpkgs/release-24.05";
|
|
|
|
flake-utils.url = "github:numtide/flake-utils";
|
|
|
|
home-manager = {
|
|
url = "github:nix-community/home-manager";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
sops-nix = {
|
|
url = "github:Mic92/sops-nix";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
inputs.nixpkgs-stable.follows = "nixpkgs-stable";
|
|
};
|
|
|
|
impermanence.url = "github:nix-community/impermanence";
|
|
|
|
stylix.url = "github:danth/stylix";
|
|
|
|
helix.url = "github:pascalkuthe/helix/inline-diagnostics";
|
|
|
|
arkenfox = {
|
|
url = "github:dwarfmaster/arkenfox-nixos";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
inputs.flake-utils.follows = "flake-utils";
|
|
};
|
|
|
|
rose-pine-hyprcursor.url = "github:ndom91/rose-pine-hyprcursor";
|
|
};
|
|
|
|
outputs = {
|
|
self,
|
|
nixpkgs,
|
|
impermanence,
|
|
home-manager,
|
|
sops-nix,
|
|
stylix,
|
|
arkenfox,
|
|
...
|
|
} @ inputs: let
|
|
inherit (nixpkgs) lib;
|
|
|
|
defaultConf = rec {
|
|
uid = 1000;
|
|
user = "lilith";
|
|
home = /home/${user};
|
|
|
|
tmpfsSize = "4G";
|
|
|
|
wallpaper = "default.png";
|
|
|
|
extraConfig = {};
|
|
};
|
|
|
|
hosts = builtins.filter (host: builtins.pathExists ./hosts/${host}/default.nix) (builtins.attrNames (builtins.readDir ./hosts));
|
|
|
|
importHostConf = host:
|
|
lib.recursiveUpdate defaultConf (import ./hosts/${host} inputs
|
|
// {
|
|
hostname = host;
|
|
hardware-configuration = ./hosts/${host}/hardware-configuration.nix;
|
|
});
|
|
|
|
mkHostConfig = host: import ./system (inputs // {conf = importHostConf host;});
|
|
in {
|
|
nixosConfigurations = builtins.listToAttrs (lib.flatten (
|
|
map (host: let
|
|
conf = mkHostConfig host;
|
|
in [
|
|
{
|
|
name = host;
|
|
value = conf.full;
|
|
}
|
|
{
|
|
name = "${host}-base";
|
|
value = conf.base;
|
|
}
|
|
])
|
|
hosts
|
|
));
|
|
};
|
|
}
|