From 373c0795072e20b04b1189f9821913100911d4f9 Mon Sep 17 00:00:00 2001 From: lassulus Date: Thu, 27 Jul 2023 09:56:20 +0200 Subject: nixpkgs-unstable: b12803b -> ef99fa5 --- krebs/nixpkgs-unstable.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'krebs') diff --git a/krebs/nixpkgs-unstable.json b/krebs/nixpkgs-unstable.json index 20bfd0ec4..ed317e9b0 100644 --- a/krebs/nixpkgs-unstable.json +++ b/krebs/nixpkgs-unstable.json @@ -1,9 +1,9 @@ { "url": "https://github.com/NixOS/nixpkgs", - "rev": "b12803b6d90e2e583429bb79b859ca53c348b39a", - "date": "2023-07-24T08:16:24+02:00", - "path": "/nix/store/786lhas0jmp3nihbb28pbp7sm1sjzsy7-nixpkgs", - "sha256": "1l9sa8hd242xrb2j18mj4f62f3cw0bf5pafp58gdl0jkl61dpapr", + "rev": "ef99fa5c5ed624460217c31ac4271cfb5cb2502c", + "date": "2023-07-25T10:08:49+02:00", + "path": "/nix/store/bdmgv90w76sx93a1q1f6wj4f0cvn1187-nixpkgs", + "sha256": "1mp7h5cw7dnhc3kr4fdjb6nvxqgxwjpvcm52wb4gyxn4lmq37a9i", "fetchLFS": false, "fetchSubmodules": false, "deepClone": false, -- cgit v1.2.3 From 447a000e0426e7356d65661425299c2406980126 Mon Sep 17 00:00:00 2001 From: lassulus Date: Thu, 27 Jul 2023 12:11:34 +0200 Subject: nixpkgs: 98da3dd -> f3fbbc3 --- krebs/nixpkgs.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'krebs') diff --git a/krebs/nixpkgs.json b/krebs/nixpkgs.json index 4ceb87230..1aea77b1e 100644 --- a/krebs/nixpkgs.json +++ b/krebs/nixpkgs.json @@ -1,9 +1,9 @@ { "url": "https://github.com/NixOS/nixpkgs", - "rev": "98da3dd0de6660d4abed7bb74e748694bd803413", - "date": "2023-07-12T12:54:32+08:00", - "path": "/nix/store/h9ncvz7aq1aqhjmxngnnhwaw359prh2g-nixpkgs", - "sha256": "0qzflsmxfgqz07jlx7njfsq752n1la8a6007mmx7rvqspp30g6j1", + "rev": "f3fbbc36b4e179a5985b9ab12624e9dfe7989341", + "date": "2023-07-26T13:29:55+02:00", + "path": "/nix/store/6sqk9bkksbnj7h840bcn6cqzz63x9b6d-nixpkgs", + "sha256": "11fpsvssy2lgpfwxmxdpjgbznmy19cmlvj7xmp4h4yn6g3dzygzp", "fetchLFS": false, "fetchSubmodules": false, "deepClone": false, -- cgit v1.2.3 From f00ba174ddd5f0f2a35a3bf1224f63e0475288bc Mon Sep 17 00:00:00 2001 From: lassulus Date: Fri, 28 Jul 2023 23:59:03 +0200 Subject: rip arcadeomat.r --- krebs/1systems/arcadeomat/config.nix | 82 ------------------------------------ krebs/1systems/arcadeomat/hw.nix | 25 ----------- 2 files changed, 107 deletions(-) delete mode 100644 krebs/1systems/arcadeomat/config.nix delete mode 100644 krebs/1systems/arcadeomat/hw.nix (limited to 'krebs') diff --git a/krebs/1systems/arcadeomat/config.nix b/krebs/1systems/arcadeomat/config.nix deleted file mode 100644 index 7439e687e..000000000 --- a/krebs/1systems/arcadeomat/config.nix +++ /dev/null @@ -1,82 +0,0 @@ -{ config,lib, pkgs, ... }: -let - shack-ip = config.krebs.build.host.nets.shack.ip4.addr; - ext-if = "et0"; - external-mac = "52:54:b0:0b:af:fe"; - mainUser = "krebs"; - -in -{ - imports = [ - ./hw.nix - ../../../krebs - ../../../krebs/2configs - - #../../../krebs/2configs/binary-cache/nixos.nix - #../../../krebs/2configs/binary-cache/prism.nix - - ../../../krebs/2configs/shack/ssh-keys.nix - ../../../krebs/2configs/save-diskspace.nix - ../../../krebs/2configs/shack/prometheus/node.nix - - ]; - # use your own binary cache, fallback use cache.nixos.org (which is used by - # apt-cacher-ng in first place) - - # local discovery in shackspace - nixpkgs.config.packageOverrides = pkgs: { tinc = pkgs.tinc_pre; }; - krebs.tinc.retiolum.extraConfig = "TCPOnly = yes"; - - - #networking = { - # firewall.enable = false; - # firewall.allowedTCPPorts = [ 8088 8086 8083 ]; - # interfaces."${ext-if}".ipv4.addresses = [ - # { - # address = shack-ip; - # prefixLength = 20; - # } - # ]; - - # defaultGateway = "10.42.0.1"; - # nameservers = [ "10.42.0.100" "10.42.0.200" ]; - #}; - - ##################### - # uninteresting stuff - ##################### - krebs.build.host = config.krebs.hosts.arcadeomat; - users.users."${mainUser}" = { - uid = 9001; - extraGroups = [ "audio" "video" ]; - isNormalUser = true; - }; - - - time.timeZone = "Europe/Berlin"; - - # avahi - services.avahi = { - enable = true; - wideArea = false; - }; - environment.systemPackages = with pkgs;[ glxinfo sdlmame ]; - nixpkgs.config.allowUnfree = true; - hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.legacy_340; - boot.kernelPackages = pkgs.linuxPackages_5_4; - - services.xserver = { - videoDrivers = [ "nvidia" ]; - enable = true; - windowManager = { - awesome.enable = true; - awesome.noArgb = true; - awesome.luaModules = [ pkgs.luaPackages.vicious ]; - }; - displayManager.defaultSession = lib.mkDefault "none+awesome"; - displayManager.autoLogin = { - enable = true; - user = mainUser; - }; - }; -} diff --git a/krebs/1systems/arcadeomat/hw.nix b/krebs/1systems/arcadeomat/hw.nix deleted file mode 100644 index b24deeecb..000000000 --- a/krebs/1systems/arcadeomat/hw.nix +++ /dev/null @@ -1,25 +0,0 @@ - -{ config, lib, pkgs, modulesPath, ... }: - -{ - imports = - [ (modulesPath + "/installer/scan/not-detected.nix") - ]; - - boot.initrd.availableKernelModules = [ "ahci" "ohci_pci" "ehci_pci" "pata_atiixp" "usbhid" "sd_mod" ]; - boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ "kvm-amd" ]; - boot.extraModulePackages = [ ]; - - fileSystems."/" = - { device = "/dev/disk/by-uuid/0aae456e-0548-4917-a282-11d5d4e403cf"; - fsType = "ext4"; - }; - - swapDevices = [ ]; - boot.loader.grub.enable = true; - boot.loader.grub.version = 2; - boot.loader.grub.device = "/dev/sda"; - boot.loader.grub.copyKernels = true; - -} -- cgit v1.2.3 From 7e18d81e20541482adda1b91838dec93f32993d2 Mon Sep 17 00:00:00 2001 From: lassulus Date: Sun, 30 Jul 2023 13:26:14 +0200 Subject: nixpkgs-unstable: ef99fa5 -> 2a9d660 --- krebs/nixpkgs-unstable.json | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'krebs') diff --git a/krebs/nixpkgs-unstable.json b/krebs/nixpkgs-unstable.json index ed317e9b0..4ae0716ea 100644 --- a/krebs/nixpkgs-unstable.json +++ b/krebs/nixpkgs-unstable.json @@ -1,9 +1,10 @@ { "url": "https://github.com/NixOS/nixpkgs", - "rev": "ef99fa5c5ed624460217c31ac4271cfb5cb2502c", - "date": "2023-07-25T10:08:49+02:00", - "path": "/nix/store/bdmgv90w76sx93a1q1f6wj4f0cvn1187-nixpkgs", - "sha256": "1mp7h5cw7dnhc3kr4fdjb6nvxqgxwjpvcm52wb4gyxn4lmq37a9i", + "rev": "2a9d660ff0f7ffde9d73be328ee6e6f10ef66b28", + "date": "2023-07-28T14:55:37+02:00", + "path": "/nix/store/38nmp3rkbjic5dm6g9qp4ldwi7pr602p-nixpkgs", + "sha256": "0c2x3bcal4kyxgf6i408622zqvxamz986h11z8zjvd7gc8y4wxn7", + "hash": "sha256-x3ZOPGLvtC0/+iFAg9Kvqm/8hTAIkGjc634SqtgaXTA=", "fetchLFS": false, "fetchSubmodules": false, "deepClone": false, -- cgit v1.2.3 From d3aa03fe0e098d6fc0b55cc48a2443e15879dae8 Mon Sep 17 00:00:00 2001 From: lassulus Date: Sun, 30 Jul 2023 14:07:09 +0200 Subject: nixpkgs: f3fbbc3 -> 48e82fe --- krebs/nixpkgs.json | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'krebs') diff --git a/krebs/nixpkgs.json b/krebs/nixpkgs.json index 1aea77b1e..55e54ec64 100644 --- a/krebs/nixpkgs.json +++ b/krebs/nixpkgs.json @@ -1,9 +1,10 @@ { "url": "https://github.com/NixOS/nixpkgs", - "rev": "f3fbbc36b4e179a5985b9ab12624e9dfe7989341", - "date": "2023-07-26T13:29:55+02:00", - "path": "/nix/store/6sqk9bkksbnj7h840bcn6cqzz63x9b6d-nixpkgs", - "sha256": "11fpsvssy2lgpfwxmxdpjgbznmy19cmlvj7xmp4h4yn6g3dzygzp", + "rev": "48e82fe1b1c863ee26a33ce9bd39621d2ada0a33", + "date": "2023-07-28T18:34:19+03:00", + "path": "/nix/store/pgqfg8ip3lv0lr6mpwh558npz3c1wwcr-nixpkgs", + "sha256": "0d7na9ygda2r7gs3gbixd9gvcxgdv84993cilkj86bcwbpbg4vp5", + "hash": "sha256-5W7y1l2cLYPkpJGNlAja7XW2X2o9rjf0O1mo9nxS9jQ=", "fetchLFS": false, "fetchSubmodules": false, "deepClone": false, -- cgit v1.2.3 From be69562a42c781de1d6938c7d579f12aafcd7c8a Mon Sep 17 00:00:00 2001 From: lassulus Date: Sun, 30 Jul 2023 15:36:15 +0200 Subject: realwallpaper: ignore constellation errors --- krebs/5pkgs/simple/realwallpaper/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'krebs') diff --git a/krebs/5pkgs/simple/realwallpaper/default.nix b/krebs/5pkgs/simple/realwallpaper/default.nix index 544abb3a3..5364a37dc 100644 --- a/krebs/5pkgs/simple/realwallpaper/default.nix +++ b/krebs/5pkgs/simple/realwallpaper/default.nix @@ -275,7 +275,7 @@ pkgs.writers.writeDashBin "generate-wallpaper" '' } ./get_constellations.py} ${pkgs.fetchurl { url = "https://raw.githubusercontent.com/ofrohn/d3-celestial/d2e20e104b86429d90ac8227a5b021262b45d75a/data/constellations.lines.json"; sha256 = "0g71fdrnxvxd6pcqvihj2q9iaynrl7px45kzw6qm1kymynz6ckr9"; - }} > constellations.arcs + }} > constellations.arcs || : # seems like astropy doesn't want to convert from icrs to itrs anymore xplanet --num_times 1 --geometry $xplanet_out_size \ --output xplanet-krebs-stars-output.png --projection merc \ -- cgit v1.2.3 From d5af942e3a62e99412c8b7a17b6d43a78c7f828d Mon Sep 17 00:00:00 2001 From: lassulus Date: Sun, 30 Jul 2023 15:36:29 +0200 Subject: reaktor2: rename to reaktor --- krebs/2configs/reaktor2.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'krebs') diff --git a/krebs/2configs/reaktor2.nix b/krebs/2configs/reaktor2.nix index 61b44fc27..95ef2f8ae 100644 --- a/krebs/2configs/reaktor2.nix +++ b/krebs/2configs/reaktor2.nix @@ -597,7 +597,7 @@ in { krebs.reaktor2 = { hackint = { hostname = "irc.hackint.org"; - nick = "reaktor2|krebs"; + nick = "reaktor"; plugins = [ { plugin = "register"; @@ -617,7 +617,7 @@ in { port = "6697"; }; r = { - nick = "reaktor2|krebs"; + nick = "reaktor"; sendDelaySec = null; plugins = [ { -- cgit v1.2.3 From 8534fe4290f9c79d6b19f649964940c1408ece71 Mon Sep 17 00:00:00 2001 From: lassulus Date: Sun, 30 Jul 2023 17:17:06 +0200 Subject: reaktor2: quote state_file in hledger --- krebs/2configs/reaktor2.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'krebs') diff --git a/krebs/2configs/reaktor2.nix b/krebs/2configs/reaktor2.nix index 95ef2f8ae..8837f0aa5 100644 --- a/krebs/2configs/reaktor2.nix +++ b/krebs/2configs/reaktor2.nix @@ -28,7 +28,7 @@ let amt=$2 unit=$3 printf '%s\n %s %d %s\n %s %d %s\n' "$(date -Id)" "$tonick" "$amt" "$unit" "$_from" "$(expr 0 - "''${amt#+}")" "$unit" >> $state_file - ${pkgs.hledger}/bin/hledger -f $state_file bal -N -O csv \ + ${pkgs.hledger}/bin/hledger -f "$state_file" bal -N -O csv \ | ${pkgs.coreutils}/bin/tail +2 \ | ${pkgs.miller}/bin/mlr --icsv --opprint cat \ | ${pkgs.gnugrep}/bin/grep "$_from" -- cgit v1.2.3 From 6043552115f1629b72fc40564eba4fd34f9a5cb6 Mon Sep 17 00:00:00 2001 From: lassulus Date: Sun, 30 Jul 2023 17:21:20 +0200 Subject: reaktor2: extract agenda.html into separate file --- krebs/2configs/agenda.html | 91 +++++++++++++++++++++++++++++++++ krebs/2configs/reaktor2.nix | 120 +++++--------------------------------------- 2 files changed, 104 insertions(+), 107 deletions(-) create mode 100644 krebs/2configs/agenda.html (limited to 'krebs') diff --git a/krebs/2configs/agenda.html b/krebs/2configs/agenda.html new file mode 100644 index 000000000..9ccfc241c --- /dev/null +++ b/krebs/2configs/agenda.html @@ -0,0 +1,91 @@ + + + + Agenda + + + + + +
+ + + diff --git a/krebs/2configs/reaktor2.nix b/krebs/2configs/reaktor2.nix index 8837f0aa5..c357da1d7 100644 --- a/krebs/2configs/reaktor2.nix +++ b/krebs/2configs/reaktor2.nix @@ -483,113 +483,19 @@ in { ''}''; }; - services.nginx = { - virtualHosts."agenda.r" = { - serverAliases = [ "kri.r" ]; - locations."= /index.html".extraConfig = '' - alias ${pkgs.writeText "agenda.html" '' - - - - Agenda - - - - - -
- - - - ''}; - ''; - locations."/agenda.json".extraConfig = '' - proxy_set_header Host $host; - proxy_pass http://localhost:8009; - ''; - extraConfig = '' - add_header 'Access-Control-Allow-Origin' '*'; - add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS'; - ''; - }; + services.nginx.virtualHosts."agenda.r" = { + serverAliases = [ "kri.r" ]; + locations."= /index.html".extraConfig = '' + alias ./agenda.html; + ''; + locations."/agenda.json".extraConfig = '' + proxy_set_header Host $host; + proxy_pass http://localhost:8009; + ''; + extraConfig = '' + add_header 'Access-Control-Allow-Origin' '*'; + add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS'; + ''; }; systemd.services.reaktor2-r.serviceConfig.DynamicUser = mkForce false; -- cgit v1.2.3 From d8cdda91e3c8027ed8a057649b32e2a00d4abaf9 Mon Sep 17 00:00:00 2001 From: lassulus Date: Sun, 30 Jul 2023 17:22:00 +0200 Subject: reaktor2: add hotdog.r/bedger.json endpoint --- krebs/2configs/reaktor2.nix | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'krebs') diff --git a/krebs/2configs/reaktor2.nix b/krebs/2configs/reaktor2.nix index c357da1d7..0f7ab0adf 100644 --- a/krebs/2configs/reaktor2.nix +++ b/krebs/2configs/reaktor2.nix @@ -498,6 +498,36 @@ in { ''; }; + krebs.htgen.bedger = { + port = 8011; + user = { + name = "reaktor2"; + home = stateDir; + }; + script = ''. ${pkgs.writers.writeDash "bedger" '' + case "$Method" in + "GET") + printf 'HTTP/1.1 200 OK\r\n' + printf 'Connection: close\r\n' + printf '\r\n' + ${pkgs.hledger}/bin/hledger -f ${stateDir}/ledger bal -N -O json + exit + ;; + esac + ''}''; + }; + + services.nginx.virtualHosts."hotdog.r" = { + locations."/bedger.json".extraConfig = '' + proxy_set_header Host $host; + proxy_pass http://localhost:8011; + ''; + extraConfig = '' + add_header 'Access-Control-Allow-Origin' '*'; + add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS'; + ''; + }; + systemd.services.reaktor2-r.serviceConfig.DynamicUser = mkForce false; systemd.services.reaktor2-hackint.serviceConfig.DynamicUser = mkForce false; krebs.reaktor2 = { -- cgit v1.2.3 From 6e63efa3645353bc0549f5f152ef811fff5d644c Mon Sep 17 00:00:00 2001 From: lassulus Date: Sun, 30 Jul 2023 21:42:56 +0200 Subject: htgen-paste: add DELETE --- krebs/5pkgs/simple/htgen-paste/src/htgen-paste | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'krebs') diff --git a/krebs/5pkgs/simple/htgen-paste/src/htgen-paste b/krebs/5pkgs/simple/htgen-paste/src/htgen-paste index 74266e53a..9d57d07ee 100644 --- a/krebs/5pkgs/simple/htgen-paste/src/htgen-paste +++ b/krebs/5pkgs/simple/htgen-paste/src/htgen-paste @@ -22,7 +22,17 @@ case "$Method $abs_path" in printf 'Connection: close\r\n' printf 'Content-Length: %d\r\n' $(wc -c < $item) printf '\r\n' - cat $item + cat "$item" + exit + fi + ;; + "DELETE /"[0-9a-z]*) + if item=$(find_item ${abs_path#/}); then + printf 'HTTP/1.1 200 OK\r\n' + printf 'Server: %s\r\n' "$Server" + printf 'Connection: close\r\n' + printf '\r\n' + rm "$item" exit fi ;; -- cgit v1.2.3