From a2a33b2450a9ded40dcff34d25ecd4e9f6f48e86 Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 23 Jun 2020 09:53:21 +0200 Subject: reaktor2: make : optional in pattern --- krebs/2configs/reaktor2.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/krebs/2configs/reaktor2.nix b/krebs/2configs/reaktor2.nix index f4fa2ca7c..72eff176b 100644 --- a/krebs/2configs/reaktor2.nix +++ b/krebs/2configs/reaktor2.nix @@ -14,7 +14,7 @@ let confirmation=no ''; in { - pattern = "^${name}-([a-z]+)(?::\\s*(.*))?"; + pattern = "^${name}-([a-z]+)(?::?\\s*(.*))?"; activate = "match"; command = 1; arguments = [2]; @@ -76,7 +76,7 @@ let }; } { - pattern = ''^(\S+)\s+([+-][1-9][0-9]*)\s+(\S+)$''; + pattern = ''^([\w-]*):?\s+([+-][1-9][0-9]*)\s+(\S+)$''; activate = "match"; arguments = [1 2 3]; command = { -- cgit v1.2.3 From 9c9b1c5748840e398e8c326ec1caa8d68d554978 Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 23 Jun 2020 09:59:09 +0200 Subject: l mors.r: update physical hardware --- lass/1systems/mors/physical.nix | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lass/1systems/mors/physical.nix b/lass/1systems/mors/physical.nix index 6828d70de..2f3a68442 100644 --- a/lass/1systems/mors/physical.nix +++ b/lass/1systems/mors/physical.nix @@ -23,7 +23,7 @@ services.udev.extraRules = '' SUBSYSTEM=="net", DEVPATH=="/devices/pci*/*1c.1/*/net/*", NAME="wl0" - SUBSYSTEM=="net", ATTR{address}=="f0:de:f1:c4:7a:f1", NAME="et0" + SUBSYSTEM=="net", ATTR{address}=="3c:97:0e:4f:42:35", NAME="et0" ''; #TODO activationScripts seem broken, fix them! @@ -37,12 +37,10 @@ echo 'auto' > '/sys/bus/pci/devices/0000:00:1f.2/power/control' echo 'auto' > '/sys/bus/pci/devices/0000:00:1f.0/power/control' echo 'auto' > '/sys/bus/pci/devices/0000:00:1d.0/power/control' - echo 'auto' > '/sys/bus/pci/devices/0000:00:1c.3/power/control' echo 'auto' > '/sys/bus/pci/devices/0000:00:1c.0/power/control' echo 'auto' > '/sys/bus/pci/devices/0000:00:1b.0/power/control' echo 'auto' > '/sys/bus/pci/devices/0000:00:1a.0/power/control' echo 'auto' > '/sys/bus/pci/devices/0000:00:19.0/power/control' echo 'auto' > '/sys/bus/pci/devices/0000:00:1c.1/power/control' - echo 'auto' > '/sys/bus/pci/devices/0000:00:1c.4/power/control' ''; } -- cgit v1.2.3 From a56bbf6dc296d1ead192d6d22617c4fca39991e7 Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 23 Jun 2020 10:19:28 +0200 Subject: l skynet.r: ignore lidswitch --- lass/1systems/skynet/config.nix | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lass/1systems/skynet/config.nix b/lass/1systems/skynet/config.nix index 70787e514..1bc440a98 100644 --- a/lass/1systems/skynet/config.nix +++ b/lass/1systems/skynet/config.nix @@ -36,7 +36,6 @@ with import ; networking.wireless.enable = false; networking.networkmanager.enable = true; - services.logind.extraConfig = '' - HandleLidSwitch=ignore - ''; + services.logind.lidSwitch = "ignore"; + services.logind.lidSwitchDocked = "ignore"; } -- cgit v1.2.3 From 60c94ad26957aeeb5b61394c5bca29c5ecbeab7e Mon Sep 17 00:00:00 2001 From: lassulus Date: Wed, 24 Jun 2020 12:00:27 +0200 Subject: l nfs-dl: add more mount options --- lass/2configs/nfs-dl.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lass/2configs/nfs-dl.nix b/lass/2configs/nfs-dl.nix index ba53321b9..91b026455 100644 --- a/lass/2configs/nfs-dl.nix +++ b/lass/2configs/nfs-dl.nix @@ -3,17 +3,19 @@ device = "prism.w:/export/download"; fsType = "nfs"; options = [ - "timeo=14" + #"timeo=14" "noauto" "noatime" "nodiratime" - "noac" - "nocto" + #"noac" + #"nocto" "x-systemd.automount" "x-systemd.device-timeout=1" "x-systemd.idle-timeout=1min" "x-systemd.requires=retiolum.service" "x-systemd.requires=wpa_supplicant.service" + "user" + "_netdev" ]; }; } -- cgit v1.2.3 From fd3bc82078512cf854001ed1f06113076e0ea9c5 Mon Sep 17 00:00:00 2001 From: lassulus Date: Thu, 25 Jun 2020 21:19:48 +0200 Subject: nixpkgs: e2bb73c -> 6460602 --- krebs/nixpkgs.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/krebs/nixpkgs.json b/krebs/nixpkgs.json index cee3c5ec8..875dbfa1c 100644 --- a/krebs/nixpkgs.json +++ b/krebs/nixpkgs.json @@ -1,7 +1,7 @@ { "url": "https://github.com/NixOS/nixpkgs-channels", - "rev": "e2bb73ce5f786b83e984b80199112f86b8a6cc9d", - "date": "2020-06-07T23:11:12+02:00", - "sha256": "0mpcdwhippvgsj3kj8vw35dgz94dnzgxgsfqqzcfpmvnzjc23vk7", + "rev": "6460602eec5ced5b9720f4d9fdb0dd717b89b4fd", + "date": "2020-06-24T19:32:57+02:00", + "sha256": "0fk22vc780xf8jza4hcin7f88z1g9gsly5mjhfbygcxfxv334q2i", "fetchSubmodules": false } -- cgit v1.2.3 From e80ff853ad7e764956769a1d6746c80b4eb3055e Mon Sep 17 00:00:00 2001 From: lassulus Date: Thu, 25 Jun 2020 21:20:32 +0200 Subject: nixpkgs-unstable: 0f5ce2f -> 22a81aa --- krebs/nixpkgs-unstable.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/krebs/nixpkgs-unstable.json b/krebs/nixpkgs-unstable.json index c64d43862..c2aae6bc4 100644 --- a/krebs/nixpkgs-unstable.json +++ b/krebs/nixpkgs-unstable.json @@ -1,7 +1,7 @@ { "url": "https://github.com/NixOS/nixpkgs-channels", - "rev": "0f5ce2fac0c726036ca69a5524c59a49e2973dd4", - "date": "2020-05-19T01:31:20+02:00", - "sha256": "0nkk492aa7pr0d30vv1aw192wc16wpa1j02925pldc09s9m9i0r3", + "rev": "22a81aa5fc15b2d41b12f7160a71cd4a9f3c3fa1", + "date": "2020-06-22T17:52:02+02:00", + "sha256": "14gx5fsqibdn2cxp7gymfrz2vcnwiwwjnxqlnysczz8dqihnrpa7", "fetchSubmodules": false } -- cgit v1.2.3 From d5c59a830346ffd75c5e973861ca00c5d0316b8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Fri, 3 Jul 2020 21:51:51 +0100 Subject: mic92: add ipv6 addresses for my machines --- krebs/3modules/external/mic92.nix | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/krebs/3modules/external/mic92.nix b/krebs/3modules/external/mic92.nix index 23ab4f684..e731e0ad7 100644 --- a/krebs/3modules/external/mic92.nix +++ b/krebs/3modules/external/mic92.nix @@ -13,6 +13,11 @@ in { amy = { owner = config.krebs.users.Mic92; nets = rec { + internet = { + ip4.addr = "129.215.165.57"; + ip6.addr = "2001:630:3c1:164:b62e:99ff:fe3e:d369"; + aliases = [ "amy.i" ]; + }; retiolum = { addrs = [ config.krebs.hosts.amy.nets.retiolum.ip4.addr @@ -41,6 +46,11 @@ in { clara = { owner = config.krebs.users.Mic92; nets = rec { + internet = { + ip4.addr = "129.215.165.58"; + ip6.addr = "2001:630:3c1:164:b62e:99ff:fe3d:70f2"; + aliases = [ "clara.i" ]; + }; retiolum = { addrs = [ config.krebs.hosts.clara.nets.retiolum.ip4.addr @@ -92,6 +102,7 @@ in { nets = rec { internet = { ip4.addr = "129.215.165.54"; + ip6.addr = "2001:630:3c1:164:30a2:6e7b:c58b:cafd"; aliases = [ "donna.i" ]; }; retiolum = { @@ -272,6 +283,7 @@ in { nets = rec { internet = { ip4.addr = "129.215.165.53"; + ip6.addr = "2001:630:3c1:164:6d4:c4ff:fe04:4aba"; aliases = [ "martha.i" ]; }; retiolum = { @@ -355,6 +367,7 @@ in { nets = rec { internet = { ip4.addr = "129.215.165.52"; + ip6.addr = "2001:630:3c1:164:6d4:c4ff:fe04:4e4b"; aliases = [ "rose.i" ]; }; retiolum = { -- cgit v1.2.3 From 0caacbdf420e1da5da01353958f5bd082f77b884 Mon Sep 17 00:00:00 2001 From: lassulus Date: Sat, 4 Jul 2020 06:15:53 +0200 Subject: l: add klem service --- lass/2configs/baseX.nix | 32 +++++++++++++++++++++ lass/3modules/klem.nix | 75 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 107 insertions(+) create mode 100644 lass/3modules/klem.nix diff --git a/lass/2configs/baseX.nix b/lass/2configs/baseX.nix index 1185be9d4..3376f5ea2 100644 --- a/lass/2configs/baseX.nix +++ b/lass/2configs/baseX.nix @@ -147,4 +147,36 @@ in { krebs.xresources.enable = true; lass.screenlock.enable = true; + + lass.klem = { + kpaste.script = pkgs.writeDash "kpaste-wrapper" '' + ${pkgs.kpaste}/bin/kpaste \ + | ${pkgs.coreutils}/bin/tail -1 \ + | ${pkgs.coreutils}/bin/tr -d '\r\n' + ''; + go = { + target = "STRING"; + script = "${pkgs.goify}/bin/goify"; + }; + "go.lassul.us" = { + target = "STRING"; + script = pkgs.writeDash "go.lassul.us" '' + export GO_HOST='go.lassul.us' + ${pkgs.goify}/bin/goify + ''; + }; + qrcode = { + target = "image"; + script = pkgs.writeDash "zbar" '' + ${pkgs.zbar}/bin/zbarimg -q - + ''; + }; + ocr = { + target = "image"; + script = pkgs.writeDash "gocr" '' + ${pkgs.netpbm}/bin/pngtopnm - \ + | ${pkgs.gocr}/bin/gocr - + ''; + }; + }; } diff --git a/lass/3modules/klem.nix b/lass/3modules/klem.nix new file mode 100644 index 000000000..a297adcd1 --- /dev/null +++ b/lass/3modules/klem.nix @@ -0,0 +1,75 @@ +{ config, pkgs, ... }: with import ; let + cfg = config.lass.klem; +in { + options.lass.klem = mkOption { + default = {}; + type = types.attrsOf (types.submodule ({ config, ...}: { + options = { + target = mkOption { + default = ".*"; + description = '' + regex of valid targets + can be shown with xclip -selection clipboard -t TARGETS + the first hit is taken as target argument + ''; + type = types.str; + }; + script = mkOption { + description = '' + file to run if entry is selected + ''; + type = types.path; + }; + label = mkOption { + default = config._module.args.name; + description = '' + label to show in dmenu for this script + ''; + type = types.str; + }; + }; + })); + }; + config = let + klem = pkgs.writers.writeDashBin "klem" '' + set -x + + labels="" + # match filetype against patterns + ${concatMapStringsSep "\n" (script: '' + ${pkgs.xclip}/bin/xclip -selection clipboard -target TARGETS -out \ + | grep -q '${script.target}' + if [ $? -eq 0 ]; then + labels="$labels:${script.label}" + fi + '') (attrValues cfg)} + + #remove empty line, feed into dmenu + script=$(echo "$labels" \ + | ${pkgs.gnused}/bin/sed 's/^://;s/:/\n/g' \ + | ${pkgs.dmenu}/bin/dmenu) + + #run the chosen script + case $script in + ${concatMapStringsSep "\n" (script: indent '' + ${script.label}) + target=$(${pkgs.xclip}/bin/xclip -selection clipboard -target TARGETS -out \ + | ${pkgs.gnugrep}/bin/grep '${script.target}' \ + | ${pkgs.gnugrep}/bin/grep -v TARGETS \ + | ${pkgs.coreutils}/bin/head -1) + ${pkgs.xclip}/bin/xclip -selection clipboard -target "$target" -out \ + | ${script.script} \ + | ${pkgs.xclip}/bin/xclip -selection clipboard -in + ;; + '') (attrValues cfg)} + esac + ''; + in mkIf (cfg != {}) { + environment.systemPackages = [ klem ]; + nixpkgs.overlays = [ + (self: super: { + klem = klem; + }) + ]; + }; +} -- cgit v1.2.3 From 11b0cc0451b961cccb67a0ff9372e2b9985610bf Mon Sep 17 00:00:00 2001 From: lassulus Date: Sat, 4 Jul 2020 06:51:08 +0200 Subject: l: use klem in xmonad --- lass/2configs/baseX.nix | 4 ++++ lass/5pkgs/custom/xmonad-lass/default.nix | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lass/2configs/baseX.nix b/lass/2configs/baseX.nix index 3376f5ea2..baf93ffe5 100644 --- a/lass/2configs/baseX.nix +++ b/lass/2configs/baseX.nix @@ -91,6 +91,10 @@ in { xorg.xhost xsel zathura + (pkgs.writeDashBin "screenshot" '' + ${pkgs.flameshot-once}/bin/flameshot-once + ${pkgs.klem}/bin/klem + '') ]; fonts.fonts = with pkgs; [ diff --git a/lass/5pkgs/custom/xmonad-lass/default.nix b/lass/5pkgs/custom/xmonad-lass/default.nix index e1c45598f..e6d4b0664 100644 --- a/lass/5pkgs/custom/xmonad-lass/default.nix +++ b/lass/5pkgs/custom/xmonad-lass/default.nix @@ -126,7 +126,7 @@ myKeyMap = , ("M4-x", floatNext True >> spawn myTerm) , ("M4-c", floatNext True >> spawn "${pkgs.termite}/bin/termite") , ("M4-f", floatNext True) - , ("M4-b", sendMessage ToggleStruts) + , ("M4-b", spawn "/run/current-system/sw/bin/klem") , ("M4-v", gets windowset >>= allWorkspaceNames >>= pager pagerConfig (windows . W.greedyView) ) , ("M4-S-v", gets windowset >>= allWorkspaceNames >>= pager pagerConfig (windows . W.shift) ) @@ -161,7 +161,7 @@ myKeyMap = , ("M4-u", spawn "${pkgs.xcalib}/bin/xcalib -invert -alter") , ("M4-s", spawn "${pkgs.knav}/bin/knav") - , ("", spawn "${pkgs.flameshot-once}/bin/flameshot-once") + , ("M4-i", spawn "/run/current-system/sw/bin/screenshot") --, ("M4-w", screenWorkspace 0 >>= (windows . W.greedyView)) --, ("M4-e", screenWorkspace 1 >>= (windows . W.greedyView)) -- cgit v1.2.3 From dbee272de6f3dae261ac6e15992b91cd3c1d02ed Mon Sep 17 00:00:00 2001 From: lassulus Date: Sat, 4 Jul 2020 10:20:26 +0200 Subject: l: import klem module --- lass/3modules/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/lass/3modules/default.nix b/lass/3modules/default.nix index f6179c394..335658ed8 100644 --- a/lass/3modules/default.nix +++ b/lass/3modules/default.nix @@ -6,6 +6,7 @@ _: ./folderPerms.nix ./hass.nix ./hosts.nix + ./klem.nix ./mysql-backup.nix ./news.nix ./nichtparasoup.nix -- cgit v1.2.3 From 9fdc801bb79a57757851e7d4727b428af6ddc705 Mon Sep 17 00:00:00 2001 From: tv Date: Tue, 14 Jul 2020 22:04:02 +0200 Subject: tv: use sane default locale --- tv/2configs/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/tv/2configs/default.nix b/tv/2configs/default.nix index 72c48da2c..4d27b0eac 100644 --- a/tv/2configs/default.nix +++ b/tv/2configs/default.nix @@ -36,6 +36,7 @@ with import ; }; } { + i18n.defaultLocale = mkDefault "C.UTF-8"; security.hideProcessInformation = true; security.sudo.extraConfig = '' Defaults env_keep+="SSH_CLIENT XMONAD_SPAWN_WORKSPACE" -- cgit v1.2.3 From 087fff54f11d28c9a08849c70520ecf9030f4ce9 Mon Sep 17 00:00:00 2001 From: lassulus Date: Wed, 22 Jul 2020 23:12:40 +0200 Subject: nixpkgs: 6460602 -> 9ea61f7 --- krebs/nixpkgs.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/krebs/nixpkgs.json b/krebs/nixpkgs.json index 875dbfa1c..d5ab111de 100644 --- a/krebs/nixpkgs.json +++ b/krebs/nixpkgs.json @@ -1,7 +1,7 @@ { "url": "https://github.com/NixOS/nixpkgs-channels", - "rev": "6460602eec5ced5b9720f4d9fdb0dd717b89b4fd", - "date": "2020-06-24T19:32:57+02:00", - "sha256": "0fk22vc780xf8jza4hcin7f88z1g9gsly5mjhfbygcxfxv334q2i", + "rev": "9ea61f7bc4454734ffbff73c9b6173420fe3147b", + "date": "2020-07-21T20:51:29+02:00", + "sha256": "0cra1cimf7692f9aziaszgy55l0xcmsawzfqmyz14jjw2psir246", "fetchSubmodules": false } -- cgit v1.2.3 From b5b90b598430cfa876639d76dbbdc8d826ccb5c0 Mon Sep 17 00:00:00 2001 From: tv Date: Tue, 4 Aug 2020 20:28:04 +0200 Subject: types.secret-file: add service option --- krebs/3modules/exim-smarthost.nix | 8 ++++++-- krebs/3modules/konsens.nix | 2 +- krebs/3modules/repo-sync.nix | 8 +++++++- krebs/3modules/tinc.nix | 9 +++++++-- lass/2configs/binary-cache/server.nix | 8 ++++++-- lass/2configs/websites/sqlBackup.nix | 8 ++++++-- lass/3modules/ejabberd/default.nix | 11 +++++++++-- lib/types.nix | 4 ++++ makefu/2configs/binary-cache/server.nix | 8 ++++++-- makefu/3modules/netdata.nix | 8 ++++++-- tv/2configs/binary-cache/default.nix | 8 ++++++-- tv/3modules/charybdis/default.nix | 11 +++++++++-- tv/3modules/ejabberd/default.nix | 11 +++++++++-- tv/3modules/x0vncserver.nix | 12 ++++++++++-- 14 files changed, 92 insertions(+), 24 deletions(-) diff --git a/krebs/3modules/exim-smarthost.nix b/krebs/3modules/exim-smarthost.nix index e988fb563..2a97f9d6e 100644 --- a/krebs/3modules/exim-smarthost.nix +++ b/krebs/3modules/exim-smarthost.nix @@ -115,8 +115,12 @@ let })); systemd.services = mkIf (cfg.dkim != []) { exim = { - after = [ "secret.service" ]; - requires = [ "secret.service" ]; + after = flip map cfg.dkim (dkim: + config.krebs.secret.files."exim.dkim_private_key/${dkim.domain}".service + ); + requires = flip map cfg.dkim (dkim: + config.krebs.secret.files."exim.dkim_private_key/${dkim.domain}".service + ); }; }; krebs.exim = { diff --git a/krebs/3modules/konsens.nix b/krebs/3modules/konsens.nix index 74895a971..81486810b 100644 --- a/krebs/3modules/konsens.nix +++ b/krebs/3modules/konsens.nix @@ -56,7 +56,7 @@ let systemd.services = mapAttrs' (name: repo: nameValuePair "konsens-${name}" { - after = [ "network.target" "secret.service" ]; + after = [ "network.target" ]; path = [ pkgs.git ]; restartIfChanged = false; serviceConfig = { diff --git a/krebs/3modules/repo-sync.nix b/krebs/3modules/repo-sync.nix index 45d9d81c3..892f34049 100644 --- a/krebs/3modules/repo-sync.nix +++ b/krebs/3modules/repo-sync.nix @@ -166,7 +166,13 @@ let }); in nameValuePair "repo-sync-${name}" { description = "repo-sync"; - after = [ "network.target" "secret.service" ]; + after = [ + config.krebs.secret.files.repo-sync-key.service + "network.target" + ]; + requires = [ + config.krebs.secret.files.repo-sync-key.service + ]; environment = { GIT_SSH_COMMAND = "${pkgs.openssh}/bin/ssh -i ${cfg.stateDir}/ssh.priv"; diff --git a/krebs/3modules/tinc.nix b/krebs/3modules/tinc.nix index 8b6e959d4..0be16d8f6 100644 --- a/krebs/3modules/tinc.nix +++ b/krebs/3modules/tinc.nix @@ -219,9 +219,14 @@ let iproute = cfg.iproutePackage; in { description = "Tinc daemon for ${netname}"; - after = [ "network.target" ]; + after = [ + config.krebs.secret.files."${netname}.rsa_key.priv".service + "network.target" + ]; + requires = [ + config.krebs.secret.files."${netname}.rsa_key.priv".service + ]; wantedBy = [ "multi-user.target" ]; - requires = [ "secret.service" ]; path = [ tinc iproute ]; serviceConfig = rec { Restart = "always"; diff --git a/lass/2configs/binary-cache/server.nix b/lass/2configs/binary-cache/server.nix index d3775b5df..fbaf16a3c 100644 --- a/lass/2configs/binary-cache/server.nix +++ b/lass/2configs/binary-cache/server.nix @@ -9,8 +9,12 @@ }; systemd.services.nix-serve = { - requires = ["secret.service"]; - after = ["secret.service"]; + after = [ + config.krebs.secret.files.nix-serve-key.service + ]; + requires = [ + config.krebs.secret.files.nix-serve-key.service + ]; }; krebs.secret.files.nix-serve-key = { path = "/run/secret/nix-serve.key"; diff --git a/lass/2configs/websites/sqlBackup.nix b/lass/2configs/websites/sqlBackup.nix index 10a6e4643..72d7c7b9a 100644 --- a/lass/2configs/websites/sqlBackup.nix +++ b/lass/2configs/websites/sqlBackup.nix @@ -14,8 +14,12 @@ }; systemd.services.mysql = { - requires = [ "secret.service" ]; - after = [ "secret.service" ]; + after = [ + config.krebs.secret.files.mysql_rootPassword.service + ]; + requires = [ + config.krebs.secret.files.mysql_rootPassword.service + ]; }; lass.mysqlBackup = { diff --git a/lass/3modules/ejabberd/default.nix b/lass/3modules/ejabberd/default.nix index 4838a9093..9642c64c9 100644 --- a/lass/3modules/ejabberd/default.nix +++ b/lass/3modules/ejabberd/default.nix @@ -74,8 +74,15 @@ in { systemd.services.ejabberd = { wantedBy = [ "multi-user.target" ]; - requires = [ "secret.service" ]; - after = [ "network.target" "secret.service" ]; + after = [ + config.krebs.secret.files.ejabberd-certfile.service + config.krebs.secret.files.ejabberd-s2s_certfile.service + "network.target" + ]; + requires = [ + config.krebs.secret.files.ejabberd-certfile.service + config.krebs.secret.files.ejabberd-s2s_certfile.service + ]; serviceConfig = { ExecStartPre = "${gen-dhparam} ${cfg.dhfile.path}"; ExecStart = "${cfg.pkgs.ejabberdctl}/bin/ejabberdctl foreground"; diff --git a/lib/types.nix b/lib/types.nix index 16ccb145e..82e184ba9 100644 --- a/lib/types.nix +++ b/lib/types.nix @@ -256,6 +256,10 @@ rec { type = str; default = "root"; }; + service = mkOption { + type = filename; + default = "secret.service"; + }; source-path = mkOption { type = str; default = toString + "/${config.name}"; diff --git a/makefu/2configs/binary-cache/server.nix b/makefu/2configs/binary-cache/server.nix index c8f68c84d..3fc174a1b 100644 --- a/makefu/2configs/binary-cache/server.nix +++ b/makefu/2configs/binary-cache/server.nix @@ -9,8 +9,12 @@ }; systemd.services.nix-serve = { - requires = ["secret.service"]; - after = ["secret.service"]; + after = [ + config.krebs.secret.files.nix-serve-key.service + ]; + requires = [ + config.krebs.secret.files.nix-serve-key.service + ]; }; krebs.secret.files.nix-serve-key = { path = "/run/secret/nix-serve.key"; diff --git a/makefu/3modules/netdata.nix b/makefu/3modules/netdata.nix index 3ed33643c..a3c789eb2 100644 --- a/makefu/3modules/netdata.nix +++ b/makefu/3modules/netdata.nix @@ -71,8 +71,12 @@ in }; config = mkIf cfg.enable { systemd.services.netdata = { - requires = [ "secret.service" ]; - after = [ "secret.service" ]; + after = [ + config.krebs.secret.files.netdata-stream.service + ]; + requires = [ + config.krebs.secret.files.netdata-stream.service + ]; }; krebs.secret.files.netdata-stream = { path = "/run/secret/netdata-stream.conf"; diff --git a/tv/2configs/binary-cache/default.nix b/tv/2configs/binary-cache/default.nix index 39c944b1a..970f705f0 100644 --- a/tv/2configs/binary-cache/default.nix +++ b/tv/2configs/binary-cache/default.nix @@ -9,8 +9,12 @@ }; systemd.services.nix-serve = { - requires = ["secret.service"]; - after = ["secret.service"]; + after = [ + config.krebs.secret.files.binary-cache-seckey.service + ]; + requires = [ + config.krebs.secret.files.binary-cache-seckey.service + ]; }; krebs.secret.files.binary-cache-seckey = { diff --git a/tv/3modules/charybdis/default.nix b/tv/3modules/charybdis/default.nix index 62a7037e3..3809da404 100644 --- a/tv/3modules/charybdis/default.nix +++ b/tv/3modules/charybdis/default.nix @@ -51,8 +51,15 @@ in { systemd.services.charybdis = { wantedBy = [ "multi-user.target" ]; - requires = [ "secret.service" ]; - after = [ "network-online.target" "secret.service" ]; + after = [ + config.krebs.secret.files.charybdis-ssl_dh_params.service + config.krebs.secret.files.charybdis-ssl_private_key.service + "network-online.target" + ]; + requires = [ + config.krebs.secret.files.charybdis-ssl_dh_params.service + config.krebs.secret.files.charybdis-ssl_private_key.service + ]; environment = { BANDB_DBPATH = "${cfg.user.home}/ban.db"; }; diff --git a/tv/3modules/ejabberd/default.nix b/tv/3modules/ejabberd/default.nix index f16dfac86..b995c145a 100644 --- a/tv/3modules/ejabberd/default.nix +++ b/tv/3modules/ejabberd/default.nix @@ -95,8 +95,15 @@ in { systemd.services.ejabberd = { wantedBy = [ "multi-user.target" ]; - requires = [ "secret.service" ]; - after = [ "network.target" "secret.service" ]; + after = [ + config.krebs.secret.files.ejabberd-certfile.service + config.krebs.secret.files.ejabberd-s2s_certfile.service + "network.target" + ]; + requires = [ + config.krebs.secret.files.ejabberd-certfile.service + config.krebs.secret.files.ejabberd-s2s_certfile.service + ]; serviceConfig = { ExecStartPre = "${gen-dhparam} ${cfg.dhfile.path}"; ExecStart = "${cfg.pkgs.ejabberd}/bin/ejabberdctl foreground"; diff --git a/tv/3modules/x0vncserver.nix b/tv/3modules/x0vncserver.nix index 44fed590d..8b9cfa89d 100644 --- a/tv/3modules/x0vncserver.nix +++ b/tv/3modules/x0vncserver.nix @@ -36,8 +36,16 @@ in { x0vncserver-pwfile = cfg.pwfile; }; systemd.services.x0vncserver = { - after = [ "graphical.target" "secret.service" ]; - requires = [ "graphical.target" "secret.service" ]; + after = [ + config.krebs.secret.files.x0vncserver-pwfile.service + "graphical.target" + ]; + partOf = [ + config.krebs.secret.files.x0vncserver-pwfile.service + ]; + requires = [ + "graphical.target" + ]; serviceConfig = { ExecStart = "${pkgs.tigervnc}/bin/x0vncserver ${toString [ "-display ${cfg.display}" -- cgit v1.2.3 From 4227cadb6823bd4b945b8ea9e766f22b95d26468 Mon Sep 17 00:00:00 2001 From: tv Date: Wed, 5 Aug 2020 10:57:09 +0200 Subject: types: add systemd unit name --- lib/types.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/types.nix b/lib/types.nix index 82e184ba9..66b01fd12 100644 --- a/lib/types.nix +++ b/lib/types.nix @@ -530,6 +530,14 @@ rec { merge = mergeOneOption; }; + systemd.unit-name = mkOptionType { + name = "systemd unit name"; + check = x: + test "^[0-9A-Za-z:_.\\-]+@?\\.(service|socket|device|mount|automount|swap|target|path|timer|slice|scope)$" x && + stringLength x <= 256; + merge = mergeOneOption; + }; + # RFC952, B. Lexical grammar, hostname = mkOptionType { name = "hostname"; -- cgit v1.2.3 From ec91d1b83cfad151033433159a04eb7b5381bc73 Mon Sep 17 00:00:00 2001 From: tv Date: Tue, 4 Aug 2020 22:22:43 +0200 Subject: krebs.secret: restart units on secret change --- krebs/3modules/exim-smarthost.nix | 3 +- krebs/3modules/repo-sync.nix | 3 +- krebs/3modules/secret.nix | 68 +++++++++++++++++++-------------- krebs/3modules/tinc.nix | 3 +- lass/2configs/binary-cache/server.nix | 2 +- lass/2configs/websites/sqlBackup.nix | 2 +- lass/3modules/ejabberd/default.nix | 4 +- lib/default.nix | 3 ++ lib/types.nix | 6 +-- makefu/2configs/binary-cache/server.nix | 2 +- makefu/3modules/netdata.nix | 2 +- tv/2configs/binary-cache/default.nix | 2 +- tv/3modules/charybdis/default.nix | 4 +- tv/3modules/ejabberd/default.nix | 4 +- tv/3modules/x0vncserver.nix | 1 + 15 files changed, 67 insertions(+), 42 deletions(-) diff --git a/krebs/3modules/exim-smarthost.nix b/krebs/3modules/exim-smarthost.nix index 2a97f9d6e..c5969caac 100644 --- a/krebs/3modules/exim-smarthost.nix +++ b/krebs/3modules/exim-smarthost.nix @@ -26,6 +26,7 @@ let private_key = mkOption { type = types.secret-file; default = { + name = "exim.dkim_private_key/${config.domain}"; path = "/run/krebs.secret/${config.domain}.dkim_private_key"; owner.name = "exim"; source-path = toString + "/${config.domain}.dkim.priv"; @@ -118,7 +119,7 @@ let after = flip map cfg.dkim (dkim: config.krebs.secret.files."exim.dkim_private_key/${dkim.domain}".service ); - requires = flip map cfg.dkim (dkim: + partOf = flip map cfg.dkim (dkim: config.krebs.secret.files."exim.dkim_private_key/${dkim.domain}".service ); }; diff --git a/krebs/3modules/repo-sync.nix b/krebs/3modules/repo-sync.nix index 892f34049..91111f3eb 100644 --- a/krebs/3modules/repo-sync.nix +++ b/krebs/3modules/repo-sync.nix @@ -124,6 +124,7 @@ let privateKeyFile = mkOption { type = types.secret-file; default = { + name = "repo-sync-key"; path = "${cfg.stateDir}/ssh.priv"; owner = cfg.user; source-path = toString + "/repo-sync.ssh.key"; @@ -170,7 +171,7 @@ let config.krebs.secret.files.repo-sync-key.service "network.target" ]; - requires = [ + partOf = [ config.krebs.secret.files.repo-sync-key.service ]; diff --git a/krebs/3modules/secret.nix b/krebs/3modules/secret.nix index 672c503b0..bf2c62cc9 100644 --- a/krebs/3modules/secret.nix +++ b/krebs/3modules/secret.nix @@ -1,4 +1,5 @@ -{ config, lib, pkgs, ... }@args: with import ; let +with import ; +{ config, lib, pkgs, ... }: let cfg = config.krebs.secret; in { options.krebs.secret = { @@ -8,32 +9,43 @@ in { }; }; config = lib.mkIf (cfg.files != {}) { - systemd.services.secret = let - # TODO fail if two files have the same path but differ otherwise - files = unique (map (flip removeAttrs ["_module"]) - (attrValues cfg.files)); - in { - serviceConfig = { - Type = "oneshot"; - RemainAfterExit = "yes"; - SyslogIdentifier = "secret"; - ExecStart = pkgs.writeDash "install-secret-files" '' - exit_code=0 - ${concatMapStringsSep "\n" (file: '' - ${pkgs.coreutils}/bin/install \ - -D \ - --compare \ - --verbose \ - --mode=${shell.escape file.mode} \ - --owner=${shell.escape file.owner.name} \ - --group=${shell.escape file.group-name} \ - ${shell.escape file.source-path} \ - ${shell.escape file.path} \ - || exit_code=1 - '') files} - exit $exit_code - ''; - }; - }; + systemd.paths = + mapAttrs' + (name: file: nameValuePair "secret-trigger-${systemd.encodeName name}" { + wantedBy = ["multi-user.target"]; + pathConfig.PathChanged = file.source-path; + }) + cfg.files; + systemd.services = + mapAttrs' + (name: file: nameValuePair "secret-trigger-${systemd.encodeName name}" { + wantedBy = ["multi-user.target"]; + serviceConfig = { + Type = "oneshot"; + ExecStart = "${pkgs.systemd}/bin/systemctl restart ${file.service}"; + }; + }) + cfg.files + // + mapAttrs' + (name: file: nameValuePair "secret-${systemd.encodeName name}" { + wantedBy = ["multi-user.target"]; + serviceConfig = { + Type = "oneshot"; + RemainAfterExit = "yes"; + ExecStart = toString [ + "${pkgs.coreutils}/bin/install" + "-D" + "--compare" + "--verbose" + "--mode=${file.mode}" + "--owner=${file.owner.name}" + "--group=${file.group-name}" + file.source-path + file.path + ]; + }; + }) + cfg.files; }; } diff --git a/krebs/3modules/tinc.nix b/krebs/3modules/tinc.nix index 0be16d8f6..1fca7de5c 100644 --- a/krebs/3modules/tinc.nix +++ b/krebs/3modules/tinc.nix @@ -158,6 +158,7 @@ let privkey = mkOption { type = types.secret-file; default = { + name = "${tinc.config.netname}.rsa_key.priv"; path = "${tinc.config.user.home}/tinc.rsa_key.priv"; owner = tinc.config.user; source-path = toString + "/${tinc.config.netname}.rsa_key.priv"; @@ -223,7 +224,7 @@ let config.krebs.secret.files."${netname}.rsa_key.priv".service "network.target" ]; - requires = [ + partOf = [ config.krebs.secret.files."${netname}.rsa_key.priv".service ]; wantedBy = [ "multi-user.target" ]; diff --git a/lass/2configs/binary-cache/server.nix b/lass/2configs/binary-cache/server.nix index fbaf16a3c..9b91035a8 100644 --- a/lass/2configs/binary-cache/server.nix +++ b/lass/2configs/binary-cache/server.nix @@ -12,7 +12,7 @@ after = [ config.krebs.secret.files.nix-serve-key.service ]; - requires = [ + partOf = [ config.krebs.secret.files.nix-serve-key.service ]; }; diff --git a/lass/2configs/websites/sqlBackup.nix b/lass/2configs/websites/sqlBackup.nix index 72d7c7b9a..c9783bece 100644 --- a/lass/2configs/websites/sqlBackup.nix +++ b/lass/2configs/websites/sqlBackup.nix @@ -17,7 +17,7 @@ after = [ config.krebs.secret.files.mysql_rootPassword.service ]; - requires = [ + partOf = [ config.krebs.secret.files.mysql_rootPassword.service ]; }; diff --git a/lass/3modules/ejabberd/default.nix b/lass/3modules/ejabberd/default.nix index 9642c64c9..20a38d572 100644 --- a/lass/3modules/ejabberd/default.nix +++ b/lass/3modules/ejabberd/default.nix @@ -17,6 +17,7 @@ in { certfile = mkOption { type = types.secret-file; default = { + name = "ejabberd-certfile"; path = "${cfg.user.home}/ejabberd.pem"; owner = cfg.user; source-path = "/var/lib/acme/lassul.us/full.pem"; @@ -25,6 +26,7 @@ in { dhfile = mkOption { type = types.secret-file; default = { + name = "ejabberd-dhfile"; path = "${cfg.user.home}/dhparams.pem"; owner = cfg.user; source-path = "/dev/null"; @@ -79,7 +81,7 @@ in { config.krebs.secret.files.ejabberd-s2s_certfile.service "network.target" ]; - requires = [ + partOf = [ config.krebs.secret.files.ejabberd-certfile.service config.krebs.secret.files.ejabberd-s2s_certfile.service ]; diff --git a/lib/default.nix b/lib/default.nix index 5a948bbf3..f02959bba 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -8,6 +8,9 @@ let krebs = import ./krebs lib; krops = import ../submodules/krops/lib; shell = import ./shell.nix { inherit lib; }; + systemd = { + encodeName = replaceChars ["/"] ["\\x2f"]; + }; types = nixpkgs-lib.types // import ./types.nix { inherit lib; }; xml = import ./xml.nix { inherit lib; }; diff --git a/lib/types.nix b/lib/types.nix index 66b01fd12..1eb4d947c 100644 --- a/lib/types.nix +++ b/lib/types.nix @@ -238,7 +238,7 @@ rec { secret-file = submodule ({ config, ... }: { options = { name = mkOption { - type = filename; + type = pathname; default = config._module.args.name; }; path = mkOption { @@ -257,8 +257,8 @@ rec { default = "root"; }; service = mkOption { - type = filename; - default = "secret.service"; + type = systemd.unit-name; + default = "secret-${lib.systemd.encodeName config.name}.service"; }; source-path = mkOption { type = str; diff --git a/makefu/2configs/binary-cache/server.nix b/makefu/2configs/binary-cache/server.nix index 3fc174a1b..1d729b9bb 100644 --- a/makefu/2configs/binary-cache/server.nix +++ b/makefu/2configs/binary-cache/server.nix @@ -12,7 +12,7 @@ after = [ config.krebs.secret.files.nix-serve-key.service ]; - requires = [ + partOf = [ config.krebs.secret.files.nix-serve-key.service ]; }; diff --git a/makefu/3modules/netdata.nix b/makefu/3modules/netdata.nix index a3c789eb2..bfa6f404c 100644 --- a/makefu/3modules/netdata.nix +++ b/makefu/3modules/netdata.nix @@ -74,7 +74,7 @@ in after = [ config.krebs.secret.files.netdata-stream.service ]; - requires = [ + partOf = [ config.krebs.secret.files.netdata-stream.service ]; }; diff --git a/tv/2configs/binary-cache/default.nix b/tv/2configs/binary-cache/default.nix index 970f705f0..866434cb5 100644 --- a/tv/2configs/binary-cache/default.nix +++ b/tv/2configs/binary-cache/default.nix @@ -12,7 +12,7 @@ after = [ config.krebs.secret.files.binary-cache-seckey.service ]; - requires = [ + partOf = [ config.krebs.secret.files.binary-cache-seckey.service ]; }; diff --git a/tv/3modules/charybdis/default.nix b/tv/3modules/charybdis/default.nix index 3809da404..a0638e1eb 100644 --- a/tv/3modules/charybdis/default.nix +++ b/tv/3modules/charybdis/default.nix @@ -17,6 +17,7 @@ in { ssl_dh_params = mkOption { type = types.secret-file; default = { + name = "charybdis-ssl_dh_params"; path = "${cfg.user.home}/dh.pem"; owner = cfg.user; source-path = toString + "/charybdis.dh.pem"; @@ -25,6 +26,7 @@ in { ssl_private_key = mkOption { type = types.secret-file; default = { + name = "charybdis-ssl_private_key"; path = "${cfg.user.home}/ssl.key.pem"; owner = cfg.user; source-path = toString + "/charybdis.key.pem"; @@ -56,7 +58,7 @@ in { config.krebs.secret.files.charybdis-ssl_private_key.service "network-online.target" ]; - requires = [ + partOf = [ config.krebs.secret.files.charybdis-ssl_dh_params.service config.krebs.secret.files.charybdis-ssl_private_key.service ]; diff --git a/tv/3modules/ejabberd/default.nix b/tv/3modules/ejabberd/default.nix index b995c145a..aaf262fa1 100644 --- a/tv/3modules/ejabberd/default.nix +++ b/tv/3modules/ejabberd/default.nix @@ -18,6 +18,7 @@ in { certfile = mkOption { type = types.secret-file; default = { + name = "ejabberd-certfile"; path = "${cfg.user.home}/ejabberd.pem"; owner = cfg.user; source-path = toString + "/ejabberd.pem"; @@ -26,6 +27,7 @@ in { dhfile = mkOption { type = types.secret-file; default = { + name = "ejabberd-dhfile"; path = "${cfg.user.home}/dhparams.pem"; owner = cfg.user; source-path = "/dev/null"; @@ -100,7 +102,7 @@ in { config.krebs.secret.files.ejabberd-s2s_certfile.service "network.target" ]; - requires = [ + partOf = [ config.krebs.secret.files.ejabberd-certfile.service config.krebs.secret.files.ejabberd-s2s_certfile.service ]; diff --git a/tv/3modules/x0vncserver.nix b/tv/3modules/x0vncserver.nix index 8b9cfa89d..ba79c4a49 100644 --- a/tv/3modules/x0vncserver.nix +++ b/tv/3modules/x0vncserver.nix @@ -12,6 +12,7 @@ in { enable = mkEnableOption "tv.x0vncserver"; pwfile = mkOption { default = { + name = "x0vncserver-pwfile"; owner = cfg.user; path = "${cfg.user.home}/.vncpasswd"; source-path = toString + "/vncpasswd"; -- cgit v1.2.3 From 42df7da046f46efaca0cb0243a6de3aff599c8aa Mon Sep 17 00:00:00 2001 From: tv Date: Wed, 5 Aug 2020 11:27:47 +0200 Subject: j firefox: remove Google Talk plugin See nixpkgs commit 2b417708c282d84316366f4125b00b29c49df10f for details. --- jeschli/5pkgs/firefox/firefox-with-config.nix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/jeschli/5pkgs/firefox/firefox-with-config.nix b/jeschli/5pkgs/firefox/firefox-with-config.nix index 9be6250d7..fc22c434e 100644 --- a/jeschli/5pkgs/firefox/firefox-with-config.nix +++ b/jeschli/5pkgs/firefox/firefox-with-config.nix @@ -5,7 +5,7 @@ , MPlayerPlugin, ffmpeg, xorg, libpulseaudio, libcanberra-gtk2 , jrePlugin, icedtea_web , bluejeans, djview4, adobe-reader -, google_talk_plugin, fribid, gnome3/*.gnome-shell*/ +, fribid, gnome3/*.gnome-shell*/ , esteidfirefoxplugin ? "" , browserpass, chrome-gnome-shell, uget-integrator, plasma-browser-integration, bukubrow , udev @@ -82,7 +82,6 @@ let ++ lib.optional (cfg.enableMPlayer or false) (MPlayerPlugin browser) ++ lib.optional (supportsJDK && jre && jrePlugin ? mozillaPlugin) jrePlugin ++ lib.optional icedtea icedtea_web - ++ lib.optional (cfg.enableGoogleTalkPlugin or false) google_talk_plugin ++ lib.optional (cfg.enableFriBIDPlugin or false) fribid ++ lib.optional (cfg.enableGnomeExtensions or false) gnome3.gnome-shell ++ lib.optional (cfg.enableBluejeans or false) bluejeans -- cgit v1.2.3 From 10f2d2b0821510e365ec03feb4e87ac1f0dd5b89 Mon Sep 17 00:00:00 2001 From: lassulus Date: Thu, 6 Aug 2020 23:26:43 +0200 Subject: nixpkgs: 9ea61f7 -> e23e054 --- krebs/nixpkgs.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/krebs/nixpkgs.json b/krebs/nixpkgs.json index d5ab111de..04684a220 100644 --- a/krebs/nixpkgs.json +++ b/krebs/nixpkgs.json @@ -1,7 +1,7 @@ { "url": "https://github.com/NixOS/nixpkgs-channels", - "rev": "9ea61f7bc4454734ffbff73c9b6173420fe3147b", - "date": "2020-07-21T20:51:29+02:00", - "sha256": "0cra1cimf7692f9aziaszgy55l0xcmsawzfqmyz14jjw2psir246", + "rev": "e23e05452c67ce406debffa831290fb3abaabf0e", + "date": "2020-08-06T15:33:30+02:00", + "sha256": "10wlcm20bvak8cxjhfvmn0vm4n9da3zl19026h66zc1wfmcqgrkp", "fetchSubmodules": false } -- cgit v1.2.3 From b71904c5b9b92eb8e9e557af8c91a2304dbded7c Mon Sep 17 00:00:00 2001 From: lassulus Date: Thu, 6 Aug 2020 23:27:07 +0200 Subject: nixpkgs-unstable: 22a81aa -> 8e2b14a --- krebs/nixpkgs-unstable.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/krebs/nixpkgs-unstable.json b/krebs/nixpkgs-unstable.json index c2aae6bc4..1973a012a 100644 --- a/krebs/nixpkgs-unstable.json +++ b/krebs/nixpkgs-unstable.json @@ -1,7 +1,7 @@ { "url": "https://github.com/NixOS/nixpkgs-channels", - "rev": "22a81aa5fc15b2d41b12f7160a71cd4a9f3c3fa1", - "date": "2020-06-22T17:52:02+02:00", - "sha256": "14gx5fsqibdn2cxp7gymfrz2vcnwiwwjnxqlnysczz8dqihnrpa7", + "rev": "8e2b14aceb1d40c7e8b84c03a7c78955359872bb", + "date": "2020-08-05T09:17:35+01:00", + "sha256": "0zzjpd9smr7rxzrdf6raw9kbj42fbvafxb5bz36lcxgv290pgsm8", "fetchSubmodules": false } -- cgit v1.2.3 From 7ca8a45c9dd89ae19dd36eb8419e2e9046910dff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Mon, 20 Jul 2020 10:30:17 +0100 Subject: mic92: add harsha machine --- krebs/3modules/external/mic92.nix | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/krebs/3modules/external/mic92.nix b/krebs/3modules/external/mic92.nix index e731e0ad7..79e168d69 100644 --- a/krebs/3modules/external/mic92.nix +++ b/krebs/3modules/external/mic92.nix @@ -424,5 +424,27 @@ in { }; }; }; + harsha = { + owner = config.krebs.users.Mic92; + nets = { + retiolum = { + ip4.addr = "10.243.29.184"; + aliases = [ + "harsha.r" + ]; + tinc.pubkey = '' + -----BEGIN RSA PUBLIC KEY----- + MIIBCgKCAQEAqIc+ozq3hKHMe/X3v4j+6or8LMjEV7MtQ8/+n00xpG4NkI4G38Bv + 3nmAcV7OhN6of0fr0psbBmym+2VxCZbpl8E3g1GWSKpAvlmP/9v4wDVdrADaTvXC + pzCxejtCwEhKLisnMwCMJCuUPbIsSBU+IQDPKP7NP0yY5VapgW3Xl3qXpnehCW1r + NBZjZASnhSXcJRLJayEDN6uBviYrnnfbrHOx4fPcjQPTHX5RYr3EbgGZQO9xki44 + 9dKT4EA95lupTqC3wzuQbaNpvIuVzmggiDY/NsBIVh0/2XjGnO54wtCEPudaLnWd + WNtc1wfVFB6gzgG1N7msOuFUReOIfyF/ywIDAQAB + -----END RSA PUBLIC KEY----- + ''; + }; + }; + + }; }; } -- cgit v1.2.3 From 3fd0a5d586cfecf90eb4344b59cb0331c4717595 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Sat, 8 Aug 2020 09:18:17 +0100 Subject: mic92: add eva --- krebs/3modules/external/mic92.nix | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/krebs/3modules/external/mic92.nix b/krebs/3modules/external/mic92.nix index 79e168d69..b8aaf9900 100644 --- a/krebs/3modules/external/mic92.nix +++ b/krebs/3modules/external/mic92.nix @@ -444,7 +444,27 @@ in { ''; }; }; - + }; + eva = { + owner = config.krebs.users.Mic92; + nets = { + retiolum = { + ip4.addr = "10.243.29.185"; + aliases = [ + "eva.r" + ]; + tinc.pubkey = '' + -----BEGIN RSA PUBLIC KEY----- + MIIBCgKCAQEAqIc+ozq3hKHMe/X3v4j+6or8LMjEV7MtQ8/+n00xpG4NkI4G38Bv + 3nmAcV7OhN6of0fr0psbBmym+2VxCZbpl8E3g1GWSKpAvlmP/9v4wDVdrADaTvXC + pzCxejtCwEhKLisnMwCMJCuUPbIsSBU+IQDPKP7NP0yY5VapgW3Xl3qXpnehCW1r + NBZjZASnhSXcJRLJayEDN6uBviYrnnfbrHOx4fPcjQPTHX5RYr3EbgGZQO9xki44 + 9dKT4EA95lupTqC3wzuQbaNpvIuVzmggiDY/NsBIVh0/2XjGnO54wtCEPudaLnWd + WNtc1wfVFB6gzgG1N7msOuFUReOIfyF/ywIDAQAB + -----END RSA PUBLIC KEY----- + ''; + }; + }; }; }; } -- cgit v1.2.3 From 87d1e0eb868445623ead814c81be934ccac14124 Mon Sep 17 00:00:00 2001 From: lassulus Date: Mon, 10 Aug 2020 18:48:45 +0200 Subject: hotdog: enable gollum as wiki.r service --- krebs/1systems/hotdog/config.nix | 1 + krebs/2configs/wiki.nix | 19 +++++++++++++++++++ krebs/3modules/krebs/default.nix | 2 ++ 3 files changed, 22 insertions(+) create mode 100644 krebs/2configs/wiki.nix diff --git a/krebs/1systems/hotdog/config.nix b/krebs/1systems/hotdog/config.nix index 60ec625f2..bb84b1873 100644 --- a/krebs/1systems/hotdog/config.nix +++ b/krebs/1systems/hotdog/config.nix @@ -14,6 +14,7 @@ + ]; krebs.build.host = config.krebs.hosts.hotdog; diff --git a/krebs/2configs/wiki.nix b/krebs/2configs/wiki.nix new file mode 100644 index 000000000..2350e711e --- /dev/null +++ b/krebs/2configs/wiki.nix @@ -0,0 +1,19 @@ +{ config, ... }: + +{ + services.gollum = { + enable = true; + }; + networking.firewall.allowedTCPPorts = [ 80 ]; + services.nginx = { + enable = true; + virtualHosts.wiki = { + serverAliases = [ "wiki.r" "wiki.${config.networking.hostName}.r" ]; + locations."/".extraConfig = '' + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + proxy_pass http://127.0.0.1:${toString config.services.gollum.port}; + ''; + }; + }; +} diff --git a/krebs/3modules/krebs/default.nix b/krebs/3modules/krebs/default.nix index de09b4251..5e3ddcb2d 100644 --- a/krebs/3modules/krebs/default.nix +++ b/krebs/3modules/krebs/default.nix @@ -74,6 +74,8 @@ in { "build.hotdog.r" "cgit.hotdog.r" "irc.r" + "wiki.r" + "wiki.hotdog.r" ]; tinc.pubkey = '' -----BEGIN RSA PUBLIC KEY----- -- cgit v1.2.3 From f556a302f62434e0a47ef23db7e569bdb9c489f6 Mon Sep 17 00:00:00 2001 From: lassulus Date: Mon, 10 Aug 2020 18:49:10 +0200 Subject: buildot-stockholm: listen on build.r --- krebs/2configs/buildbot-stockholm.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/krebs/2configs/buildbot-stockholm.nix b/krebs/2configs/buildbot-stockholm.nix index 43dd96919..43a38a9f8 100644 --- a/krebs/2configs/buildbot-stockholm.nix +++ b/krebs/2configs/buildbot-stockholm.nix @@ -5,7 +5,7 @@ services.nginx = { enable = true; virtualHosts.build = { - serverAliases = [ "build.${config.networking.hostName}.r" ]; + serverAliases = [ "build.r" "build.${config.networking.hostName}.r" ]; locations."/".extraConfig = '' proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; -- cgit v1.2.3