From 27b09a744997a3439d3e6c3d1e56c8a6e10a8ff6 Mon Sep 17 00:00:00 2001 From: lassulus Date: Sun, 26 Nov 2017 09:45:48 +0100 Subject: l nixpkgs: 0c5a587 -> 7f6f0c4 --- lass/source.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lass/source.nix b/lass/source.nix index d0f77573..f168c4dd 100644 --- a/lass/source.nix +++ b/lass/source.nix @@ -10,7 +10,7 @@ in nixos-config.symlink = "stockholm/lass/1systems/${name}/config.nix"; nixpkgs.git = { url = https://github.com/nixos/nixpkgs; - ref = "0c5a587"; + ref = "7f6f0c4"; }; secrets.file = getAttr builder { buildbot = toString ; -- cgit v1.2.3 From 9273a32fee20c3f8607d190aea341251de5f5364 Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 28 Nov 2017 17:55:25 +0100 Subject: hotdog.r: remove krebs reaktor --- krebs/1systems/hotdog/config.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/krebs/1systems/hotdog/config.nix b/krebs/1systems/hotdog/config.nix index 4fdb53ae..73b5377b 100644 --- a/krebs/1systems/hotdog/config.nix +++ b/krebs/1systems/hotdog/config.nix @@ -13,7 +13,6 @@ - ]; -- cgit v1.2.3 From 1dc9411277954718cf13498b19bc042d07bb10c5 Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 28 Nov 2017 17:57:52 +0100 Subject: l prism.r: import reaktor-krebs --- lass/1systems/prism/config.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/lass/1systems/prism/config.nix b/lass/1systems/prism/config.nix index b7f0ea55..e7849446 100644 --- a/lass/1systems/prism/config.nix +++ b/lass/1systems/prism/config.nix @@ -285,6 +285,7 @@ in { { predicate = "-p udp --dport 25565"; target = "ACCEPT"; } ]; } + ]; krebs.build.host = config.krebs.hosts.prism; -- cgit v1.2.3 From e01aa796a0fcc0a3a7c6212dfec260ac6cd8da48 Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 28 Nov 2017 18:02:18 +0100 Subject: l helios.r: import virtualbox --- lass/1systems/helios/config.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/lass/1systems/helios/config.nix b/lass/1systems/helios/config.nix index eb45d92e..23307e9a 100644 --- a/lass/1systems/helios/config.nix +++ b/lass/1systems/helios/config.nix @@ -13,6 +13,7 @@ with import ; # TODO fix krebs.git.rules.[definition 2-entry 2].lass not defined # + { # automatic hardware detection boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ]; boot.kernelModules = [ "kvm-intel" ]; -- cgit v1.2.3 From d7b599e301b04d35f493445acd94fd62ce061793 Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 28 Nov 2017 18:03:30 +0100 Subject: l mail: don't show security mails --- lass/2configs/mail.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/lass/2configs/mail.nix b/lass/2configs/mail.nix index 91127f73..962efaf3 100644 --- a/lass/2configs/mail.nix +++ b/lass/2configs/mail.nix @@ -76,6 +76,7 @@ let "INBOX" "notmuch://?query=tag:inbox \ and NOT to:nix-devel\ and NOT to:shackspace\ + and NOT to:security\ and NOT to:c-base" \ "shack" "notmuch://?query=to:shackspace"\ "c-base" "notmuch://?query=to:c-base"\ -- cgit v1.2.3 From 5014ba291dce70a8b4ffb36ddc0d9cd3a45aa6e4 Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 28 Nov 2017 19:40:03 +0100 Subject: types: use cidr only in tinc.subnets --- krebs/3modules/lass/default.nix | 6 ++++-- lib/types.nix | 9 ++++++++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/krebs/3modules/lass/default.nix b/krebs/3modules/lass/default.nix index 867f1bd3..d2c3000d 100644 --- a/krebs/3modules/lass/default.nix +++ b/krebs/3modules/lass/default.nix @@ -449,8 +449,6 @@ with import ; retiolum = rec { via = internet; addrs = [ - # edinburgh university - "129.215.0.0/16" ip4.addr ip6.addr ]; @@ -472,6 +470,10 @@ with import ; lyK301Jb42wGEsVWxu3Eo/PLtp8OdD+Wdh6o/ELcc0k/YCUGFMujUM8CAwEAAQ== -----END RSA PUBLIC KEY----- ''; + tinc.subnets = [ + # edinburgh university + "129.215.0.0/16" + ]; }; }; }; diff --git a/lib/types.nix b/lib/types.nix index 08dc0974..c3b14d80 100644 --- a/lib/types.nix +++ b/lib/types.nix @@ -92,7 +92,7 @@ rec { default = null; }; addrs = mkOption { - type = listOf cidr; + type = listOf addr; default = optional (config.ip4 != null) config.ip4.addr ++ optional (config.ip6 != null) config.ip6.addr; @@ -155,6 +155,8 @@ rec { ++ (map (a: "Subnet = ${a}") net.addrs) ++ + (map (a: "Subnet = ${a}") config.subnets) + ++ [config.extraConfig] ++ [config.pubkey] @@ -173,6 +175,11 @@ rec { description = "tinc port to use to connect to host"; default = 655; }; + subnets = mkOption { + type = listOf cidr; + description = "tinc subnets"; + default = []; + }; }; })); default = null; -- cgit v1.2.3 From 613ee4c9ba347cd6b0c96b1193c8cc34451f2c63 Mon Sep 17 00:00:00 2001 From: lassulus Date: Wed, 29 Nov 2017 15:39:14 +0100 Subject: l: refactor xresources --- lass/2configs/baseX.nix | 8 +++++- lass/2configs/urxvt.nix | 42 ++++++++++++----------------- lass/2configs/xresources.nix | 63 -------------------------------------------- lass/3modules/xresources.nix | 10 +++---- 4 files changed, 27 insertions(+), 96 deletions(-) delete mode 100644 lass/2configs/xresources.nix diff --git a/lass/2configs/baseX.nix b/lass/2configs/baseX.nix index 1638264d..f7f39050 100644 --- a/lass/2configs/baseX.nix +++ b/lass/2configs/baseX.nix @@ -7,9 +7,9 @@ in { ./mpv.nix ./power-action.nix ./copyq.nix - ./xresources.nix ./livestream.nix ./dns-stuff.nix + ./urxvt.nix { hardware.pulseaudio = { enable = true; @@ -41,6 +41,11 @@ in { default = "-*-clean-*-*-*-*-*-*-*-*-*-*-iso10646-1"; }; }; + config.services.xresources.resources.X = '' + *.font: ${config.lass.fonts.regular} + *.boldFont: ${config.lass.fonts.bold} + *.italicFont: ${config.lass.fonts.italic} + ''; } ]; @@ -134,5 +139,6 @@ in { }; services.urxvtd.enable = true; + services.xresources.enable = true; lass.screenlock.enable = true; } diff --git a/lass/2configs/urxvt.nix b/lass/2configs/urxvt.nix index 1358dde7..ee50b338 100644 --- a/lass/2configs/urxvt.nix +++ b/lass/2configs/urxvt.nix @@ -1,40 +1,32 @@ { config, pkgs, ... }: - -let - inherit (config.users.extraUsers) mainUser; - -in +with import ; { - imports = [ - ../3modules/urxvtd.nix - ../3modules/xresources.nix - ]; - - services.urxvtd = { - enable = true; - users = [ mainUser.name ]; - urxvtPackage = pkgs.rxvt_unicode_with-plugins; - }; - services.xresources.enable = true; + services.urxvtd.enable = true; + services.xresources.resources.urxvt = '' - URxvt*scrollBar: false - URxvt*urgentOnBell: true - URxvt*font: -*-clean-*-*-*-*-*-*-*-*-*-*-iso10646-* - URxvt*boldFont: -*-clean-*-*-*-*-*-*-*-*-*-*-iso10646-* + URxvt*SaveLines: 4096 + URxvt*scrollBar: false + URxvt*urgentOnBell: true URxvt.perl-ext-common: default,clipboard,url-select,keyboard-select - URxvt.url-select.launcher: browser-select + + ${optionalString (hasAttr "browser" config.lass) + "URxvt.url-select.launcher: ${config.lass.browser.select}/bin/browser-select" + } + URxvt.url-select.underline: true URxvt.keysym.M-u: perl:url-select:select_next URxvt.keysym.M-Escape: perl:keyboard-select:activate URxvt.keysym.M-s: perl:keyboard-select:search - URxvt.intensityStyles: false + URxvt.intensityStyles: false - URxvt*background: #000000 - URxvt*foreground: #ffffff + URxvt*background: #000000 + URxvt*foreground: #ffffff !change unreadable blue - URxvt*color4: #268bd2 + URxvt*color4: #268bd2 + + URxvt*color0: #232342 ''; } diff --git a/lass/2configs/xresources.nix b/lass/2configs/xresources.nix deleted file mode 100644 index a3c54f3a..00000000 --- a/lass/2configs/xresources.nix +++ /dev/null @@ -1,63 +0,0 @@ -{ config, pkgs, ... }: - -with import ; - -let - - xresources = pkgs.writeText "Xresources" '' - URxvt*scrollBar: false - URxvt*urgentOnBell: true - URxvt*SaveLines: 4096 - - URxvt.font: ${config.lass.fonts.regular} - URxvt.boldFont: ${config.lass.fonts.bold} - URxvt.italicFont: ${config.lass.fonts.italic} - - ! ref https://github.com/muennich/urxvt-perls - URxvt.perl-lib: ${pkgs.urxvt_perls}/lib/urxvt/perl - URxvt.perl-ext-common: default,clipboard,url-select,keyboard-select - ${optionalString (hasAttr "browser" config.lass) - "URxvt.url-select.launcher: ${config.lass.browser.select}/bin/browser-select" - } - URxvt.url-select.underline: true - URxvt.keysym.M-u: perl:url-select:select_next - URxvt.keysym.M-Escape: perl:keyboard-select:activate - URxvt.keysym.M-s: perl:keyboard-select:search - - URxvt.intensityStyles: false - - URxvt*background: #000000 - URxvt*foreground: #d0d7d0 - - URxvt*cursorColor: #f042b0 - URxvt*cursorColor2: #f0b000 - URxvt*cursorBlink: off - - URxvt*.pointerBlank: true - URxvt*.pointerBlankDelay: 987654321 - URxvt*.pointerColor: #f042b0 - URxvt*.pointerColor2: #050505 - - URxvt*color0: #232342 - ''; - -in { - systemd.services.xresources = { - description = "xresources"; - wantedBy = [ "multi-user.target" ]; - after = [ "display-manager.service" ]; - - environment = { - DISPLAY = ":0"; - }; - - restartIfChanged = true; - - serviceConfig = { - Type = "simple"; - ExecStart = "${pkgs.xorg.xrdb}/bin/xrdb -merge ${xresources}"; - Restart = "on-failure"; - User = "lass"; - }; - }; -} diff --git a/lass/3modules/xresources.nix b/lass/3modules/xresources.nix index 07496302..629b2303 100644 --- a/lass/3modules/xresources.nix +++ b/lass/3modules/xresources.nix @@ -4,16 +4,13 @@ #prefix with Attribute Name #ex: urxvt -# -# with builtins; with lib; let - inherit (import ../../tv/4lib { inherit pkgs lib; }) shell-escape; - inherit (pkgs) writeScript; + inherit (pkgs) writeScript writeText; in @@ -46,12 +43,11 @@ in config = let cfg = config.services.xresources; - xres = concatStringsSep "\n" (attrValues cfg.resources); + xres = writeText "xresources" (concatStringsSep "\n" (attrValues cfg.resources)); in mkIf cfg.enable { services.xserver.displayManager.sessionCommands = '' - echo ${shell-escape xres} | xrdb -merge + xrdb -merge ${xres} ''; }; - } -- cgit v1.2.3 From be1df23dbe00b646256f8ccfab5bcdc70c375c9d Mon Sep 17 00:00:00 2001 From: tv Date: Sun, 26 Nov 2017 16:10:06 +0100 Subject: tv backup: add nomic-pull-querel-home --- tv/2configs/backup.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tv/2configs/backup.nix b/tv/2configs/backup.nix index f76fb2e0..14d38156 100644 --- a/tv/2configs/backup.nix +++ b/tv/2configs/backup.nix @@ -22,6 +22,12 @@ with import ; dst = { host = config.krebs.hosts.zu; path = "/bku/nomic-home"; }; startAt = "04:20"; }; + nomic-pull-querel-home = { + method = "pull"; + src = { host = config.krebs.hosts.querel; path = "/home"; }; + dst = { host = config.krebs.hosts.nomic; path = "/fs/ponyhof/bku/querel-home"; }; + startAt = "00:00"; + }; wu-home-xu = { method = "push"; src = { host = config.krebs.hosts.wu; path = "/home"; }; -- cgit v1.2.3 From 7e57f6ee6dcc61bee31f10c2eff8a2d0d074565a Mon Sep 17 00:00:00 2001 From: lassulus Date: Wed, 29 Nov 2017 16:15:10 +0100 Subject: l baseX: more pkgs --- lass/2configs/baseX.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lass/2configs/baseX.nix b/lass/2configs/baseX.nix index f7f39050..d489ecfa 100644 --- a/lass/2configs/baseX.nix +++ b/lass/2configs/baseX.nix @@ -69,9 +69,11 @@ in { dic dmenu gi + git-preview gitAndTools.qgit - lm_sensors haskellPackages.hledger + lm_sensors + mpv-poll much ncdu nix-repl -- cgit v1.2.3 From 53e45b128688d6fa103e8f117aa35a793781662a Mon Sep 17 00:00:00 2001 From: lassulus Date: Wed, 29 Nov 2017 16:21:30 +0100 Subject: l wine: add wine64 --- lass/2configs/wine.nix | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/lass/2configs/wine.nix b/lass/2configs/wine.nix index 0d2b731c..d60b1fee 100644 --- a/lass/2configs/wine.nix +++ b/lass/2configs/wine.nix @@ -4,10 +4,6 @@ let mainUser = config.users.extraUsers.mainUser; in { - krebs.per-user.wine.packages = with pkgs; [ - wine - #(wineFull.override { wineBuild = "wine64"; }) - ]; users.users= { wine = { name = "wine"; @@ -19,9 +15,27 @@ in { "video" ]; createHome = true; + packages = [ + pkgs.wine + ]; + }; + wine64 = { + name = "wine64"; + description = "user for running wine in 64bit"; + home = "/home/wine64"; + useDefaultShell = true; + extraGroups = [ + "audio" + "video" + ]; + createHome = true; + packages = [ + (pkgs.wine.override { wineBuild = "wineWow"; }) + ]; }; }; security.sudo.extraConfig = '' ${mainUser.name} ALL=(wine) NOPASSWD: ALL + ${mainUser.name} ALL=(wine64) NOPASSWD: ALL ''; } -- cgit v1.2.3 From ff3e1c0d031ad18d6e7bb6720358cd55e115b4f8 Mon Sep 17 00:00:00 2001 From: lassulus Date: Wed, 29 Nov 2017 16:22:10 +0100 Subject: l helios.r: add dcso coop env --- lass/1systems/helios/config.nix | 1 + lass/2configs/dcso-dev.nix | 46 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 lass/2configs/dcso-dev.nix diff --git a/lass/1systems/helios/config.nix b/lass/1systems/helios/config.nix index 23307e9a..dfca3d4d 100644 --- a/lass/1systems/helios/config.nix +++ b/lass/1systems/helios/config.nix @@ -14,6 +14,7 @@ with import ; # + { # automatic hardware detection boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ]; boot.kernelModules = [ "kvm-intel" ]; diff --git a/lass/2configs/dcso-dev.nix b/lass/2configs/dcso-dev.nix new file mode 100644 index 00000000..8aadaa7b --- /dev/null +++ b/lass/2configs/dcso-dev.nix @@ -0,0 +1,46 @@ +{ config, lib, pkgs, ... }: + +let + mainUser = config.users.extraUsers.mainUser; + inherit (import ) genid; + +in { + users.extraUsers = { + dev = { + name = "dev"; + uid = genid "dev"; + description = "user for collaborative development"; + home = "/home/dev"; + useDefaultShell = true; + createHome = true; + openssh.authorizedKeys.keys = [ + "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDhQdDQFMxXOjbC+Avx3mlcFHqQpFUk/q9sO6ATA65jCV3YzN11vhZDDv54hABVS2h8TPXs7Lu3PCvK9qouASd2h4Ie9cExUmn50G/iwgFIODsCugVYBzVt1iwaAdwz1Hb9DKYXbVXanzVJjimmrrlQNvsyZg85lcnfyedpPX5ad+4FdSP68LHqEHC18LTitldR6V4P1omaKHlOtVpDgR/72tDgbtNZDBn3EU+TPk9OLTzjc6PinPw4iIvjEfiu14APwXpFDIqT7P7SjOEFpa0v/1z7dhxIy/Z9XbqyEdUfhv3PjZR5K2C+VzR7g6jVEVR2xFId51MpLv/Un4/lalbphBEw3I90Rr8tatOJiFhyrXbaKTcLqp1sIu05OxdPkm3hzfmLIhoKxhaIlXH7WQ9sAqxL1NAQ7O+J6yT4DMnwKzvpkkJjBaGtV84Pp1cccfNRH8XXID3FkWkrUpdgXWBpyLnRq4ilUJTajkU0GSdXkq8kLL3mWg9LPRTg3dmDj61ZB/qhjM61ppwHJvDRN9WI5HruXIU6nOQjh5yE2C/JZfLcsZD4Y1UDBy5/JSZrCVT2sQjFopkkYEkRCbX7oITHOH4iyRdxZkKWLUPboFrcmBpXO+owCEhO4JZrtfFWMC6qM++nrmiZWOrdIOIvdYHWluhKR2shlkisEKQP5pUqkw== markus.hihn@dcso.de" + ]; + packages = with pkgs; [ + emacs25-nox + + (pkgs.symlinkJoin { + name = "tmux"; + paths = [ + (pkgs.writeDashBin "tmux" '' + exec ${pkgs.tmux}/bin/tmux -f ${pkgs.writeText "tmux.conf" '' + set-option -g default-terminal screen-256color + + #use session instead of windows + bind-key c new-session + bind-key p switch-client -p + bind-key n switch-client -n + bind-key C-s switch-client -l + ''} "$@" + '') + pkgs.tmux + ]; + }) + ]; + }; + }; + + security.sudo.extraConfig = '' + ${mainUser.name} ALL=(dev) NOPASSWD: ALL + ''; +} -- cgit v1.2.3 From 102c4e907c82ed291da09cfaece5410286697776 Mon Sep 17 00:00:00 2001 From: lassulus Date: Wed, 29 Nov 2017 16:38:21 +0100 Subject: l pkgs.screengrab: get resolution from xrandr --- lass/5pkgs/default.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lass/5pkgs/default.nix b/lass/5pkgs/default.nix index e0775f07..5b668c88 100644 --- a/lass/5pkgs/default.nix +++ b/lass/5pkgs/default.nix @@ -21,6 +21,9 @@ xmonad-lass = import ./xmonad-lass.nix { inherit config pkgs; }; yt-next = pkgs.callPackage ./yt-next/default.nix {}; - screengrab = pkgs.writeDashBin "screengrab" "${pkgs.ffmpeg}/bin/ffmpeg -f x11grab -r 25 -s 1024x768 -i :0.0 -c:v huffyuv $1"; + screengrab = pkgs.writeDashBin "screengrab" '' + resolution="$(${pkgs.xorg.xrandr}/bin/xrandr | ${pkgs.gnugrep}/bin/grep '*' | ${pkgs.gawk}/bin/awk '{print $1}')" + ${pkgs.ffmpeg}/bin/ffmpeg -f x11grab -r 25 -i :0.0 -s $resolution -c:v huffyuv $1 + ''; }; } -- cgit v1.2.3 From 23d301097e8b3fb74154b4b06619d25e7d2dec36 Mon Sep 17 00:00:00 2001 From: lassulus Date: Thu, 30 Nov 2017 17:17:28 +0100 Subject: l nixpkgs: 7f6f0c4 -> f9390d6 --- lass/source.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lass/source.nix b/lass/source.nix index f168c4dd..292b92a9 100644 --- a/lass/source.nix +++ b/lass/source.nix @@ -10,7 +10,7 @@ in nixos-config.symlink = "stockholm/lass/1systems/${name}/config.nix"; nixpkgs.git = { url = https://github.com/nixos/nixpkgs; - ref = "7f6f0c4"; + ref = "f9390d6"; }; secrets.file = getAttr builder { buildbot = toString ; -- cgit v1.2.3 From 3c631cfa76849cb4640e17d8cdda969e4b6f423e Mon Sep 17 00:00:00 2001 From: lassulus Date: Sun, 3 Dec 2017 22:29:18 +0100 Subject: fetchWallpaper: get DISPLAY from xserver.display --- krebs/3modules/fetchWallpaper.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/krebs/3modules/fetchWallpaper.nix b/krebs/3modules/fetchWallpaper.nix index 8d4933cb..58d361c6 100644 --- a/krebs/3modules/fetchWallpaper.nix +++ b/krebs/3modules/fetchWallpaper.nix @@ -26,8 +26,8 @@ let default = "/var/lib/wallpaper"; }; display = mkOption { - type = types.str; - default = ":0"; + type = types.int; + default = config.services.xserver.display; }; unitConfig = mkOption { type = types.attrsOf types.str; @@ -81,7 +81,7 @@ let environment = { URL = cfg.url; - DISPLAY = cfg.display; + DISPLAY = ":${toString cfg.display}"; }; restartIfChanged = true; -- cgit v1.2.3 From c8cdf7edf33733706403f736b4bed9e2568da4b3 Mon Sep 17 00:00:00 2001 From: lassulus Date: Sun, 3 Dec 2017 22:29:40 +0100 Subject: l helios.r: add games related stuff --- lass/1systems/helios/config.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lass/1systems/helios/config.nix b/lass/1systems/helios/config.nix index dfca3d4d..b14ef2a3 100644 --- a/lass/1systems/helios/config.nix +++ b/lass/1systems/helios/config.nix @@ -15,6 +15,7 @@ with import ; + { # automatic hardware detection boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ]; boot.kernelModules = [ "kvm-intel" ]; @@ -62,6 +63,13 @@ with import ; maxTime = 9001; }; } + { + #urban terror port + krebs.iptables.tables.filter.INPUT.rules = [ + { predicate = "-p tcp --dport 27960"; target = "ACCEPT"; } + { predicate = "-p udp --dport 27960"; target = "ACCEPT"; } + ]; + } ]; krebs.build.host = config.krebs.hosts.helios; @@ -93,7 +101,6 @@ with import ; environment.systemPackages = with pkgs; [ ag vim - rxvt_unicode git rsync hashPassword -- cgit v1.2.3 From d7185c7283954ca572b9dda1179e67d06042890a Mon Sep 17 00:00:00 2001 From: lassulus Date: Sun, 3 Dec 2017 22:48:49 +0100 Subject: l baseX: use urxvt with plugins --- lass/2configs/baseX.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lass/2configs/baseX.nix b/lass/2configs/baseX.nix index d489ecfa..784b97d3 100644 --- a/lass/2configs/baseX.nix +++ b/lass/2configs/baseX.nix @@ -81,7 +81,7 @@ in { pavucontrol powertop push - rxvt_unicode + rxvt_unicode_with-plugins screengrab slock sxiv -- cgit v1.2.3 From 3cd8dee321daa694ef6d9ae2f7731daccd0a6062 Mon Sep 17 00:00:00 2001 From: lassulus Date: Sun, 3 Dec 2017 22:56:40 +0100 Subject: l prism.r: import dsco-dev --- lass/1systems/prism/config.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/lass/1systems/prism/config.nix b/lass/1systems/prism/config.nix index e7849446..b18abf50 100644 --- a/lass/1systems/prism/config.nix +++ b/lass/1systems/prism/config.nix @@ -286,6 +286,7 @@ in { ]; } + ]; krebs.build.host = config.krebs.hosts.prism; -- cgit v1.2.3 From 1d687bb2a8e3ee0d129b01a645f998b3cdafd82d Mon Sep 17 00:00:00 2001 From: lassulus Date: Sun, 3 Dec 2017 23:00:24 +0100 Subject: l: add xserver module --- lass/3modules/default.nix | 1 + lass/3modules/xserver/default.nix | 96 ++++++++++++++++++++++++++++++++++ lass/3modules/xserver/xserver.conf.nix | 40 ++++++++++++++ 3 files changed, 137 insertions(+) create mode 100644 lass/3modules/xserver/default.nix create mode 100644 lass/3modules/xserver/xserver.conf.nix diff --git a/lass/3modules/default.nix b/lass/3modules/default.nix index e14e39bc..81b52c30 100644 --- a/lass/3modules/default.nix +++ b/lass/3modules/default.nix @@ -11,6 +11,7 @@ _: ./screenlock.nix ./umts.nix ./usershadow.nix + ./xserver ./xresources.nix ]; } diff --git a/lass/3modules/xserver/default.nix b/lass/3modules/xserver/default.nix new file mode 100644 index 00000000..c0cb37d6 --- /dev/null +++ b/lass/3modules/xserver/default.nix @@ -0,0 +1,96 @@ +{ config, pkgs, ... }@args: +with import ; +let + + out = { + options.lass.xserver = api; + config = mkIf cfg.enable imp; + }; + + user = config.krebs.build.user; + + cfg = config.lass.xserver; + api = { + enable = mkEnableOption "lass xserver"; + }; + imp = { + + services.xserver = { + # Don't install feh into systemPackages + # refs + desktopManager.session = mkForce []; + + enable = true; + display = 11; + tty = 11; + }; + + systemd.services.display-manager.enable = false; + + systemd.services.xmonad = { + wantedBy = [ "multi-user.target" ]; + requires = [ "xserver.service" ]; + environment = { + DISPLAY = ":${toString config.services.xserver.display}"; + + XMONAD_STARTUP_HOOK = pkgs.writeDash "xmonad-startup-hook" '' + ${pkgs.xorg.xhost}/bin/xhost +LOCAL: & + ${config.services.xserver.displayManager.sessionCommands} + wait + ''; + + XMONAD_DATA_DIR = "/tmp"; + }; + serviceConfig = { + SyslogIdentifier = "xmonad"; + ExecStart = "${pkgs.xmonad-lass}/bin/xmonad"; + ExecStop = "${pkgs.xmonad-lass}/bin/xmonad --shutdown"; + User = user.name; + WorkingDirectory = user.home; + }; + }; + + systemd.services.xserver = { + after = [ + "systemd-udev-settle.service" + "local-fs.target" + "acpid.service" + ]; + reloadIfChanged = true; + environment = { + XKB_BINDIR = "${pkgs.xorg.xkbcomp}/bin"; # Needed for the Xkb extension. + XORG_DRI_DRIVER_PATH = "/run/opengl-driver/lib/dri"; # !!! Depends on the driver selected at runtime. + LD_LIBRARY_PATH = concatStringsSep ":" ( + [ "${pkgs.xorg.libX11}/lib" "${pkgs.xorg.libXext}/lib" ] + ++ concatLists (catAttrs "libPath" config.services.xserver.drivers)); + }; + serviceConfig = { + SyslogIdentifier = "xserver"; + ExecReload = "${pkgs.coreutils}/bin/echo NOP"; + ExecStart = toString [ + "${pkgs.xorg.xorgserver}/bin/X" + ":${toString config.services.xserver.display}" + "vt${toString config.services.xserver.tty}" + "-config ${import ./xserver.conf.nix args}" + "-logfile /dev/null -logverbose 0 -verbose 3" + "-nolisten tcp" + "-xkbdir ${pkgs.xkeyboard_config}/etc/X11/xkb" + ]; + }; + }; + systemd.services.urxvtd = { + wantedBy = [ "multi-user.target" ]; + reloadIfChanged = true; + serviceConfig = { + SyslogIdentifier = "urxvtd"; + ExecReload = "${pkgs.coreutils}/bin/echo NOP"; + ExecStart = "${pkgs.rxvt_unicode_with-plugins}/bin/urxvtd"; + Restart = "always"; + RestartSec = "2s"; + StartLimitBurst = 0; + User = user.name; + }; + }; + }; + +in out diff --git a/lass/3modules/xserver/xserver.conf.nix b/lass/3modules/xserver/xserver.conf.nix new file mode 100644 index 00000000..6f34e015 --- /dev/null +++ b/lass/3modules/xserver/xserver.conf.nix @@ -0,0 +1,40 @@ +{ config, lib, pkgs, ... }: + +with import ; + +let + cfg = config.services.xserver; +in + +pkgs.stdenv.mkDerivation { + name = "xserver.conf"; + + xfs = optionalString (cfg.useXFS != false) + ''FontPath "${toString cfg.useXFS}"''; + + inherit (cfg) config; + + buildCommand = + '' + echo 'Section "Files"' >> $out + echo $xfs >> $out + + for i in ${toString config.fonts.fonts}; do + if test "''${i:0:''${#NIX_STORE}}" == "$NIX_STORE"; then + for j in $(find $i -name fonts.dir); do + echo " FontPath \"$(dirname $j)\"" >> $out + done + fi + done + + for i in $(find ${toString cfg.modules} -type d); do + if test $(echo $i/*.so* | wc -w) -ne 0; then + echo " ModulePath \"$i\"" >> $out + fi + done + + echo 'EndSection' >> $out + + echo "$config" >> $out + ''; +} -- cgit v1.2.3 From 4c50faee7eab3580d96e2c1df05d0504612a4447 Mon Sep 17 00:00:00 2001 From: lassulus Date: Sun, 3 Dec 2017 23:09:06 +0100 Subject: l baseX: use xserver module --- lass/2configs/baseX.nix | 26 +------------------------- 1 file changed, 1 insertion(+), 25 deletions(-) diff --git a/lass/2configs/baseX.nix b/lass/2configs/baseX.nix index 784b97d3..32a9f66c 100644 --- a/lass/2configs/baseX.nix +++ b/lass/2configs/baseX.nix @@ -104,26 +104,8 @@ in { xlibs.fontschumachermisc ]; + lass.xserver.enable = true; services.xserver = { - enable = true; - - desktopManager.xterm.enable = false; - desktopManager.default = "none"; - displayManager.lightdm.enable = true; - displayManager.lightdm.autoLogin = { - enable = true; - user = "lass"; - }; - windowManager.default = "xmonad"; - windowManager.session = [{ - name = "xmonad"; - start = '' - ${pkgs.xorg.xhost}/bin/xhost +LOCAL: - ${pkgs.xmonad-lass}/bin/xmonad & - waitPID=$! - ''; - }]; - layout = "us"; xkbModel = "evdev"; xkbVariant = "altgr-intl"; @@ -134,12 +116,6 @@ in { HandleLidSwitch=ignore ''; - services.xserver.synaptics = { - enable = true; - twoFingerScroll = true; - accelFactor = "0.035"; - }; - services.urxvtd.enable = true; services.xresources.enable = true; lass.screenlock.enable = true; -- cgit v1.2.3 From 0aba986658bbf743902881f771dc9c0da30d8fe0 Mon Sep 17 00:00:00 2001 From: lassulus Date: Sun, 3 Dec 2017 23:13:01 +0100 Subject: l copyq: get DISPLAY from xserver.display --- lass/2configs/copyq.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lass/2configs/copyq.nix b/lass/2configs/copyq.nix index fa01a99c..cd10313f 100644 --- a/lass/2configs/copyq.nix +++ b/lass/2configs/copyq.nix @@ -21,9 +21,9 @@ let in { systemd.services.copyq = { wantedBy = [ "multi-user.target" ]; - requires = [ "display-manager.service" ]; + requires = [ "xserver.service" ]; environment = { - DISPLAY = ":0"; + DISPLAY = ":${toString config.services.xserver.display}"; }; path = with pkgs; [ qt5.full -- cgit v1.2.3 From aab2624a60c87ba3ce5e495e823eeeb0a5446fe0 Mon Sep 17 00:00:00 2001 From: lassulus Date: Sun, 3 Dec 2017 23:13:25 +0100 Subject: l dsco-dev: add more pubkeys --- lass/2configs/dcso-dev.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lass/2configs/dcso-dev.nix b/lass/2configs/dcso-dev.nix index 8aadaa7b..b7fcc7aa 100644 --- a/lass/2configs/dcso-dev.nix +++ b/lass/2configs/dcso-dev.nix @@ -14,7 +14,9 @@ in { useDefaultShell = true; createHome = true; openssh.authorizedKeys.keys = [ + config.krebs.users.lass.pubkey "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDhQdDQFMxXOjbC+Avx3mlcFHqQpFUk/q9sO6ATA65jCV3YzN11vhZDDv54hABVS2h8TPXs7Lu3PCvK9qouASd2h4Ie9cExUmn50G/iwgFIODsCugVYBzVt1iwaAdwz1Hb9DKYXbVXanzVJjimmrrlQNvsyZg85lcnfyedpPX5ad+4FdSP68LHqEHC18LTitldR6V4P1omaKHlOtVpDgR/72tDgbtNZDBn3EU+TPk9OLTzjc6PinPw4iIvjEfiu14APwXpFDIqT7P7SjOEFpa0v/1z7dhxIy/Z9XbqyEdUfhv3PjZR5K2C+VzR7g6jVEVR2xFId51MpLv/Un4/lalbphBEw3I90Rr8tatOJiFhyrXbaKTcLqp1sIu05OxdPkm3hzfmLIhoKxhaIlXH7WQ9sAqxL1NAQ7O+J6yT4DMnwKzvpkkJjBaGtV84Pp1cccfNRH8XXID3FkWkrUpdgXWBpyLnRq4ilUJTajkU0GSdXkq8kLL3mWg9LPRTg3dmDj61ZB/qhjM61ppwHJvDRN9WI5HruXIU6nOQjh5yE2C/JZfLcsZD4Y1UDBy5/JSZrCVT2sQjFopkkYEkRCbX7oITHOH4iyRdxZkKWLUPboFrcmBpXO+owCEhO4JZrtfFWMC6qM++nrmiZWOrdIOIvdYHWluhKR2shlkisEKQP5pUqkw== markus.hihn@dcso.de" + "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQC1T5+2epslFARSnETdr4wdolA6ocJaD4H9tmz6BZFQKXlwIq+OMp+sSEdwYwW3Lu9+mNbBHPxVVJDWg/We9DXB0ezXPM5Bs1+FcehmkoGwkmgKaFCDt0sL+CfSnog/3wEkN21O/rQxVFqMmiJ7WUDGci6IKCFZ5ZjOsmmfHg5p3LYxU9xv33fNr2v+XauhrGbFtQ7eDz4kSywxN/aw73LN4d8em0V0UV8VPI3Qkw7MamDFwefA+K1TfK8pBzMeruU6N7HLuNkpkAp7kS+K4Zzd72aQtR37a5qMiFUbOxQ9B7iFypuPx0iu6ZwY1s/sM8t3kLmcDJ9O4FOTzlbpneet3as6iJ+Ckr/TlfKor2Tl5pWcXh2FXHoG8VUu5bYmIViJBrKihAlAQfQN0mJ9fdFTnCXVTtbYTy11s4eEVHgUlb7oSpgBnx5bnBONgApbsOX9zyoo8wz8KkZBcf1SQpkV5br8uUAHCcZtHuY6I3kKlv+8lJmgUipiYzMdTi7+dHa49gVEcEKL4ZnJ0msQkl4XT7JjKETLvumC4/TIqVuRu48wuYalkCR9OzxCsTXQ/msBJBztPdYLrEOXVb2HfzuCT+43UuMQ5rP/EoPy0TWQO9BaqfEXqvbOvWjVxj/GMvglQ2ChZTwHxwwTKB8qRVvJLnbZQwizQiSrkzjb6hRJfQ== u0_a165@localhost" ]; packages = with pkgs; [ emacs25-nox -- cgit v1.2.3 From 4c6a578673a2c8eb4f7a3e65a8835071b2b572e4 Mon Sep 17 00:00:00 2001 From: lassulus Date: Sun, 3 Dec 2017 23:13:54 +0100 Subject: l sreenlock: get DISPLAY from xserver.display --- lass/3modules/screenlock.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lass/3modules/screenlock.nix b/lass/3modules/screenlock.nix index 06ca1f27..e16ce986 100644 --- a/lass/3modules/screenlock.nix +++ b/lass/3modules/screenlock.nix @@ -23,7 +23,7 @@ let before = [ "sleep.target" ]; wantedBy = [ "sleep.target" ]; environment = { - DISPLAY = ":0"; + DISPLAY = ":${toString config.services.xserver.display}"; }; serviceConfig = { SyslogIdentifier = "screenlock"; -- cgit v1.2.3 From b4850cfd1dbfaa5ddea0b51799ff6eb9447cf3f7 Mon Sep 17 00:00:00 2001 From: lassulus Date: Sun, 3 Dec 2017 23:17:25 +0100 Subject: l xresources: fix xrdb path --- lass/3modules/xresources.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lass/3modules/xresources.nix b/lass/3modules/xresources.nix index 629b2303..bf7e2a01 100644 --- a/lass/3modules/xresources.nix +++ b/lass/3modules/xresources.nix @@ -47,7 +47,7 @@ in in mkIf cfg.enable { services.xserver.displayManager.sessionCommands = '' - xrdb -merge ${xres} + ${pkgs.xorg.xrdb}/bin/xrdb -merge ${xres} ''; }; } -- cgit v1.2.3 From c3db1f794a802068397cec9698026009cebcb86c Mon Sep 17 00:00:00 2001 From: lassulus Date: Sun, 3 Dec 2017 23:18:22 +0100 Subject: l xmonad: cleanup --- lass/5pkgs/xmonad-lass.nix | 41 +++++++++++++---------------------------- 1 file changed, 13 insertions(+), 28 deletions(-) diff --git a/lass/5pkgs/xmonad-lass.nix b/lass/5pkgs/xmonad-lass.nix index 47868624..65bec117 100644 --- a/lass/5pkgs/xmonad-lass.nix +++ b/lass/5pkgs/xmonad-lass.nix @@ -3,6 +3,7 @@ pkgs.writeHaskell "xmonad-lass" { executables.xmonad = { extra-depends = [ "containers" + "extra" "unix" "X11" "xmonad" @@ -20,17 +21,15 @@ module Main where import XMonad import qualified XMonad.StackSet as W -import Control.Exception +import Control.Monad.Extra (whenJustM) import Data.List (isInfixOf) -import System.Environment (getArgs, withArgs) -import System.IO (hPutStrLn, stderr) +import System.Environment (getArgs, lookupEnv) import System.Posix.Process (executeFile) import XMonad.Actions.CopyWindow (copy, kill1) import XMonad.Actions.CycleWS (toggleWS) import XMonad.Actions.DynamicWorkspaces ( addWorkspacePrompt, renameWorkspace, removeEmptyWorkspace) import XMonad.Actions.DynamicWorkspaces (withWorkspace) import XMonad.Actions.GridSelect (GSConfig(..), gridselectWorkspace, navNSearch) -import XMonad.Actions.UpdatePointer (updatePointer) import XMonad.Hooks.FloatNext (floatNext) import XMonad.Hooks.FloatNext (floatNextHook) import XMonad.Hooks.ManageDocks (avoidStruts, ToggleStruts(ToggleStruts)) @@ -48,28 +47,30 @@ import XMonad.Layout.SimpleFloat (simpleFloat) import XMonad.Stockholm.Shutdown myTerm :: FilePath -myTerm = "${pkgs.rxvt_unicode}/bin/urxvtc" +myTerm = "${pkgs.rxvt_unicode_with-plugins}/bin/urxvtc" myFont :: String myFont = "${config.lass.fonts.regular}" main :: IO () main = getArgs >>= \case - ["--shutdown"] -> sendShutdownEvent - _ -> mainNoArgs + ["--shutdown"] -> sendShutdownEvent + _ -> main' -mainNoArgs :: IO () -mainNoArgs = do - xmonad' +main' :: IO () +main' = do + xmonad $ withUrgencyHook (SpawnUrgencyHook "echo emit Urgency ") $ def { terminal = myTerm , modMask = mod4Mask , layoutHook = smartBorders $ myLayoutHook - , logHook = updatePointer (0.25, 0.25) (0.25, 0.25) , manageHook = placeHook (smart (1,0)) <+> floatNextHook + , startupHook = + whenJustM (liftIO (lookupEnv "XMONAD_STARTUP_HOOK")) + (\path -> forkFile path [] Nothing) , normalBorderColor = "#1c1c1c" - , focusedBorderColor = "#f000b0" + , focusedBorderColor = "#ff0000" , handleEventHook = handleShutdownEvent , workspaces = [ "dashboard", "sys", "wp" ] } `additionalKeysP` myKeyMap @@ -78,22 +79,6 @@ myLayoutHook = defLayout where defLayout = minimize $ ((avoidStruts $ Tall 1 (3/100) (1/2) ||| Full ||| Mirror (Tall 1 (3/100) (1/2))) ||| FixedColumn 2 80 80 1) ||| simpleFloat - -xmonad' :: (LayoutClass l Window, Read (l Window)) => XConfig l -> IO () -xmonad' conf = do - let path = "/tmp/xmonad.state" - try (readFile path) >>= \case - Right content -> do - hPutStrLn stderr ("resuming from " ++ path) - withArgs ("--resume" : lines content) (xmonad conf) - Left e -> do - hPutStrLn stderr (displaySomeException e) - xmonad conf - -displaySomeException :: SomeException -> String -displaySomeException = displayException - - myKeyMap :: [([Char], X ())] myKeyMap = [ ("M4-", spawn "${config.lass.screenlock.command}") -- cgit v1.2.3 From 47e7a6f6880195c41465e92b2d11f060d9e21311 Mon Sep 17 00:00:00 2001 From: lassulus Date: Sun, 3 Dec 2017 23:31:31 +0100 Subject: fetchWallpaper: display should be string --- krebs/3modules/fetchWallpaper.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/krebs/3modules/fetchWallpaper.nix b/krebs/3modules/fetchWallpaper.nix index 58d361c6..f6718812 100644 --- a/krebs/3modules/fetchWallpaper.nix +++ b/krebs/3modules/fetchWallpaper.nix @@ -26,8 +26,8 @@ let default = "/var/lib/wallpaper"; }; display = mkOption { - type = types.int; - default = config.services.xserver.display; + type = types.str; + default = ":${toString config.services.xserver.display}"; }; unitConfig = mkOption { type = types.attrsOf types.str; @@ -81,7 +81,7 @@ let environment = { URL = cfg.url; - DISPLAY = ":${toString cfg.display}"; + DISPLAY = cfg.display; }; restartIfChanged = true; -- cgit v1.2.3 From 054d0cceb132d5f5766de31b3e859c4786fb0661 Mon Sep 17 00:00:00 2001 From: lassulus Date: Mon, 4 Dec 2017 01:01:26 +0100 Subject: ircd: add motd --- krebs/2configs/ircd.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/krebs/2configs/ircd.nix b/krebs/2configs/ircd.nix index 38f58952..b534f9ad 100644 --- a/krebs/2configs/ircd.nix +++ b/krebs/2configs/ircd.nix @@ -7,6 +7,9 @@ services.charybdis = { enable = true; + motd = '' + hello + ''; config = '' serverinfo { name = "${config.krebs.build.host.name}.irc.retiolum"; -- cgit v1.2.3 From 99468fec8fe675ffd224ded2ff91ed22c021bb52 Mon Sep 17 00:00:00 2001 From: lassulus Date: Mon, 4 Dec 2017 11:51:25 +0100 Subject: l xresources: add updateXresources cmd --- lass/3modules/xresources.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lass/3modules/xresources.nix b/lass/3modules/xresources.nix index bf7e2a01..017dbff2 100644 --- a/lass/3modules/xresources.nix +++ b/lass/3modules/xresources.nix @@ -49,5 +49,10 @@ in services.xserver.displayManager.sessionCommands = '' ${pkgs.xorg.xrdb}/bin/xrdb -merge ${xres} ''; + environment.systemPackages = [ + (pkgs.writeDashBin "updateXresources" '' + ${pkgs.xorg.xrdb}/bin/xrdb -merge ${xres} + '') + ]; }; } -- cgit v1.2.3 From 3a38f5b6eaa7911ffe966821e86cce0603675dfa Mon Sep 17 00:00:00 2001 From: lassulus Date: Mon, 4 Dec 2017 11:52:00 +0100 Subject: l xserver: add dpi support --- lass/3modules/xserver/default.nix | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/lass/3modules/xserver/default.nix b/lass/3modules/xserver/default.nix index c0cb37d6..462c6dee 100644 --- a/lass/3modules/xserver/default.nix +++ b/lass/3modules/xserver/default.nix @@ -10,6 +10,7 @@ let user = config.krebs.build.user; cfg = config.lass.xserver; + xcfg = config.services.xserver; api = { enable = mkEnableOption "lass xserver"; }; @@ -31,11 +32,11 @@ let wantedBy = [ "multi-user.target" ]; requires = [ "xserver.service" ]; environment = { - DISPLAY = ":${toString config.services.xserver.display}"; + DISPLAY = ":${toString xcfg.display}"; XMONAD_STARTUP_HOOK = pkgs.writeDash "xmonad-startup-hook" '' ${pkgs.xorg.xhost}/bin/xhost +LOCAL: & - ${config.services.xserver.displayManager.sessionCommands} + ${xcfg.displayManager.sessionCommands} wait ''; @@ -62,22 +63,26 @@ let XORG_DRI_DRIVER_PATH = "/run/opengl-driver/lib/dri"; # !!! Depends on the driver selected at runtime. LD_LIBRARY_PATH = concatStringsSep ":" ( [ "${pkgs.xorg.libX11}/lib" "${pkgs.xorg.libXext}/lib" ] - ++ concatLists (catAttrs "libPath" config.services.xserver.drivers)); + ++ concatLists (catAttrs "libPath" xcfg.drivers)); }; serviceConfig = { SyslogIdentifier = "xserver"; ExecReload = "${pkgs.coreutils}/bin/echo NOP"; ExecStart = toString [ "${pkgs.xorg.xorgserver}/bin/X" - ":${toString config.services.xserver.display}" - "vt${toString config.services.xserver.tty}" + ":${toString xcfg.display}" + "vt${toString xcfg.tty}" "-config ${import ./xserver.conf.nix args}" "-logfile /dev/null -logverbose 0 -verbose 3" "-nolisten tcp" "-xkbdir ${pkgs.xkeyboard_config}/etc/X11/xkb" + (optional (xcfg.dpi != null) "-dpi ${toString xcfg.dpi}") ]; }; }; + services.xresources.resources.dpi = '' + ${optionalString (xcfg.dpi != null) "Xft.dpi: ${toString xcfg.dpi}"} + ''; systemd.services.urxvtd = { wantedBy = [ "multi-user.target" ]; reloadIfChanged = true; -- cgit v1.2.3 From 704096c93e91f0b71d257028401b52d6da03c073 Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 5 Dec 2017 15:15:21 +0100 Subject: l repo-sync: add public ssh access --- lass/2configs/repo-sync.nix | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/lass/2configs/repo-sync.nix b/lass/2configs/repo-sync.nix index f3ef23e6..98dbdc22 100644 --- a/lass/2configs/repo-sync.nix +++ b/lass/2configs/repo-sync.nix @@ -22,15 +22,22 @@ let }); }; in { - rules = with git; singleton { - user = with config.krebs.users; [ - config.krebs.users."${config.networking.hostName}-repo-sync" - lass - lass-shodan - ]; - repo = [ repo ]; - perm = push ''refs/*'' [ non-fast-forward create delete merge ]; - }; + rules = with git; [ + { + user = with config.krebs.users; [ + config.krebs.users."${config.networking.hostName}-repo-sync" + lass + lass-shodan + ]; + repo = [ repo ]; + perm = push ''refs/*'' [ non-fast-forward create delete merge ]; + } + { + user = attrValues config.krebs.users; + repo = [ repo ]; + perm = fetch; + } + ]; repos."${name}" = repo; }; -- cgit v1.2.3