Working config
This commit is contained in:
+1
-2
@@ -3,8 +3,7 @@
|
||||
with lib; {
|
||||
imports = [
|
||||
../config
|
||||
../packages
|
||||
|
||||
|
||||
./instance.nix
|
||||
|
||||
./fudo/acme-for-hostname.nix
|
||||
|
||||
@@ -87,6 +87,15 @@ in {
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
||||
networking.hosts = let
|
||||
other-hosts = filterAttrs
|
||||
(hostname: hostOpts: hostname != config.instance.hostname)
|
||||
cfg.network-definition.hosts;
|
||||
in mapAttrs'
|
||||
(hostname: hostOpts: nameValuePair hostOpts.ipv4-address ["${hostname}.${cfg.domain}" hostname])
|
||||
other-hosts;
|
||||
|
||||
services.dhcpd4 = let network = cfg.network-definition;
|
||||
in {
|
||||
enable = true;
|
||||
|
||||
+7
-6
@@ -77,8 +77,8 @@ let
|
||||
default = [ ];
|
||||
};
|
||||
|
||||
home-manager-config = mkOption {
|
||||
type = nullOr attrs;
|
||||
home-manager-generator = mkOption {
|
||||
type = nullOr (functionTo attrs);
|
||||
description = "Home Manager configuration for the given user.";
|
||||
default = null;
|
||||
};
|
||||
@@ -237,13 +237,14 @@ in {
|
||||
|
||||
home-manager = {
|
||||
useGlobalPkgs = true;
|
||||
|
||||
|
||||
users = let
|
||||
home-manager-users =
|
||||
filterAttrs (username: userOpts: userOpts.home-manager-config != null)
|
||||
filterAttrs (username: userOpts: userOpts.home-manager-generator != null)
|
||||
sys.local-users;
|
||||
in mapAttrs (username: userOpts: userOpts.home-manager-config)
|
||||
home-manager-users;
|
||||
in mapAttrs (username: userOpts: userOpts.home-manager-generator {
|
||||
enable-gui = host-cfg.enable-gui;
|
||||
}) home-manager-users;
|
||||
};
|
||||
|
||||
# Group home directories have to exist, otherwise users can't log in
|
||||
|
||||
Reference in New Issue
Block a user