diff options
| -rw-r--r-- | flake.lock | 66 | ||||
| -rw-r--r-- | hm/env/niri/binds.nix | 56 | ||||
| -rw-r--r-- | hm/env/niri/niri.nix | 10 | ||||
| -rw-r--r-- | hm/env/swayidle.nix | 15 | ||||
| -rw-r--r-- | hm/soft/mpv.nix | 2 | ||||
| -rw-r--r-- | hosts/desktop/configuration.nix | 9 | ||||
| -rw-r--r-- | hosts/desktop/home.nix | 15 | ||||
| -rw-r--r-- | os/core/core.nix | 13 | ||||
| -rw-r--r-- | os/core/drivers.nix | 10 |
9 files changed, 114 insertions, 82 deletions
@@ -232,11 +232,11 @@ ] }, "locked": { - "lastModified": 1767733722, - "narHash": "sha256-R0CZ0BiOaUqFLMDZKv7+I0sdeyzjlc40QmRR7zSwvkM=", + "lastModified": 1767864335, + "narHash": "sha256-2L1hc/V2oHMVsAKxyCoSD0q5lL2ap7MR8pk9U2YB9gs=", "owner": "nix-community", "repo": "home-manager", - "rev": "6e94d8157c941d4dd6fc39866592699043b73668", + "rev": "af7f14ddf770e269bb67cea19708198e618b5c75", "type": "github" }, "original": { @@ -277,11 +277,11 @@ ] }, "locked": { - "lastModified": 1767657911, - "narHash": "sha256-nQOe84JaJN45rPHEK7+4mxPH7ZXnUFRoKB5vTIMjOZw=", + "lastModified": 1767830720, + "narHash": "sha256-QkoscipfDnwclEnVughLSycbkv69yYbxzBLeSWWVAvM=", "owner": "nix-community", "repo": "neovim-nightly-overlay", - "rev": "604d6efcf77db13aca9e618f3d914c29d5923c9f", + "rev": "bc28e1651ac22277c1b8d77916944a3a462d875b", "type": "github" }, "original": { @@ -293,11 +293,11 @@ "neovim-src": { "flake": false, "locked": { - "lastModified": 1767655057, - "narHash": "sha256-RwUtdcoSeiuNH2FfXrCfwtI4QX65oUXSkxtf5HO9urc=", + "lastModified": 1767829782, + "narHash": "sha256-ZICnwVq/gDcG8KjRTLFk4fI9nvrVJNGORnNdHEG5iZI=", "owner": "neovim", "repo": "neovim", - "rev": "e38c9f734a262e3e7595434ca009f961afcccef2", + "rev": "89960e27d6f131587e6e97602be947fdedd8de7a", "type": "github" }, "original": { @@ -318,11 +318,11 @@ "xwayland-satellite-unstable": "xwayland-satellite-unstable" }, "locked": { - "lastModified": 1767721577, - "narHash": "sha256-Q+dtentC9LrpHLOBC6nYSap4BUH0FFmAtAkvsVGiCiM=", + "lastModified": 1767833217, + "narHash": "sha256-HLr9k8g1Geq40PLsNw7I5N8TZkBYtQVjkgDPV/Kehxk=", "owner": "sodiboo", "repo": "niri-flake", - "rev": "3c7bdf49e4ed7c9f1bf2a4209052b4352e260b6a", + "rev": "a789aa1512a9157d5d3392b27e60621fd0d83438", "type": "github" }, "original": { @@ -351,11 +351,11 @@ "niri-unstable": { "flake": false, "locked": { - "lastModified": 1767598098, - "narHash": "sha256-IyH3zaCT2JZ6fdY4vKlUz2RbDdxaryvSZWUVixKYrKM=", + "lastModified": 1767792726, + "narHash": "sha256-qS4tdG2iUQwSld9dTH1gk8GcIOrRi9umMgPv8MGDIA0=", "owner": "YaLTeR", "repo": "niri", - "rev": "b7eb8a635b7f75705808eaed85c016f02ae4fd2d", + "rev": "10df9f4717cbd4efd20ae796eb6b0aa400127bdc", "type": "github" }, "original": { @@ -396,11 +396,11 @@ ] }, "locked": { - "lastModified": 1767715368, - "narHash": "sha256-3JkfCB4MwVMLlC8N/ATth3saUF9kD1WQiIF/quDpvNo=", + "lastModified": 1767859386, + "narHash": "sha256-AWL0ju7OKKMyvxHolmJ0KhXhQ1NkSKZO5e4OJel+egc=", "owner": "KaylorBen", "repo": "nixcord", - "rev": "f391c270ad2c74a94d99cbc9ad6a57478111c6de", + "rev": "ba59974679accf680b1f16a74ea72e18dea31ecb", "type": "github" }, "original": { @@ -442,11 +442,11 @@ }, "nixpkgs-stable": { "locked": { - "lastModified": 1767480499, - "narHash": "sha256-8IQQUorUGiSmFaPnLSo2+T+rjHtiNWc+OAzeHck7N48=", + "lastModified": 1767799921, + "narHash": "sha256-r4GVX+FToWVE2My8VVZH4V0pTIpnu2ZE8/Z4uxGEMBE=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "30a3c519afcf3f99e2c6df3b359aec5692054d92", + "rev": "d351d0653aeb7877273920cd3e823994e7579b0b", "type": "github" }, "original": { @@ -458,11 +458,11 @@ }, "nixpkgs-stable_2": { "locked": { - "lastModified": 1767051569, - "narHash": "sha256-0MnuWoN+n1UYaGBIpqpPs9I9ZHW4kynits4mrnh1Pk4=", + "lastModified": 1767313136, + "narHash": "sha256-16KkgfdYqjaeRGBaYsNrhPRRENs0qzkQVUooNHtoy2w=", "owner": "nixos", "repo": "nixpkgs", - "rev": "40ee5e1944bebdd128f9fbada44faefddfde29bd", + "rev": "ac62194c3917d5f474c1a844b6fd6da2db95077d", "type": "github" }, "original": { @@ -474,11 +474,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1767640445, - "narHash": "sha256-UWYqmD7JFBEDBHWYcqE6s6c77pWdcU/i+bwD6XxMb8A=", + "lastModified": 1767767207, + "narHash": "sha256-Mj3d3PfwltLmukFal5i3fFt27L6NiKXdBezC1EBuZs4=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "9f0c42f8bc7151b8e7e5840fb3bd454ad850d8c5", + "rev": "5912c1772a44e31bf1c63c0390b90501e5026886", "type": "github" }, "original": { @@ -753,11 +753,11 @@ "xwayland-satellite-unstable": { "flake": false, "locked": { - "lastModified": 1766429945, - "narHash": "sha256-9Kv4gWagx/u4RfZJzBMAoagW9ava5waxd+XoTkzqF7E=", + "lastModified": 1767830382, + "narHash": "sha256-0PgS7M1SV6JCN3MugFZPaP8J+Mr2o7lSDFTPVYZSIAY=", "owner": "Supreeeme", "repo": "xwayland-satellite", - "rev": "0dde7ca1d3a8e8c5082533d76084e2aa02bef70e", + "rev": "74cf1a95a35fd7aec76432bc2cd9b310e0d908c5", "type": "github" }, "original": { @@ -775,11 +775,11 @@ "rust-overlay": "rust-overlay_4" }, "locked": { - "lastModified": 1767671748, - "narHash": "sha256-tZpnam3sKHg5jDt39npl8wCFTt5+jtgjDf3pmjYhhKQ=", + "lastModified": 1767863093, + "narHash": "sha256-1EM8n49TOj9xHUqO4xtrdcRQx7kQ79q+DMOlzTxMZJg=", "owner": "sxyazi", "repo": "yazi", - "rev": "c9327ca85180afddf365d4bbcab329ae9a10ff96", + "rev": "ebedab3e29c5e7c2b422e9c671ca46625c70cba5", "type": "github" }, "original": { diff --git a/hm/env/niri/binds.nix b/hm/env/niri/binds.nix index 3cfce88..df5e34d 100644 --- a/hm/env/niri/binds.nix +++ b/hm/env/niri/binds.nix @@ -2,6 +2,7 @@ with config.lib.niri.actions; let playerctl = spawn "${pkgs.playerctl}/bin/playerctl"; + ss = "/media/pics/ss/$(date +%Y-%m-%d_%H-%M-%S)"; in { "Mod+O" = { @@ -11,20 +12,18 @@ in "Mod+Slash".action = show-hotkey-overlay; # Audio - XF86AudioRaiseVolume.action = playerctl "volume" "0.02+"; - XF86AudioLowerVolume.action = playerctl "volume" "0.02-"; + XF86AudioRaiseVolume.action = playerctl "volume" "0.03+"; + XF86AudioLowerVolume.action = playerctl "volume" "0.03-"; # microphone - XF86AudioMute.action = spawn "wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"; - # headphones - "Mod+XF86AudioMute".action = spawn "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"; - - "Super+Shift+L" = { - allow-when-locked = true; + XF86AudioMute.action = spawn "wpctl" "set-mute" "@DEFAULT_AUDIO_SOURCE@" "toggle"; + # # headphones + "Mod+XF86AudioMute". action = spawn "sh" "-c" '' wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle && \ wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle ''; - }; + + "Super+Shift+L".action = spawn "swaylock" "-f"; # Media keys XF86AudioPlay.action = playerctl "play-pause"; XF86AudioPrev.action = playerctl "previous"; @@ -43,20 +42,19 @@ in "Mod+Shift+P".action = power-off-monitors; "Mod+W".action = toggle-column-tabbed-display; - "Mod+S".action = spawn "sh" "-c" - '' - filename="/media/pics/ss/$(date +%Y-%m-%d_%H-%M-%S).png" - grim -g "$(slurp)" - | tee "$filename" | wl-copy - ''; - - "Mod+Shift+S".action = spawn "sh" "-c" - '' - filename="/media/pics/ss/$(date +%Y-%m-%d_%H-%M-%S).png" - grim -g "$(slurp)" "$filename" - - edited="/media/pics/ss/$(date +%Y-%m-%d_%H-%M-%S)-edited.png" - satty --filename "$filename" --output-filename "$edited" - ''; + "Mod+S" = { + action = spawn "sh" "-c" '' + grim -g "$(slurp)" - | tee ${ss}.png | wl-copy + ''; + repeat = false; + }; + "Mod+Shift+S" = { + action = spawn "sh" "-c" '' + grim -g "$(slurp)" ${ss}.png + satty --filename "${ss}.png" --output-filename "${ss}-edited.png" + ''; + repeat = false; + }; "Mod+Shift+D".action = spawn "sh" "-c" '' @@ -69,7 +67,17 @@ in "Mod+C".action = spawn "qalculate-gtk"; "Mod+BracketLeft".action = consume-or-expel-window-left; "Mod+BracketRight".action = consume-or-expel-window-right; - "Super+L".action = spawn "swaylock"; + + "XF86Tools" = { + action = spawn "sh" "-c" '' + pkill -9 firefox || true + swaylock -f + wpctl set-mute @DEFAULT_AUDIO_SINK@ 1 + wpctl set-mute @DEFAULT_AUDIO_SOURCE@ 1 + niri msg action power-off-monitors + ''; + repeat = false; + }; "Mod+R".action = switch-preset-column-width; "Mod+Shift+R".action = reset-window-height; diff --git a/hm/env/niri/niri.nix b/hm/env/niri/niri.nix index fbbb5f2..577e52c 100644 --- a/hm/env/niri/niri.nix +++ b/hm/env/niri/niri.nix @@ -53,7 +53,7 @@ in cursor = { hide-when-typing = true; size = 48; - theme = "Hoshimi_Miyabi"; + theme = "miyabi"; }; layout = { empty-workspace-above-first = true; @@ -81,6 +81,14 @@ in position = "top"; }; }; + window-rules = [ + { + matches = [ + { app-id = "Bitwarden"; } + ]; + block-out-from = "screen-capture"; + } + ]; gestures.hot-corners.enable = false; spawn-at-startup = [ { command = [ "${lib.getExe pkgs.xwayland-satellite}" ]; } diff --git a/hm/env/swayidle.nix b/hm/env/swayidle.nix index 41f64a2..1d703cc 100644 --- a/hm/env/swayidle.nix +++ b/hm/env/swayidle.nix @@ -1,4 +1,4 @@ -{ config, lib, ... }: +{ config, lib, pkgs, ... }: let cfg = config.hm.env.swayidle; in @@ -7,6 +7,19 @@ in config = lib.mkIf cfg.enable { services.swayidle = { enable = true; + systemdTarget = "graphical-session.target"; + events = { + before-sleep = "${pkgs.swaylock-effects}/bin/swaylock -f"; + lock = "${pkgs.swaylock-effects}/bin/swaylock -f"; + }; + timeouts = [ + { timeout = 300; command = "${pkgs.swaylock-effects}/bin/swaylock -f"; } + { + timeout = 600; + command = "${pkgs.niri-unstable}/bin/niri msg action power-off-monitors"; + resumeCommand = "${pkgs.niri-unstable}/bin/niri msg action power-on-monitors"; + } + ]; }; }; } diff --git a/hm/soft/mpv.nix b/hm/soft/mpv.nix index 4e4d08e..da4b591 100644 --- a/hm/soft/mpv.nix +++ b/hm/soft/mpv.nix @@ -40,7 +40,7 @@ in gpu-api = "vulkan"; vo = "gpu-next"; - hwdec = "vaapi"; + hwdec = "auto-safe"; gpu-hwdec-interop = "vaapi"; hwdec-codecs = "all"; diff --git a/hosts/desktop/configuration.nix b/hosts/desktop/configuration.nix index 7da98ae..af29944 100644 --- a/hosts/desktop/configuration.nix +++ b/hosts/desktop/configuration.nix @@ -13,14 +13,13 @@ core = { allowUnfree.enable = true; flatpak.enable = true; - hardwareTools.enable = true; audio.enable = true; bootloader = "systemd-boot"; drivers = { enable = true; amdgpu.enable = true; - stability = "unstable"; + stability = "stable"; }; fonts.enable = true; greet.enable = true; @@ -68,6 +67,10 @@ }; }; + environment.systemPackages = with pkgs; [ + rivalcfg + ]; + boot = { kernelParams = [ "video=DP-1:2560x1440@240" ]; kernelModules = [ "nct6687" ]; @@ -88,7 +91,7 @@ wantedBy = [ "default.target" ]; serviceConfig = { - ExecStart = "${pkgs.python3.withPackages (ps: [ ps.pypresence ])}/bin/python3 /etc/nixos/hosts/desktop/resources/zzz.py"; + ExecStart = "${pkgs.python3.withPackages (ps: [ ps.pypresence ])}/bin/python3 /etc/nixos/resources/zzz.py"; Restart = "always"; RestartSec = "10"; }; diff --git a/hosts/desktop/home.nix b/hosts/desktop/home.nix index 20e3b3a..3116bc7 100644 --- a/hosts/desktop/home.nix +++ b/hosts/desktop/home.nix @@ -1,8 +1,8 @@ { pkgs, username, ... }: let - miyabi-cursor-pkg = pkgs.runCommand "Hoshimi_Miyabi" {} '' - mkdir -p $out/share/icons/Hoshimi_Miyabi - cp -rv ${./resources/cursors/Hoshimi_Miyabi}/* $out/share/icons/Hoshimi_Miyabi/ + miyabi-cursor-pkg = pkgs.runCommand "miyabi" {} '' + mkdir -p $out/share/icons/miyabi + cp -rv ${../../resources/cursors/miyabi}/* $out/share/icons/miyabi/ ''; in { @@ -71,11 +71,18 @@ in gimp ]; + programs.firefox.enable = true; + + programs.nix-index = { + enable = true; + enableFishIntegration = true; + }; + home.pointerCursor = { gtk.enable = true; x11.enable = true; package = miyabi-cursor-pkg; - name = "Hoshimi_Miyabi"; + name = "miyabi"; size = 48; }; } diff --git a/os/core/core.nix b/os/core/core.nix index f13396e..160e67b 100644 --- a/os/core/core.nix +++ b/os/core/core.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, ... }: +{ config, lib, ... }: let cfg = config.os.core; in @@ -22,26 +22,15 @@ in options.os.core = { allowUnfree.enable = lib.mkEnableOption "unfree software"; - flatpak.enable = lib.mkEnableOption "Flatpak support"; - - hardwareTools = { - enable = lib.mkEnableOption "peripheral and thermal tools"; - }; }; config = lib.mkMerge [ (lib.mkIf cfg.allowUnfree.enable { nixpkgs.config.allowUnfree = true; }) - (lib.mkIf cfg.flatpak.enable { services.flatpak.enable = true; }) - - (lib.mkIf cfg.hardwareTools.enable { - programs.coolercontrol.enable = true; - environment.systemPackages = [ pkgs.rivalcfg ]; - }) ]; } diff --git a/os/core/drivers.nix b/os/core/drivers.nix index 30028dc..57f370a 100644 --- a/os/core/drivers.nix +++ b/os/core/drivers.nix @@ -13,6 +13,8 @@ in }; config = lib.mkIf cfg.enable (lib.mkMerge [ { + programs.coolercontrol.enable = true; + services.lact.enable = true; services.smartd.enable = true; hardware.sensor.iio.enable = true; hardware.enableAllFirmware = true; @@ -20,19 +22,21 @@ in hardware.graphics = { enable = true; enable32Bit = true; + extraPackages = with pkgs; [ + rocmPackages.clr.icd + ]; }; } (lib.mkIf cfg.amdgpu.enable { - services.xserver.videoDrivers = [ "amdgpu" ]; hardware.amdgpu = { initrd.enable = true; overdrive.enable = true; }; + boot.kernelParams = [ "amdgpu.gpu_recovery=1" ]; }) (lib.mkIf (cfg.amdgpu.enable && cfg.stability == "unstable") { - services.lact.enable = true; boot.kernelPackages = pkgs.linuxPackages_latest; chaotic.mesa-git = { enable = true; @@ -44,7 +48,7 @@ in }) (lib.mkIf (cfg.amdgpu.enable && cfg.stability == "stable") { - boot.kernelPackages = pkgs.linuxPackages_latest; + boot.kernelPackages = pkgs.linuxPackages_6_12; }) ]); } |
