Compare commits

..

2 commits

Author SHA1 Message Date
472d9b0b05 use hyprlock
All checks were successful
/ check (push) Successful in 3m5s
2026-02-15 12:50:47 -06:00
cabf5f52e1 misc cleanup 2026-02-15 12:22:44 -06:00
7 changed files with 152 additions and 65 deletions

51
flake.lock generated
View file

@ -384,11 +384,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1768068402, "lastModified": 1768749864,
"narHash": "sha256-bAXnnJZKJiF7Xr6eNW6+PhBf1lg2P1aFUO9+xgWkXfA=", "narHash": "sha256-EKRMFBLBRCHrFZ5luX85RTnsN3b2q3FjZEi62vXwJBE=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "8bc5473b6bc2b6e1529a9c4040411e1199c43b4c", "rev": "5148e08046dc8c74c66b8aee4d302a47d6931b56",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -422,11 +422,11 @@
"spectrum": "spectrum" "spectrum": "spectrum"
}, },
"locked": { "locked": {
"lastModified": 1768085909, "lastModified": 1768682386,
"narHash": "sha256-VmLSHlimAq+em9rXX9YhBS0Shu5MBCAQi2Kd//8OOgQ=", "narHash": "sha256-mKrMf7eG9TM2AM3pTuhIiCGmZ/JwDegCQH3ThVqcTuc=",
"owner": "microvm-nix", "owner": "microvm-nix",
"repo": "microvm.nix", "repo": "microvm.nix",
"rev": "4f267df275361406cda9a3f8e349035be207b307", "rev": "f469c1dfede623bbbf1ac605f6359316fd4002ef",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -517,11 +517,11 @@
}, },
"nixos-hardware": { "nixos-hardware": {
"locked": { "locked": {
"lastModified": 1767185284, "lastModified": 1768736227,
"narHash": "sha256-ljDBUDpD1Cg5n3mJI81Hz5qeZAwCGxon4kQW3Ho3+6Q=", "narHash": "sha256-qgGq7CfrYKc3IBYQ7qp0Z/ZXndQVC5Bj0N8HW9mS2rM=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixos-hardware", "repo": "nixos-hardware",
"rev": "40b1a28dce561bea34858287fbb23052c3ee63fe", "rev": "d447553bcbc6a178618d37e61648b19e744370df",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -590,11 +590,11 @@
}, },
"nixpkgs-stable": { "nixpkgs-stable": {
"locked": { "locked": {
"lastModified": 1768028080, "lastModified": 1768621446,
"narHash": "sha256-50aDK+8eLvsLK39TzQhKNq50/HcXyP4hyxOYoPoVxjo=", "narHash": "sha256-6YwHV1cjv6arXdF/PQc365h1j+Qje3Pydk501Rm4Q+4=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "d03088749a110d52a4739348f39a63f84bb0be14", "rev": "72ac591e737060deab2b86d6952babd1f896d7c5",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -636,11 +636,11 @@
}, },
"nixpkgs_3": { "nixpkgs_3": {
"locked": { "locked": {
"lastModified": 1768127708, "lastModified": 1768564909,
"narHash": "sha256-1Sm77VfZh3mU0F5OqKABNLWxOuDeHIlcFjsXeeiPazs=", "narHash": "sha256-Kell/SpJYVkHWMvnhqJz/8DqQg2b6PguxVWOuadbHCc=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "ffbc9f8cbaacfb331b6017d5a5abb21a492c9a38", "rev": "e4bae1bd10c9c57b2cf517953ab70060a828ee6f",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -676,14 +676,17 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1768164266, "lastModified": 1768202037,
"narHash": "sha256-HKxy//xkB/NIm1rURS1EUU/kgrH4ZgvehgB1lekJuVg=", "narHash": "sha256-vSRt6yIYj9/X89ZTKpGz71BiksoHPYYLsmclaJveg7s=",
"path": "/home/e/dev/nvim.nix", "owner": "iofq",
"type": "path" "repo": "nvim.nix",
"rev": "3c5c3a6745fd93970e5bebfb5a75b5bca53557a3",
"type": "github"
}, },
"original": { "original": {
"path": "/home/e/dev/nvim.nix", "owner": "iofq",
"type": "path" "repo": "nvim.nix",
"type": "github"
} }
}, },
"pre-commit-hooks": { "pre-commit-hooks": {
@ -732,11 +735,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1768104471, "lastModified": 1768709255,
"narHash": "sha256-HdnXWQsA1EI27IJlaENUEEug58trUrh6+MT0cFiDHmY=", "narHash": "sha256-aigyBfxI20FRtqajVMYXHtj5gHXENY2gLAXEhfJ8/WM=",
"owner": "Mic92", "owner": "Mic92",
"repo": "sops-nix", "repo": "sops-nix",
"rev": "94f9cbd20f680ebb2ad6cdf39da97cbcfaedf004", "rev": "5e8fae80726b66e9fec023d21cd3b3e638597aa9",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -26,9 +26,10 @@
}; };
# nvim = { # nvim = {
# url = "github:iofq/nvim.nix"; # url = "github:iofq/nvim.nix";
# url = "path:/home/e/dev/nvim.nix";
# }; # };
nvim = { nvim = {
url = "path:/home/e/dev/nvim.nix"; url = "github:iofq/nvim.nix";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
deploy-rs = { deploy-rs = {

View file

@ -9,6 +9,12 @@
}; };
core.editor = "nvim"; core.editor = "nvim";
pull.rebase = true; pull.rebase = true;
difftool."nvim_difftool" = {
cmd = ''nvim -c "packadd nvim.difftool" -c "DiffTool $LOCAL $REMOTE"'';
};
diff = {
tool = "nvim_difftool";
};
}; };
signing = { signing = {
key = "cjriddz@protonmail.com"; key = "cjriddz@protonmail.com";
@ -50,6 +56,7 @@
conflict-marker-style = "git"; conflict-marker-style = "git";
merge-editor = "vimdiff"; merge-editor = "vimdiff";
diff-editor = "diffview"; diff-editor = "diffview";
diff-instructions = false;
diff-formatter = ":git"; diff-formatter = ":git";
movement = { movement = {
edit = true; edit = true;
@ -97,6 +104,42 @@
'' ''
]; ];
}; };
merge-tools.diffview-new = {
program = "sh";
edit-args = [
"-c"
''
set -eux
nix run /home/e/dev/nvim.nix -- \
--server $NVIM \
--remote-send "<cmd>lua require('difftool').open('$left', '$right', {ignore = { '.git', '.jj' }})<cr>"
until nix run /home/e/dev/nvim.nix -- \
--headless \
--server "$NVIM" \
--remote-expr "v:lua.require'iofq.jj'.is_jj_diffedit_open()" 2>/dev/null | grep 0; do
sleep 1
done
''
];
diff-args = [
"-c"
''
set -eu
rm -f "$right/JJ-INSTRUCTIONS"
git -C "$left" init -q
git -C "$left" add -A
git -C "$left" commit -q -m baseline --allow-empty
mv "$left/.git" "$right"
git -C "$right" add --intent-to-add -A
(cd "$right"; nvim -c "lua vim.g.snacks_indent=false" -c "lua require('lazy').load({plugins = {'diffview.nvim'}})" -c DiffviewOpen)
git -C "$right" diff-index --quiet --cached HEAD && { echo "No changes done, aborting split."; exit 1; }
git -C "$right" commit -q -m split
git -C "$right" restore . # undo changes in modified files
git -C "$right" reset . # undo --intent-to-add
git -C "$right" clean -q -df # remove untracked files
''
];
};
snapshot = { snapshot = {
max-new-file-size = "10MiB"; max-new-file-size = "10MiB";
}; };

View file

@ -2,7 +2,8 @@
pkgs, pkgs,
config, config,
... ...
}: { }:
{
imports = [ imports = [
./alacritty ./alacritty
./hyprland ./hyprland
@ -35,19 +36,6 @@
temperature.day = 6000; temperature.day = 6000;
temperature.night = 3500; temperature.night = 3500;
}; };
swayidle = {
enable = true;
events = [
{
event = "before-sleep";
command = "${config.programs.swaylock.package}/bin/swaylock";
}
{
event = "lock";
command = "${config.programs.swaylock.package}/bin/swaylock";
}
];
};
mako.enable = true; mako.enable = true;
mako.settings = { mako.settings = {
default-timeout = 5; default-timeout = 5;
@ -67,16 +55,6 @@
} }
''; '';
}; };
swaylock = {
enable = true;
package = pkgs.swaylock-effects;
settings = {
color = "#152528";
daemonize = true;
clock = true;
ignore-empty-password = true;
};
};
}; };
xdg = { xdg = {
configFile."mimeapps.list".force = true; configFile."mimeapps.list".force = true;

View file

@ -6,7 +6,6 @@
extraConfig = '' extraConfig = ''
monitor=,preferred,auto,1 monitor=,preferred,auto,1
''; '';
plugins = [ pkgs.hyprlandPlugins.hyprexpo ];
settings = { settings = {
"$mod" = "SUPER"; "$mod" = "SUPER";
general = { general = {
@ -16,9 +15,14 @@
}; };
misc = { misc = {
disable_hyprland_logo = true; disable_hyprland_logo = true;
new_window_takes_over_fullscreen = 1; on_focus_under_fullscreen = 1;
exit_window_retains_fullscreen = 1; exit_window_retains_fullscreen = 1;
vfr = true; vfr = true;
middle_click_paste = false;
};
ecosystem = {
no_update_news = true;
no_donation_nag = true;
}; };
decoration = { decoration = {
blur = { blur = {
@ -71,7 +75,6 @@
"$mod ALT, k, resizeactive, 0 -50" "$mod ALT, k, resizeactive, 0 -50"
]; ];
bind = [ bind = [
"$mod, a, hyprexpo:expo, toggle"
"$mod, Return, exec, alacritty" "$mod, Return, exec, alacritty"
"$mod, x, killactive" "$mod, x, killactive"
"$mod, f, fullscreen" "$mod, f, fullscreen"
@ -84,7 +87,7 @@
"$mod, b, exec, pkill -SIGUSR1 waybar" "$mod, b, exec, pkill -SIGUSR1 waybar"
"$mod, bracketleft, exec, grimshot --notify save area /tmp/scrot-$(date \"+%Y-%m-%d\"T\"%H:%M:%S\").png" "$mod, bracketleft, exec, grimshot --notify save area /tmp/scrot-$(date \"+%Y-%m-%d\"T\"%H:%M:%S\").png"
"$mod, bracketright, exec, grimshot --notify copy area" "$mod, bracketright, exec, grimshot --notify copy area"
"$mod SHIFT, q, exec, swaylock" "$mod SHIFT, q, exec, hyprlock"
",XF86MonBrightnessDown, exec, light -U 10" ",XF86MonBrightnessDown, exec, light -U 10"
",XF86MonBrightnessUp, exec, light -A 10" ",XF86MonBrightnessUp, exec, light -A 10"
",XF86AudioRaiseVolume, exec, pactl set-sink-volume @DEFAULT_SINK@ +1%" ",XF86AudioRaiseVolume, exec, pactl set-sink-volume @DEFAULT_SINK@ +1%"
@ -123,7 +126,7 @@
let let
c = (x + 1) / 10; c = (x + 1) / 10;
in in
builtins.toString (x + 1 - (c * 10)); toString (x + 1 - (c * 10));
in in
[ [
"$mod, ${ws}, focusworkspaceoncurrentmonitor, ${toString (x + 1)}" "$mod, ${ws}, focusworkspaceoncurrentmonitor, ${toString (x + 1)}"
@ -158,12 +161,57 @@
services.hyprpaper = { services.hyprpaper = {
enable = true; enable = true;
settings = { settings = {
preload = [ "/home/pape" ]; wallpaper = {
wallpaper = ",/home/pape"; monitor = "";
path = "/home/pape";
};
ipc = "off"; ipc = "off";
splash = false; splash = false;
}; };
}; };
services.hypridle = {
enable = true;
settings = {
general = {
after_sleep_cmd = "hyprctl dispatch dpms on";
ignore_dbus_inhibit = false;
lock_cmd = "hyprlock";
};
listener = [
{
timeout = 900;
on-timeout = "hyprlock";
}
{
timeout = 1200;
on-timeout = "hyprctl dispatch dpms off";
on-resume = "hyprctl dispatch dpms on";
}
];
};
};
programs.hyprlock = {
enable = true;
settings = {
background = {
monitor = "";
path = "/home/pape";
blur_passes = 5;
};
general = {
ignore_empty_input = true;
};
input-field = {
monitor = "";
size = "5%, 5%";
outline_thickness = 1;
inner_color = "rgba(0, 0, 0, 0.0)";
hide_input = true;
halign = "center";
valign = "center";
};
};
};
programs.waybar = { programs.waybar = {
enable = true; enable = true;
systemd.enable = true; systemd.enable = true;

View file

@ -1,5 +1,13 @@
{ host, config, lib, ...}: {
let cfg = config.system-sys; in { host,
config,
lib,
...
}:
let
cfg = config.system-sys;
in
{
options.system-sys = { options.system-sys = {
enable = lib.mkOption { enable = lib.mkOption {
type = lib.types.bool; type = lib.types.bool;
@ -9,6 +17,10 @@ let cfg = config.system-sys; in {
type = lib.types.int; type = lib.types.int;
default = 4; default = 4;
}; };
swap = lib.mkOption {
type = lib.types.bool;
default = false;
};
zram = lib.mkOption { zram = lib.mkOption {
type = lib.types.bool; type = lib.types.bool;
default = true; default = true;
@ -27,7 +39,7 @@ let cfg = config.system-sys; in {
enable = true; enable = true;
wheelNeedsPassword = false; wheelNeedsPassword = false;
}; };
swapDevices = [ swapDevices = lib.mkIf cfg.swap [
{ {
device = "/swapfile"; device = "/swapfile";
size = cfg.swapSize * 1024; size = cfg.swapSize * 1024;
@ -65,14 +77,14 @@ let cfg = config.system-sys; in {
"network" "network"
]; ];
openssh.authorizedKeys.keys = [ openssh.authorizedKeys.keys = [
''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHM4Zr0PFN7QdOG2aJ+nuzRCK6caulrpY6bphA1Ppl8Y e@t14'' "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHM4Zr0PFN7QdOG2aJ+nuzRCK6caulrpY6bphA1Ppl8Y e@t14"
''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJou+k8HtIWdlztpWog7fVfJgxJnRIo7c5xVPUBhBxhi'' # phone "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJou+k8HtIWdlztpWog7fVfJgxJnRIo7c5xVPUBhBxhi" # phone
]; ];
}; };
}; };
users.users.root.openssh.authorizedKeys.keys = [ users.users.root.openssh.authorizedKeys.keys = [
''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDcL53Gdrj5V9YDwKlCBIcgqiS+zHtOQpJlnOHTevJCJ e@t14'' "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDcL53Gdrj5V9YDwKlCBIcgqiS+zHtOQpJlnOHTevJCJ e@t14"
''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHM4Zr0PFN7QdOG2aJ+nuzRCK6caulrpY6bphA1Ppl8Y e@t14'' "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHM4Zr0PFN7QdOG2aJ+nuzRCK6caulrpY6bphA1Ppl8Y e@t14"
]; ];
}; };
} }

View file

@ -57,7 +57,7 @@ in
}; };
}; };
security.pam.services.swaylock = { }; security.pam.services.hyprlock = { };
xdg.portal = { xdg.portal = {
enable = true; enable = true;
xdgOpenUsePortal = false; xdgOpenUsePortal = false;
@ -84,7 +84,9 @@ in
}; };
}; };
system-net.nfs = true; system-net.nfs = true;
system-sys.zram = false; system-sys.zram = true;
system-sys.swap = false;
system-sys.documentation = true;
hardware = { hardware = {
graphics = { graphics = {
enable = true; enable = true;