This commit is contained in:
2023-07-04 16:32:09 +02:00
parent 6dcd96551b
commit 51575e020e
8 changed files with 38 additions and 1 deletions

View File

@@ -4,7 +4,6 @@
services.xserver.displayManager.gdm.enable = true;
services.xserver.displayManager.gdm.wayland = true;
services.xserver.desktopManager.gnome.enable = true;
services.xserver.displayManager.gdm.autoSuspend = !config.services.openssh.enable;
#services.printing.enable = true; # CUPS
programs.xwayland.enable = true;
xdg.portal.enable = true;

View File

@@ -3,4 +3,6 @@
systemd.targets.suspend.enable = false;
systemd.targets.hibernate.enable = false;
systemd.targets.hybrid-sleep.enable = false;
services.xserver.displayManager.gdm.autoSuspend = true;
}

View File

@@ -131,6 +131,11 @@ let
programs.ssh.knownHosts.${proxy.host or "IGNORE"} = lib.mkIf (proxy != null) { publicKey = proxy.publicKey; };
};
remoteMap = lib.listToAttrs (lib.forEach remotes (remote: {
name = remote.hostName;
value = remote;
}));
in {
nix.distributedBuilds = true;
@@ -141,6 +146,15 @@ in {
# useful when the builder has a faster internet connection than i do
nix.settings.builders-use-substitutes = true;
/** /
nix.buildMachines = let cfg = remoteMap.${config.networking.fqdn}; in [{
hostName = "localhost"; # https://github.com/NixOS/nix/pull/4938
systems = [ config.nixpkgs.system "builtin" ] ++ config.boot.binfmt.emulatedSystems;
supportedFeatures = ["builtin" "local" "kvm" "nixos-test" "big-parallel" "benchmark"];
inherit (cfg) maxJobs speedFactor;
}];
/**/
# TIL: this can be a list of configurations and lambdas, not just file paths
imports = builtins.map mkRemoteConfig remotes;

View File

@@ -8,6 +8,7 @@ in
#(lib.mapAttrsToList (domain: vhost: [ domain ] ++ vhost.serverAliases))
(lib.mapAttrsToList (domain: vhost: [ domain ]))
lib.flatten
#(builtins.filter (domain: domain != ""))
(lib.sort (x: y: x<y))
];
@@ -31,6 +32,17 @@ in
services.nginx.enable = true;
networking.firewall.allowedTCPPorts = [ 80 443 ];
/** /
services.nginx.virtualHosts."" = {
default = true;
forceSSL = false;
enableACME = false;
root = pkgs.writeTextDir "index.html" ''
<!DOCTYPE html>
no
'';
};
/**/
# Website tunnel
# TODO: remove