From ec1a6acebc3effcca3f6655f7fcee20dede46592 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Sat, 26 Aug 2023 11:35:11 +0200 Subject: [PATCH 1/9] refactor: nix-system commands --- modules/profiles/base.nix | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/modules/profiles/base.nix b/modules/profiles/base.nix index 1717f1f..102eb91 100644 --- a/modules/profiles/base.nix +++ b/modules/profiles/base.nix @@ -6,14 +6,20 @@ with lib; let - nom-system = pkgs.writeShellApplication { + nom-system = pkgs.writeFishApplication { name = "nom-system"; runtimeInputs = with pkgs; [ nix-output-monitor ]; - text = '' - nom build --no-link "/home/moritz/.dotfiles#nixosConfigurations.$(hostname).config.system.build.toplevel" + text = /* fish */ '' + nom build --no-link "/home/moritz/.dotfiles#nixosConfigurations.$(hostname).config.system.build.toplevel" $argv + ''; + }; + nom-system-command = name: command: pkgs.writeFishApplication { + inherit name; + runtimeInputs = with pkgs; [ nom-system nix ]; + text = /* fish */ '' + nom-system $argv && ${command} ''; }; - nom-system-command = command: "${nom-system}/bin/nom-system && ${command}"; f = pkgs.writeFishApplication { name = "f"; @@ -57,8 +63,6 @@ in mv = "mv -i"; cd = "__zoxide_z"; - nixos-switch = nom-system-command "sudo nixos-rebuild switch --flake ~/.dotfiles"; - nixos-boot = nom-system-command "sudo nixos-rebuild boot --flake ~/.dotfiles"; nixos-update = "pushd ~/.dotfiles && nix flake update && popd"; latexwatch = ''find -type f -name "*.tex" | entr -c latexmk -pdf -silent''; @@ -105,6 +109,8 @@ in bottom # nix + (nom-system-command "nixos-boot" "sudo nixos-rebuild boot --flake ~/.dotfiles") + (nom-system-command "nixos-switch" "sudo nixos-rebuild switch --flake ~/.dotfiles") comma nix-index nixpkgs-fmt From 92e2e149bcf8b2c3d93344c5ecd516c41a0f2bd6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Sat, 26 Aug 2023 11:37:18 +0200 Subject: [PATCH 2/9] refactor: move git ignore alias to own script --- modules/profiles/base.nix | 33 +++++++++++++++++++++++++++++++-- modules/programs/fish.nix | 18 ------------------ 2 files changed, 31 insertions(+), 20 deletions(-) diff --git a/modules/profiles/base.nix b/modules/profiles/base.nix index 102eb91..a5fa164 100644 --- a/modules/profiles/base.nix +++ b/modules/profiles/base.nix @@ -32,6 +32,34 @@ let complete -c f ''; }; + + gi = pkgs.writeFishApplication + { + name = "gi"; + runtimeInputs = with pkgs; [ fzf gum curl ]; + text = /* fish */ '' + set url https://www.gitignore.io/api + + if test (count $argv) -eq 0 + set choice ( curl -sL $url/list \ + | string split "," \ + | fzf -m \ + | string join "," ) + else + set choice (string join "," $argv[1..]) + end + + if gum confirm "Overwrite current .gitignore?" + curl -sL $url/$choice > .gitignore + else + curl -sL $url/$choice >> .gitignore + end + ''; + completions = /* fish */ '' + set args (curl -sL https://www.gitignore.io/api/list | string split ",") + complete -c gi -fa "$args" + ''; + }; in { users.users.moritz = { @@ -125,15 +153,16 @@ in duf entr exa + f + gi gparted neofetch reptyr ripgrep up + vim viu wget - vim - f ]; fonts.packages = with pkgs; [ diff --git a/modules/programs/fish.nix b/modules/programs/fish.nix index efc2dac..c9798c6 100644 --- a/modules/programs/fish.nix +++ b/modules/programs/fish.nix @@ -50,24 +50,6 @@ in ${exportedVariables} ''; functions = { - gi = '' - set url https://www.gitignore.io/api - - if test (count $argv) -eq 0 - set choice ( curl -sL $url/list \ - | string split "," \ - | ${getExe pkgs.fzf} -m \ - | string join "," ) - else - set choice (string join "," $argv[1..]) - end - - if ${getExe pkgs.gum} confirm "Overwrite current .gitignore?" - ${getExe pkgs.curl} -sL $url/$choice > .gitignore - else - ${getExe pkgs.curl} -sL $url/$choice >> .gitignore - end - ''; fish_greeting = ""; cheat = "cht.sh $argv | bat -p"; }; From e2b6699215ecea97fd8933fb3e30beba46a066bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Sat, 26 Aug 2023 11:43:29 +0200 Subject: [PATCH 3/9] refactor: f script --- modules/profiles/base.nix | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/modules/profiles/base.nix b/modules/profiles/base.nix index a5fa164..043720b 100644 --- a/modules/profiles/base.nix +++ b/modules/profiles/base.nix @@ -24,12 +24,11 @@ let f = pkgs.writeFishApplication { name = "f"; runtimeInputs = with pkgs; [ fzf bat ]; - text = '' - #!/usr/bin/env fish - fzf --query "$argv" --multi --bind "enter:become($EDITOR {+})" --preview "bat --color=always --style=header,grid --line-range :500 {+}" - ''; - completions = '' - complete -c f + text = /* fish */ '' + fzf --query "$argv" \ + --multi \ + --bind "enter:become($EDITOR {+})" \ + --preview "bat --color=always --style=header,grid --line-range :500 {+}" ''; }; From 56abb0ce6476fff924758f854b9a2126b1d54c49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Sat, 26 Aug 2023 11:43:56 +0200 Subject: [PATCH 4/9] feat: add which-nix script --- modules/profiles/base.nix | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/modules/profiles/base.nix b/modules/profiles/base.nix index 043720b..aefaac4 100644 --- a/modules/profiles/base.nix +++ b/modules/profiles/base.nix @@ -32,6 +32,17 @@ let ''; }; + which-nix = pkgs.writeFishApplication { + name = "which-nix"; + runtimeInputs = with pkgs; [ which coreutils-full ]; + text = /* fish */ '' + readlink -f (which $argv) + ''; + completions = /* fish */ '' + complete -c which-nix -fa '(__fish_complete_command)' + ''; + }; + gi = pkgs.writeFishApplication { name = "gi"; @@ -139,11 +150,12 @@ in (nom-system-command "nixos-boot" "sudo nixos-rebuild boot --flake ~/.dotfiles") (nom-system-command "nixos-switch" "sudo nixos-rebuild switch --flake ~/.dotfiles") comma + manix nix-index + nix-output-monitor nixpkgs-fmt statix - manix - nix-output-monitor + which-nix # other bat From 4b5e16454daa507339018e8791fc6b04db9aa024 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Sat, 26 Aug 2023 11:44:35 +0200 Subject: [PATCH 5/9] feat(fish): add dockerCompat completions --- modules/programs/fish.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/programs/fish.nix b/modules/programs/fish.nix index c9798c6..fbb4c24 100644 --- a/modules/programs/fish.nix +++ b/modules/programs/fish.nix @@ -45,6 +45,7 @@ in # Completions complete -c c -kfa '(zoxide query -l | sed "s|$HOME|~|")' + ${optionalString config.virtualisation.podman.dockerCompat /* fish */ "complete -c docker -w podman"} # Variables ${exportedVariables} From 84934c6cd6bdf91d153ddc81f8e937ba38166948 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Sat, 26 Aug 2023 11:45:21 +0200 Subject: [PATCH 6/9] feat: lower kitty transparency --- modules/programs/kitty.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/programs/kitty.nix b/modules/programs/kitty.nix index df34c20..a1e5b56 100644 --- a/modules/programs/kitty.nix +++ b/modules/programs/kitty.nix @@ -21,7 +21,7 @@ in cursor_shape = "underline"; window_padding_width = 3; confirm_os_window_close = 0; - background_opacity = "0.92"; + background_opacity = "0.9"; }; keybindings = { "ctrl+plus" = "change_font_size all +2.0"; From fc91521270df6b09f0e011f0f9475a8d4091c10a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Sat, 26 Aug 2023 11:45:58 +0200 Subject: [PATCH 7/9] refactor: writeFishApplication body --- overlays/builders.nix | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/overlays/builders.nix b/overlays/builders.nix index 498ebcc..813b7d3 100644 --- a/overlays/builders.nix +++ b/overlays/builders.nix @@ -18,13 +18,11 @@ with final.lib; preferLocalBuild = false; text = '' #!${getExe final.fish} - '' + optionalString (runtimeInputs != [ ]) '' - export PATH="${makeBinPath runtimeInputs}:$PATH" - '' + '' + ${optionalString (runtimeInputs != [ ]) ''export PATH="${makeBinPath runtimeInputs}:$PATH"''} - ${content} - ''; + ${content} + ''; checkPhase = if checkPhase == null then '' @@ -35,9 +33,7 @@ with final.lib; else checkPhase; }; - script = fishFile "/bin/${name}" text; - completions_file = fishFile "/share/fish/vendor_completions.d/${name}.fish" completions; in final.symlinkJoin { From 67dd3bd65dad017c8b78147d307bdd9b75bf5abf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Sat, 26 Aug 2023 11:47:07 +0200 Subject: [PATCH 8/9] build: update inputs --- flake.lock | 130 ++++++++++++-------------- modules/programs/hyprland/default.nix | 21 +---- overlays/packages.nix | 2 +- 3 files changed, 63 insertions(+), 90 deletions(-) diff --git a/flake.lock b/flake.lock index 6a0eb62..e03935e 100644 --- a/flake.lock +++ b/flake.lock @@ -191,11 +191,11 @@ "systems": "systems" }, "locked": { - "lastModified": 1689068808, - "narHash": "sha256-6ixXo3wt24N/melDWjq70UuHQLxGV8jZvooRanIHXw0=", + "lastModified": 1692799911, + "narHash": "sha256-3eihraek4qL744EvQXsK1Ha6C3CR7nnT8X2qWap4RNk=", "owner": "numtide", "repo": "flake-utils", - "rev": "919d646de7be200f3bf08cb76ae1f09402b6f9b4", + "rev": "f9e7cf818399d17d347f847525c5a5a8032e4e44", "type": "github" }, "original": { @@ -322,11 +322,11 @@ "hmts-nvim": { "flake": false, "locked": { - "lastModified": 1691525513, - "narHash": "sha256-il5m+GlNt0FzZjefl1q8ZxWHg0+gQps0vigt+eoIy8A=", + "lastModified": 1692743873, + "narHash": "sha256-lfqJVj1HbFJ5H4mo6rKYrexaosqSh17+PQ9BWpcuxZI=", "owner": "calops", "repo": "hmts.nvim", - "rev": "594dd17c870afb7f6517723c8963f6eb144e3c0d", + "rev": "34b825bd1c9ec1b6e2952c111753e2eb286c9e07", "type": "github" }, "original": { @@ -363,11 +363,11 @@ ] }, "locked": { - "lastModified": 1692131549, - "narHash": "sha256-MFjI8NL63/6HjMZpvJgnB/Pgg2dht22t45jOYtipZig=", + "lastModified": 1692763155, + "narHash": "sha256-qMrGKZ8c/q/mHO3ZdrcBPwiVVXPLLgXjY98Ejqb5kAA=", "owner": "nix-community", "repo": "home-manager", - "rev": "75cfe974e2ca05a61b66768674032b4c079e55d4", + "rev": "6a20e40acaebf067da682661aa67da8b36812606", "type": "github" }, "original": { @@ -403,11 +403,11 @@ "xdph": "xdph" }, "locked": { - "lastModified": 1692182360, - "narHash": "sha256-FSJEeAQj0viz52+GE774GiOOtU0X2B2KgXnRCgogSaU=", + "lastModified": 1692871050, + "narHash": "sha256-OJ/OkOLFn546rcXmj/3VEGlsPYjdXWAhEmjqdc6re6k=", "owner": "hyprwm", "repo": "Hyprland", - "rev": "78fa8adadc146a7efeebf63438c1140662484fba", + "rev": "90c03e5bd2204ba6d1a0167c68f65b7a9231bef4", "type": "github" }, "original": { @@ -446,11 +446,11 @@ "nixpkgs": "nixpkgs_3" }, "locked": { - "lastModified": 1691060455, - "narHash": "sha256-V5ulB9CkGh1ghiC4BKvRdoYKZzpaiOKzAOUmJIFkgM0=", + "lastModified": 1692480535, + "narHash": "sha256-3Q0Uz/JPW9USHyAmrzRl6KhZLqMYTWkmtL3RA+oAeVY=", "owner": "hyprwm", "repo": "hyprpaper", - "rev": "e498c438b1e16dcf32ecb3030b20b83f7ed9ff6d", + "rev": "5e73eb60552d48d55541c60f9a8da2b666003fe6", "type": "github" }, "original": { @@ -477,11 +477,11 @@ }, "master": { "locked": { - "lastModified": 1692198797, - "narHash": "sha256-4MwKoXIBfNI85zZ/tHyLT+M7sF2Zb0XoyhdXtlM6g2c=", + "lastModified": 1692893187, + "narHash": "sha256-Hbbp6bWQykkLsvzi7yo2KQme0oXCZkCdz9bBorcSKH4=", "owner": "nixos", "repo": "nixpkgs", - "rev": "c85be71df497312de66b65df8d7ad7b5c0c81d04", + "rev": "d240553dcc2180fe486155bea8a846d5941e168c", "type": "github" }, "original": { @@ -492,14 +492,17 @@ }, "naersk": { "inputs": { - "nixpkgs": "nixpkgs_8" + "nixpkgs": [ + "timers", + "nixpkgs" + ] }, "locked": { - "lastModified": 1686572087, - "narHash": "sha256-jXTut7ZSYqLEgm/nTk7TuVL2ExahTip605bLINklAnQ=", + "lastModified": 1692351612, + "narHash": "sha256-KTGonidcdaLadRnv9KFgwSMh1ZbXoR/OBmPjeNMhFwU=", "owner": "nix-community", "repo": "naersk", - "rev": "8507af04eb40c5520bd35d9ce6f9d2342cea5ad1", + "rev": "78789c30d64dea2396c9da516bbcc8db3a475207", "type": "github" }, "original": { @@ -519,11 +522,11 @@ }, "locked": { "dir": "contrib", - "lastModified": 1692141167, - "narHash": "sha256-1My5JBKfHupN9D86eeX8JFr2Wk03qWJObk73NC1/x2s=", + "lastModified": 1692744130, + "narHash": "sha256-Iod6+KGeWnX1SV4owXpSoC17iImCJjTq2iqEp6IRBZc=", "owner": "neovim", "repo": "neovim", - "rev": "f92bda1dad462de81ec92134dfa9ba637edc7bb7", + "rev": "6462ee1c10f9f1aa66ffc4d4fe1b7b3d9f0f91af", "type": "github" }, "original": { @@ -542,11 +545,11 @@ "nixpkgs": "nixpkgs_5" }, "locked": { - "lastModified": 1692144319, - "narHash": "sha256-sJ7KT+dfLEQbsNI2G+ZLKQ0tIS72roMv+xjC+0bTS9k=", + "lastModified": 1692749096, + "narHash": "sha256-XyFSBw3WMf5cTG9ImL6S/v9Aoawr38h/Fr1XIi7peEs=", "owner": "nix-community", "repo": "neovim-nightly-overlay", - "rev": "3632032784ed4a7f761a61a3337f2e1d61210eae", + "rev": "83d68ba72f3308b5c90b12fb40044c870903e6ee", "type": "github" }, "original": { @@ -589,11 +592,11 @@ "nixpkgs-regression": "nixpkgs-regression" }, "locked": { - "lastModified": 1689005785, - "narHash": "sha256-gxJmO6Y6L+iEgIhBlyOLlruQQqixERkWkByYSH4LaTg=", + "lastModified": 1691953666, + "narHash": "sha256-HxgMSgoM19OnDb4h47nrxI2lRGsDo+4Y4JEHeCoWB+Q=", "owner": "privatevoid-net", "repo": "nix-super", - "rev": "6ff67e40b495e79aa6b2dc9356f1e9ade3b77bca", + "rev": "65e8abac80cc06f9f05147b51908a47549e9342e", "type": "github" }, "original": { @@ -670,11 +673,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1691654369, - "narHash": "sha256-gSILTEx1jRaJjwZxRlnu3ZwMn1FVNk80qlwiCX8kmpo=", + "lastModified": 1692638711, + "narHash": "sha256-J0LgSFgJVGCC1+j5R2QndadWI1oumusg6hCtYAzLID4=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "ce5e4a6ef2e59d89a971bc434ca8ca222b9c7f5e", + "rev": "91a22f76cd1716f9d0149e8a5c68424bb691de15", "type": "github" }, "original": { @@ -718,11 +721,11 @@ }, "nixpkgs_5": { "locked": { - "lastModified": 1692067901, - "narHash": "sha256-kq8Pf/nmlXECDWMkQSRGQkjWsA6G0pjzZkfUEaTmXJE=", + "lastModified": 1692557222, + "narHash": "sha256-TCOtZaioLf/jTEgfa+nyg0Nwq5Uc610Z+OFV75yUgGw=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "ea95c0917609e5c48023cc7c6141bea2fdf13970", + "rev": "0b07d4957ee1bd7fd3bdfd12db5f361bd70175a6", "type": "github" }, "original": { @@ -734,11 +737,11 @@ }, "nixpkgs_6": { "locked": { - "lastModified": 1692128808, - "narHash": "sha256-Di1Zm/P042NuwThMiZNrtmaAjd4Tm2qBOKHX7xUOfMk=", + "lastModified": 1692808169, + "narHash": "sha256-x9Opq06rIiwdwGeK2Ykj69dNc2IvUH1fY55Wm7atwrE=", "owner": "nixos", "repo": "nixpkgs", - "rev": "4ed9856be002a730234a1a1ed9dcd9dd10cbdb40", + "rev": "9201b5ff357e781bf014d0330d18555695df7ba8", "type": "github" }, "original": { @@ -766,24 +769,11 @@ }, "nixpkgs_8": { "locked": { - "lastModified": 1685677062, - "narHash": "sha256-zoHF7+HNwNwne2XEomphbdc4Y8tdWT16EUxUTXpOKpQ=", - "path": "/nix/store/dnqwkazyg92hzya7400klxlk072g3zsk-source", - "rev": "95be94370d09f97f6af6a1df1eb9649b5260724e", - "type": "path" - }, - "original": { - "id": "nixpkgs", - "type": "indirect" - } - }, - "nixpkgs_9": { - "locked": { - "lastModified": 1687103638, - "narHash": "sha256-dwy/TK6Db5W7ivcgmcxUykhFwodIg0jrRzOFt7H5NUc=", + "lastModified": 1692934111, + "narHash": "sha256-9EEE59v/esKNMR5zKbLRV9NoRPYvERw5jHQOnfr47bk=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "91430887645a0953568da2f3e9a3a3bb0a0378ac", + "rev": "1e44a037bbf4fcaba041436e65e87be88f3f495b", "type": "github" }, "original": { @@ -818,11 +808,11 @@ "nixpkgs-stable": "nixpkgs-stable" }, "locked": { - "lastModified": 1691747570, - "narHash": "sha256-J3fnIwJtHVQ0tK2JMBv4oAmII+1mCdXdpeCxtIsrL2A=", + "lastModified": 1692274144, + "narHash": "sha256-BxTQuRUANQ81u8DJznQyPmRsg63t4Yc+0kcyq6OLz8s=", "owner": "cachix", "repo": "pre-commit-hooks.nix", - "rev": "c5ac3aa3324bd8aebe8622a3fc92eeb3975d317a", + "rev": "7e3517c03d46159fdbf8c0e5c97f82d5d4b0c8fa", "type": "github" }, "original": { @@ -916,11 +906,11 @@ }, "stable": { "locked": { - "lastModified": 1692134936, - "narHash": "sha256-Z68O969cioC6I3k/AFBxsuEwpJwt4l9fzwuAMUhCCs0=", + "lastModified": 1692794066, + "narHash": "sha256-H0aG8r16dj0x/Wz6wQhQxc9V7AsObOiHPaKxQgH6Y08=", "owner": "nixos", "repo": "nixpkgs", - "rev": "bfd953b2c6de4f550f75461bcc5768b6f966be10", + "rev": "fc944919f743bb22379dddf18dcb72db6cff84aa", "type": "github" }, "original": { @@ -1024,15 +1014,15 @@ "timers": { "inputs": { "naersk": "naersk", - "nixpkgs": "nixpkgs_9", + "nixpkgs": "nixpkgs_8", "utils": "utils" }, "locked": { - "lastModified": 1692198673, - "narHash": "sha256-kLhdmJ4uI248caVxQhYSq+IA+xQHDcp5in4eI8sJphk=", + "lastModified": 1693040925, + "narHash": "sha256-AhJSwmp7XN/9V66EYHFnNuIAjqOrYUN3LGRjwrTN6T0=", "ref": "refs/heads/main", - "rev": "37dc5c727a3d73778d6ee9d63c1468357cf0ed72", - "revCount": 20, + "rev": "739f76fa90271860e2c1d683e3a53cfb93e6eb89", + "revCount": 27, "type": "git", "url": "https://gitea.moritzboeh.me/moritz/timers.git" }, @@ -1046,11 +1036,11 @@ "systems": "systems_5" }, "locked": { - "lastModified": 1687171271, - "narHash": "sha256-BJlq+ozK2B1sJDQXS3tzJM5a+oVZmi1q0FlBK/Xqv7M=", + "lastModified": 1692799911, + "narHash": "sha256-3eihraek4qL744EvQXsK1Ha6C3CR7nnT8X2qWap4RNk=", "owner": "numtide", "repo": "flake-utils", - "rev": "abfb11bd1aec8ced1c9bb9adfe68018230f4fb3c", + "rev": "f9e7cf818399d17d347f847525c5a5a8032e4e44", "type": "github" }, "original": { diff --git a/modules/programs/hyprland/default.nix b/modules/programs/hyprland/default.nix index c9b387a..e208565 100644 --- a/modules/programs/hyprland/default.nix +++ b/modules/programs/hyprland/default.nix @@ -61,18 +61,6 @@ in home-manager.users.moritz.programs.waybar = { enable = true; - # use package with hyprland support for switching workspaces - package = pkgs.symlinkJoin { - name = "waybar-hyprland"; - paths = [ pkgs.waybar-hyprland ]; - nativeBuildInputs = [ pkgs.makeWrapper ]; - postBuild = '' - wrapProgram $out/bin/waybar \ - --prefix PATH ":" "${hyprland}/bin" - ''; - }; - - # start using systemd service systemd = { enable = true; @@ -84,14 +72,9 @@ in layer = "top"; position = "top"; height = 20; - modules-left = [ "wlr/workspaces" ]; + modules-left = [ "hyprland/workspaces" ]; modules-center = [ "hyprland/window" ]; - modules-right = [ "network" "memory" "cpu" "battery" "clock" ]; - modules = { - "wlr/workspaces" = { - on-click = "activate"; - }; - }; + modules-right = [ "hyprland/language" "network" "memory" "cpu" "battery" "clock" ]; }; }; }; diff --git a/overlays/packages.nix b/overlays/packages.nix index ceef671..66b2624 100644 --- a/overlays/packages.nix +++ b/overlays/packages.nix @@ -10,7 +10,7 @@ final: prev: src = inputs.rofi-wayland; version = lib.my.mkVersionInput inputs.rofi-wayland; }); - timers = inputs.timers.defaultPackage.${prev.system}; + timers = inputs.timers.packages.${prev.system}.default; fzf1 = final.writeShellApplication { name = "fzf1"; From ff632a5b5214f5d1f51e0ffbdc9eaf1e0d0b0ac1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Sat, 26 Aug 2023 11:47:39 +0200 Subject: [PATCH 9/9] feat(fish): add more completions for timers --- modules/programs/fish.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/modules/programs/fish.nix b/modules/programs/fish.nix index fbb4c24..de683ab 100644 --- a/modules/programs/fish.nix +++ b/modules/programs/fish.nix @@ -47,6 +47,14 @@ in complete -c c -kfa '(zoxide query -l | sed "s|$HOME|~|")' ${optionalString config.virtualisation.podman.dockerCompat /* fish */ "complete -c docker -w podman"} + complete -c timers \ + -n "__fish_seen_subcommand_from toggle" \ + -fa '(timers --json l | ${getExe pkgs.jq} -r .[][].name)' + + complete -c timers \ + -n "__fish_seen_subcommand_from remove" \ + -fa '(timers --json l | ${getExe pkgs.jq} -r .[][].name)' + # Variables ${exportedVariables} '';