home/natto: add hyprlock,hypridle and hyprpaper

also move hyprland.conf -> hyprland.nix

Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
This commit is contained in:
2025-09-10 16:39:57 +05:30
parent 5579bf49c3
commit 0bab44bf04
10 changed files with 396 additions and 274 deletions

122
flake.lock generated
View File

@@ -61,11 +61,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1755632680, "lastModified": 1755946532,
"narHash": "sha256-EjaD8+d7AiAV2fGRN4NTMboWDwk8szDfwbzZ8DL1PhQ=", "narHash": "sha256-POePremlUY5GyA1zfbtic6XLxDaQcqHN6l+bIxdT5gc=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "aquamarine", "repo": "aquamarine",
"rev": "50637ed23e962f0db294d6b0ef534f37b144644b", "rev": "81584dae2df6ac79f6b6dae0ecb7705e95129ada",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -139,11 +139,11 @@
"nixpkgs-stable": "nixpkgs-stable" "nixpkgs-stable": "nixpkgs-stable"
}, },
"locked": { "locked": {
"lastModified": 1756087945, "lastModified": 1756977824,
"narHash": "sha256-+abiBhtddmBlNrxko1r4Z6oKSKszBkzemrt2k//NXGk=", "narHash": "sha256-lIO20exA0v0olNE/BFlwL1W7XiMHCAaUCUafvp3Ec7A=",
"owner": "nix-community", "owner": "nix-community",
"repo": "emacs-overlay", "repo": "emacs-overlay",
"rev": "9e3a5b9a0c79e66b4a1e2490be606a058a6712fe", "rev": "4478783c30738c4641fc82e4e9077aab81e90cb2",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -258,11 +258,11 @@
"nixpkgs-lib": "nixpkgs-lib" "nixpkgs-lib": "nixpkgs-lib"
}, },
"locked": { "locked": {
"lastModified": 1754487366, "lastModified": 1756770412,
"narHash": "sha256-pHYj8gUBapuUzKV/kN/tR3Zvqc7o6gdFB9XKXIp1SQ8=", "narHash": "sha256-+uWLQZccFHwqpGqr2Yt5VsW/PbeJVTn9Dk6SHWhNRPw=",
"owner": "hercules-ci", "owner": "hercules-ci",
"repo": "flake-parts", "repo": "flake-parts",
"rev": "af66ad14b28a127c5c0f3bbb298218fc63528a18", "rev": "4524271976b625a4a605beefd893f270620fd751",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -297,11 +297,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1754487366, "lastModified": 1756770412,
"narHash": "sha256-pHYj8gUBapuUzKV/kN/tR3Zvqc7o6gdFB9XKXIp1SQ8=", "narHash": "sha256-+uWLQZccFHwqpGqr2Yt5VsW/PbeJVTn9Dk6SHWhNRPw=",
"owner": "hercules-ci", "owner": "hercules-ci",
"repo": "flake-parts", "repo": "flake-parts",
"rev": "af66ad14b28a127c5c0f3bbb298218fc63528a18", "rev": "4524271976b625a4a605beefd893f270620fd751",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -544,11 +544,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1756022458, "lastModified": 1756954499,
"narHash": "sha256-J1i35r4HfNDdPpwL0vOBaZopQudAUVtartEerc1Jryc=", "narHash": "sha256-Pg4xBHzvzNY8l9x/rLWoJMnIR8ebG+xeU+IyqThIkqU=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "9e3a33c0bcbc25619e540b9dfea372282f8a9740", "rev": "ed1a98c375450dfccf427adacd2bfd1a7b22eb25",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -602,11 +602,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1754305013, "lastModified": 1755678602,
"narHash": "sha256-u+M2f0Xf1lVHzIPQ7DsNCDkM1NYxykOSsRr4t3TbSM4=", "narHash": "sha256-uEC5O/NIUNs1zmc1aH1+G3GRACbODjk2iS0ET5hXtuk=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "hyprgraphics", "repo": "hyprgraphics",
"rev": "4c1d63a0f22135db123fc789f174b89544c6ec2d", "rev": "157cc52065a104fc3b8fa542ae648b992421d1c7",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -631,11 +631,11 @@
"xdph": "xdph" "xdph": "xdph"
}, },
"locked": { "locked": {
"lastModified": 1756069181, "lastModified": 1756977414,
"narHash": "sha256-FPur4yuDwzM9uHhPFJW6KD3Xys5fz0xmRmZqFfWQD3Y=", "narHash": "sha256-HBiLw2Ev+eKOjfwPa0nyL8jIXkSQcwyWP/QPAlWdks8=",
"ref": "refs/heads/main", "ref": "refs/heads/main",
"rev": "0ed880f3f7dc2c746bf3590eee266c010d737558", "rev": "4e785d12a91117cd5b255052799d1a051d9976c0",
"revCount": 6393, "revCount": 6409,
"submodules": true, "submodules": true,
"type": "git", "type": "git",
"url": "https://github.com/hyprwm/Hyprland" "url": "https://github.com/hyprwm/Hyprland"
@@ -798,11 +798,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1755416120, "lastModified": 1756117388,
"narHash": "sha256-PosTxeL39YrLvCX5MqqPA6NNWQ4T5ea5K55nmN7ju9Q=", "narHash": "sha256-oRDel6pNl/T2tI+nc/USU9ZP9w08dxtl7hiZxa0C/Wc=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "hyprutils", "repo": "hyprutils",
"rev": "e631ea36ddba721eceda69bfee6dd01068416489", "rev": "b2ae3204845f5f2f79b4703b441252d8ad2ecfd0",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -847,11 +847,11 @@
"nixpkgs-25_05": "nixpkgs-25_05" "nixpkgs-25_05": "nixpkgs-25_05"
}, },
"locked": { "locked": {
"lastModified": 1755996068, "lastModified": 1756130152,
"narHash": "sha256-+KP2Lu813lX0sfKTP6Nc4ulaE/EDIDmWUQVX9S850Yg=", "narHash": "sha256-3qcN28djoBqqhEqOv8ve3/+wD0lLR2YCVV1EZ4SYfjo=",
"owner": "simple-nixos-mailserver", "owner": "simple-nixos-mailserver",
"repo": "nixos-mailserver", "repo": "nixos-mailserver",
"rev": "cc5f1804270d138f268a6f2d64c383fb4cf59ad0", "rev": "b49ae46f226430854102c207fdcb55e2de8e884e",
"type": "gitlab" "type": "gitlab"
}, },
"original": { "original": {
@@ -884,11 +884,11 @@
"neovim-src": { "neovim-src": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1756079028, "lastModified": 1756942103,
"narHash": "sha256-u58rAgWhxtfr3G6ol2aTW20ZbL9sJmaIX4lzo+tukXc=", "narHash": "sha256-9WzJiN5FLcZhNoMR/xM2ENDUOPafO/4dXgWVzzq3TTY=",
"owner": "neovim", "owner": "neovim",
"repo": "neovim", "repo": "neovim",
"rev": "bccec33f5a011fac7f0a90260c72c2ac2f4c334f", "rev": "de950f827236e2c7447bd776c2509faa39c27b63",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -903,11 +903,11 @@
"nixpkgs": "nixpkgs_9" "nixpkgs": "nixpkgs_9"
}, },
"locked": { "locked": {
"lastModified": 1756087120, "lastModified": 1756950352,
"narHash": "sha256-VP7wb0KZLVX+kK0nmvIUcMf1WbGl/PdUpNPxlkqBR6A=", "narHash": "sha256-CkNlcUeNlDmxF1GJwEQg3aIBSCihnFcAqCwBjUQGqNY=",
"owner": "fufexan", "owner": "fufexan",
"repo": "nix-gaming", "repo": "nix-gaming",
"rev": "0ca8d5927960555f78b495a14aab4e2be08f202b", "rev": "64ac07fae89f297beab704dce70038cdbda55c25",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -969,11 +969,11 @@
}, },
"nixpkgs-lib": { "nixpkgs-lib": {
"locked": { "locked": {
"lastModified": 1753579242, "lastModified": 1754788789,
"narHash": "sha256-zvaMGVn14/Zz8hnp4VWT9xVnhc8vuL3TStRqwk22biA=", "narHash": "sha256-x2rJ+Ovzq0sCMpgfgGaaqgBSwY+LST+WbZ6TytnT9Rk=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nixpkgs.lib", "repo": "nixpkgs.lib",
"rev": "0f36c44e01a6129be94e3ade315a5883f0228a6e", "rev": "a73b9c743612e4244d865a2fdee11865283c04e6",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -1030,11 +1030,11 @@
}, },
"nixpkgs_11": { "nixpkgs_11": {
"locked": { "locked": {
"lastModified": 1756035328, "lastModified": 1756819007,
"narHash": "sha256-vC7SslUBCtdT3T37ZH3PLIWYmTkSeppL5BJJByUjYCM=", "narHash": "sha256-12V64nKG/O/guxSYnr5/nq1EfqwJCdD2+cIGmhz3nrE=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "6b0b1559e918d4f7d1df398ee1d33aeac586d4d6", "rev": "aaff8c16d7fc04991cac6245bee1baa31f72b1e1",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -1046,11 +1046,11 @@
}, },
"nixpkgs_12": { "nixpkgs_12": {
"locked": { "locked": {
"lastModified": 1755829505, "lastModified": 1756819007,
"narHash": "sha256-4/Jd+LkQ2ssw8luQVkqVs9spDBVE6h/u/hC/tzngsPo=", "narHash": "sha256-12V64nKG/O/guxSYnr5/nq1EfqwJCdD2+cIGmhz3nrE=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "f937f8ecd1c70efd7e9f90ba13dfb400cf559de4", "rev": "aaff8c16d7fc04991cac6245bee1baa31f72b1e1",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -1078,11 +1078,11 @@
}, },
"nixpkgs_3": { "nixpkgs_3": {
"locked": { "locked": {
"lastModified": 1755615617, "lastModified": 1756787288,
"narHash": "sha256-HMwfAJBdrr8wXAkbGhtcby1zGFvs+StOp19xNsbqdOg=", "narHash": "sha256-rw/PHa1cqiePdBxhF66V7R+WAP8WekQ0mCDG4CFqT8Y=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "20075955deac2583bb12f07151c2df830ef346b4", "rev": "d0fc30899600b9b3466ddb260fd83deb486c32f1",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -1142,11 +1142,11 @@
}, },
"nixpkgs_7": { "nixpkgs_7": {
"locked": { "locked": {
"lastModified": 1755186698, "lastModified": 1756266583,
"narHash": "sha256-wNO3+Ks2jZJ4nTHMuks+cxAiVBGNuEBXsT29Bz6HASo=", "narHash": "sha256-cr748nSmpfvnhqSXPiCfUPxRz2FJnvf/RjJGvFfaCsM=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "fbcf476f790d8a217c3eab4e12033dc4a0f6d23c", "rev": "8a6d5427d99ec71c64f0b93d45778c889005d9c2",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -1174,11 +1174,11 @@
}, },
"nixpkgs_9": { "nixpkgs_9": {
"locked": { "locked": {
"lastModified": 1755829505, "lastModified": 1756536218,
"narHash": "sha256-4/Jd+LkQ2ssw8luQVkqVs9spDBVE6h/u/hC/tzngsPo=", "narHash": "sha256-ynQxPVN2FIPheUgTFhv01gYLbaiSOS7NgWJPm9LF9D0=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "f937f8ecd1c70efd7e9f90ba13dfb400cf559de4", "rev": "a918bb3594dd243c2f8534b3be01b3cb4ed35fd1",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -1199,11 +1199,11 @@
"treefmt-nix": "treefmt-nix" "treefmt-nix": "treefmt-nix"
}, },
"locked": { "locked": {
"lastModified": 1756080870, "lastModified": 1756944329,
"narHash": "sha256-kxClZk/T/Z3vGCo2At5n/clqQY7RwPULkOdtPEkkzmI=", "narHash": "sha256-/q95og9Q3PVSHTS3X0Hy+1IIOePkweOxY5id++rkOXU=",
"owner": "nix-community", "owner": "nix-community",
"repo": "neovim-nightly-overlay", "repo": "neovim-nightly-overlay",
"rev": "7a6894dbb8e81e33fd437b2bf96f26aab848cd2e", "rev": "a3e7ad344421aeb5d47a3ce1eef989dc4d16af49",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -1222,11 +1222,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1755446520, "lastModified": 1755960406,
"narHash": "sha256-I0Ok1OGDwc1jPd8cs2VvAYZsHriUVFGIUqW+7uSsOUM=", "narHash": "sha256-RF7j6C1TmSTK9tYWO6CdEMtg6XZaUKcvZwOCD2SICZs=",
"owner": "cachix", "owner": "cachix",
"repo": "git-hooks.nix", "repo": "git-hooks.nix",
"rev": "4b04db83821b819bbbe32ed0a025b31e7971f22e", "rev": "e891a93b193fcaf2fc8012d890dc7f0befe86ec2",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -1399,11 +1399,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1755934250, "lastModified": 1756662192,
"narHash": "sha256-CsDojnMgYsfshQw3t4zjRUkmMmUdZGthl16bXVWgRYU=", "narHash": "sha256-F1oFfV51AE259I85av+MAia221XwMHCOtZCMcZLK2Jk=",
"owner": "numtide", "owner": "numtide",
"repo": "treefmt-nix", "repo": "treefmt-nix",
"rev": "74e1a52d5bd9430312f8d1b8b0354c92c17453e5", "rev": "1aabc6c05ccbcbf4a635fb7a90400e44282f61c4",
"type": "github" "type": "github"
}, },
"original": { "original": {

View File

@@ -1,173 +0,0 @@
monitor=, highrr, auto, 1
input {
kb_layout = us,us
kb_variant = colemak_dh,
kb_model =
kb_options = grp:rctrl_toggle
kb_rules =
follow_mouse = 1
touchpad {
natural_scroll = yes
scroll_factor = 0.4
}
repeat_delay = 300
accel_profile = flat
}
general {
gaps_in = 5
gaps_out = 10
border_size = 2
# home-manager is going to override these
col.active_border = rgba(b4befeee) rgba(f5c2e7ff) 135deg
col.inactive_border = rgba(595959ff)
layout = dwindle
}
decoration {
rounding = 1
inactive_opacity = 0.8
shadow {
enabled = true
}
blur {
enabled = true
size = 8
new_optimizations = true
xray = true
}
}
animations {
enabled = yes
bezier =overshot,0.01, 0.9, 0.1, 1.05
bezier =easeoutexpo,0.16, 1, 0.3, 1
animation = windows, 1, 7, overshot, popin 50%
animation = windowsOut, 1, 7, easeoutexpo, popin 50%
animation = border, 1, 10, default
animation = fade, 1, 7, default
animation = workspaces, 1, 6, overshot
}
cursor {
no_hardware_cursors = true
}
dwindle {
pseudotile = yes
preserve_split = yes
}
gestures {
workspace_swipe = off
}
misc {
disable_hyprland_logo = true
}
$mainMod=SUPER
binde=$mainMod, RETURN, exec, foot
bindr=SUPER, D, exec, pkill tofi || tofi-drun | xargs hyprctl dispatch exec --
bindr=SUPER SHIFT, D, exec, pkill tofi || tofi-run --require-match=false | xargs hyprctl dispatch exec --
$playerctl=playerctl -p 'playerctld,%any'
bind=$mainMod, P, exec, $playerctl play-pause
bind=, XF86AudioPlay, exec, $playerctl play-pause
bind=, XF86AudioNext, exec, $playerctl position 5+
bind=, XF86AudioPrev, exec, $playerctl position 5-
bind=$mainMod, XF86AudioNext, exec, $playerctl next
bind=$mainMod, XF86AudioPrev, exec, $playerctl previous
binde=, XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+
binde=, XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-
bind=, XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle
binde=, XF86MonBrightnessUp, exec, light -A 5
binde=, XF86MonBrightnessDown, exec, light -U 5
bind=$mainMod SHIFT, F1, exec, setxkbmap us colemak_dh
bind=$mainMod SHIFT, F2, exec, setxkbmap us basic
bind=$mainMod SHIFT, F3, exec, setxkbmap in deva
bind=$mainMod SHIFT, F4, exec, setxkbmap in guru
bind=$mainMod SHIFT, F5, exec, setxkbmap colemak dhz
bind=, PRINT, exec, grimblast --notify copysave screen
bind=SHIFT, PRINT, exec, grimblast --notify copysave area
binde=$mainMod SHIFT, Q, killactive,
bind=$mainMod ALT, f, exit,
bind=$mainMod SHIFT, t, pseudo,
bind=$mainMod, f, fullscreen,
bind=$mainMod, t, togglefloating,
bindm=SUPER, mouse:272, movewindow
bindm=SUPER, mouse:273, resizewindow
bind=$mainMod, left, movefocus, l
bind=$mainMod, h, movefocus, l
bind=$mainMod, right, movefocus, r
bind=$mainMod, l, movefocus, r
bind=$mainMod, up, movefocus, u
bind=$mainMod, k, movefocus, u
bind=$mainMod, down, movefocus, d
bind=$mainMod, j, movefocus, d
binde=$mainMod SHIFT, left, movewindow, l
binde=$mainMod SHIFT, h, movewindow, l
binde=$mainMod SHIFT, right, movewindow, r
binde=$mainMod SHIFT, l, movewindow, r
binde=$mainMod SHIFT, up, movewindow, u
binde=$mainMod SHIFT, k, movewindow, u
binde=$mainMod SHIFT, down, movewindow, d
binde=$mainMod SHIFT, j, movewindow, d
binde=SHIFT ALT, left, resizeactive, -10 0
binde=SHIFT ALT, h, resizeactive, -10 0
binde=SHIFT ALT, right, resizeactive, 10 0
binde=SHIFT ALT, l, resizeactive, 10 0
binde=SHIFT ALT, up, resizeactive, 0 -10
binde=SHIFT ALT, k, resizeactive, 0 -10
binde=SHIFT ALT, down, resizeactive, 0 10
binde=SHIFT ALT, j, resizeactive, 0 10
bind=$mainMod, 1, workspace, 1
bind=$mainMod, 2, workspace, 2
bind=$mainMod, 3, workspace, 3
bind=$mainMod, 4, workspace, 4
bind=$mainMod, 5, workspace, 5
bind=$mainMod, 6, workspace, 6
bind=$mainMod, 7, workspace, 7
bind=$mainMod, 8, workspace, 8
bind=$mainMod, 9, workspace, 9
bind=$mainMod, 0, workspace, 10
bind=$mainMod SHIFT, 1, movetoworkspacesilent, 1
bind=$mainMod SHIFT, 2, movetoworkspacesilent, 2
bind=$mainMod SHIFT, 3, movetoworkspacesilent, 3
bind=$mainMod SHIFT, 4, movetoworkspacesilent, 4
bind=$mainMod SHIFT, 5, movetoworkspacesilent, 5
bind=$mainMod SHIFT, 6, movetoworkspacesilent, 6
bind=$mainMod SHIFT, 7, movetoworkspacesilent, 7
bind=$mainMod SHIFT, 8, movetoworkspacesilent, 8
bind=$mainMod SHIFT, 9, movetoworkspacesilent, 9
bind=$mainMod SHIFT, 0, movetoworkspacesilent, 10
bind=$mainMod SHIFT, comma, focusmonitor, -1
bind=$mainMod SHIFT, period, focusmonitor, +1
bind=CTRL ALT, r, pass, ^(com\.obsproject\.Studio)$
exec-once=eww open bar
exec-once=swaybg -i ~/Wallpapers/current.*

View File

@@ -28,6 +28,9 @@
# when wayland # when wayland
./wayland.nix ./wayland.nix
./hyprpaper.nix
./hyprlock.nix
./hypridle.nix
./hyprland.nix ./hyprland.nix
./foot.nix ./foot.nix
./tofi.nix ./tofi.nix

View File

@@ -26,24 +26,23 @@
}; };
Service = Service =
let let
deps = deps = [
[ config.programs.eww.package
config.programs.eww.package ]
] ++ lib.optional config.wayland.windowManager.hyprland.enable config.wayland.windowManager.hyprland.package
++ lib.optional config.wayland.windowManager.hyprland.enable config.wayland.windowManager.hyprland.package ++ (with pkgs; [
++ (with pkgs; [ coreutils
coreutils bash
bash jq
jq less
less gawk
gawk socat
socat playerctl
playerctl networkmanager
networkmanager iwgtk
iwgtk wireplumber
wireplumber ])
]) ++ lib.optional config.laptop pkgs.light;
++ lib.optional config.laptop pkgs.light;
in in
{ {
Type = "simple"; Type = "simple";

29
home/natto/hypridle.nix Normal file
View File

@@ -0,0 +1,29 @@
{
pkgs,
config,
...
}:
let
lock = "${pkgs.systemd}/bin/loginctl lock-session";
timeout = 300;
in
{
# screen idle
services.hypridle = {
enable = true;
settings = {
general = {
before_sleep_cmd = lock;
lock_cmd = "pgrep hyprlock || ${config.programs.hyprlock.package}/bin/hyprlock";
};
listener = [
{
timeout = timeout;
on-timeout = lock;
}
];
};
};
}

View File

@@ -2,6 +2,7 @@
pkgs, pkgs,
inputs, inputs,
config, config,
lib,
conf, conf,
... ...
}: }:
@@ -10,32 +11,197 @@
windowManager = { windowManager = {
hyprland = { hyprland = {
enable = true; enable = true;
package = inputs.hyprland.packages.${pkgs.system}.hyprland; package = inputs.hyprland.packages.${pkgs.system}.hyprland;
portalPackage = inputs.hyprland.packages.${pkgs.system}.xdg-desktop-portal-hyprland; portalPackage = inputs.hyprland.packages.${pkgs.system}.xdg-desktop-portal-hyprland;
xwayland = { xwayland = {
enable = true; enable = true;
}; };
extraConfig =
(builtins.readFile ./config/hypr/hyprland.conf) settings = {
+ (with config.home.pointerCursor; '' monitor = ", highrr, auto, 1";
exec-once=hyprctl setcursor ${name} ${toString size}
'') input = {
+ (with conf.colors.argb { a = "ee"; }; '' kb_layout = "us,us";
general { kb_variant = "colemak_dh";
col.active_border = 0x${mauve} 0x${flamingo} 135deg kb_model = "";
col.inactive_border = 0x${surface0} kb_options = "grp:rctrl_toggle";
} kb_rules = "";
''); repeat_delay = 300;
accel_profile = "flat";
follow_mouse = true;
touchpad = {
natural_scroll = true;
scroll_factor = 0.4;
};
};
general = with conf.colors.argb { a = "ee"; }; {
gaps_in = 5;
gaps_out = 10;
border_size = 2;
layout = "dwindle";
"col.active_border" = "0x${mauve} 0x${flamingo} 135deg";
"col.inactive_border" = "0x${surface0}";
};
decoration = {
rounding = 1;
inactive_opacity = 0.8;
shadow = {
enabled = true;
};
blur = {
enabled = true;
size = 8;
new_optimizations = true;
xray = true;
};
};
animations = {
enabled = true;
bezier = [
"overshot,0.01,0.9,0.1,1.05"
"easeoutexpo,0.16,1,0.3,1"
];
animation = [
"windows,1,7,overshot,popin 50%"
"windowsOut,1,7,easeoutexpo,popin 50%"
"border,1,10,default"
"fade,1,7,default"
"workspaces,1,6,overshot"
];
};
cursor = {
no_hardware_cursors = true;
};
dwindle = {
pseudotile = true;
preserve_split = true;
};
misc = {
disable_hyprland_logo = true;
};
"$mod" = "SUPER";
bind =
let
playerctl = "playerctl -p 'playerctld,%any'";
in
[
# Hyprland operations
"$mod ALT, f, exit,"
"$mod SHIFT, t, pseudo,"
"$mod, f, fullscreen,"
"$mod, t, togglefloating,"
"$mod, left, movefocus, l"
"$mod, h, movefocus, l"
"$mod, right, movefocus, r"
"$mod, l, movefocus, r"
"$mod, up, movefocus, u"
"$mod, k, movefocus, u"
"$mod, down, movefocus, d"
"$mod, j, movefocus, d"
"$mod, 1, workspace, 1"
"$mod, 2, workspace, 2"
"$mod, 3, workspace, 3"
"$mod, 4, workspace, 4"
"$mod, 5, workspace, 5"
"$mod, 6, workspace, 6"
"$mod, 7, workspace, 7"
"$mod, 8, workspace, 8"
"$mod, 9, workspace, 9"
"$mod, 0, workspace, 10"
"$mod SHIFT, 1, movetoworkspacesilent, 1"
"$mod SHIFT, 2, movetoworkspacesilent, 2"
"$mod SHIFT, 3, movetoworkspacesilent, 3"
"$mod SHIFT, 4, movetoworkspacesilent, 4"
"$mod SHIFT, 5, movetoworkspacesilent, 5"
"$mod SHIFT, 6, movetoworkspacesilent, 6"
"$mod SHIFT, 7, movetoworkspacesilent, 7"
"$mod SHIFT, 8, movetoworkspacesilent, 8"
"$mod SHIFT, 9, movetoworkspacesilent, 9"
"$mod SHIFT, 0, movetoworkspacesilent, 10"
"$mod SHIFT, comma, focusmonitor, -1"
"$mod SHIFT, period, focusmonitor, +1"
# Launchers
"$mod, RETURN, exec, foot"
"$mod, D, exec, pkill tofi || tofi-drun | xargs hyprctl dispatch exec --"
"$mod SHIFT, D, exec, pkill tofi || tofi-run --require-match=false | xargs hyprctl dispatch exec --"
# Media
", XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+"
", XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-"
", XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"
# Backlight
", XF86MonBrightnessUp, exec, light -A 5"
", XF86MonBrightnessDown, exec, light -U 5"
# XWayland Keymaps
"$mod SHIFT, F1, exec, setxkbmap us colemak_dh"
"$mod SHIFT, F2, exec, setxkbmap us basic"
# Screenshot
", PRINT, exec, grimblast --notify copysave screen"
"SHIFT, PRINT, exec, grimblast --notify copysave area"
# Playerctl
"$mod, P, exec, ${playerctl} play-pause"
", XF86AudioPlay, exec, ${playerctl} play-pause"
", XF86AudioNext, exec, ${playerctl} position 5+"
", XF86AudioPrev, exec, ${playerctl} position 5-"
"$mod, XF86AudioNext, exec, ${playerctl} next"
"$mod, XF86AudioPrev, exec, ${playerctl} previous"
];
binde = [
# Hyprland operations
"$mod SHIFT, Q, killactive,"
"$mod SHIFT, left, movewindow, l"
"$mod SHIFT, h, movewindow, l"
"$mod SHIFT, right, movewindow, r"
"$mod SHIFT, l, movewindow, r"
"$mod SHIFT, up, movewindow, u"
"$mod SHIFT, k, movewindow, u"
"$mod SHIFT, down, movewindow, d"
"$mod SHIFT, j, movewindow, d"
"SHIFT ALT, left, resizeactive, -10 0"
"SHIFT ALT, h, resizeactive, -10 0"
"SHIFT ALT, right, resizeactive, 10 0"
"SHIFT ALT, l, resizeactive, 10 0"
"SHIFT ALT, up, resizeactive, 0 -10"
"SHIFT ALT, k, resizeactive, 0 -10"
"SHIFT ALT, down, resizeactive, 0 10"
"SHIFT ALT, j, resizeactive, 0 10"
];
bindm = [
# Mouse
"$mod, mouse:272, movewindow"
"$mod, mouse:273, resizewindow"
"$mod ALT, mouse:272, resizewindow"
];
exec-once = [
(with config.home.pointerCursor; "hyprctl setcursor ${name} ${toString size} ")
]
++ (with config.programs; lib.optional eww.enable "${eww.package}/bin/eww open bar");
};
}; };
}; };
}; };
home.packages = with pkgs; [
grim
slurp
inputs.hyprland-contrib.packages.${pkgs.system}.grimblast
wl-clipboard
swayimg
swaybg
];
} }

80
home/natto/hyprlock.nix Normal file
View File

@@ -0,0 +1,80 @@
{
config,
pkgs,
conf,
...
}:
{
programs.hyprlock = {
enable = true;
settings = with conf.colors.argb { a = "ee"; }; {
general = {
hide_cursor = false;
};
background = [
{
monitor = "";
path = "screenshot";
blur_passes = 2;
}
];
input-field = [
{
monitor = "";
size = "300, 60";
outline_thickness = 4;
valign = "center";
halign = "center";
font_color = "0x${text}";
outer_color = "0x${mauve}";
inner_color = "0x${surface0}";
check_color = "0x${blue}";
fail_color = "0x${red}";
capslock_color = "0x${yellow}";
fade_on_empty = false;
hide_input = false;
placeholder_text = "Logged in as <b>$USER</b>";
fail_text = "Fail! <b>($ATTEMPTS)</b>";
dots_spacing = 0.2;
dots_center = true;
}
];
label = [
{
monitor = "";
text = "Layout: $LAYOUT";
font_size = 25;
color = "0x${text}";
position = "2%, -2%";
valign = "top";
halign = "left";
}
{
monitor = "";
text = "$TIME";
font_size = 90;
color = "0x${text}";
position = "-2%, 0";
valign = "top";
halign = "right";
}
{
monitor = "";
text = "cmd[update:3600000] date +\"%A, %d %B %Y\"";
font_size = 25;
color = "0x${text}";
position = "-2%, -10%";
valign = "top";
halign = "right";
}
];
};
};
}

18
home/natto/hyprpaper.nix Normal file
View File

@@ -0,0 +1,18 @@
{
config,
...
}:
{
services.hyprpaper = {
enable = true;
settings =
let
wallpaper = "${config.home.homeDirectory}/wallpaper.png";
in
{
preload = [ "${wallpaper}" ];
wallpaper = [ ", ${wallpaper}" ];
};
};
}

View File

@@ -67,7 +67,6 @@ in
home = { home = {
packages = with pkgs; [ packages = with pkgs; [
spotify spotify
playerctl
mpc_cli mpc_cli
(ncmpcpp.override { (ncmpcpp.override {
visualizerSupport = true; visualizerSupport = true;
@@ -89,4 +88,6 @@ in
path = "${home}/.config/mpdasrc"; path = "${home}/.config/mpdasrc";
symlink = false; symlink = false;
}; };
services.playerctld.enable = true;
} }

View File

@@ -60,7 +60,6 @@
]; ];
}; };
defaultGateway = "192.168.1.1";
nameservers = [ nameservers = [
"1.1.1.1" "1.1.1.1"
"8.8.8.8" "8.8.8.8"