From 87d76973260c14b6f047cd37ef7b6fd8a93cb061 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20B=C3=A4dorf?= Date: Mon, 2 May 2022 23:53:34 +0200 Subject: [PATCH 1/3] Add docker drone runner wrapper Adds a small sh wrapper around a drone runner docker container. The `stop` and `logs` functionality is barely better than using straight up docker, but at least it saves you from having to know any of the implementation details. --- pkgs/default.nix | 1 + pkgs/drone-docker-runner.nix | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 pkgs/drone-docker-runner.nix diff --git a/pkgs/default.nix b/pkgs/default.nix index b2403502..dcbd0f0e 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -16,6 +16,7 @@ with final; { toggle-kbd-layout = writeShellScriptBin "toggle-kbd-layout" (import ./toggle-kbd-layout.nix final); uhk-agent = import ./uhk-agent.nix final; wcwd = writeShellScriptBin "wcwd" (import ./wcwd.nix final); + drone-docker-runner = writeShellScriptBin "drone-docker-runner" (import ./drone-docker-runner.nix final); # ps-fixes ps-signal-desktop = writeShellScriptBin "signal-desktop" (import ./ps-signal-desktop.nix final); diff --git a/pkgs/drone-docker-runner.nix b/pkgs/drone-docker-runner.nix new file mode 100644 index 00000000..7d098536 --- /dev/null +++ b/pkgs/drone-docker-runner.nix @@ -0,0 +1,32 @@ +self: with self; '' + case $1 in + start) + ${self.docker}/bin/docker run --detach \ + --volume=/var/run/docker.sock:/var/run/docker.sock \ + --env=DRONE_RPC_PROTO=$DRONE_RPC_PROTO \ + --env=DRONE_RPC_HOST=$DRONE_RPC_HOST \ + --env=DRONE_RPC_SECRET=$(${self.libsecret}/bin/secret-tool lookup drone rpc-secret) \ + --env=DRONE_RUNNER_CAPACITY=4 \ + --env=DRONE_RUNNER_NAME=$(${self.inetutils}/bin/hostname) \ + --publish=3000:3000 \ + --restart=always \ + --name=drone-runner \ + drone/drone-runner-docker:1 + ;; + + stop) + ${self.docker}/bin/docker stop drone-runner + ${self.docker}/bin/docker rm drone-runner + ;; + + logs) + ${self.docker}/bin/docker logs drone-runner + ;; + + *) + echo "Usage: drone-docker-runner " + exit 1; + ;; + esac + +'' From 3fae0d93faf761cf358884f91cbfd81cfa1c9851 Mon Sep 17 00:00:00 2001 From: teutat3s Date: Thu, 5 May 2022 16:06:52 +0200 Subject: [PATCH 2/3] graphical: move FF sharing indicator to sway ws 7 The Firefox sharing indicator sometimes doesn't like to float like it should, and when it does, it usually floats over UI elements you'd like to use. Moving it to sway workspace 7 should get it mostly out of the way --- modules/sway/config/config.d/applications.conf | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/modules/sway/config/config.d/applications.conf b/modules/sway/config/config.d/applications.conf index 8691bc4f..3bab265d 100644 --- a/modules/sway/config/config.d/applications.conf +++ b/modules/sway/config/config.d/applications.conf @@ -58,10 +58,11 @@ for_window [window_role="task_dialog"] floating enable for_window [window_role="Preferences"] floating enable for_window [window_type="dialog"] floating enable for_window [window_type="menu"] floating enable -for_window [title="About Mozilla Firefox"] floating enabled -for_window [title="Password Required - Mozilla Firefox"] floating enabled -for_window [title="Firefox — Sharing Indicator"] floating enabled -for_window [title="Extension: (Open in Browser)*"] floating enabled +for_window [title="About Mozilla Firefox"] floating enable +for_window [title="Password Required - Mozilla Firefox"] floating enable +for_window [title="Firefox — Sharing Indicator"] move to workspace $ws7, floating enable +no_focus [title="Firefox — Sharing Indicator"] +for_window [title="Extension: (Open in Browser)*"] floating enable # qMasterPassword floating menu for_window [title="qMasterPassword"] focus From 8e43046dee1233e966cc6fc236ca3ed51849e747 Mon Sep 17 00:00:00 2001 From: teutat3s Date: Thu, 2 Jun 2022 10:09:42 +0200 Subject: [PATCH 3/3] nixos: follow release-22.05 home: follow release-22.05 branch Fixes for upstream changes: ag renamed to silver-searcher, extfat-utils is now exfat, lot's of overrides no longer needed, as they're now in the release branch, services.caddy.config split up into globalConfig and extraConfig --- flake.lock | 85 +++++++++++++++---------------- flake.nix | 4 +- modules/terminal-life/default.nix | 2 +- modules/x-os/networking.nix | 8 +-- overlays/overrides.nix | 10 ---- profiles/core/default.nix | 2 +- 6 files changed, 50 insertions(+), 61 deletions(-) diff --git a/flake.lock b/flake.lock index 8fc8adf4..d29bd0f0 100644 --- a/flake.lock +++ b/flake.lock @@ -7,11 +7,11 @@ ] }, "locked": { - "lastModified": 1648942457, - "narHash": "sha256-i29Z1t3sVfCNfpp+KAfeExvpqHQSbLO1KWylTtfradU=", + "lastModified": 1652712410, + "narHash": "sha256-hMJ2TqLt0DleEnQFGUHK9sV2aAzJPU8pZeiZoqRozbE=", "owner": "ryantm", "repo": "agenix", - "rev": "0d5e59ed645e4c7b60174bc6f6aac6a203dc0b01", + "rev": "7e5e58b98c3dcbf497543ff6f22591552ebfe65b", "type": "github" }, "original": { @@ -87,11 +87,11 @@ ] }, "locked": { - "lastModified": 1650976225, - "narHash": "sha256-PGM65SQHS63Dd5MmLJo3GJsZP9lJVZmpWxluQoG1Dt8=", + "lastModified": 1651916036, + "narHash": "sha256-UuD9keUGm4IuVEV6wdSYbuRm7CwfXE63hVkzKDjVsh4=", "owner": "LnL7", "repo": "nix-darwin", - "rev": "bb3baef6e115ae47bc2ab4973bd3a486488485b0", + "rev": "2f2bdf658d2b79bada78dc914af99c53cad37cba", "type": "github" }, "original": { @@ -130,11 +130,11 @@ "utils": "utils" }, "locked": { - "lastModified": 1648475189, - "narHash": "sha256-gAGAS6IagwoUr1B0ohE3iR6sZ8hP4LSqzYLC8Mq3WGU=", + "lastModified": 1653594315, + "narHash": "sha256-kJ0ENmnQJ4qL2FeYKZba9kvv1KmIuB3NVpBwMeI7AJQ=", "owner": "serokell", "repo": "deploy-rs", - "rev": "83e0c78291cd08cb827ba0d553ad9158ae5a95c3", + "rev": "184349d8149436748986d1bdba087e4149e9c160", "type": "github" }, "original": { @@ -188,11 +188,11 @@ "nixpkgs-unstable": "nixpkgs-unstable" }, "locked": { - "lastModified": 1651210705, - "narHash": "sha256-2RzKrjEnWDhsBQ4Et2gm2LjV5pXyszeqV1xNe+LtNT8=", + "lastModified": 1652713922, + "narHash": "sha256-era1h0M+QP9wP/hbwXRpxOiT8M5n+loWX/Zrq7duq5w=", "owner": "divnix", "repo": "digga", - "rev": "0ffa2dff5ede12a03ca83fbc514972f94cf18f42", + "rev": "29bbac0173859812893d777fdce204af83a231ea", "type": "github" }, "original": { @@ -269,11 +269,11 @@ "flake-utils": "flake-utils_3" }, "locked": { - "lastModified": 1647259887, - "narHash": "sha256-yEkMbEHVO9qydluQ3uHGWX1PkfZhgDKxnd1rhZYZ72w=", + "lastModified": 1652704544, + "narHash": "sha256-UTKE33tYgCmDszaVyWA33a8mtegM5xfH4fH8w4y6TxA=", "owner": "gytis-ivaskevicius", "repo": "flake-utils-plus", - "rev": "06dba5f3b4fa2cc0bfc98ce9cd6f9a4d8db11d46", + "rev": "f8d6d1f87b6177e3bc674c29f247bdbf897ba274", "type": "github" }, "original": { @@ -314,11 +314,11 @@ }, "flake-utils_4": { "locked": { - "lastModified": 1644229661, - "narHash": "sha256-1YdnJAsNy69bpcjuoKdOYQX0YxZBiCYZo4Twxerqv7k=", + "lastModified": 1652776076, + "narHash": "sha256-gzTw/v1vj4dOVbpBSJX4J0DwUR6LIyXo7/SuuTJp1kM=", "owner": "numtide", "repo": "flake-utils", - "rev": "3cecb5b042f7f209c56ffd8371b2711a290ec797", + "rev": "04c1b180862888302ddfb2e3ad9eaa63afc60cf8", "type": "github" }, "original": { @@ -349,16 +349,16 @@ ] }, "locked": { - "lastModified": 1651007218, - "narHash": "sha256-NkQAMtqW0PSJTbLHalyZtaqj0ai2TZMOedug9yDIcFw=", + "lastModified": 1654113405, + "narHash": "sha256-VpK+0QaWG2JRgB00lw77N9TjkE3ec0iMYIX1TzGpxa4=", "owner": "nix-community", "repo": "home-manager", - "rev": "d14adb99f3fb562ec74ad18c032efc154b438034", + "rev": "ac2287df5a2d6f0a44bbcbd11701dbbf6ec43675", "type": "github" }, "original": { "owner": "nix-community", - "ref": "release-21.11", + "ref": "release-22.05", "repo": "home-manager", "type": "github" } @@ -381,11 +381,11 @@ }, "latest_2": { "locked": { - "lastModified": 1651007983, - "narHash": "sha256-GNay7yDPtLcRcKCNHldug85AhAvBpTtPEJWSSDYBw8U=", + "lastModified": 1653931853, + "narHash": "sha256-O3wncIouj9x7gBPntzHeK/Hkmm9M1SGlYq7JI7saTAE=", "owner": "nixos", "repo": "nixpkgs", - "rev": "e10da1c7f542515b609f8dfbcf788f3d85b14936", + "rev": "f1c167688a6f81f4a51ab542e5f476c8c595e457", "type": "github" }, "original": { @@ -402,11 +402,11 @@ ] }, "locked": { - "lastModified": 1650265945, - "narHash": "sha256-SO8+1db4jTOjnwP++29vVgImLIfETSXyoz0FuLkiikE=", + "lastModified": 1653413650, + "narHash": "sha256-wojDHjb+eU80MPH+3HQaK0liUy8EgR95rvmCl24i58Y=", "owner": "nmattia", "repo": "naersk", - "rev": "e8f9f8d037774becd82fce2781e1abdb7836d7df", + "rev": "69daaceebe12c070cd5ae69ba38f277bbf033695", "type": "github" }, "original": { @@ -423,11 +423,11 @@ ] }, "locked": { - "lastModified": 1649569158, - "narHash": "sha256-Wtmiyu/1d+3YGGcRxTnQyEtnJaKKR/Ry0kNbOY48Afs=", + "lastModified": 1653198236, + "narHash": "sha256-nzW2BaqWTGGQthOtFzHUJTHK5wK+mkh4aOhETGj5nBk=", "owner": "dramforever", "repo": "nix-dram", - "rev": "84c47c0dc93c77f7edfd996f71618d278844c1c4", + "rev": "e10086d39ca49abfd2a3b77d2a77baa6037ec31e", "type": "github" }, "original": { @@ -453,16 +453,16 @@ }, "nixos": { "locked": { - "lastModified": 1651093906, - "narHash": "sha256-kHXSbv+Hc73eV0/JVJ5YsJGr08bA4vJ3/XZew5PgZg0=", + "lastModified": 1654005557, + "narHash": "sha256-J6elwUzPoco+r5qWPHhvS2EHVWomUtNcxzkfdAQOwEU=", "owner": "nixos", "repo": "nixpkgs", - "rev": "feea25c58657fa81d16e0e51f80e1a02ef4cbd49", + "rev": "08950a6e29cf7bddee466592eb790a417550f7f9", "type": "github" }, "original": { "owner": "nixos", - "ref": "nixos-21.11", + "ref": "nixos-22.05", "repo": "nixpkgs", "type": "github" } @@ -473,11 +473,11 @@ "nixpkgs": "nixpkgs_2" }, "locked": { - "lastModified": 1650997411, - "narHash": "sha256-r4a3qsSv5UTtx+pxTUEdOphBkwTx1+AAVog3c457A0M=", + "lastModified": 1653339081, + "narHash": "sha256-dpim9Mtd57Yj6qt7p7UKwjWm6NnOU3S7jaEyEscSyPE=", "owner": "nix-community", "repo": "nixos-generators", - "rev": "3cdf22c79bc80910e2b610cd59fcb8408354ddbc", + "rev": "fb3ee0f618b8c80dea1239691b15dfeb4bb46331", "type": "github" }, "original": { @@ -488,11 +488,11 @@ }, "nixos-hardware": { "locked": { - "lastModified": 1650522846, - "narHash": "sha256-SxWHXRI3qJwswyXAtzsi6PKVY3KLNNnb072KaJthII8=", + "lastModified": 1654057797, + "narHash": "sha256-mXo7C4v7Jj2feBzcReu1Eu/3Rnw5b023E9kOyFsHZQw=", "owner": "nixos", "repo": "nixos-hardware", - "rev": "6b4ebea9093c997c5f275c820e679108de4871ab", + "rev": "0cab18a48de7914ef8cad35dca0bb36868f3e1af", "type": "github" }, "original": { @@ -551,10 +551,9 @@ }, "nur": { "locked": { - "lastModified": 1626378135, + "lastModified": 0, "narHash": "sha256-koC6DBYmLCrgXA+AMHVaODf1uHYPmvcFygHfy3eg6vI=", "path": "/nix/store/6mfkswqi67m35qwv0vh7kpk8rypbl2rq-source", - "rev": "00c2ec8f0bbdf0cfb2135bde55fbae5d6b64aa6d", "type": "path" }, "original": { diff --git a/flake.nix b/flake.nix index e9b91fc9..7f3c2803 100644 --- a/flake.nix +++ b/flake.nix @@ -8,7 +8,7 @@ inputs = { # Track channels with commits tested and built by hydra - nixos.url = "github:nixos/nixpkgs/nixos-21.11"; + nixos.url = "github:nixos/nixpkgs/nixos-22.05"; latest.url = "github:nixos/nixpkgs/nixos-unstable"; digga.url = "github:divnix/digga"; @@ -21,7 +21,7 @@ bud.inputs.nixpkgs.follows = "nixos"; bud.inputs.devshell.follows = "digga/devshell"; - home.url = "github:nix-community/home-manager/release-21.11"; + home.url = "github:nix-community/home-manager/release-22.05"; home.inputs.nixpkgs.follows = "nixos"; darwin.url = "github:LnL7/nix-darwin"; diff --git a/modules/terminal-life/default.nix b/modules/terminal-life/default.nix index 75ca2bd3..8ecb9919 100644 --- a/modules/terminal-life/default.nix +++ b/modules/terminal-life/default.nix @@ -27,7 +27,6 @@ in home.packages = [ ack asciinema - ag bat exa fd @@ -35,6 +34,7 @@ in glow nnn powerline + silver-searcher vifm watson ]; diff --git a/modules/x-os/networking.nix b/modules/x-os/networking.nix index 1e981290..347fe750 100644 --- a/modules/x-os/networking.nix +++ b/modules/x-os/networking.nix @@ -40,10 +40,10 @@ in # Caddy reverse proxy for local services like cups services.caddy = { enable = true; - config = '' - { - auto_https off - } + globalConfig = '' + auto_https off + ''; + extraConfig = '' cups.local:80 bind 127.0.0.1 request_header Host localhost:631 diff --git a/overlays/overrides.nix b/overlays/overrides.nix index 9b463e96..8c016e15 100644 --- a/overlays/overrides.nix +++ b/overlays/overrides.nix @@ -14,17 +14,7 @@ channels: final: prev: { starship deploy-rs - nixUnstable - neovim-unwrapped tdesktop - xdg-desktop-portal - xdg-desktop-portal-gtk - xdg-desktop-portal-wlr - obs-studio - obs-studio-plugins - looking-glass-client - nix-direnv - vimPlugins ; diff --git a/profiles/core/default.nix b/profiles/core/default.nix index 9348249b..f3136372 100644 --- a/profiles/core/default.nix +++ b/profiles/core/default.nix @@ -48,7 +48,7 @@ in dateutils diffutils findutils - exfat-utils + exfat file # zippit