mirror of
https://github.com/Moe1369/nix-fleet.git
synced 2026-04-24 15:59:06 +02:00
helper script
This commit is contained in:
@@ -1,15 +1,12 @@
|
|||||||
{ inputs, ... }: {
|
{ inputs, ... }:
|
||||||
flake.nixosConfigurations.computer-mo = inputs.nixpkgs.lib.nixosSystem {
|
let
|
||||||
system = "x86_64-linux";
|
mkHost = inputs.self.lib.mkHost;
|
||||||
specialArgs = {
|
in
|
||||||
|
{
|
||||||
|
flake.nixosConfigurations = {
|
||||||
|
computer-mo = mkHost {
|
||||||
user = "mo";
|
user = "mo";
|
||||||
pkgs-unstable = import inputs.nixpkgs-unstable {
|
extraModules = [ inputs.self.nixosModules.computer-mo ];
|
||||||
system = "x86_64-linux";
|
|
||||||
config.allowUnfree = true;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
modules = [
|
|
||||||
inputs.self.nixosModules.computer-mo
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|||||||
14
modules/platform/mkhost.nix
Normal file
14
modules/platform/mkhost.nix
Normal 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;
|
||||||
|
};
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user