Add Lix-based NixOS installer ISO and interactive script
This commit is contained in:
commit
97c865d91b
7 changed files with 720 additions and 0 deletions
29
flake.nix
Normal file
29
flake.nix
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
{
|
||||
description = "NixOS installation ISO with Lix";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.11";
|
||||
lix-module.url = "git+https://git.lix.systems/lix-project/nixos-module";
|
||||
lix-module.inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
outputs = 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)
|
||||
) 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;
|
||||
|
||||
packages.x86_64-linux.install-iso =
|
||||
self.nixosConfigurations.installer.config.system.build.isoImage;
|
||||
packages.x86_64-linux.default = self.packages.x86_64-linux.install-iso;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue