Merge pull request 'clan-cli: remove unused flag' (#867) from Mic92-fix-cross-system into main
This commit is contained in:
commit
0aa876a06c
@ -4,6 +4,8 @@
|
|||||||
, machines ? { } # allows to include machine-specific modules i.e. machines.${name} = { ... }
|
, machines ? { } # allows to include machine-specific modules i.e. machines.${name} = { ... }
|
||||||
, clanName # Needs to be (globally) unique, as this determines the folder name where the flake gets downloaded to.
|
, clanName # Needs to be (globally) unique, as this determines the folder name where the flake gets downloaded to.
|
||||||
, clanIcon ? null # A path to an icon to be used for the clan, should be the same for all machines
|
, clanIcon ? null # A path to an icon to be used for the clan, should be the same for all machines
|
||||||
|
, pkgsForSystem ? (_system: null) # A map from arch to pkgs, if specified this nixpkgs will be only imported once for each system.
|
||||||
|
# This improves performance, but all nipxkgs.* options will be ignored.
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
machinesDirs = lib.optionalAttrs (builtins.pathExists "${directory}/machines") (builtins.readDir (directory + /machines));
|
machinesDirs = lib.optionalAttrs (builtins.pathExists "${directory}/machines") (builtins.readDir (directory + /machines));
|
||||||
@ -78,13 +80,23 @@ let
|
|||||||
configsPerSystem = builtins.listToAttrs
|
configsPerSystem = builtins.listToAttrs
|
||||||
(builtins.map
|
(builtins.map
|
||||||
(system: lib.nameValuePair system
|
(system: lib.nameValuePair system
|
||||||
(lib.mapAttrs (name: _: nixosConfiguration { inherit name system; }) allMachines))
|
(lib.mapAttrs
|
||||||
|
(name: _: nixosConfiguration {
|
||||||
|
inherit name system;
|
||||||
|
pkgs = pkgsForSystem system;
|
||||||
|
})
|
||||||
|
allMachines))
|
||||||
supportedSystems);
|
supportedSystems);
|
||||||
|
|
||||||
configsFuncPerSystem = builtins.listToAttrs
|
configsFuncPerSystem = builtins.listToAttrs
|
||||||
(builtins.map
|
(builtins.map
|
||||||
(system: lib.nameValuePair system
|
(system: lib.nameValuePair system
|
||||||
(lib.mapAttrs (name: _: args: nixosConfiguration (args // { inherit name system; })) allMachines))
|
(lib.mapAttrs
|
||||||
|
(name: _: args: nixosConfiguration (args // {
|
||||||
|
inherit name system;
|
||||||
|
pkgs = pkgsForSystem system;
|
||||||
|
}))
|
||||||
|
allMachines))
|
||||||
supportedSystems);
|
supportedSystems);
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
@ -201,5 +201,4 @@ def run_command(args: argparse.Namespace) -> None:
|
|||||||
|
|
||||||
def register_run_parser(parser: argparse.ArgumentParser) -> None:
|
def register_run_parser(parser: argparse.ArgumentParser) -> None:
|
||||||
parser.add_argument("machine", type=str, help="machine in the flake to run")
|
parser.add_argument("machine", type=str, help="machine in the flake to run")
|
||||||
parser.add_argument("--flake-url", type=str, help="flake url")
|
|
||||||
parser.set_defaults(func=run_command)
|
parser.set_defaults(func=run_command)
|
||||||
|
Loading…
Reference in New Issue
Block a user