From 512232b72a5eab6a63a7e23ff1371b2821d5b065 Mon Sep 17 00:00:00 2001 From: tv Date: Tue, 4 Jul 2023 11:33:54 +0200 Subject: permown: fix flakify fuckups --- krebs/3modules/permown.nix | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/krebs/3modules/permown.nix b/krebs/3modules/permown.nix index 3ebbc44fe..ae8702978 100644 --- a/krebs/3modules/permown.nix +++ b/krebs/3modules/permown.nix @@ -1,4 +1,6 @@ -{ config, pkgs, lib, ... }: +{ config, pkgs, lib, ... }: let + slib = import ../../lib/pure.nix { inherit lib; }; +in with lib; { options.krebs.permown = mkOption { @@ -16,7 +18,7 @@ with lib; { group = mkOption { apply = x: if x == null then "" else x; default = null; - type = types.nullOr types.groupname; + type = types.nullOr slib.types.groupname; }; keepGoing = mkOption { default = false; @@ -28,15 +30,15 @@ with lib; { ''; }; owner = mkOption { - type = types.username; + type = slib.types.username; }; path = mkOption { default = config._module.args.name; - type = types.absolute-pathname; + type = slib.types.absolute-pathname; }; umask = mkOption { default = "0027"; - type = types.file-mode; + type = slib.types.file-mode; }; }; })); @@ -48,11 +50,11 @@ with lib; { system.activationScripts.permown = let mkdir = plan: /* sh */ '' - ${pkgs.coreutils}/bin/mkdir -p ${shell.escape plan.path} + ${pkgs.coreutils}/bin/mkdir -p ${slib.shell.escape plan.path} ''; in concatMapStrings mkdir plans; - systemd.services = genAttrs' plans (plan: let + systemd.services = slib.genAttrs' plans (plan: let continuable = command: if plan.keepGoing then /* sh */ "{ ${command}; } || :" -- cgit v1.2.3 From 69c038e3904bba43cbac9615a272309284d02699 Mon Sep 17 00:00:00 2001 From: tv Date: Tue, 4 Jul 2023 11:45:27 +0200 Subject: Revert "tv alacritty: automatically select hidpi variant" This reverts commit 3fc184a22607952db257c9c76a6f8f1d7afd16d6. --- tv/2configs/default.nix | 7 ------- 1 file changed, 7 deletions(-) diff --git a/tv/2configs/default.nix b/tv/2configs/default.nix index 53b11c620..a8d840c15 100644 --- a/tv/2configs/default.nix +++ b/tv/2configs/default.nix @@ -130,11 +130,4 @@ with import ./lib; ]; } ]; - - nixpkgs.overlays = - mkAfter (optional config.hardware.video.hidpi.enable (self: super: { - alacritty-tv = super.alacritty-tv.override { - variant = "hidpi"; - }; - })); } -- cgit v1.2.3 From 6ad13152c49b86de002b519e9c8bb95085d540f1 Mon Sep 17 00:00:00 2001 From: tv Date: Tue, 4 Jul 2023 12:16:34 +0200 Subject: tv wu: RIP --- kartei/tv/hosts/wu.nix | 25 --------------- kartei/tv/wiregrill/wu.pub | 1 - tv/1systems/wu/config.nix | 42 ------------------------- tv/1systems/wu/lib | 1 - tv/2configs/backup.nix | 29 ----------------- tv/2configs/exim-smarthost.nix | 1 - tv/2configs/hw/w110er.nix | 70 ------------------------------------------ tv/2configs/nets/hkw.nix | 13 -------- 8 files changed, 182 deletions(-) delete mode 100644 kartei/tv/hosts/wu.nix delete mode 100644 kartei/tv/wiregrill/wu.pub delete mode 100644 tv/1systems/wu/config.nix delete mode 120000 tv/1systems/wu/lib delete mode 100644 tv/2configs/hw/w110er.nix diff --git a/kartei/tv/hosts/wu.nix b/kartei/tv/hosts/wu.nix deleted file mode 100644 index d03886f14..000000000 --- a/kartei/tv/hosts/wu.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ - ci = true; - nets = { - retiolum = { - ip4.addr = "10.243.13.37"; - aliases = [ - "wu.r" - "cgit.wu.r" - ]; - tinc.pubkey = '' - -----BEGIN RSA PUBLIC KEY----- - MIIBCgKCAQEArDvU0cuBsVqTjCX2TlWL4XHSy4qSjUhjrDvUPZSKTVN7x6OENCUn - M27g9H7j4/Jw/8IHoJLiKnXHavOoc9UJM+P9Fla/4TTVADr69UDSnLgH+wGiHcEg - GxPkb2jt0Z8zcpD6Fusj1ATs3sssaLHTHvg1D0LylEWA3cI4WPP13v23PkyUENQT - KpSWfR+obqDl38Q7LuFi6dH9ruyvqK+4syddrBwjPXrcNxcGL9QbDn7+foRNiWw4 - 4CE5z25oGG2iWMShI7fe3ji/fMUAl7DSOOrHVVG9eMtpzy+uI8veOHrdTax4oKik - AFGCrMIov3F0GIeu3nDlrTIZPZDTodbFKQIDAQAB - -----END RSA PUBLIC KEY----- - ''; - tinc.pubkey_ed25519 = "urVOEGxTkBedkpszPH0XRCRMk+Fc2U9IneYMFDqGoIB"; - }; - }; - secure = true; - ssh.pubkey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIcJvu8JDVzObLUtlAQg9qVugthKSfitwCljuJ5liyHa"; -} diff --git a/kartei/tv/wiregrill/wu.pub b/kartei/tv/wiregrill/wu.pub deleted file mode 100644 index 0d25d9de9..000000000 --- a/kartei/tv/wiregrill/wu.pub +++ /dev/null @@ -1 +0,0 @@ -68bL6l3/sjbirva80tm0Dw6/PJu1S95nJC58gWCh42E= diff --git a/tv/1systems/wu/config.nix b/tv/1systems/wu/config.nix deleted file mode 100644 index 4d45f6d40..000000000 --- a/tv/1systems/wu/config.nix +++ /dev/null @@ -1,42 +0,0 @@ -with import ../lib; -{ config, pkgs, ... }: { - krebs.build.host = config.krebs.hosts.wu; - - imports = [ - - - - - - - ]; - - boot.initrd.luks.devices.wuca.device = "/dev/sda2"; - - fileSystems = { - "/" = { - device = "/dev/mapper/wuvga-root"; - fsType = "ext4"; - }; - "/bku" = { - device = "/dev/mapper/wuvga-bku"; - fsType = "ext4"; - }; - "/home" = { - device = "/dev/mapper/wuvga-home"; - fsType = "ext4"; - }; - "/boot" = { - device = "/dev/sda1"; - }; - }; - - networking.wireless.enable = true; - networking.wireless.interfaces = [ - "wlp3s0" - ]; - networking.interfaces.enp4s0f2.useDHCP = true; - networking.interfaces.wlp3s0.useDHCP = true; - networking.useDHCP = false; - -} diff --git a/tv/1systems/wu/lib b/tv/1systems/wu/lib deleted file mode 120000 index dc598c56d..000000000 --- a/tv/1systems/wu/lib +++ /dev/null @@ -1 +0,0 @@ -../lib \ No newline at end of file diff --git a/tv/2configs/backup.nix b/tv/2configs/backup.nix index c8ab73b50..56c04c4e3 100644 --- a/tv/2configs/backup.nix +++ b/tv/2configs/backup.nix @@ -9,12 +9,6 @@ with import ./lib; yearly = { format = "%Y"; }; }; }) { - bu-home-wu = { - method = "push"; - src = { host = config.krebs.hosts.bu; path = "/home"; }; - dst = { host = config.krebs.hosts.wu; path = "/bku/bu-home"; }; - startAt = "05:15"; - }; bu-home-xu = { method = "push"; src = { host = config.krebs.hosts.bu; path = "/home"; }; @@ -45,18 +39,6 @@ with import ./lib; dst = { host = config.krebs.hosts.nomic; path = "/fs/ponyhof/bku/querel-home"; }; startAt = "22:00"; }; - wu-home-xu = { - method = "push"; - src = { host = config.krebs.hosts.wu; path = "/home"; }; - dst = { host = config.krebs.hosts.xu; path = "/bku/wu-home"; }; - startAt = "05:00"; - }; - wu-home-zu = { - method = "push"; - src = { host = config.krebs.hosts.wu; path = "/home"; }; - dst = { host = config.krebs.hosts.zu; path = "/bku/wu-home"; }; - startAt = "05:20"; - }; xu-home-bu = { method = "push"; src = { host = config.krebs.hosts.xu; path = "/home"; }; @@ -69,12 +51,6 @@ with import ./lib; dst = { host = config.krebs.hosts.nomic; path = "/fs/cis3hG/bku/xu-home"; }; startAt = "05:20"; }; - xu-home-wu = { - method = "push"; - src = { host = config.krebs.hosts.xu; path = "/home"; }; - dst = { host = config.krebs.hosts.wu; path = "/bku/xu-home"; }; - startAt = "06:00"; - }; xu-home-zu = { method = "push"; src = { host = config.krebs.hosts.xu; path = "/home"; }; @@ -129,10 +105,5 @@ with import ./lib; src = { host = config.krebs.hosts.xu; path = "/tmp/xu-bku-test-data"; }; dst = { host = config.krebs.hosts.xu; path = "/bku/xu-test-pull"; }; }; - xu-test-push-wu = { - method = "push"; - src = { host = config.krebs.hosts.xu; path = "/tmp/xu-bku-test-data"; }; - dst = { host = config.krebs.hosts.wu; path = "/bku/xu-test-push"; }; - }; }; } diff --git a/tv/2configs/exim-smarthost.nix b/tv/2configs/exim-smarthost.nix index e905536df..6750d9a85 100644 --- a/tv/2configs/exim-smarthost.nix +++ b/tv/2configs/exim-smarthost.nix @@ -15,7 +15,6 @@ with import ./lib; ]; relay_from_hosts = concatMap (host: host.nets.retiolum.addrs) [ config.krebs.hosts.nomic - config.krebs.hosts.wu config.krebs.hosts.xu ]; internet-aliases = with config.krebs.users; [ diff --git a/tv/2configs/hw/w110er.nix b/tv/2configs/hw/w110er.nix deleted file mode 100644 index bf749a98a..000000000 --- a/tv/2configs/hw/w110er.nix +++ /dev/null @@ -1,70 +0,0 @@ -with import ./lib; -{ pkgs, ... }: { - imports = [ - ../smartd.nix - { - # nvidia doesn't build despite - # https://github.com/NixOS/nixpkgs/issues/33284 - #hardware.bumblebee.enable = true; - #hardware.bumblebee.group = "video"; - #hardware.enableRedistributableFirmware= true; - #krebs.nixpkgs.allowUnfreePredicate = pkg: any (eq (packageName pkg)) [ - # "nvidia-x11" - # "nvidia-persistenced" - # "nvidia-settings" - #]; - } - - { - nix.buildCores = 4; - nix.maxJobs = 4; - } - (if lib.versionAtLeast (lib.versions.majorMinor lib.version) "21.11" then { - nix.daemonCPUSchedPolicy = "batch"; - nix.daemonIOSchedPriority = 1; - } else { - nix.daemonIONiceLevel = 1; - nix.daemonNiceLevel = 1; - }) - ]; - - boot.extraModprobeConfig = '' - options kvm_intel nested=1 - ''; - - boot.initrd.availableKernelModules = [ "ahci" ]; - boot.kernelModules = [ "kvm-intel" ]; - - boot.loader.systemd-boot.enable = true; - boot.loader.efi.canTouchEfiVariables = true; - - hardware.enableRedistributableFirmware = true; - - hardware.opengl.driSupport32Bit = true; - hardware.opengl.extraPackages = [ pkgs.vaapiIntel ]; - - networking.wireless.enable = true; - - services.logind.extraConfig = '' - HandleHibernateKey=ignore - HandleLidSwitch=ignore - HandlePowerKey=ignore - HandleSuspendKey=ignore - ''; - - system.activationScripts.powertopTunables = '' - echo 1 > /sys/module/snd_hda_intel/parameters/power_save - echo 1500 > /proc/sys/vm/dirty_writeback_centisecs - (cd /sys/bus/pci/devices - for i in *; do - echo auto > $i/power/control # defaults to 'on' - done) - ''; - - services.xserver = { - videoDriver = "intel"; - }; - - tv.hw.screens.primary.width = 1366; - tv.hw.screens.primary.height = 768; -} diff --git a/tv/2configs/nets/hkw.nix b/tv/2configs/nets/hkw.nix index c3acde1fb..51a8a7366 100644 --- a/tv/2configs/nets/hkw.nix +++ b/tv/2configs/nets/hkw.nix @@ -38,19 +38,6 @@ ]; }; }; - wu = { - nets.hkw = { - ip4 = { - addr = "10.23.1.37"; - prefix = "10.23.1.0/24"; - }; - aliases = [ - "wu.hkw" - "cache.wu.hkw" - ]; - ssh.port = 11423; - }; - }; xu = { nets.hkw = { ip4 = { -- cgit v1.2.3 From 537fa18f762e28f2f475f9e00dedf71914a0c8f6 Mon Sep 17 00:00:00 2001 From: tv Date: Tue, 4 Jul 2023 13:00:04 +0200 Subject: treewide: replaceChars -> replaceStrings --- krebs/2configs/shack/prometheus/unifi.nix | 2 +- krebs/3modules/acl.nix | 2 +- krebs/5pkgs/simple/netcup/default.nix | 2 +- lib/pure.nix | 4 ++-- makefu/3modules/snapraid.nix | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/krebs/2configs/shack/prometheus/unifi.nix b/krebs/2configs/shack/prometheus/unifi.nix index 401ecb024..34e47add9 100644 --- a/krebs/2configs/shack/prometheus/unifi.nix +++ b/krebs/2configs/shack/prometheus/unifi.nix @@ -5,6 +5,6 @@ unifiAddress = "https://unifi.shack:8443/"; unifiInsecure = true; unifiUsername = "prometheus"; # needed manual login after setup to confirm the password - unifiPassword = lib.replaceChars ["\n"] [""] (builtins.readFile ); + unifiPassword = lib.replaceStrings ["\n"] [""] (builtins.readFile ); }; } diff --git a/krebs/3modules/acl.nix b/krebs/3modules/acl.nix index d23706499..05f7e824b 100644 --- a/krebs/3modules/acl.nix +++ b/krebs/3modules/acl.nix @@ -33,7 +33,7 @@ in { default = {}; }; config = { - systemd.services = lib.mapAttrs' (path: rules: lib.nameValuePair "acl-${lib.replaceChars ["/"] ["_"] path}" { + systemd.services = lib.mapAttrs' (path: rules: lib.nameValuePair "acl-${lib.replaceStrings ["/"] ["_"] path}" { wantedBy = [ "multi-user.target" ]; path = [ pkgs.acl diff --git a/krebs/5pkgs/simple/netcup/default.nix b/krebs/5pkgs/simple/netcup/default.nix index 408672eff..750e9cfa9 100644 --- a/krebs/5pkgs/simple/netcup/default.nix +++ b/krebs/5pkgs/simple/netcup/default.nix @@ -3,7 +3,7 @@ with stockholm.lib; let readJSON = path: fromJSON (readFile path); - sed.escape = replaceChars ["/"] ["\\/"]; # close enough + sed.escape = replaceStrings ["/"] ["\\/"]; # close enough PATH = makeBinPath [ coreutils curl diff --git a/lib/pure.nix b/lib/pure.nix index bb2d586f6..3329db022 100644 --- a/lib/pure.nix +++ b/lib/pure.nix @@ -26,7 +26,7 @@ let krops = import ../submodules/krops/lib; shell = import ./shell.nix { inherit (stockholm) lib; }; systemd = { - encodeName = replaceChars ["/"] ["\\x2f"]; + encodeName = replaceStrings ["/"] ["\\x2f"]; }; types = nixpkgs-lib.types // import ./types.nix { lib = stockholm.lib; }; uri = import ./uri.nix { inherit (stockholm) lib; }; @@ -79,7 +79,7 @@ let string = toJSON x; # close enough }.${type} or reject; - indent = replaceChars ["\n"] ["\n "]; + indent = replaceStrings ["\n"] ["\n "]; stripAttr = converge (filterAttrsRecursive (n: v: v != {} && v != null)); diff --git a/makefu/3modules/snapraid.nix b/makefu/3modules/snapraid.nix index 1a2c08475..25254c142 100644 --- a/makefu/3modules/snapraid.nix +++ b/makefu/3modules/snapraid.nix @@ -4,7 +4,7 @@ with import ; let # returns dirname without / , used as disk name - dname = dir: replaceChars ["/"] [""] (head (reverseList (splitString "/" dir))); + dname = dir: replaceStrings ["/"] [""] (head (reverseList (splitString "/" dir))); snapraid-conf = '' # Disks ${concatMapStringsSep "\n" (d: "disk ${dname d} ${d}") cfg.disks} -- cgit v1.2.3 From f8a78cfad4e9cb9307a061fb5325092e45a7670a Mon Sep 17 00:00:00 2001 From: tv Date: Tue, 4 Jul 2023 13:04:02 +0200 Subject: tv xserver: drop synaptics config --- tv/2configs/xserver/default.nix | 6 ------ 1 file changed, 6 deletions(-) diff --git a/tv/2configs/xserver/default.nix b/tv/2configs/xserver/default.nix index f10ccb10e..9b9d86f58 100644 --- a/tv/2configs/xserver/default.nix +++ b/tv/2configs/xserver/default.nix @@ -52,12 +52,6 @@ in { enable = true; display = mkForce 11; tty = mkForce 11; - - synaptics = { - enable = true; - twoFingerScroll = true; - accelFactor = "0.035"; - }; }; systemd.services.display-manager.enable = false; -- cgit v1.2.3 From 6133a77cf2aaa1e55186fc8a9b7a046e5d05ed9e Mon Sep 17 00:00:00 2001 From: tv Date: Tue, 4 Jul 2023 13:33:33 +0200 Subject: puyak: fix flakify fuckups --- krebs/1systems/puyak/config.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/krebs/1systems/puyak/config.nix b/krebs/1systems/puyak/config.nix index 931ebe70b..a4f22d39c 100644 --- a/krebs/1systems/puyak/config.nix +++ b/krebs/1systems/puyak/config.nix @@ -113,6 +113,8 @@ ]; krebs.build.host = config.krebs.hosts.puyak; + krebs.hosts.puyak.ssh.privkey.path = ; + sound.enable = false; boot = { loader.systemd-boot.enable = true; -- cgit v1.2.3 From 2403aa019b5dec5f762a9a692db509929e86b7dd Mon Sep 17 00:00:00 2001 From: tv Date: Tue, 4 Jul 2023 13:33:52 +0200 Subject: wolf: fix flakify fuckups --- krebs/1systems/wolf/config.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/krebs/1systems/wolf/config.nix b/krebs/1systems/wolf/config.nix index 12ce4db3e..2415bd32f 100644 --- a/krebs/1systems/wolf/config.nix +++ b/krebs/1systems/wolf/config.nix @@ -51,6 +51,7 @@ in # uninteresting stuff ##################### krebs.build.host = config.krebs.hosts.wolf; + krebs.hosts.wolf.ssh.privkey.path = ; boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "ehci_pci" "virtio_pci" "virtio_blk" -- cgit v1.2.3 From 2bdd7ad3349b2012d8c9659286c5f34843271768 Mon Sep 17 00:00:00 2001 From: tv Date: Tue, 4 Jul 2023 14:02:48 +0200 Subject: email-header: 0.4.1-tv2 -> 0.4.2-tv1 --- krebs/5pkgs/haskell/email-header.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/krebs/5pkgs/haskell/email-header.nix b/krebs/5pkgs/haskell/email-header.nix index e1e9d423f..f8ce03f39 100644 --- a/krebs/5pkgs/haskell/email-header.nix +++ b/krebs/5pkgs/haskell/email-header.nix @@ -18,9 +18,9 @@ let sha256 = "11xjivpj495r2ss9aqljnpzzycb57cm4sr7yzmf939rzwsd3ib0x"; }; }.${versions.majorMinor version} or { - version = "0.4.1-tv2"; + version = "0.4.2-tv1"; rev = "refs/tags/v${cfg.version}"; - sha256 = "1yg4b5318lpviwgjs4kdcqg8cwfnxxfcdckcjq12r2nnj2k4ms2d"; + sha256 = "JZfqvkbb/1t0q1iWmZHmmCN2Vr+QKTiq4LVncrG+xMU="; }; in mkDerivation { -- cgit v1.2.3 From f5cb4940f997d521045445642aa4825d7b0ab5f3 Mon Sep 17 00:00:00 2001 From: tv Date: Tue, 4 Jul 2023 16:10:23 +0200 Subject: iana-etc: fix flakify fuckups --- krebs/3modules/iana-etc.nix | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/krebs/3modules/iana-etc.nix b/krebs/3modules/iana-etc.nix index 3195f71d9..dabe2f8aa 100644 --- a/krebs/3modules/iana-etc.nix +++ b/krebs/3modules/iana-etc.nix @@ -1,5 +1,6 @@ -{ config, pkgs, lib, ... }: -with lib; { +{ config, lib, pkgs, ... }: let + slib = import ../../lib/pure.nix { inherit lib; }; +in with lib; { options.krebs.iana-etc.services = mkOption { default = {}; @@ -7,7 +8,7 @@ with lib; { options = { port = mkOption { default = config._module.args.name; - type = types.addCheck types.str (test "[1-9][0-9]*"); + type = types.addCheck types.str (slib.test "[1-9][0-9]*"); }; } // genAttrs ["tcp" "udp"] (protocol: mkOption { default = null; @@ -30,7 +31,7 @@ with lib; { (proto: let line = "${entry.${proto}.name} ${entry.port}/${proto}"; in /* sh */ '' - echo ${shell.escape line} + echo ${slib.shell.escape line} '') (filter (proto: entry.${proto} != null) ["tcp" "udp"])} '') (attrValues config.krebs.iana-etc.services)} -- cgit v1.2.3 From 143ba5eed02b5441fdd91b7d00dd57bc973fcf27 Mon Sep 17 00:00:00 2001 From: tv Date: Thu, 6 Jul 2023 20:26:40 +0200 Subject: exim-smarthost: add xkey --- krebs/2configs/exim-smarthost.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/krebs/2configs/exim-smarthost.nix b/krebs/2configs/exim-smarthost.nix index c2f6b4dc0..2842e10d4 100644 --- a/krebs/2configs/exim-smarthost.nix +++ b/krebs/2configs/exim-smarthost.nix @@ -42,6 +42,7 @@ in { "makefu@krebsco.de" = makefu; "spam@krebsco.de" = spam-ml; "tv@krebsco.de" = tv; + "xkey@krebsco.de" = { mail = "lennart@cope.cool"; }; # XXX These are no internet aliases # XXX exim-retiolum hosts should be able to relay to retiolum addresses "lass@retiolum" = lass; -- cgit v1.2.3