e078e7a229
Keep the README.md lean and use DOC.md for more detailed explanations. While revising user documentation, a default `nixos` user profile was created, which serves as a goood base example.
50 lines
1.1 KiB
Nix
50 lines
1.1 KiB
Nix
args@{ home, nixpkgs, self, ... }:
|
|
let
|
|
inherit (nixpkgs) lib;
|
|
|
|
utils = import ../lib/utils.nix { inherit lib; };
|
|
|
|
inherit (utils) recImport;
|
|
|
|
inherit (builtins) attrValues removeAttrs;
|
|
|
|
config = hostName:
|
|
lib.nixosSystem rec {
|
|
system = "x86_64-linux";
|
|
|
|
specialArgs.usr = { inherit utils; };
|
|
|
|
modules = let
|
|
inherit (home.nixosModules) home-manager;
|
|
|
|
core = ../profiles/core.nix;
|
|
|
|
global = {
|
|
networking.hostName = hostName;
|
|
nix.nixPath = [
|
|
"nixpkgs=${nixpkgs}"
|
|
"nixos-config=/etc/nixos/configuration.nix"
|
|
"nixpkgs-overlays=/etc/nixos/overlays"
|
|
];
|
|
|
|
system.configurationRevision = self.rev;
|
|
|
|
nixpkgs.overlays = self.overlays;
|
|
};
|
|
|
|
local = import "${toString ./.}/${hostName}.nix";
|
|
|
|
# Everything in `./modules/list.nix`.
|
|
flakeModules =
|
|
attrValues (removeAttrs self.nixosModules [ "profiles" ]);
|
|
|
|
in flakeModules ++ [ core global local home-manager ];
|
|
|
|
};
|
|
|
|
hosts = recImport {
|
|
dir = ./.;
|
|
_import = config;
|
|
};
|
|
in hosts
|