Compare commits

...

7 commits

Author SHA1 Message Date
f7dead6bd4
work: Fix wallpaper, disable bitwarden desktop client 2024-04-12 08:48:25 +02:00
64a8659d45
Switch back to fish as shell 2024-04-12 08:48:08 +02:00
acb17e1563
foot: Add catppuccin theme 2024-04-12 08:47:52 +02:00
0dab7bdd5a
fish: Update ls alias 2024-04-12 08:47:33 +02:00
2d7d48a13e
fish: Updated functions
- Added the KINK play function
- Added pre- and post-exec event handlers for pipe-command-output
- Just add pkgs as argument instead of individual packages
2024-04-12 08:45:28 +02:00
ac7c2145b6
fish: Add catppuccin theme 2024-04-12 08:45:05 +02:00
8358aecb87
flake.lock: Update
Flake lock file updates:

• Updated input 'atuin':
    'github:atuinsh/atuin/0ab9f4d9ff545d83dc664b494ecf450750c0f184?narHash=sha256-tcGPDWrfUuo3d5OpXyg9veJeYIatzFLRjcZSp%2B0SFxI%3D' (2024-04-09)
  → 'github:atuinsh/atuin/0da8d34425ef83395759db79377025c062a69911?narHash=sha256-VHP7ESpUHb5STZfbZyMDGz9g%2BxsgGdJGa8iX4rkFYz8%3D' (2024-04-10)
• Updated input 'disko':
    'github:nix-community/disko/79eab0e82cb126bf4ac170f44af82479f0895ab5?narHash=sha256-Tv4C8OSPVmm4LbpJGLFSODyvJy6DqrisEGPCQdNVOeY%3D' (2024-04-08)
  → 'github:nix-community/disko/a297cb1cb0337ee10a7a0f9517954501d8f6f74d?narHash=sha256-aAksVB7zMfBQTz0q2Lw3o78HM3Bg2FRziX2D6qnh%2Bsk%3D' (2024-04-11)
• Updated input 'emacs-overlay':
    'github:nix-community/emacs-overlay/d08457d425b0a1f15f44f6d9faa17240f2bd29a6?narHash=sha256-y703Dcj6RS51iO5xFDorkyIGZD8/hQDkwaHJsB6uI80%3D' (2024-04-10)
  → 'github:nix-community/emacs-overlay/9b79fd139ff55062e46191bd5dd42fcb79696328?narHash=sha256-mEL4y1N/aQrI%2BOeYHm6Sol8lpDVsceCc2TJF8%2BuMv6Y%3D' (2024-04-11)
• Updated input 'home-manager':
    'github:nix-community/home-manager/b00d0e4fe9cba0047f54e77418ddda5f17e6ef2c?narHash=sha256-NrVLXkpT9ZigiI8md6NIzHS%2B3lE4QTj30IgXG57O9iM%3D' (2024-04-09)
  → 'github:nix-community/home-manager/31357486b0ef6f4e161e002b6893eeb4fafc3ca9?narHash=sha256-2APpO3ZW4idlgtlb8hB04u/rmIcKA8O7pYqxF66xbNY%3D' (2024-04-10)
• Updated input 'nixos-hardware':
    'github:NixOS/nixos-hardware/05aa46a1f3b5ac92bfe84807868ba9670d48b031?narHash=sha256-rXb3onsPMiv00FrGSpIJyYa8x53W0dlbJ5Ka3xvje/c%3D' (2024-04-09)
  → 'github:NixOS/nixos-hardware/e1c4bac14beb8c409d0534382cf967171706b9d9?narHash=sha256-4zhaEW1nB%2BnGbCNMjOggWeY5nXs/H0Y71q0%2Bh%2BjdxoU%3D' (2024-04-10)
