forked from pub-solar/os
1c79781936
Easily build the iso using `nix build $ISO` thanks to direnv.
51 lines
1,021 B
Nix
51 lines
1,021 B
Nix
{ home, nixpkgs, flake, ... }:
|
|
let
|
|
utils = import ../lib/utils.nix { lib = nixpkgs.lib; };
|
|
|
|
inherit (utils)
|
|
recImport
|
|
;
|
|
|
|
inherit (builtins)
|
|
attrValues
|
|
;
|
|
|
|
|
|
config = self:
|
|
nixpkgs.lib.nixosSystem rec {
|
|
system = "x86_64-linux";
|
|
|
|
modules = let
|
|
core = ../profiles/core.nix;
|
|
|
|
global = {
|
|
networking.hostName = self;
|
|
nix.nixPath = [
|
|
"nixpkgs=${nixpkgs}"
|
|
"nixos-config=/etc/nixos/configuration.nix"
|
|
];
|
|
system.configurationRevision = flake.rev;
|
|
|
|
nixpkgs.overlays = flake.overlays;
|
|
};
|
|
|
|
local = import "${toString ./.}/${self}.nix";
|
|
|
|
iso = nixpkgs.lib.optionalAttrs (self == "niximg")
|
|
(import "${nixpkgs}/nixos/modules/installer/cd-dvd/iso-image.nix");
|
|
in
|
|
attrValues flake.nixosModules ++ [
|
|
core
|
|
global
|
|
local
|
|
home
|
|
iso
|
|
];
|
|
|
|
};
|
|
|
|
hosts =
|
|
recImport { dir = ./.; _import = config; };
|
|
in
|
|
hosts
|