From 2ff744d3e932372e401a49e38f14cec9a699279d Mon Sep 17 00:00:00 2001 From: tv Date: Thu, 11 Feb 2021 23:21:11 +0100 Subject: tv public_html: move to /srv --- tv/2configs/nginx/public_html.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tv/2configs/nginx/public_html.nix b/tv/2configs/nginx/public_html.nix index a37498ba..43d7189e 100644 --- a/tv/2configs/nginx/public_html.nix +++ b/tv/2configs/nginx/public_html.nix @@ -12,9 +12,9 @@ with import ; "${config.krebs.build.host.name}.hkw" "${config.krebs.build.host.name}.r" ]; - locations."~ ^/~(.+?)(/.*)?\$".extraConfig = '' - alias /home/$1/public_html$2; - ''; + locations."~ ^/~([a-z]+)(?:/(.*))?\$" = { + alias = "/srv/$1/public_html/$2"; + }; }; }; tv.iptables.input-internet-accept-tcp = singleton "http"; -- cgit v1.2.3 From a29fddda2ca554e671bddd9f3ff7399d8ea9756b Mon Sep 17 00:00:00 2001 From: tv Date: Sun, 14 Feb 2021 13:29:42 +0100 Subject: tv wu: remove unnecessary services --- tv/1systems/wu/config.nix | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/tv/1systems/wu/config.nix b/tv/1systems/wu/config.nix index f9c3860e..f0ef6f9b 100644 --- a/tv/1systems/wu/config.nix +++ b/tv/1systems/wu/config.nix @@ -7,10 +7,6 @@ with import ; - - - - @@ -38,14 +34,4 @@ with import ; networking.wireless.enable = true; - services.printing.enable = true; - - services.udev.extraRules = '' - SUBSYSTEM=="net", ATTR{address}=="00:90:f5:da:aa:c3", NAME="en0" - SUBSYSTEM=="net", ATTR{address}=="a0:88:b4:1b:ae:6c", NAME="wl0" - - # for jack - KERNEL=="rtc0", GROUP="audio" - KERNEL=="hpet", GROUP="audio" - ''; } -- cgit v1.2.3 From 824e5f02a1b921d086b8f33f3dce16588ad51ac0 Mon Sep 17 00:00:00 2001 From: tv Date: Sun, 14 Feb 2021 20:40:07 +0100 Subject: gitignore: init --- krebs/5pkgs/simple/gitignore.nix | 46 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 krebs/5pkgs/simple/gitignore.nix diff --git a/krebs/5pkgs/simple/gitignore.nix b/krebs/5pkgs/simple/gitignore.nix new file mode 100644 index 00000000..b3c750a0 --- /dev/null +++ b/krebs/5pkgs/simple/gitignore.nix @@ -0,0 +1,46 @@ +{ pkgs }: + +/* gitignore - Filter for intentionally untracked lines or blocks of code + +This is a filter that allows specifying intentionally untracked lines and +blocks of code that Git should ignore. + +Example: + + int main(void) { + printf("I would never say derp.\n"); + //#gitignore-begin + printf("DERP!\n"); + //#gitignore-end + printf("DERP!\n"); //#gitignore + return 0; + } + +Installation: + + Define a filter, e.g. in ~/.config/git/config[1]: + + [filter "gitignore"] + clean = gitignore + smudge = cat + + Assing that filter to some paths, e.g. in ~/.config/git/attributes[2]: + + *.hs filter=gitignore + *.c filter=gitignore + ... + + [1]: For more information about defining filters see git-config(1). + [2]: For more information about assigning filters see gitattributes(5). +*/ + +pkgs.execBin "gitignore" { + filename = "${pkgs.gnused}/bin/sed"; + argv = [ + "gitignore" + /* sed */ '' + /#gitignore-begin/,/#gitignore-end/d + /#gitignore/d + '' + ]; +} -- cgit v1.2.3 From d2edb22d9f975959fc21a19f4e9da4a591d2b2a5 Mon Sep 17 00:00:00 2001 From: tv Date: Mon, 15 Feb 2021 13:52:20 +0100 Subject: tv.hw.screens: init --- tv/3modules/default.nix | 1 + tv/3modules/hw.nix | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 tv/3modules/hw.nix diff --git a/tv/3modules/default.nix b/tv/3modules/default.nix index 5be1beef..9f2f8e60 100644 --- a/tv/3modules/default.nix +++ b/tv/3modules/default.nix @@ -5,6 +5,7 @@ ./ejabberd ./focus.nix ./hosts.nix + ./hw.nix ./im.nix ./iptables.nix ./slock.nix diff --git a/tv/3modules/hw.nix b/tv/3modules/hw.nix new file mode 100644 index 00000000..6eb722d2 --- /dev/null +++ b/tv/3modules/hw.nix @@ -0,0 +1,16 @@ +let + lib = import ; + local.types.screen = lib.types.submodule { + options.width = lib.mkOption { + type = lib.types.uint; + }; + options.height = lib.mkOption { + type = lib.types.uint; + }; + }; +in { + options.tv.hw.screens = lib.mkOption { + type = lib.types.attrsOf local.types.screen; + default = {}; + }; +} -- cgit v1.2.3 From e249b2d8d4c9368a911ac1d5d7492c14a9602c05 Mon Sep 17 00:00:00 2001 From: tv Date: Mon, 15 Feb 2021 14:00:47 +0100 Subject: tv config: define primary screens --- tv/1systems/au/config.nix | 3 +++ tv/2configs/hw/AO753.nix | 3 +++ tv/2configs/hw/w110er.nix | 3 +++ tv/2configs/hw/x220.nix | 7 ++++++- 4 files changed, 15 insertions(+), 1 deletion(-) diff --git a/tv/1systems/au/config.nix b/tv/1systems/au/config.nix index 3891b757..d9ba5391 100644 --- a/tv/1systems/au/config.nix +++ b/tv/1systems/au/config.nix @@ -16,4 +16,7 @@ networking.interfaces.wwp0s29u1u4i6.useDHCP = true; system.stateVersion = "20.03"; + + tv.hw.screens.primary.width = 1920; + tv.hw.screens.primary.height = 1080; } diff --git a/tv/2configs/hw/AO753.nix b/tv/2configs/hw/AO753.nix index a91a5e51..469f5c6f 100644 --- a/tv/2configs/hw/AO753.nix +++ b/tv/2configs/hw/AO753.nix @@ -44,4 +44,7 @@ with import ; ''; krebs.nixpkgs.allowUnfreePredicate = pkg: packageName pkg == "broadcom-sta"; + + tv.hw.screens.primary.width = 1366; + tv.hw.screens.primary.height = 768; } diff --git a/tv/2configs/hw/w110er.nix b/tv/2configs/hw/w110er.nix index 7d837eab..693cef5a 100644 --- a/tv/2configs/hw/w110er.nix +++ b/tv/2configs/hw/w110er.nix @@ -59,4 +59,7 @@ with import ; services.xserver = { videoDriver = "intel"; }; + + tv.hw.screens.primary.width = 1366; + tv.hw.screens.primary.height = 768; } diff --git a/tv/2configs/hw/x220.nix b/tv/2configs/hw/x220.nix index aadfc669..ecbb84a4 100644 --- a/tv/2configs/hw/x220.nix +++ b/tv/2configs/hw/x220.nix @@ -1,4 +1,6 @@ -{ config, pkgs, ... }: +{ config, pkgs, ... }: let + lib = import ; +in { imports = [ ../smartd.nix @@ -74,4 +76,7 @@ services.xserver = { videoDriver = "intel"; }; + + tv.hw.screens.primary.width = lib.mkDefault 1366; + tv.hw.screens.primary.height = lib.mkDefault 768; } -- cgit v1.2.3 From 9365aff352d99b7506bafbef6682de7bfb00df27 Mon Sep 17 00:00:00 2001 From: tv Date: Mon, 15 Feb 2021 18:04:20 +0100 Subject: exim: init at 4.94+fixes cdb37db --- krebs/5pkgs/override/default.nix | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/krebs/5pkgs/override/default.nix b/krebs/5pkgs/override/default.nix index 926e9dcc..e5867926 100644 --- a/krebs/5pkgs/override/default.nix +++ b/krebs/5pkgs/override/default.nix @@ -10,6 +10,21 @@ self: super: { }; }); + exim = super.exim.overrideAttrs (old: rec { + version = warnOldVersion old.version "4.95+fixes"; + src = self.fetchgit { + url = "git://git.exim.org/exim.git"; + rev = "cdb37db5c0ff060de7edfc94e830cab6b7f7c084"; + sha256 = "1xaxs1p8yy5f04an5g9mxhj5cvbnzj0xfb50aa1xxkhkqkspzlsg"; + postFetch = /* sh */ '' + ${self.gnutar}/bin/tar xf ${old.src} + ${self.rsync}/bin/rsync -vac "$out"/src/ exim-4.94/src + rm -R "$out" + mv exim-4.94 "$out" + ''; + }; + }); + flameshot = super.flameshot.overrideAttrs (old: rec { patches = old.patches or [] ++ [ (self.writeText "flameshot-imgur.patch" /* diff */ '' -- cgit v1.2.3