diff --git a/flake.lock b/flake.lock index e03935e..6a0eb62 100644 --- a/flake.lock +++ b/flake.lock @@ -191,11 +191,11 @@ "systems": "systems" }, "locked": { - "lastModified": 1692799911, - "narHash": "sha256-3eihraek4qL744EvQXsK1Ha6C3CR7nnT8X2qWap4RNk=", + "lastModified": 1689068808, + "narHash": "sha256-6ixXo3wt24N/melDWjq70UuHQLxGV8jZvooRanIHXw0=", "owner": "numtide", "repo": "flake-utils", - "rev": "f9e7cf818399d17d347f847525c5a5a8032e4e44", + "rev": "919d646de7be200f3bf08cb76ae1f09402b6f9b4", "type": "github" }, "original": { @@ -322,11 +322,11 @@ "hmts-nvim": { "flake": false, "locked": { - "lastModified": 1692743873, - "narHash": "sha256-lfqJVj1HbFJ5H4mo6rKYrexaosqSh17+PQ9BWpcuxZI=", + "lastModified": 1691525513, + "narHash": "sha256-il5m+GlNt0FzZjefl1q8ZxWHg0+gQps0vigt+eoIy8A=", "owner": "calops", "repo": "hmts.nvim", - "rev": "34b825bd1c9ec1b6e2952c111753e2eb286c9e07", + "rev": "594dd17c870afb7f6517723c8963f6eb144e3c0d", "type": "github" }, "original": { @@ -363,11 +363,11 @@ ] }, "locked": { - "lastModified": 1692763155, - "narHash": "sha256-qMrGKZ8c/q/mHO3ZdrcBPwiVVXPLLgXjY98Ejqb5kAA=", + "lastModified": 1692131549, + "narHash": "sha256-MFjI8NL63/6HjMZpvJgnB/Pgg2dht22t45jOYtipZig=", "owner": "nix-community", "repo": "home-manager", - "rev": "6a20e40acaebf067da682661aa67da8b36812606", + "rev": "75cfe974e2ca05a61b66768674032b4c079e55d4", "type": "github" }, "original": { @@ -403,11 +403,11 @@ "xdph": "xdph" }, "locked": { - "lastModified": 1692871050, - "narHash": "sha256-OJ/OkOLFn546rcXmj/3VEGlsPYjdXWAhEmjqdc6re6k=", + "lastModified": 1692182360, + "narHash": "sha256-FSJEeAQj0viz52+GE774GiOOtU0X2B2KgXnRCgogSaU=", "owner": "hyprwm", "repo": "Hyprland", - "rev": "90c03e5bd2204ba6d1a0167c68f65b7a9231bef4", + "rev": "78fa8adadc146a7efeebf63438c1140662484fba", "type": "github" }, "original": { @@ -446,11 +446,11 @@ "nixpkgs": "nixpkgs_3" }, "locked": { - "lastModified": 1692480535, - "narHash": "sha256-3Q0Uz/JPW9USHyAmrzRl6KhZLqMYTWkmtL3RA+oAeVY=", + "lastModified": 1691060455, + "narHash": "sha256-V5ulB9CkGh1ghiC4BKvRdoYKZzpaiOKzAOUmJIFkgM0=", "owner": "hyprwm", "repo": "hyprpaper", - "rev": "5e73eb60552d48d55541c60f9a8da2b666003fe6", + "rev": "e498c438b1e16dcf32ecb3030b20b83f7ed9ff6d", "type": "github" }, "original": { @@ -477,11 +477,11 @@ }, "master": { "locked": { - "lastModified": 1692893187, - "narHash": "sha256-Hbbp6bWQykkLsvzi7yo2KQme0oXCZkCdz9bBorcSKH4=", + "lastModified": 1692198797, + "narHash": "sha256-4MwKoXIBfNI85zZ/tHyLT+M7sF2Zb0XoyhdXtlM6g2c=", "owner": "nixos", "repo": "nixpkgs", - "rev": "d240553dcc2180fe486155bea8a846d5941e168c", + "rev": "c85be71df497312de66b65df8d7ad7b5c0c81d04", "type": "github" }, "original": { @@ -492,17 +492,14 @@ }, "naersk": { "inputs": { - "nixpkgs": [ - "timers", - "nixpkgs" - ] + "nixpkgs": "nixpkgs_8" }, "locked": { - "lastModified": 1692351612, - "narHash": "sha256-KTGonidcdaLadRnv9KFgwSMh1ZbXoR/OBmPjeNMhFwU=", + "lastModified": 1686572087, + "narHash": "sha256-jXTut7ZSYqLEgm/nTk7TuVL2ExahTip605bLINklAnQ=", "owner": "nix-community", "repo": "naersk", - "rev": "78789c30d64dea2396c9da516bbcc8db3a475207", + "rev": "8507af04eb40c5520bd35d9ce6f9d2342cea5ad1", "type": "github" }, "original": { @@ -522,11 +519,11 @@ }, "locked": { "dir": "contrib", - "lastModified": 1692744130, - "narHash": "sha256-Iod6+KGeWnX1SV4owXpSoC17iImCJjTq2iqEp6IRBZc=", + "lastModified": 1692141167, + "narHash": "sha256-1My5JBKfHupN9D86eeX8JFr2Wk03qWJObk73NC1/x2s=", "owner": "neovim", "repo": "neovim", - "rev": "6462ee1c10f9f1aa66ffc4d4fe1b7b3d9f0f91af", + "rev": "f92bda1dad462de81ec92134dfa9ba637edc7bb7", "type": "github" }, "original": { @@ -545,11 +542,11 @@ "nixpkgs": "nixpkgs_5" }, "locked": { - "lastModified": 1692749096, - "narHash": "sha256-XyFSBw3WMf5cTG9ImL6S/v9Aoawr38h/Fr1XIi7peEs=", + "lastModified": 1692144319, + "narHash": "sha256-sJ7KT+dfLEQbsNI2G+ZLKQ0tIS72roMv+xjC+0bTS9k=", "owner": "nix-community", "repo": "neovim-nightly-overlay", - "rev": "83d68ba72f3308b5c90b12fb40044c870903e6ee", + "rev": "3632032784ed4a7f761a61a3337f2e1d61210eae", "type": "github" }, "original": { @@ -592,11 +589,11 @@ "nixpkgs-regression": "nixpkgs-regression" }, "locked": { - "lastModified": 1691953666, - "narHash": "sha256-HxgMSgoM19OnDb4h47nrxI2lRGsDo+4Y4JEHeCoWB+Q=", + "lastModified": 1689005785, + "narHash": "sha256-gxJmO6Y6L+iEgIhBlyOLlruQQqixERkWkByYSH4LaTg=", "owner": "privatevoid-net", "repo": "nix-super", - "rev": "65e8abac80cc06f9f05147b51908a47549e9342e", + "rev": "6ff67e40b495e79aa6b2dc9356f1e9ade3b77bca", "type": "github" }, "original": { @@ -673,11 +670,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1692638711, - "narHash": "sha256-J0LgSFgJVGCC1+j5R2QndadWI1oumusg6hCtYAzLID4=", + "lastModified": 1691654369, + "narHash": "sha256-gSILTEx1jRaJjwZxRlnu3ZwMn1FVNk80qlwiCX8kmpo=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "91a22f76cd1716f9d0149e8a5c68424bb691de15", + "rev": "ce5e4a6ef2e59d89a971bc434ca8ca222b9c7f5e", "type": "github" }, "original": { @@ -721,11 +718,11 @@ }, "nixpkgs_5": { "locked": { - "lastModified": 1692557222, - "narHash": "sha256-TCOtZaioLf/jTEgfa+nyg0Nwq5Uc610Z+OFV75yUgGw=", + "lastModified": 1692067901, + "narHash": "sha256-kq8Pf/nmlXECDWMkQSRGQkjWsA6G0pjzZkfUEaTmXJE=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "0b07d4957ee1bd7fd3bdfd12db5f361bd70175a6", + "rev": "ea95c0917609e5c48023cc7c6141bea2fdf13970", "type": "github" }, "original": { @@ -737,11 +734,11 @@ }, "nixpkgs_6": { "locked": { - "lastModified": 1692808169, - "narHash": "sha256-x9Opq06rIiwdwGeK2Ykj69dNc2IvUH1fY55Wm7atwrE=", + "lastModified": 1692128808, + "narHash": "sha256-Di1Zm/P042NuwThMiZNrtmaAjd4Tm2qBOKHX7xUOfMk=", "owner": "nixos", "repo": "nixpkgs", - "rev": "9201b5ff357e781bf014d0330d18555695df7ba8", + "rev": "4ed9856be002a730234a1a1ed9dcd9dd10cbdb40", "type": "github" }, "original": { @@ -769,11 +766,24 @@ }, "nixpkgs_8": { "locked": { - "lastModified": 1692934111, - "narHash": "sha256-9EEE59v/esKNMR5zKbLRV9NoRPYvERw5jHQOnfr47bk=", + "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=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "1e44a037bbf4fcaba041436e65e87be88f3f495b", + "rev": "91430887645a0953568da2f3e9a3a3bb0a0378ac", "type": "github" }, "original": { @@ -808,11 +818,11 @@ "nixpkgs-stable": "nixpkgs-stable" }, "locked": { - "lastModified": 1692274144, - "narHash": "sha256-BxTQuRUANQ81u8DJznQyPmRsg63t4Yc+0kcyq6OLz8s=", + "lastModified": 1691747570, + "narHash": "sha256-J3fnIwJtHVQ0tK2JMBv4oAmII+1mCdXdpeCxtIsrL2A=", "owner": "cachix", "repo": "pre-commit-hooks.nix", - "rev": "7e3517c03d46159fdbf8c0e5c97f82d5d4b0c8fa", + "rev": "c5ac3aa3324bd8aebe8622a3fc92eeb3975d317a", "type": "github" }, "original": { @@ -906,11 +916,11 @@ }, "stable": { "locked": { - "lastModified": 1692794066, - "narHash": "sha256-H0aG8r16dj0x/Wz6wQhQxc9V7AsObOiHPaKxQgH6Y08=", + "lastModified": 1692134936, + "narHash": "sha256-Z68O969cioC6I3k/AFBxsuEwpJwt4l9fzwuAMUhCCs0=", "owner": "nixos", "repo": "nixpkgs", - "rev": "fc944919f743bb22379dddf18dcb72db6cff84aa", + "rev": "bfd953b2c6de4f550f75461bcc5768b6f966be10", "type": "github" }, "original": { @@ -1014,15 +1024,15 @@ "timers": { "inputs": { "naersk": "naersk", - "nixpkgs": "nixpkgs_8", + "nixpkgs": "nixpkgs_9", "utils": "utils" }, "locked": { - "lastModified": 1693040925, - "narHash": "sha256-AhJSwmp7XN/9V66EYHFnNuIAjqOrYUN3LGRjwrTN6T0=", + "lastModified": 1692198673, + "narHash": "sha256-kLhdmJ4uI248caVxQhYSq+IA+xQHDcp5in4eI8sJphk=", "ref": "refs/heads/main", - "rev": "739f76fa90271860e2c1d683e3a53cfb93e6eb89", - "revCount": 27, + "rev": "37dc5c727a3d73778d6ee9d63c1468357cf0ed72", + "revCount": 20, "type": "git", "url": "https://gitea.moritzboeh.me/moritz/timers.git" }, @@ -1036,11 +1046,11 @@ "systems": "systems_5" }, "locked": { - "lastModified": 1692799911, - "narHash": "sha256-3eihraek4qL744EvQXsK1Ha6C3CR7nnT8X2qWap4RNk=", + "lastModified": 1687171271, + "narHash": "sha256-BJlq+ozK2B1sJDQXS3tzJM5a+oVZmi1q0FlBK/Xqv7M=", "owner": "numtide", "repo": "flake-utils", - "rev": "f9e7cf818399d17d347f847525c5a5a8032e4e44", + "rev": "abfb11bd1aec8ced1c9bb9adfe68018230f4fb3c", "type": "github" }, "original": { diff --git a/modules/profiles/base.nix b/modules/profiles/base.nix index aefaac4..1717f1f 100644 --- a/modules/profiles/base.nix +++ b/modules/profiles/base.nix @@ -6,70 +6,26 @@ with lib; let - nom-system = pkgs.writeFishApplication { + nom-system = pkgs.writeShellApplication { name = "nom-system"; runtimeInputs = with pkgs; [ nix-output-monitor ]; - 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} + text = '' + nom build --no-link "/home/moritz/.dotfiles#nixosConfigurations.$(hostname).config.system.build.toplevel" ''; }; + nom-system-command = command: "${nom-system}/bin/nom-system && ${command}"; f = pkgs.writeFishApplication { name = "f"; runtimeInputs = with pkgs; [ fzf bat ]; - text = /* fish */ '' - fzf --query "$argv" \ - --multi \ - --bind "enter:become($EDITOR {+})" \ - --preview "bat --color=always --style=header,grid --line-range :500 {+}" + 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 ''; }; - - 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"; - 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 = { @@ -101,6 +57,8 @@ 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''; @@ -147,15 +105,12 @@ 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 - manix nix-index - nix-output-monitor nixpkgs-fmt statix - which-nix + manix + nix-output-monitor # other bat @@ -164,16 +119,15 @@ 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 de683ab..efc2dac 100644 --- a/modules/programs/fish.nix +++ b/modules/programs/fish.nix @@ -45,20 +45,29 @@ in # Completions 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} ''; 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"; }; diff --git a/modules/programs/hyprland/default.nix b/modules/programs/hyprland/default.nix index e208565..c9b387a 100644 --- a/modules/programs/hyprland/default.nix +++ b/modules/programs/hyprland/default.nix @@ -61,6 +61,18 @@ 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; @@ -72,9 +84,14 @@ in layer = "top"; position = "top"; height = 20; - modules-left = [ "hyprland/workspaces" ]; + modules-left = [ "wlr/workspaces" ]; modules-center = [ "hyprland/window" ]; - modules-right = [ "hyprland/language" "network" "memory" "cpu" "battery" "clock" ]; + modules-right = [ "network" "memory" "cpu" "battery" "clock" ]; + modules = { + "wlr/workspaces" = { + on-click = "activate"; + }; + }; }; }; }; diff --git a/modules/programs/kitty.nix b/modules/programs/kitty.nix index a1e5b56..df34c20 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.9"; + background_opacity = "0.92"; }; keybindings = { "ctrl+plus" = "change_font_size all +2.0"; diff --git a/overlays/builders.nix b/overlays/builders.nix index 813b7d3..498ebcc 100644 --- a/overlays/builders.nix +++ b/overlays/builders.nix @@ -18,11 +18,13 @@ with final.lib; preferLocalBuild = false; text = '' #!${getExe final.fish} + '' + optionalString (runtimeInputs != [ ]) '' - ${optionalString (runtimeInputs != [ ]) ''export PATH="${makeBinPath runtimeInputs}:$PATH"''} + export PATH="${makeBinPath runtimeInputs}:$PATH" + '' + '' - ${content} - ''; + ${content} + ''; checkPhase = if checkPhase == null then '' @@ -33,7 +35,9 @@ with final.lib; else checkPhase; }; + script = fishFile "/bin/${name}" text; + completions_file = fishFile "/share/fish/vendor_completions.d/${name}.fish" completions; in final.symlinkJoin { diff --git a/overlays/packages.nix b/overlays/packages.nix index 66b2624..ceef671 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.packages.${prev.system}.default; + timers = inputs.timers.defaultPackage.${prev.system}; fzf1 = final.writeShellApplication { name = "fzf1";