refactor: make nanuqsaurus module-based; keep btrfs install profile
This commit is contained in:
parent
e640b43b2f
commit
bb138278f1
13 changed files with 218 additions and 173 deletions
23
flake.nix
23
flake.nix
|
|
@ -23,25 +23,24 @@
|
|||
inputs@{ self, nixpkgs, ... }:
|
||||
let
|
||||
lib = nixpkgs.lib;
|
||||
hostFiles = builtins.attrNames (builtins.readDir ./hosts);
|
||||
hostNames = lib.filter (
|
||||
name: lib.hasSuffix ".nix" name && !(lib.hasSuffix "-hardware.nix" name) && name != "iso.nix"
|
||||
) hostFiles;
|
||||
mkHost =
|
||||
name:
|
||||
lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
specialArgs = { inherit inputs; };
|
||||
modules = [ (./hosts + "/${name}.nix") ];
|
||||
};
|
||||
in
|
||||
{
|
||||
nixosConfigurations = lib.genAttrs (map (lib.removeSuffix ".nix") hostNames) mkHost // {
|
||||
nixosModules.nanuqsaurus = import ./modules/profile/nanuqsaurus.nix { inherit inputs; };
|
||||
|
||||
nixosConfigurations = {
|
||||
# Live installer ISO (used to bootstrap installs).
|
||||
installer = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
specialArgs = { inherit inputs; };
|
||||
modules = [ ./hosts/iso.nix ];
|
||||
};
|
||||
|
||||
# Fresh-install profile that includes disko partitioning/layout.
|
||||
nanuqsaurus-btrfs = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
specialArgs = { inherit inputs; };
|
||||
modules = [ ./hosts/nanuqsaurus-btrfs.nix ];
|
||||
};
|
||||
};
|
||||
|
||||
packages.x86_64-linux.install-iso = self.nixosConfigurations.installer.config.system.build.isoImage;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue