diff --git a/home/environments/niri/konawall.nix b/home/environments/niri/konawall.nix index b38a61ad..1d89fb29 100644 --- a/home/environments/niri/konawall.nix +++ b/home/environments/niri/konawall.nix @@ -8,6 +8,7 @@ interval = 30 * 60; rotate = true; tags = [ + "rating:s" "score:>=100" "width:>=1500" ]; diff --git a/modules/system/colmena.nix b/modules/system/colmena.nix index 8c2148b0..1fe6139a 100644 --- a/modules/system/colmena.nix +++ b/modules/system/colmena.nix @@ -1,10 +1,11 @@ { + name, config, lib, inputs, ... }: let - inherit (lib.modules) mkOptionDefault mkDefault; + inherit (lib.modules) mkIf mkOptionDefault mkDefault; in { options = let inherit (lib.types) nullOr; @@ -22,5 +23,22 @@ in { "all" ]; }; + deploy = let + nixos = config.built; + in { + sshUser = mkOptionDefault "deploy"; + user = mkOptionDefault "root"; + sshOpts = mkIf (config.type == "NixOS") ( + mkOptionDefault ["-p" "${builtins.toString (builtins.head nixos.config.services.openssh.ports)}"] + ); + autoRollback = mkOptionDefault true; + magicRollback = mkOptionDefault true; + fastConnection = mkOptionDefault false; + hostname = mkOptionDefault "${name}.devices.inskip.me"; + profiles.system = { + user = "root"; + path = inputs.deploy-rs.lib.${config.system}.activate.nixos inputs.self.nixosConfigurations.${name}; + }; + }; }; } diff --git a/nixos/profiles/graphical/distributed.nix b/nixos/profiles/graphical/distributed.nix deleted file mode 100644 index 5c0f86d4..00000000 --- a/nixos/profiles/graphical/distributed.nix +++ /dev/null @@ -1,28 +0,0 @@ -{config, ...}: { - programs.ssh.extraConfig = '' - Host daiyousei-build - HostName daiyousei.inskip.me - User root - IdentityAgent /run/user/${toString config.users.users.kat.uid}/gnupg/S.gpg-agent.ssh - ControlMaster auto - ControlPath ${config.users.users.kat.home}/.ssh/master-%r@%n:%p - ControlPersist 10m - ''; - nix = { - buildMachines = [ - { - hostName = "daiyousei-build"; - system = "aarch64-linux"; - protocol = "ssh-ng"; - maxJobs = 100; - speedFactor = 1; - supportedFeatures = ["benchmark" "big-parallel" "kvm"]; - mandatoryFeatures = []; - } - ]; - distributedBuilds = true; - extraOptions = '' - builders-use-substitutes = true - ''; - }; -} diff --git a/nixos/profiles/performance/kernel.nix b/nixos/profiles/graphical/kernel.nix similarity index 100% rename from nixos/profiles/performance/kernel.nix rename to nixos/profiles/graphical/kernel.nix diff --git a/nixos/profiles/performance/scx.nix b/nixos/profiles/performance/scx.nix deleted file mode 100644 index 9e02f7b3..00000000 --- a/nixos/profiles/performance/scx.nix +++ /dev/null @@ -1,7 +0,0 @@ -{pkgs, ...}: { - services.scx = { - enable = true; - package = pkgs.scx_git.full; - scheduler = "scx_lavd"; - }; -} diff --git a/nixos/profiles/performance/zram.nix b/nixos/profiles/performance/zram.nix deleted file mode 100644 index 3a26c5d7..00000000 --- a/nixos/profiles/performance/zram.nix +++ /dev/null @@ -1,3 +0,0 @@ -_: { - zramSwap.enable = true; -} diff --git a/nixos/profiles/server/fqdn.nix b/nixos/profiles/server/fqdn.nix deleted file mode 100644 index 13c4d819..00000000 --- a/nixos/profiles/server/fqdn.nix +++ /dev/null @@ -1,3 +0,0 @@ -_: { - networking.domain = "inskip.me"; -} diff --git a/nixos/servers/web/nginx.nix b/nixos/servers/web/nginx.nix index 9f997045..289f6be3 100644 --- a/nixos/servers/web/nginx.nix +++ b/nixos/servers/web/nginx.nix @@ -1,4 +1,4 @@ -{config, ...}: { +_: { services.nginx = { enable = true; recommendedTlsSettings = true; @@ -6,32 +6,5 @@ recommendedGzipSettings = true; recommendedProxySettings = true; statusPage = true; - virtualHosts = let - vHost = { - extraConfig = '' - add_header Content-Type text/plain; - return 200 "meep?"; - ''; - /* - locations = { - "/" = { - extraConfig = '' - add_header Content-Type text/plain; - return 200 "meep?"; - ''; - }; - }; - */ - }; - in { - "${config.networking.fqdn}" = - vHost - // { - enableACME = true; - forceSSL = true; - default = true; - }; - "localhost" = vHost; - }; }; } diff --git a/systems/daiyousei.nix b/systems/daiyousei.nix index cb0aa4d8..d1d020c6 100644 --- a/systems/daiyousei.nix +++ b/systems/daiyousei.nix @@ -1,6 +1,5 @@ _: let hostConfig = { - pkgs, tree, modulesPath, ... @@ -29,10 +28,6 @@ _: let web ]); - environment.systemPackages = [ - pkgs.numix-icon-theme - ]; - # TODO: Add config.microvm.stateDir to backup schedule? # TODO: figure out updateFlake? #microvm = { diff --git a/systems/goliath.nix b/systems/goliath.nix index a69c15b1..859a1c73 100644 --- a/systems/goliath.nix +++ b/systems/goliath.nix @@ -50,7 +50,6 @@ _: let quiet-boot wireless gaming - performance dev ]) ++ (with tree.nixos.environments; [ @@ -173,6 +172,30 @@ _: let networking.hostId = "c3b94e85"; + programs.ssh.extraConfig = '' + Host daiyousei-build + HostName 140.238.156.121 + User root + IdentityAgent /run/user/1000/gnupg/S.gpg-agent.ssh + ''; + nix = { + buildMachines = [ + { + hostName = "daiyousei-build"; + system = "aarch64-linux"; + protocol = "ssh-ng"; + maxJobs = 100; + speedFactor = 1; + supportedFeatures = ["benchmark" "big-parallel" "kvm"]; + mandatoryFeatures = []; + } + ]; + distributedBuilds = true; + extraOptions = '' + builders-use-substitutes = true + ''; + }; + services.xserver.videoDrivers = ["nvidia"]; hardware.nvidia = { @@ -183,6 +206,14 @@ _: let powerManagement.enable = true; }; + services.scx = { + enable = false; + package = pkgs.scx_git.full; + scheduler = "scx_lavd"; + }; + + zramSwap.enable = true; + boot = { zfs.requestEncryptionCredentials = true; loader = { diff --git a/systems/koishi.nix b/systems/koishi.nix index 7c0f7572..9761d3af 100644 --- a/systems/koishi.nix +++ b/systems/koishi.nix @@ -1,6 +1,7 @@ _: let hostConfig = { tree, + pkgs, lib, config, ... @@ -52,7 +53,6 @@ _: let wireless laptop gaming - performance ]) ++ (with tree.nixos.environments; [ niri @@ -106,6 +106,39 @@ _: let ]; }; + services.scx = { + enable = true; + package = pkgs.scx_git.full; + scheduler = "scx_lavd"; + }; + + zramSwap.enable = true; + + programs.ssh.extraConfig = '' + Host daiyousei-build + HostName 140.238.156.121 + User root + IdentityAgent /run/user/1000/gnupg/S.gpg-agent.ssh + ''; + + nix = { + buildMachines = [ + { + hostName = "daiyousei-build"; + system = "aarch64-linux"; + protocol = "ssh-ng"; + maxJobs = 100; + speedFactor = 1; + supportedFeatures = ["benchmark" "big-parallel" "kvm"]; + mandatoryFeatures = []; + } + ]; + distributedBuilds = true; + extraOptions = '' + builders-use-substitutes = true + ''; + }; + # optional, useful when the builder has a faster internet connection than yours services = { printing.enable = true;