helper script

This commit is contained in:
2026-03-03 10:34:24 +01:00
parent 1bee6e5b29
commit d99a9cd1f4
2 changed files with 22 additions and 11 deletions

View File

@@ -1,15 +1,12 @@
{ inputs, ... }: {
flake.nixosConfigurations.computer-mo = inputs.nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = {
{ inputs, ... }:
let
mkHost = inputs.self.lib.mkHost;
in
{
flake.nixosConfigurations = {
computer-mo = mkHost {
user = "mo";
pkgs-unstable = import inputs.nixpkgs-unstable {
system = "x86_64-linux";
config.allowUnfree = true;
extraModules = [ inputs.self.nixosModules.computer-mo ];
};
};
modules = [
inputs.self.nixosModules.computer-mo
];
};
}

View File

@@ -0,0 +1,14 @@
{ inputs, ... }: {
flake.lib.mkHost = { system ? "x86_64-linux", user, extraModules ? [] }:
inputs.nixpkgs.lib.nixosSystem {
inherit system;
specialArgs = {
inherit user;
pkgs-unstable = import inputs.nixpkgs-unstable {
inherit system;
config.allowUnfree = true;
};
};
modules = extraModules;
};
}