Working config

This commit is contained in:
2021-09-04 14:17:51 -07:00
parent c71b07a903
commit e52b959613
55 changed files with 58 additions and 1915 deletions
+1 -2
View File
@@ -3,8 +3,7 @@
with lib; {
imports = [
../config
../packages
./instance.nix
./fudo/acme-for-hostname.nix
+9
View File
@@ -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
View File
@@ -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