1
0
Fork 0

as a flake

This commit is contained in:
Pratham Patel 2024-02-20 18:00:47 +05:30
parent bd18eb69d7
commit c92ac70d95
Signed by: thefossguy
SSH Key Fingerprint: SHA256:/B3wAg7jnMEBQ2JwkebbS/eXVZANDmqRfnd9QkIhxMI
3 changed files with 93 additions and 4 deletions

62
flake.lock Normal file
View File

@ -0,0 +1,62 @@
{
"nodes": {
"nixlib": {
"locked": {
"lastModified": 1708217146,
"narHash": "sha256-nGfEv7k78slqIR5E0zzWSx214d/4/ZPKDkObLJqVLVw=",
"owner": "nix-community",
"repo": "nixpkgs.lib",
"rev": "e623008d8a46517470e6365505f1a3ce171fa46a",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nixpkgs.lib",
"type": "github"
}
},
"nixos-generators": {
"inputs": {
"nixlib": "nixlib",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1708402276,
"narHash": "sha256-7ZTUHdMwy8o6d8ela6H7H3UcS7cyns4D1zuWbmU1dCI=",
"owner": "nix-community",
"repo": "nixos-generators",
"rev": "fa146e1a156c83b009b398213c661d6b46d71421",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nixos-generators",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1708294118,
"narHash": "sha256-evZzmLW7qoHXf76VCepvun1esZDxHfVRFUJtumD7L2M=",
"rev": "e0da498ad77ac8909a980f07eff060862417ccf7",
"revCount": 555878,
"type": "tarball",
"url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.2311.555878%2Brev-e0da498ad77ac8909a980f07eff060862417ccf7/018dc208-7d9b-7b50-b6ba-496aa2db6fca/source.tar.gz"
},
"original": {
"type": "tarball",
"url": "https://flakehub.com/f/NixOS/nixpkgs/%2A.tar.gz"
}
},
"root": {
"inputs": {
"nixos-generators": "nixos-generators",
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

31
flake.nix Normal file
View File

@ -0,0 +1,31 @@
{
inputs = {
nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/*.tar.gz";
nixos-generators.url = "github:nix-community/nixos-generators";
nixos-generators.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = { self, nixpkgs, nixos-generators, ... }:
let
# helpers for producing system-specific outputs
supportedSystems = [
"aarch64-linux"
"riscv64-linux"
"x86_64-linux"
];
forEachSupportedSystem = f: nixpkgs.lib.genAttrs supportedSystems (system: f {
pkgs = import nixpkgs { inherit system; };
inherit system;
});
in
{
packages = forEachSupportedSystem ({ pkgs, system, ... }: {
default = nixos-generators.nixosGenerate {
inherit system;
format = "install-iso";
modules = [ ./iso.nix ];
};
});
};
}

View File

@ -1,10 +1,6 @@
{ lib, pkgs, config, ... }:
{
imports = [
<nixpkgs/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix>
];
boot = {
kernelPackages = pkgs.linuxPackages_latest;
# since the latest kernel package is installed, there will be a ZFS conflict because