forked from pub-solar/os
ref: userSelf -> userFlakeSelf
This commit is contained in:
parent
cd7fb4f54c
commit
6cccb55263
|
@ -1,4 +1,4 @@
|
||||||
{ lib, nixpkgs, userSelf, userFlakeInputs, ... }:
|
{ lib, nixpkgs, userFlakeSelf, userFlakeInputs, ... }:
|
||||||
|
|
||||||
{ modules, ... } @ args:
|
{ modules, ... } @ args:
|
||||||
lib.nixosSystem (args // {
|
lib.nixosSystem (args // {
|
||||||
|
@ -27,11 +27,11 @@ lib.nixosSystem (args // {
|
||||||
|
|
||||||
isoImage.isoBaseName = "nixos-" + config.networking.hostName;
|
isoImage.isoBaseName = "nixos-" + config.networking.hostName;
|
||||||
isoImage.contents = [{
|
isoImage.contents = [{
|
||||||
source = userSelf;
|
source = userFlakeSelf;
|
||||||
target = "/devos/";
|
target = "/devos/";
|
||||||
}];
|
}];
|
||||||
isoImage.storeContents = [
|
isoImage.storeContents = [
|
||||||
userSelf.devShell.${config.nixpkgs.system}
|
userFlakeSelf.devShell.${config.nixpkgs.system}
|
||||||
# include also closures that are "switched off" by the
|
# include also closures that are "switched off" by the
|
||||||
# above profile filter on the local config attribute
|
# above profile filter on the local config attribute
|
||||||
fullHostConfig.system.build.toplevel
|
fullHostConfig.system.build.toplevel
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ lib, userSelf, ... }:
|
{ lib, userFlakeSelf, ... }:
|
||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
let
|
let
|
||||||
|
@ -6,7 +6,7 @@ let
|
||||||
mapAttrs' (user: v: nameValuePair "${user}@${host}" v.home)
|
mapAttrs' (user: v: nameValuePair "${user}@${host}" v.home)
|
||||||
config.config.system.build.homes;
|
config.config.system.build.homes;
|
||||||
|
|
||||||
hmConfigs = mapAttrs mkHomes userSelf.nixosConfigurations;
|
hmConfigs = mapAttrs mkHomes userFlakeSelf.nixosConfigurations;
|
||||||
|
|
||||||
in
|
in
|
||||||
foldl recursiveUpdate { } (attrValues hmConfigs)
|
foldl recursiveUpdate { } (attrValues hmConfigs)
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ lib, nixpkgs, userFlakeInputs, userSelf, ... }:
|
{ lib, nixpkgs, userFlakeInputs, userFlakeSelf, ... }:
|
||||||
|
|
||||||
{ dir, extern, suites, overrides, multiPkgs, ... }:
|
{ dir, extern, suites, overrides, multiPkgs, ... }:
|
||||||
let
|
let
|
||||||
|
@ -29,7 +29,7 @@ let
|
||||||
useUserPackages = true;
|
useUserPackages = true;
|
||||||
|
|
||||||
extraSpecialArgs = extern.userSpecialArgs // { suites = suites.user; };
|
extraSpecialArgs = extern.userSpecialArgs // { suites = suites.user; };
|
||||||
sharedModules = extern.userModules ++ (builtins.attrValues userSelf.homeModules);
|
sharedModules = extern.userModules ++ (builtins.attrValues userFlakeSelf.homeModules);
|
||||||
};
|
};
|
||||||
users.mutableUsers = lib.mkDefault false;
|
users.mutableUsers = lib.mkDefault false;
|
||||||
|
|
||||||
|
@ -37,14 +37,14 @@ let
|
||||||
|
|
||||||
nix.nixPath = [
|
nix.nixPath = [
|
||||||
"nixpkgs=${nixpkgs}"
|
"nixpkgs=${nixpkgs}"
|
||||||
"nixos-config=${userSelf}/compat/nixos"
|
"nixos-config=${userFlakeSelf}/compat/nixos"
|
||||||
"home-manager=${userFlakeInputs.home}"
|
"home-manager=${userFlakeInputs.home}"
|
||||||
];
|
];
|
||||||
|
|
||||||
nixpkgs.pkgs = lib.mkDefault multiPkgs.${config.nixpkgs.system};
|
nixpkgs.pkgs = lib.mkDefault multiPkgs.${config.nixpkgs.system};
|
||||||
|
|
||||||
nix.registry = {
|
nix.registry = {
|
||||||
devos.flake = userSelf;
|
devos.flake = userFlakeSelf;
|
||||||
nixos.flake = nixpkgs;
|
nixos.flake = nixpkgs;
|
||||||
override.flake = userFlakeInputs.override;
|
override.flake = userFlakeInputs.override;
|
||||||
};
|
};
|
||||||
|
@ -57,11 +57,11 @@ let
|
||||||
}
|
}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
system.configurationRevision = lib.mkIf (userSelf ? rev) userSelf.rev;
|
system.configurationRevision = lib.mkIf (userFlakeSelf ? rev) userFlakeSelf.rev;
|
||||||
};
|
};
|
||||||
|
|
||||||
# Everything in `./modules/list.nix`.
|
# Everything in `./modules/list.nix`.
|
||||||
flakeModules = { imports = builtins.attrValues userSelf.nixosModules ++ extern.modules; };
|
flakeModules = { imports = builtins.attrValues userFlakeSelf.nixosModules ++ extern.modules; };
|
||||||
|
|
||||||
cachix = ../../cachix.nix;
|
cachix = ../../cachix.nix;
|
||||||
};
|
};
|
||||||
|
@ -78,7 +78,7 @@ let
|
||||||
networking = { inherit hostName; };
|
networking = { inherit hostName; };
|
||||||
|
|
||||||
_module.args = {
|
_module.args = {
|
||||||
self = userSelf;
|
self = userFlakeSelf;
|
||||||
hosts = builtins.mapAttrs (_: host: host.config)
|
hosts = builtins.mapAttrs (_: host: host.config)
|
||||||
(removeAttrs hosts [ hostName ]);
|
(removeAttrs hosts [ hostName ]);
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
{ lib, userSelf, ... }:
|
{ lib, userFlakeSelf, ... }:
|
||||||
|
|
||||||
{ pkgs }:
|
{ pkgs }:
|
||||||
let
|
let
|
||||||
inherit (userSelf) overlay overlays;
|
inherit (userFlakeSelf) overlay overlays;
|
||||||
packagesNames = lib.attrNames (overlay null null)
|
packagesNames = lib.attrNames (overlay null null)
|
||||||
++ lib.attrNames (lib.concatAttrs
|
++ lib.attrNames (lib.concatAttrs
|
||||||
(lib.attrValues
|
(lib.attrValues
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ lib, nixpkgs, userSelf, utils, userFlakeInputs, ... }:
|
{ lib, nixpkgs, userFlakeSelf, utils, userFlakeInputs, ... }:
|
||||||
|
|
||||||
{ extern, overrides }:
|
{ extern, overrides }:
|
||||||
(utils.lib.eachDefaultSystem
|
(utils.lib.eachDefaultSystem
|
||||||
|
@ -17,10 +17,10 @@
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
(overridesOverlay overridePkgs)
|
(overridesOverlay overridePkgs)
|
||||||
userSelf.overlay
|
userFlakeSelf.overlay
|
||||||
]
|
]
|
||||||
++ extern.overlays
|
++ extern.overlays
|
||||||
++ (lib.attrValues userSelf.overlays);
|
++ (lib.attrValues userFlakeSelf.overlays);
|
||||||
in
|
in
|
||||||
{ pkgs = lib.os.pkgImport nixpkgs overlays system; }
|
{ pkgs = lib.os.pkgImport nixpkgs overlays system; }
|
||||||
)
|
)
|
||||||
|
|
|
@ -6,7 +6,7 @@ in
|
||||||
_: { self, ... } @ args:
|
_: { self, ... } @ args:
|
||||||
let
|
let
|
||||||
|
|
||||||
userSelf = self;
|
userFlakeSelf = self;
|
||||||
|
|
||||||
cfg = (lib.mkFlake.evalOldArgs { inherit args; }).config;
|
cfg = (lib.mkFlake.evalOldArgs { inherit args; }).config;
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@ let
|
||||||
|
|
||||||
outputs = {
|
outputs = {
|
||||||
nixosConfigurations = os.mkHosts {
|
nixosConfigurations = os.mkHosts {
|
||||||
inherit userSelf multiPkgs;
|
inherit userFlakeSelf multiPkgs;
|
||||||
inherit (cfg) extern suites overrides;
|
inherit (cfg) extern suites overrides;
|
||||||
dir = cfg.hosts;
|
dir = cfg.hosts;
|
||||||
};
|
};
|
||||||
|
@ -28,7 +28,7 @@ let
|
||||||
overlay = cfg.packages;
|
overlay = cfg.packages;
|
||||||
inherit (cfg) overlays;
|
inherit (cfg) overlays;
|
||||||
|
|
||||||
deploy.nodes = os.mkNodes deploy userSelf.nixosConfigurations;
|
deploy.nodes = os.mkNodes deploy userFlakeSelf.nixosConfigurations;
|
||||||
};
|
};
|
||||||
|
|
||||||
systemOutputs = utils.lib.eachDefaultSystem (system:
|
systemOutputs = utils.lib.eachDefaultSystem (system:
|
||||||
|
@ -40,9 +40,9 @@ let
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
checks = pkgs-lib.tests.mkChecks {
|
checks = pkgs-lib.tests.mkChecks {
|
||||||
inherit (userSelf.deploy) nodes;
|
inherit (userFlakeSelf.deploy) nodes;
|
||||||
hosts = userSelf.nixosConfigurations;
|
hosts = userFlakeSelf.nixosConfigurations;
|
||||||
homes = userSelf.homeConfigurations;
|
homes = userFlakeSelf.homeConfigurations;
|
||||||
};
|
};
|
||||||
|
|
||||||
inherit legacyPackages;
|
inherit legacyPackages;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ userSelf, lib, nixpkgs, utils, ... }:
|
{ userFlakeSelf, lib, nixpkgs, utils, ... }:
|
||||||
|
|
||||||
{ args }:
|
{ args }:
|
||||||
let
|
let
|
||||||
|
@ -161,8 +161,8 @@ let
|
||||||
};
|
};
|
||||||
profiles = mkOption {
|
profiles = mkOption {
|
||||||
type = path;
|
type = path;
|
||||||
default = "${userSelf}/profiles";
|
default = "${userFlakeSelf}/profiles";
|
||||||
defaultText = "\${userSelf}/profiles";
|
defaultText = "\${userFlakeSelf}/profiles";
|
||||||
apply = x: os.mkProfileAttrs (toString x);
|
apply = x: os.mkProfileAttrs (toString x);
|
||||||
description = "path to profiles folder that can be collected into suites";
|
description = "path to profiles folder that can be collected into suites";
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ userSelf, lib, inputs, ... }:
|
{ userFlakeSelf, lib, inputs, ... }:
|
||||||
|
|
||||||
{ args }:
|
{ args }:
|
||||||
let
|
let
|
||||||
|
@ -22,8 +22,8 @@ let
|
||||||
};
|
};
|
||||||
hosts = mkOption {
|
hosts = mkOption {
|
||||||
type = path;
|
type = path;
|
||||||
default = "${userSelf}/hosts";
|
default = "${userFlakeSelf}/hosts";
|
||||||
defaultText = "\${userSelf}/hosts";
|
defaultText = "\${userFlakeSelf}/hosts";
|
||||||
apply = toString;
|
apply = toString;
|
||||||
description = ''
|
description = ''
|
||||||
Path to directory containing host configurations that will be exported
|
Path to directory containing host configurations that will be exported
|
||||||
|
@ -64,15 +64,15 @@ let
|
||||||
};
|
};
|
||||||
profiles = mkOption {
|
profiles = mkOption {
|
||||||
type = path;
|
type = path;
|
||||||
default = "${userSelf}/profiles";
|
default = "${userFlakeSelf}/profiles";
|
||||||
defaultText = "\${userSelf}/profiles";
|
defaultText = "\${userFlakeSelf}/profiles";
|
||||||
apply = x: os.mkProfileAttrs (toString x);
|
apply = x: os.mkProfileAttrs (toString x);
|
||||||
description = "path to profiles folder that can be collected into suites";
|
description = "path to profiles folder that can be collected into suites";
|
||||||
};
|
};
|
||||||
userProfiles = mkOption {
|
userProfiles = mkOption {
|
||||||
type = path;
|
type = path;
|
||||||
default = "${userSelf}/users/profiles";
|
default = "${userFlakeSelf}/users/profiles";
|
||||||
defaultText = "\${userSelf}/users/profiles";
|
defaultText = "\${userFlakeSelf}/users/profiles";
|
||||||
apply = x: os.mkProfileAttrs (toString x);
|
apply = x: os.mkProfileAttrs (toString x);
|
||||||
description = "path to user profiles folder that can be collected into userSuites";
|
description = "path to user profiles folder that can be collected into userSuites";
|
||||||
};
|
};
|
||||||
|
@ -97,8 +97,8 @@ let
|
||||||
};
|
};
|
||||||
users = mkOption {
|
users = mkOption {
|
||||||
type = path;
|
type = path;
|
||||||
default = "${userSelf}/users";
|
default = "${userFlakeSelf}/users";
|
||||||
defaultText = "\${userSelf}/users";
|
defaultText = "\${userFlakeSelf}/users";
|
||||||
apply = x: os.mkProfileAttrs (toString x);
|
apply = x: os.mkProfileAttrs (toString x);
|
||||||
description = ''
|
description = ''
|
||||||
path to folder containing profiles that define system users
|
path to folder containing profiles that define system users
|
||||||
|
@ -121,9 +121,9 @@ let
|
||||||
{ modules = []; overlays = []; specialArgs = []; userModules = []; userSpecialArgs = []; }
|
{ modules = []; overlays = []; specialArgs = []; userModules = []; userSpecialArgs = []; }
|
||||||
'';
|
'';
|
||||||
# So unneeded extern attributes can safely be deleted
|
# So unneeded extern attributes can safely be deleted
|
||||||
apply = x: defaults // (x { inputs = inputs // userSelf.inputs; });
|
apply = x: defaults // (x { inputs = inputs // userFlakeSelf.inputs; });
|
||||||
description = ''
|
description = ''
|
||||||
Function with argument 'inputs' that contains all devos and ''${userSelf}'s inputs.
|
Function with argument 'inputs' that contains all devos and ''${userFlakeSelf}'s inputs.
|
||||||
The function should return an attribute set with modules, overlays, and
|
The function should return an attribute set with modules, overlays, and
|
||||||
specialArgs to be included across nixos and home manager configurations.
|
specialArgs to be included across nixos and home manager configurations.
|
||||||
Only attributes that are used should be returned.
|
Only attributes that are used should be returned.
|
||||||
|
@ -131,8 +131,8 @@ let
|
||||||
};
|
};
|
||||||
overlays = mkOption {
|
overlays = mkOption {
|
||||||
type = path;
|
type = path;
|
||||||
default = "${userSelf}/overlays";
|
default = "${userFlakeSelf}/overlays";
|
||||||
defaultText = "\${userSelf}/overlays";
|
defaultText = "\${userFlakeSelf}/overlays";
|
||||||
apply = x: lib.pathsToImportedAttrs (lib.pathsIn (toString x));
|
apply = x: lib.pathsToImportedAttrs (lib.pathsIn (toString x));
|
||||||
description = ''
|
description = ''
|
||||||
path to folder containing overlays which will be applied to pkgs and exported in
|
path to folder containing overlays which will be applied to pkgs and exported in
|
||||||
|
|
Loading…
Reference in a new issue