• Updated input 'rust-overlay':
    'github:oxalica/rust-overlay/9ef1eca23bee5fb8080863909af3802130b2ee57?narHash=sha256-uOx7GaLV%2B5hekAYtm/CBr627Pi7%2Bd1Yh70hwKmVjYYo%3D' (2024-04-10)
  → 'github:oxalica/rust-overlay/35ebec41fcdeeae8e012e7d62ba153a13645227f?narHash=sha256-KZJnVw3TdfDyUhvClzgy3IEoC9tRhvG0yM%2BlHfqAm34%3D' (2024-04-11)
2024-04-11 08:40:28 +02:00
6 changed files with 123 additions and 58 deletions

View file

@ -54,11 +54,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1712668887, "lastModified": 1712750567,
"narHash": "sha256-tcGPDWrfUuo3d5OpXyg9veJeYIatzFLRjcZSp+0SFxI=", "narHash": "sha256-VHP7ESpUHb5STZfbZyMDGz9g+xsgGdJGa8iX4rkFYz8=",
"owner": "atuinsh", "owner": "atuinsh",
"repo": "atuin", "repo": "atuin",
"rev": "0ab9f4d9ff545d83dc664b494ecf450750c0f184", "rev": "0da8d34425ef83395759db79377025c062a69911",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -192,11 +192,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1712612224, "lastModified": 1712798444,
"narHash": "sha256-Tv4C8OSPVmm4LbpJGLFSODyvJy6DqrisEGPCQdNVOeY=", "narHash": "sha256-aAksVB7zMfBQTz0q2Lw3o78HM3Bg2FRziX2D6qnh+sk=",
"owner": "nix-community", "owner": "nix-community",
"repo": "disko", "repo": "disko",
"rev": "79eab0e82cb126bf4ac170f44af82479f0895ab5", "rev": "a297cb1cb0337ee10a7a0f9517954501d8f6f74d",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -216,11 +216,11 @@
"nixpkgs-stable": "nixpkgs-stable_2" "nixpkgs-stable": "nixpkgs-stable_2"
}, },
"locked": { "locked": {
"lastModified": 1712713563, "lastModified": 1712800011,
"narHash": "sha256-y703Dcj6RS51iO5xFDorkyIGZD8/hQDkwaHJsB6uI80=", "narHash": "sha256-mEL4y1N/aQrI+OeYHm6Sol8lpDVsceCc2TJF8+uMv6Y=",
"owner": "nix-community", "owner": "nix-community",
"repo": "emacs-overlay", "repo": "emacs-overlay",
"rev": "d08457d425b0a1f15f44f6d9faa17240f2bd29a6", "rev": "9b79fd139ff55062e46191bd5dd42fcb79696328",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -560,11 +560,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1712688495, "lastModified": 1712759992,
"narHash": "sha256-NrVLXkpT9ZigiI8md6NIzHS+3lE4QTj30IgXG57O9iM=", "narHash": "sha256-2APpO3ZW4idlgtlb8hB04u/rmIcKA8O7pYqxF66xbNY=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "b00d0e4fe9cba0047f54e77418ddda5f17e6ef2c", "rev": "31357486b0ef6f4e161e002b6893eeb4fafc3ca9",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -667,11 +667,11 @@
}, },
"nixos-hardware": { "nixos-hardware": {
"locked": { "locked": {
"lastModified": 1712695607, "lastModified": 1712760404,
"narHash": "sha256-rXb3onsPMiv00FrGSpIJyYa8x53W0dlbJ5Ka3xvje/c=", "narHash": "sha256-4zhaEW1nB+nGbCNMjOggWeY5nXs/H0Y71q0+h+jdxoU=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixos-hardware", "repo": "nixos-hardware",
"rev": "05aa46a1f3b5ac92bfe84807868ba9670d48b031", "rev": "e1c4bac14beb8c409d0534382cf967171706b9d9",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -911,11 +911,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1712715149, "lastModified": 1712801594,
"narHash": "sha256-uOx7GaLV+5hekAYtm/CBr627Pi7+d1Yh70hwKmVjYYo=", "narHash": "sha256-KZJnVw3TdfDyUhvClzgy3IEoC9tRhvG0yM+lHfqAm34=",
"owner": "oxalica", "owner": "oxalica",
"repo": "rust-overlay", "repo": "rust-overlay",
"rev": "9ef1eca23bee5fb8080863909af3802130b2ee57", "rev": "35ebec41fcdeeae8e012e7d62ba153a13645227f",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -7,6 +7,13 @@
with lib; with lib;
let let
cfg = config.eboskma.programs.fish; cfg = config.eboskma.programs.fish;
catppuccin = pkgs.fetchFromGitHub {
owner = "catppuccin";
repo = "fish";
rev = "0ce27b518e8ead555dec34dd8be3df5bd75cff8e";
hash = "sha256-Dc/zdxfzAUM5NX8PxzfljRbYvO9f9syuLO8yBr+R3qg=";
};
in in
{ {
options.eboskma.programs.fish = { options.eboskma.programs.fish = {
@ -17,7 +24,7 @@ in
programs = { programs = {
fish = { fish = {
enable = true; enable = true;
functions = import ./functions.nix { inherit (pkgs) git coreutils; }; functions = import ./functions.nix { inherit pkgs; };
plugins = [ plugins = [
{ {
@ -32,8 +39,7 @@ in
]; ];
shellAliases = { shellAliases = {
# code = "${pkgs.vscode}/bin/code --enable-features=UseOzonePlatform --ozone-platform=wayland"; ls = "${pkgs.eza}/bin/eza --long --git --git-repos --header --classify --binary";
ls = "${pkgs.eza}/bin/eza -Fb --git";
vimdiff = mkIf config.eboskma.programs.neovim.enable "nvim -d"; vimdiff = mkIf config.eboskma.programs.neovim.enable "nvim -d";
vim = mkIf config.eboskma.programs.neovim.enable "nvim"; vim = mkIf config.eboskma.programs.neovim.enable "nvim";
@ -68,5 +74,7 @@ in
enableFishIntegration = true; enableFishIntegration = true;
}; };
}; };
xdg.configFile."fish/themes/Catppuccin Mocha.theme".source = "${catppuccin}/themes/Catppuccin Mocha.theme";
}; };
} }

View file

@ -1,9 +1,24 @@
{ git, coreutils }: { pkgs, ... }:
{ {
# Mark each prompt so you can jump between prompts with C-S-z and C-S-x
mark_prompt_start = { mark_prompt_start = {
onEvent = "fish_prompt"; onEvent = "fish_prompt";
body = '' body = ''
${coreutils}/bin/echo -en "\e]133;A\e\\" ${pkgs.coreutils}/bin/echo -en "\e]133;A\e\\"
'';
};
# Mark the start and end of the output of a command
# This
foot_cmd_start = {
onEvent = "fish_preexec";
body = ''
${pkgs.coreutils}/bin/echo -en "\e]133;C\e\\"
'';
};
foot_cmd_end = {
onEvent = "fish_postexec";
body = ''
${pkgs.coreutils}/bin/echo -en "\e]133;D\e\\"
''; '';
}; };
reload = { reload = {
@ -26,28 +41,45 @@
clangfmt = { clangfmt = {
body = '' body = ''
set source_exts "h" "hpp" "c" "cpp" "cc" "cp" "c++" "cxx" "cu" "proto" set source_exts "h" "hpp" "c" "cpp" "cc" "cp" "c++" "cxx" "cu" "proto"
set files (${git}/bin/git diff --diff-filter=ACMR --name-only $argv[1]) set files (${pkgs.git}/bin/git diff --diff-filter=ACMR --name-only $argv[1])
set repo_path (realpath --relative-to=$PWD (${git}/bin/git rev-parse --show-toplevel)) set repo_path (${pkgs.coreutils}/bin/realpath --relative-to=$PWD (${pkgs.git}/bin/git rev-parse --show-toplevel))
set clangformat (${git}/bin/git config --get clangFormat.binary) set clangformat (${pkgs.git}/bin/git config --get clangFormat.binary)
${coreutils}/bin/echo "Formatting files in $repo_path with $clangformat" ${pkgs.coreutils}/bin/echo "Formatting files in $repo_path with $clangformat"
for f in $files for f in $files
set file (realpath $repo_path/$f) set file (${pkgs.coreutils}/bin/realpath $repo_path/$f)
${coreutils}/bin/echo "Processing $file" ${pkgs.coreutils}/bin/echo "Processing $file"
set ext (string match -r ".*\.([^\.]+)\$" $file)[2] set ext (string match -r ".*\.([^\.]+)\$" $file)[2]
if contains $ext $source_exts if contains $ext $source_exts
${coreutils}/bin/echo "Formatting $file" ${pkgs.coreutils}/bin/echo "Formatting $file"
$clangformat -i -style=file $file $clangformat -i -style=file $file
else else
${coreutils}/bin/echo "Extension $ext not found in $source_exts" ${pkgs.coreutils}/bin/echo "Extension $ext not found in $source_exts"
end end
end end
''; '';
description = "Use clang-format to format all changed and added files"; description = "Use clang-format to format all changed and added files";
}; };
kink = {
body = ''
set -f pls_url = "https://playerservices.streamtheworld.com/pls/KINKAAC.pls"
if [ "$channel" = "dna" ]
set pls_url "https://playerservices.streamtheworld.com/pls/KINK_DNAAAC.pls"
else if [ "$channel" = "distortion" ]
set pls_url "https://playerservices.streamtheworld.com/pls/KINK_DISTORTIONAAC.pls"
end
set -f stream_url (${pkgs.curl}/bin/curl -sSL $pls_url | grep File | shuf | head -n 1 | awk -F '=' 'BEGIN { RS="\r\n" } { print $2 }')
mpc clear
mpc add "$stream_url"
mpc play
'';
argumentNames = "channel";
description = "Play a KINK channel with mpc";
};
linklib = { linklib = {
body = '' body = ''
function linklib --argument lib function linklib --argument lib
@ -56,17 +88,17 @@
set libmajor $libname.$libcomponents[3] set libmajor $libname.$libcomponents[3]
if test -f $libname -o -L $libname if test -f $libname -o -L $libname
${coreutils}/bin/echo "$libname already exists" ${pkgs.coreutils}/bin/echo "$libname already exists"
return 1 return 1
end end
if test -f $libmajor -o -L $libmajor if test -f $libmajor -o -L $libmajor
${coreutils}/bin/echo "$libmajor already exists" ${pkgs.coreutils}/bin/echo "$libmajor already exists"
return 2 return 2
end end
${coreutils}/bin/ln -s $lib $libmajor ${pkgs.coreutils}/bin/ln -s $lib $libmajor
${coreutils}/bin/ln -s $libmajor $libname ${pkgs.coreutils}/bin/ln -s $libmajor $libname
end end
''; '';
}; };

View file

@ -39,24 +39,46 @@ in
colors = { colors = {
alpha = 0.9; alpha = 0.9;
foreground = "f8f8f2";
background = "282a36"; # Dracula
regular0 = "000000"; # black # foreground = "f8f8f2";
regular1 = "ff5555"; # red # background = "282a36";
regular2 = "50fa7b"; # green # regular0 = "000000"; # black
regular3 = "f1fa8c"; # yellow # regular1 = "ff5555"; # red
regular4 = "bd93f9"; # blue # regular2 = "50fa7b"; # green
regular5 = "ff79c6"; # magenta # regular3 = "f1fa8c"; # yellow
regular6 = "8be9fd"; # cyan # regular4 = "bd93f9"; # blue
regular7 = "bfbfbf"; # white # regular5 = "ff79c6"; # magenta
bright0 = "4d4d4d"; # bright black # regular6 = "8be9fd"; # cyan
bright1 = "ff6e67"; # bright red # regular7 = "bfbfbf"; # white
bright2 = "5af78e"; # bright green # bright0 = "4d4d4d"; # bright black
bright3 = "f4f99d"; # bright yellow # bright1 = "ff6e67"; # bright red
bright4 = "caa9fa"; # bright blue # bright2 = "5af78e"; # bright green
bright5 = "ff92d0"; # bright magenta # bright3 = "f4f99d"; # bright yellow
bright6 = "9aedfe"; # bright cyan # bright4 = "caa9fa"; # bright blue
bright7 = "e6e6e6"; # bright white # bright5 = "ff92d0"; # bright magenta
# bright6 = "9aedfe"; # bright cyan
# bright7 = "e6e6e6"; # bright white
# Catppuccin Mocha
foreground = "cdd6f4"; # Text
background = "1e1e2e"; # Base
regular0 = "45475a"; # Surface 1
regular1 = "f38ba8"; # red
regular2 = "a6e3a1"; # green
regular3 = "f9e2af"; # yellow
regular4 = "89b4fa"; # blue
regular5 = "f5c2e7"; # pink
regular6 = "94e2d5"; # teal
regular7 = "bac2de"; # Subtext 1
bright0 = "585b70"; # Surface 2
bright1 = "f38ba8"; # red
bright2 = "a6e3a1"; # green
bright3 = "f9e2af"; # yellow
bright4 = "89b4fa"; # blue
bright5 = "f5c2e7"; # pink
bright6 = "94e2d5"; # teal
bright7 = "a6adc8"; # Subtext 0
}; };
}; };
}; };

View file

@ -41,7 +41,7 @@ in
"dialout" "dialout"
"input" "input"
] ++ (optional config.hardware.i2c.enable config.hardware.i2c.group); ] ++ (optional config.hardware.i2c.enable config.hardware.i2c.group);
shell = config.home-manager.users.erwin.programs.nushell.package; shell = config.home-manager.users.erwin.programs.fish.package;
openssh.authorizedKeys.keyFiles = [ openssh.authorizedKeys.keyFiles = [
(pkgs.fetchurl { (pkgs.fetchurl {
url = "https://github.com/eboskma.keys"; url = "https://github.com/eboskma.keys";
@ -50,6 +50,8 @@ in
]; ];
}; };
programs.fish.enable = true;
nix.settings.allowed-users = [ "erwin" ]; nix.settings.allowed-users = [ "erwin" ];
}; };
} }

View file

@ -147,15 +147,15 @@ in
enable = true; enable = true;
package = pkgs.swayfx; package = pkgs.swayfx;
wayvnc = true; wayvnc = true;
lock-wallpaper = ../../wallpapers/river-3840.png; lock-wallpaper = "${homeCfg.home.homeDirectory}/.wallpapers/river-3840.png";
output = { output = {
"DP-1" = { "DP-1" = {
bg = "${../../wallpapers/river-3840.png} fill"; bg = "${homeCfg.home.homeDirectory}/.wallpapers/river-3840.png fill";
mode = "3840x2160@60Hz"; mode = "3840x2160@60Hz";
position = "0 0"; position = "0 0";
}; };
"DP-3" = { "DP-3" = {
bg = "${../../wallpapers/space_shuttle_endeavour_3840.jpg} fill"; bg = "${homeCfg.home.homeDirectory}/.wallpapers/river-3840.png fill";
mode = "3840x2160@60Hz"; mode = "3840x2160@60Hz";
position = "3840 0"; position = "3840 0";
}; };
@ -237,7 +237,8 @@ in
[ [
atool atool
attic-client attic-client
bitwarden # bitwarden
bitwarden-cli
blink1-tool blink1-tool
bottom bottom
chromium chromium