diff --git a/flake.lock b/flake.lock index c6d6240..56ef9ea 100644 --- a/flake.lock +++ b/flake.lock @@ -620,6 +620,22 @@ "type": "github" } }, + "nixpkgs-fish": { + "locked": { + "lastModified": 1741006659, + "narHash": "sha256-kL+uKjZYg3ildMMuFzqPyGd6E9nNrV6NwnocHgPcumk=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "52eebd2541779e42ae67471622aeb18bbb47991d", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "fish", + "repo": "nixpkgs", + "type": "github" + } + }, "nixpkgs-lib": { "locked": { "lastModified": 1738452942, @@ -838,6 +854,7 @@ "niri": "niri", "nixd": "nixd", "nixpkgs": "nixpkgs_4", + "nixpkgs-fish": "nixpkgs-fish", "nixvim": "nixvim", "nur": "nur", "stylix": "stylix", diff --git a/flake.nix b/flake.nix index 62b3c80..226587c 100644 --- a/flake.nix +++ b/flake.nix @@ -67,5 +67,6 @@ nh.url = "github:viperML/nh"; treefmt-nix.url = "github:numtide/treefmt-nix"; agenix.url = "github:ryantm/agenix"; + nixpkgs-fish.url = "github:NixOS/nixpkgs/fish"; }; } diff --git a/home/programs/coding/nixvim/default.nix b/home/programs/coding/nixvim/default.nix index 37ebe3e..4383332 100644 --- a/home/programs/coding/nixvim/default.nix +++ b/home/programs/coding/nixvim/default.nix @@ -30,11 +30,17 @@ maplocalleader = " "; have_nerd_font = true; }; - highlightOverride = { + highlightOverride = with config.lib.stylix.colors.withHashtag; { CursorLineNr = { - bg = "#${config.lib.stylix.colors.base01}"; - fg = "#${config.lib.stylix.colors.base06}"; + bg = base01; + fg = base06; }; + Comment.italic = true; + Comment.fg = base03; + Boolean.italic = true; + Boolean.fg = base0E; + String.italic = true; + String.fg = base0B; # LineNrAbove = { # bg = "#${config.lib.stylix.colors.base00}"; # fg = "#${config.lib.stylix.colors.base06}"; diff --git a/home/programs/shell/fish.nix b/home/programs/shell/fish.nix index 5bb60e7..25439e8 100644 --- a/home/programs/shell/fish.nix +++ b/home/programs/shell/fish.nix @@ -1,8 +1,9 @@ -{ pkgs, ... }: +{ pkgs, inputs, ... }: { programs = { fish = { enable = true; + package = inputs.nixpkgs-fish.legacyPackages.${pkgs.system}.fish; shellAbbrs = { nixu = "nh os switch --ask"; homeu = "nh home switch --ask"; diff --git a/home/programs/shell/starship.nix b/home/programs/shell/starship.nix index 06e34b6..096ad47 100644 --- a/home/programs/shell/starship.nix +++ b/home/programs/shell/starship.nix @@ -181,7 +181,7 @@ symbol = ' ' [custom.flake] - command = "nix flake metadata --quiet --json | jq .description --raw-output" + command = "cat flake.nix | grep description | cut -d\" -f2" style = "bg:overlay fg:pine" format = " [](fg:overlay)[ $symbol$output ]($style)[](fg:overlay)" disabled = false diff --git a/home/programs/terminal/kitty.nix b/home/programs/terminal/kitty.nix index b3a852b..087367c 100644 --- a/home/programs/terminal/kitty.nix +++ b/home/programs/terminal/kitty.nix @@ -12,6 +12,7 @@ window_padding_width = "10 20 10 20"; cursor_trail = 1; cursor_trail_start_threshold = 0; + font_family = lib.mkForce "Comic Code"; }; extraConfig = '' map ctrl+shift+p kitten hints --type path --program @ diff --git a/home/tweaks/stylix.nix b/home/tweaks/stylix.nix index 314d048..67387ff 100644 --- a/home/tweaks/stylix.nix +++ b/home/tweaks/stylix.nix @@ -22,7 +22,6 @@ in fonts = { monospace.name = "Comic Mono"; monospace.package = pkgs.comic-mono; - sizes.terminal = 13; sansSerif.name = "LXGW WenKai"; sansSerif.package = pkgs.lxgw-wenkai; serif.name = "LXGW WenKai"; diff --git a/hosts/inspiron/home.nix b/hosts/inspiron/home.nix index c37317c..a7355e5 100644 --- a/hosts/inspiron/home.nix +++ b/hosts/inspiron/home.nix @@ -9,13 +9,13 @@ refresh = 60.0; }; position = { - x = 1067; + x = 1000; y = 0; }; rotation = 0; }; "HDMI-A-1" = { - scale = 1.5; + scale = 1.6; mode = { width = 2560; height = 1600; diff --git a/os/programs/default.nix b/os/programs/default.nix index 5c16565..c73f7e3 100644 --- a/os/programs/default.nix +++ b/os/programs/default.nix @@ -4,5 +4,6 @@ ./doas.nix ./niri.nix ./ai.nix + ./swhkd.nix ]; } diff --git a/os/programs/swhkd.nix b/os/programs/swhkd.nix new file mode 100644 index 0000000..bf36cc4 --- /dev/null +++ b/os/programs/swhkd.nix @@ -0,0 +1,18 @@ +{ pkgs, ... }: +let + swhkd = import ../../pkgs/swhkd/swhkd.nix { + inherit (pkgs) + lib + rustPlatform + fetchFromGitHub + makeWrapper + pkg-config + ; + }; +in +{ + environment.systemPackages = [ + swhkd + ]; + systemd.packages = [ swhkd ]; +} diff --git a/pkgs/swhkd/com.github.swhkd.pkexec.policy b/pkgs/swhkd/com.github.swhkd.pkexec.policy new file mode 100644 index 0000000..f45d96b --- /dev/null +++ b/pkgs/swhkd/com.github.swhkd.pkexec.policy @@ -0,0 +1,13 @@ + + + + + Authentication is required to run Simple Wayland Hotkey Daemon + + no + no + yes + + /usr/bin/swhkd + + diff --git a/pkgs/swhkd/hotkeys.sh b/pkgs/swhkd/hotkeys.sh new file mode 100644 index 0000000..c8a030c --- /dev/null +++ b/pkgs/swhkd/hotkeys.sh @@ -0,0 +1,7 @@ +#! @runtimeShell@ + +PATH="$PATH:@path@" + +@psmisc@/bin/killall swhks + +@out@/bin/swhks & /run/wrappers/bin/pkexec @out@/bin/swhkd -c "$HOME"/.config/swhkd/swhkdrc diff --git a/pkgs/swhkd/swhkd.nix b/pkgs/swhkd/swhkd.nix new file mode 100644 index 0000000..145f65a --- /dev/null +++ b/pkgs/swhkd/swhkd.nix @@ -0,0 +1,43 @@ +{ + lib, + rustPlatform, + fetchFromGitHub, + makeWrapper, + pkg-config, +}: +rustPlatform.buildRustPackage { + pname = "swhkd"; + version = "1.3.0-unstable-2025-02-08"; + + src = fetchFromGitHub { + owner = "waycrate"; + repo = "swhkd"; + rev = "d7182b6854ea1873c388f38714b923570cb71f86"; + hash = "sha256-+cxF/aWy2OLs1s+vQIXXsTx4hVAfJGenEdxOSgsmcqk="; + }; + + useFetchCargoVendor = true; + cargoHash = "sha256-LBbmFyddyw7vV5voctXq3L4U3Ddbh428j5XbI+td/dg="; + + nativeBuildInputs = [ + makeWrapper + pkg-config + ]; + + postInstall = '' + cp ${./com.github.swhkd.pkexec.policy} ./com.github.swhkd.pkexec.policy + + install -D -m0444 -t "$out/share/polkit-1/actions" ./com.github.swhkd.pkexec.policy + + substituteInPlace "$out/share/polkit-1/actions/com.github.swhkd.pkexec.policy" \ + --replace /usr/bin/swhkd \ + "$out/bin/swhkd" + ''; + + meta = with lib; { + description = "A drop-in replacement for sxhkd that works with wayland"; + homepage = "https://github.com/waycrate/swhkd"; + license = licenses.bsd2; + maintainers = with maintainers; [ EdenQwQ ]; + }; +} diff --git a/pkgs/swhkd/swhkd.service b/pkgs/swhkd/swhkd.service new file mode 100644 index 0000000..88b2bdc --- /dev/null +++ b/pkgs/swhkd/swhkd.service @@ -0,0 +1,10 @@ +[Unit] +Description=swhkd hotkey daemon +BindsTo=default.target + +[Service] +Type=simple +ExecStart=@out@ + +[Install] +WantedBy=default.target