Compare commits

..

9 commits

7 changed files with 138 additions and 132 deletions

View file

@ -191,11 +191,11 @@
"systems": "systems" "systems": "systems"
}, },
"locked": { "locked": {
"lastModified": 1689068808, "lastModified": 1692799911,
"narHash": "sha256-6ixXo3wt24N/melDWjq70UuHQLxGV8jZvooRanIHXw0=", "narHash": "sha256-3eihraek4qL744EvQXsK1Ha6C3CR7nnT8X2qWap4RNk=",
"owner": "numtide", "owner": "numtide",
"repo": "flake-utils", "repo": "flake-utils",
"rev": "919d646de7be200f3bf08cb76ae1f09402b6f9b4", "rev": "f9e7cf818399d17d347f847525c5a5a8032e4e44",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -322,11 +322,11 @@
"hmts-nvim": { "hmts-nvim": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1691525513, "lastModified": 1692743873,
"narHash": "sha256-il5m+GlNt0FzZjefl1q8ZxWHg0+gQps0vigt+eoIy8A=", "narHash": "sha256-lfqJVj1HbFJ5H4mo6rKYrexaosqSh17+PQ9BWpcuxZI=",
"owner": "calops", "owner": "calops",
"repo": "hmts.nvim", "repo": "hmts.nvim",
"rev": "594dd17c870afb7f6517723c8963f6eb144e3c0d", "rev": "34b825bd1c9ec1b6e2952c111753e2eb286c9e07",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -363,11 +363,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1692131549, "lastModified": 1692763155,
"narHash": "sha256-MFjI8NL63/6HjMZpvJgnB/Pgg2dht22t45jOYtipZig=", "narHash": "sha256-qMrGKZ8c/q/mHO3ZdrcBPwiVVXPLLgXjY98Ejqb5kAA=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "75cfe974e2ca05a61b66768674032b4c079e55d4", "rev": "6a20e40acaebf067da682661aa67da8b36812606",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -403,11 +403,11 @@
"xdph": "xdph" "xdph": "xdph"
}, },
"locked": { "locked": {
"lastModified": 1692182360, "lastModified": 1692871050,
"narHash": "sha256-FSJEeAQj0viz52+GE774GiOOtU0X2B2KgXnRCgogSaU=", "narHash": "sha256-OJ/OkOLFn546rcXmj/3VEGlsPYjdXWAhEmjqdc6re6k=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "Hyprland", "repo": "Hyprland",
"rev": "78fa8adadc146a7efeebf63438c1140662484fba", "rev": "90c03e5bd2204ba6d1a0167c68f65b7a9231bef4",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -446,11 +446,11 @@
"nixpkgs": "nixpkgs_3" "nixpkgs": "nixpkgs_3"
}, },
"locked": { "locked": {
"lastModified": 1691060455, "lastModified": 1692480535,
"narHash": "sha256-V5ulB9CkGh1ghiC4BKvRdoYKZzpaiOKzAOUmJIFkgM0=", "narHash": "sha256-3Q0Uz/JPW9USHyAmrzRl6KhZLqMYTWkmtL3RA+oAeVY=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "hyprpaper", "repo": "hyprpaper",
"rev": "e498c438b1e16dcf32ecb3030b20b83f7ed9ff6d", "rev": "5e73eb60552d48d55541c60f9a8da2b666003fe6",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -477,11 +477,11 @@
}, },
"master": { "master": {
"locked": { "locked": {
"lastModified": 1692198797, "lastModified": 1692893187,
"narHash": "sha256-4MwKoXIBfNI85zZ/tHyLT+M7sF2Zb0XoyhdXtlM6g2c=", "narHash": "sha256-Hbbp6bWQykkLsvzi7yo2KQme0oXCZkCdz9bBorcSKH4=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "c85be71df497312de66b65df8d7ad7b5c0c81d04", "rev": "d240553dcc2180fe486155bea8a846d5941e168c",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -492,14 +492,17 @@
}, },
"naersk": { "naersk": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs_8" "nixpkgs": [
"timers",
"nixpkgs"
]
}, },
"locked": { "locked": {
"lastModified": 1686572087, "lastModified": 1692351612,
"narHash": "sha256-jXTut7ZSYqLEgm/nTk7TuVL2ExahTip605bLINklAnQ=", "narHash": "sha256-KTGonidcdaLadRnv9KFgwSMh1ZbXoR/OBmPjeNMhFwU=",
"owner": "nix-community", "owner": "nix-community",
"repo": "naersk", "repo": "naersk",
"rev": "8507af04eb40c5520bd35d9ce6f9d2342cea5ad1", "rev": "78789c30d64dea2396c9da516bbcc8db3a475207",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -519,11 +522,11 @@
}, },
"locked": { "locked": {
"dir": "contrib", "dir": "contrib",
"lastModified": 1692141167, "lastModified": 1692744130,
"narHash": "sha256-1My5JBKfHupN9D86eeX8JFr2Wk03qWJObk73NC1/x2s=", "narHash": "sha256-Iod6+KGeWnX1SV4owXpSoC17iImCJjTq2iqEp6IRBZc=",
"owner": "neovim", "owner": "neovim",
"repo": "neovim", "repo": "neovim",
"rev": "f92bda1dad462de81ec92134dfa9ba637edc7bb7", "rev": "6462ee1c10f9f1aa66ffc4d4fe1b7b3d9f0f91af",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -542,11 +545,11 @@
"nixpkgs": "nixpkgs_5" "nixpkgs": "nixpkgs_5"
}, },
"locked": { "locked": {
"lastModified": 1692144319, "lastModified": 1692749096,
"narHash": "sha256-sJ7KT+dfLEQbsNI2G+ZLKQ0tIS72roMv+xjC+0bTS9k=", "narHash": "sha256-XyFSBw3WMf5cTG9ImL6S/v9Aoawr38h/Fr1XIi7peEs=",
"owner": "nix-community", "owner": "nix-community",
"repo": "neovim-nightly-overlay", "repo": "neovim-nightly-overlay",
"rev": "3632032784ed4a7f761a61a3337f2e1d61210eae", "rev": "83d68ba72f3308b5c90b12fb40044c870903e6ee",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -589,11 +592,11 @@
"nixpkgs-regression": "nixpkgs-regression" "nixpkgs-regression": "nixpkgs-regression"
}, },
"locked": { "locked": {
"lastModified": 1689005785, "lastModified": 1691953666,
"narHash": "sha256-gxJmO6Y6L+iEgIhBlyOLlruQQqixERkWkByYSH4LaTg=", "narHash": "sha256-HxgMSgoM19OnDb4h47nrxI2lRGsDo+4Y4JEHeCoWB+Q=",
"owner": "privatevoid-net", "owner": "privatevoid-net",
"repo": "nix-super", "repo": "nix-super",
"rev": "6ff67e40b495e79aa6b2dc9356f1e9ade3b77bca", "rev": "65e8abac80cc06f9f05147b51908a47549e9342e",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -670,11 +673,11 @@
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1691654369, "lastModified": 1692638711,
"narHash": "sha256-gSILTEx1jRaJjwZxRlnu3ZwMn1FVNk80qlwiCX8kmpo=", "narHash": "sha256-J0LgSFgJVGCC1+j5R2QndadWI1oumusg6hCtYAzLID4=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "ce5e4a6ef2e59d89a971bc434ca8ca222b9c7f5e", "rev": "91a22f76cd1716f9d0149e8a5c68424bb691de15",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -718,11 +721,11 @@
}, },
"nixpkgs_5": { "nixpkgs_5": {
"locked": { "locked": {
"lastModified": 1692067901, "lastModified": 1692557222,
"narHash": "sha256-kq8Pf/nmlXECDWMkQSRGQkjWsA6G0pjzZkfUEaTmXJE=", "narHash": "sha256-TCOtZaioLf/jTEgfa+nyg0Nwq5Uc610Z+OFV75yUgGw=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "ea95c0917609e5c48023cc7c6141bea2fdf13970", "rev": "0b07d4957ee1bd7fd3bdfd12db5f361bd70175a6",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -734,11 +737,11 @@
}, },
"nixpkgs_6": { "nixpkgs_6": {
"locked": { "locked": {
"lastModified": 1692128808, "lastModified": 1692808169,
"narHash": "sha256-Di1Zm/P042NuwThMiZNrtmaAjd4Tm2qBOKHX7xUOfMk=", "narHash": "sha256-x9Opq06rIiwdwGeK2Ykj69dNc2IvUH1fY55Wm7atwrE=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "4ed9856be002a730234a1a1ed9dcd9dd10cbdb40", "rev": "9201b5ff357e781bf014d0330d18555695df7ba8",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -766,24 +769,11 @@
}, },
"nixpkgs_8": { "nixpkgs_8": {
"locked": { "locked": {
"lastModified": 1685677062, "lastModified": 1692934111,
"narHash": "sha256-zoHF7+HNwNwne2XEomphbdc4Y8tdWT16EUxUTXpOKpQ=", "narHash": "sha256-9EEE59v/esKNMR5zKbLRV9NoRPYvERw5jHQOnfr47bk=",
"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", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "91430887645a0953568da2f3e9a3a3bb0a0378ac", "rev": "1e44a037bbf4fcaba041436e65e87be88f3f495b",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -818,11 +808,11 @@
"nixpkgs-stable": "nixpkgs-stable" "nixpkgs-stable": "nixpkgs-stable"
}, },
"locked": { "locked": {
"lastModified": 1691747570, "lastModified": 1692274144,
"narHash": "sha256-J3fnIwJtHVQ0tK2JMBv4oAmII+1mCdXdpeCxtIsrL2A=", "narHash": "sha256-BxTQuRUANQ81u8DJznQyPmRsg63t4Yc+0kcyq6OLz8s=",
"owner": "cachix", "owner": "cachix",
"repo": "pre-commit-hooks.nix", "repo": "pre-commit-hooks.nix",
"rev": "c5ac3aa3324bd8aebe8622a3fc92eeb3975d317a", "rev": "7e3517c03d46159fdbf8c0e5c97f82d5d4b0c8fa",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -916,11 +906,11 @@
}, },
"stable": { "stable": {
"locked": { "locked": {
"lastModified": 1692134936, "lastModified": 1692794066,
"narHash": "sha256-Z68O969cioC6I3k/AFBxsuEwpJwt4l9fzwuAMUhCCs0=", "narHash": "sha256-H0aG8r16dj0x/Wz6wQhQxc9V7AsObOiHPaKxQgH6Y08=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "bfd953b2c6de4f550f75461bcc5768b6f966be10", "rev": "fc944919f743bb22379dddf18dcb72db6cff84aa",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -1024,15 +1014,15 @@
"timers": { "timers": {
"inputs": { "inputs": {
"naersk": "naersk", "naersk": "naersk",
"nixpkgs": "nixpkgs_9", "nixpkgs": "nixpkgs_8",
"utils": "utils" "utils": "utils"
}, },
"locked": { "locked": {
"lastModified": 1692198673, "lastModified": 1693040925,
"narHash": "sha256-kLhdmJ4uI248caVxQhYSq+IA+xQHDcp5in4eI8sJphk=", "narHash": "sha256-AhJSwmp7XN/9V66EYHFnNuIAjqOrYUN3LGRjwrTN6T0=",
"ref": "refs/heads/main", "ref": "refs/heads/main",
"rev": "37dc5c727a3d73778d6ee9d63c1468357cf0ed72", "rev": "739f76fa90271860e2c1d683e3a53cfb93e6eb89",
"revCount": 20, "revCount": 27,
"type": "git", "type": "git",
"url": "https://gitea.moritzboeh.me/moritz/timers.git" "url": "https://gitea.moritzboeh.me/moritz/timers.git"
}, },
@ -1046,11 +1036,11 @@
"systems": "systems_5" "systems": "systems_5"
}, },
"locked": { "locked": {
"lastModified": 1687171271, "lastModified": 1692799911,
"narHash": "sha256-BJlq+ozK2B1sJDQXS3tzJM5a+oVZmi1q0FlBK/Xqv7M=", "narHash": "sha256-3eihraek4qL744EvQXsK1Ha6C3CR7nnT8X2qWap4RNk=",
"owner": "numtide", "owner": "numtide",
"repo": "flake-utils", "repo": "flake-utils",
"rev": "abfb11bd1aec8ced1c9bb9adfe68018230f4fb3c", "rev": "f9e7cf818399d17d347f847525c5a5a8032e4e44",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -6,24 +6,68 @@
with lib; with lib;
let let
nom-system = pkgs.writeShellApplication { nom-system = pkgs.writeFishApplication {
name = "nom-system"; name = "nom-system";
runtimeInputs = with pkgs; [ nix-output-monitor ]; runtimeInputs = with pkgs; [ nix-output-monitor ];
text = '' text = /* fish */ ''
nom build --no-link "/home/moritz/.dotfiles#nixosConfigurations.$(hostname).config.system.build.toplevel" 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 { f = pkgs.writeFishApplication {
name = "f"; name = "f";
runtimeInputs = with pkgs; [ fzf bat ]; runtimeInputs = with pkgs; [ fzf bat ];
text = '' text = /* fish */ ''
#!/usr/bin/env fish fzf --query "$argv" \
fzf --query "$argv" --multi --bind "enter:become($EDITOR {+})" --preview "bat --color=always --style=header,grid --line-range :500 {+}" --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 in
@ -57,8 +101,6 @@ in
mv = "mv -i"; mv = "mv -i";
cd = "__zoxide_z"; 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"; nixos-update = "pushd ~/.dotfiles && nix flake update && popd";
latexwatch = ''find -type f -name "*.tex" | entr -c latexmk -pdf -silent''; latexwatch = ''find -type f -name "*.tex" | entr -c latexmk -pdf -silent'';
@ -105,12 +147,15 @@ in
bottom bottom
# nix # nix
(nom-system-command "nixos-boot" "sudo nixos-rebuild boot --flake ~/.dotfiles")
(nom-system-command "nixos-switch" "sudo nixos-rebuild switch --flake ~/.dotfiles")
comma comma
manix
nix-index nix-index
nix-output-monitor
nixpkgs-fmt nixpkgs-fmt
statix statix
manix which-nix
nix-output-monitor
# other # other
bat bat
@ -119,15 +164,16 @@ in
duf duf
entr entr
exa exa
f
gi
gparted gparted
neofetch neofetch
reptyr reptyr
ripgrep ripgrep
up up
vim
viu viu
wget wget
vim
f
]; ];
fonts.packages = with pkgs; [ fonts.packages = with pkgs; [

View file

@ -45,29 +45,20 @@ in
# Completions # Completions
complete -c c -kfa '(zoxide query -l | sed "s|$HOME|~|")' 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 # Variables
${exportedVariables} ${exportedVariables}
''; '';
functions = { 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 = ""; fish_greeting = "";
cheat = "cht.sh $argv | bat -p"; cheat = "cht.sh $argv | bat -p";
}; };

View file

@ -61,18 +61,6 @@ in
home-manager.users.moritz.programs.waybar = { home-manager.users.moritz.programs.waybar = {
enable = true; 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 # start using systemd service
systemd = { systemd = {
enable = true; enable = true;
@ -84,14 +72,9 @@ in
layer = "top"; layer = "top";
position = "top"; position = "top";
height = 20; height = 20;
modules-left = [ "wlr/workspaces" ]; modules-left = [ "hyprland/workspaces" ];
modules-center = [ "hyprland/window" ]; modules-center = [ "hyprland/window" ];
modules-right = [ "network" "memory" "cpu" "battery" "clock" ]; modules-right = [ "hyprland/language" "network" "memory" "cpu" "battery" "clock" ];
modules = {
"wlr/workspaces" = {
on-click = "activate";
};
};
}; };
}; };
}; };

View file

@ -21,7 +21,7 @@ in
cursor_shape = "underline"; cursor_shape = "underline";
window_padding_width = 3; window_padding_width = 3;
confirm_os_window_close = 0; confirm_os_window_close = 0;
background_opacity = "0.92"; background_opacity = "0.9";
}; };
keybindings = { keybindings = {
"ctrl+plus" = "change_font_size all +2.0"; "ctrl+plus" = "change_font_size all +2.0";

View file

@ -18,10 +18,8 @@ with final.lib;
preferLocalBuild = false; preferLocalBuild = false;
text = '' text = ''
#!${getExe final.fish} #!${getExe final.fish}
'' + optionalString (runtimeInputs != [ ]) ''
export PATH="${makeBinPath runtimeInputs}:$PATH" ${optionalString (runtimeInputs != [ ]) ''export PATH="${makeBinPath runtimeInputs}:$PATH"''}
'' + ''
${content} ${content}
''; '';
@ -35,9 +33,7 @@ with final.lib;
else checkPhase; else checkPhase;
}; };
script = fishFile "/bin/${name}" text; script = fishFile "/bin/${name}" text;
completions_file = fishFile "/share/fish/vendor_completions.d/${name}.fish" completions; completions_file = fishFile "/share/fish/vendor_completions.d/${name}.fish" completions;
in in
final.symlinkJoin { final.symlinkJoin {

View file

@ -10,7 +10,7 @@ final: prev:
src = inputs.rofi-wayland; src = inputs.rofi-wayland;
version = lib.my.mkVersionInput 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 { fzf1 = final.writeShellApplication {
name = "fzf1"; name = "fzf1";