feat: Adds workflow for NixOS build
This commit is contained in:
parent
5d44bc6075
commit
f4efd87aa5
4 changed files with 129 additions and 15 deletions
29
flake.nix
29
flake.nix
|
|
@ -4,26 +4,25 @@
|
|||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11";
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
nixos-generators.url = "github:nix-community/nixos-generators";
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, flake-utils, nixos-generators }:
|
||||
flake-utils.lib.eachDefaultSystem (system: let
|
||||
pkgs = import nixpkgs { inherit system; };
|
||||
in {
|
||||
# Build a bootable ISO image using nixos-generators
|
||||
packages.iso = nixos-generators.nixosGenerate {
|
||||
inherit pkgs;
|
||||
format = "iso";
|
||||
modules = [ ./nixos/kiosk.nix ];
|
||||
};
|
||||
outputs = { self, nixpkgs, flake-utils }:
|
||||
flake-utils.lib.eachDefaultSystem (system: {
|
||||
# Build a bootable ISO image using the built-in NixOS iso module
|
||||
packages.iso = (
|
||||
(nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
./nixos/kiosk.nix
|
||||
(import "${nixpkgs}/nixos/modules/installer/cd-dvd/iso-image.nix")
|
||||
];
|
||||
}).config.system.build.isoImage
|
||||
);
|
||||
|
||||
# Expose the NixOS configuration for direct use if desired
|
||||
nixosConfigurations.kiosk = let
|
||||
lib = nixpkgs.lib;
|
||||
in lib.nixosSystem {
|
||||
nixosConfigurations.kiosk = (nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
modules = [ ./nixos/kiosk.nix ];
|
||||
};
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue