67 lines
1.6 KiB
Nix
67 lines
1.6 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";
|
|
};
|
|
|
|
outputs = {
|
|
self,
|
|
nixpkgs,
|
|
impermanence,
|
|
home-manager,
|
|
sops-nix,
|
|
stylix,
|
|
...
|
|
} @ inputs: let
|
|
inherit (nixpkgs) lib;
|
|
|
|
defaultConf = rec {
|
|
uid = 1000;
|
|
user = "lilith";
|
|
home = /home/${user};
|
|
|
|
tmpfsSize = "4G";
|
|
|
|
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 (
|
|
map (host: {
|
|
name = host;
|
|
value = (mkHostConfig host).build;
|
|
})
|
|
hosts
|
|
);
|
|
};
|
|
}
|