Add system stuff to config.instance
This commit is contained in:
@@ -14,6 +14,7 @@ with lib; {
|
||||
./fudo/distributed-builds.nix
|
||||
./fudo/dns.nix
|
||||
./fudo/domains.nix
|
||||
./fudo-lib.nix
|
||||
./fudo/garbage-collector.nix
|
||||
./fudo/git.nix
|
||||
./fudo/global.nix
|
||||
|
||||
+10
-1
@@ -1,6 +1,15 @@
|
||||
{ lib, ... }:
|
||||
|
||||
{
|
||||
let
|
||||
ip = import ./ip.nix { inherit lib; };
|
||||
dns = import ./dns.nix { inherit lib; };
|
||||
in
|
||||
{
|
||||
lib.overlays = [
|
||||
(final: prev: {
|
||||
fudo = {
|
||||
inherit ip dns;
|
||||
};
|
||||
})
|
||||
];
|
||||
}
|
||||
|
||||
@@ -3,8 +3,6 @@
|
||||
|
||||
with lib;
|
||||
let
|
||||
sys = import ../system.nix { inherit lib config; };
|
||||
|
||||
list-contains = lst: item: any (i: i == item) lst;
|
||||
|
||||
domain-realm = domain: domainOpts: domainOpts.gssapi-realm;
|
||||
@@ -30,5 +28,5 @@ let
|
||||
};
|
||||
|
||||
in {
|
||||
config.home-manager.users = mapAttrs user-config sys.local-users;
|
||||
config.home-manager.users = mapAttrs user-config config.instance.local-users;
|
||||
}
|
||||
|
||||
+2
-2
@@ -265,8 +265,8 @@ in {
|
||||
};
|
||||
};
|
||||
|
||||
home-manager.userGlobalPkgs = true;
|
||||
# home-manager.userGlobalPkgs = {
|
||||
home-manager.useGlobalPkgs = true;
|
||||
# home-manager.useGlobalPkgs = {
|
||||
# useGlobalPkgs = true;
|
||||
|
||||
# users = let
|
||||
|
||||
+40
-7
@@ -28,11 +28,44 @@ let
|
||||
filterAttrs (host: hostOpts: hostOpts.site == local-site) config.fudo.hosts;
|
||||
|
||||
in {
|
||||
local-host = local-host;
|
||||
local-domain = local-domain;
|
||||
local-site = local-site;
|
||||
local-users = local-users;
|
||||
local-admins = local-admins;
|
||||
local-groups = local-groups;
|
||||
local-hosts = local-hosts;
|
||||
options.instance = with types; {
|
||||
local-host = mkOption {
|
||||
type = str;
|
||||
description = "Name of the current local host.";
|
||||
};
|
||||
local-domain = mkOption {
|
||||
type = str;
|
||||
description = "Domain name of the current local host.";
|
||||
};
|
||||
local-site = mkOption {
|
||||
type = str;
|
||||
description = "Site name of the current local host.";
|
||||
};
|
||||
local-users = mkOption {
|
||||
type = listOf str;
|
||||
description = "List of users who should have access to the local host.";
|
||||
};
|
||||
local-admins = mkOption {
|
||||
type = listOf str;
|
||||
description = "List of users who should have admin access to the local host.";
|
||||
};
|
||||
local-groups = mkOption {
|
||||
type = listOf str;
|
||||
description = "List of groups which should be created on the local host.";
|
||||
};
|
||||
local-hosts = mkOption {
|
||||
type = listOf str;
|
||||
description = "List of hosts that should be considered local to the current host.";
|
||||
};
|
||||
};
|
||||
|
||||
config.instance = {
|
||||
local-host = local-host;
|
||||
local-domain = local-domain;
|
||||
local-site = local-site;
|
||||
local-users = local-users;
|
||||
local-admins = local-admins;
|
||||
local-groups = local-groups;
|
||||
local-hosts = local-hosts;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user