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

View file

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

View file

@ -9,6 +9,12 @@
};
core.editor = "nvim";
pull.rebase = true;
difftool."nvim_difftool" = {
cmd = ''nvim -c "packadd nvim.difftool" -c "DiffTool $LOCAL $REMOTE"'';
};
diff = {
tool = "nvim_difftool";
};
};
signing = {
key = "cjriddz@protonmail.com";
@ -50,6 +56,7 @@
conflict-marker-style = "git";
merge-editor = "vimdiff";
diff-editor = "diffview";
diff-instructions = false;
diff-formatter = ":git";
movement = {
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 = {
max-new-file-size = "10MiB";
};

View file

@ -2,7 +2,8 @@
pkgs,
config,
...
}: {
}:
{
imports = [
./alacritty
./hyprland
@ -35,19 +36,6 @@
temperature.day = 6000;
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.settings = {
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 = {
configFile."mimeapps.list".force = true;

View file

@ -6,7 +6,6 @@
extraConfig = ''
monitor=,preferred,auto,1
'';
plugins = [ pkgs.hyprlandPlugins.hyprexpo ];
settings = {
"$mod" = "SUPER";
general = {
@ -16,9 +15,14 @@
};
misc = {
disable_hyprland_logo = true;
new_window_takes_over_fullscreen = 1;
on_focus_under_fullscreen = 1;
exit_window_retains_fullscreen = 1;
vfr = true;
middle_click_paste = false;
};
ecosystem = {
no_update_news = true;
no_donation_nag = true;
};
decoration = {
blur = {
@ -71,7 +75,6 @@
"$mod ALT, k, resizeactive, 0 -50"
];
bind = [
"$mod, a, hyprexpo:expo, toggle"
"$mod, Return, exec, alacritty"
"$mod, x, killactive"
"$mod, f, fullscreen"
@ -84,7 +87,7 @@
"$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, bracketright, exec, grimshot --notify copy area"
"$mod SHIFT, q, exec, swaylock"
"$mod SHIFT, q, exec, hyprlock"
",XF86MonBrightnessDown, exec, light -U 10"
",XF86MonBrightnessUp, exec, light -A 10"
",XF86AudioRaiseVolume, exec, pactl set-sink-volume @DEFAULT_SINK@ +1%"
@ -123,7 +126,7 @@
let
c = (x + 1) / 10;
in
builtins.toString (x + 1 - (c * 10));
toString (x + 1 - (c * 10));
in
[
"$mod, ${ws}, focusworkspaceoncurrentmonitor, ${toString (x + 1)}"
@ -158,12 +161,57 @@
services.hyprpaper = {
enable = true;
settings = {
preload = [ "/home/pape" ];
wallpaper = ",/home/pape";
wallpaper = {
monitor = "";
path = "/home/pape";
};
ipc = "off";
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 = {
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 = {
enable = lib.mkOption {
type = lib.types.bool;
@ -9,6 +17,10 @@ let cfg = config.system-sys; in {
type = lib.types.int;
default = 4;
};
swap = lib.mkOption {
type = lib.types.bool;
default = false;
};
zram = lib.mkOption {
type = lib.types.bool;
default = true;
@ -27,7 +39,7 @@ let cfg = config.system-sys; in {
enable = true;
wheelNeedsPassword = false;
};
swapDevices = [
swapDevices = lib.mkIf cfg.swap [
{
device = "/swapfile";
size = cfg.swapSize * 1024;
@ -65,14 +77,14 @@ let cfg = config.system-sys; in {
"network"
];
openssh.authorizedKeys.keys = [
''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHM4Zr0PFN7QdOG2aJ+nuzRCK6caulrpY6bphA1Ppl8Y e@t14''
''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJou+k8HtIWdlztpWog7fVfJgxJnRIo7c5xVPUBhBxhi'' # phone
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHM4Zr0PFN7QdOG2aJ+nuzRCK6caulrpY6bphA1Ppl8Y e@t14"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJou+k8HtIWdlztpWog7fVfJgxJnRIo7c5xVPUBhBxhi" # phone
];
};
};
users.users.root.openssh.authorizedKeys.keys = [
''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDcL53Gdrj5V9YDwKlCBIcgqiS+zHtOQpJlnOHTevJCJ e@t14''
''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHM4Zr0PFN7QdOG2aJ+nuzRCK6caulrpY6bphA1Ppl8Y e@t14''
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDcL53Gdrj5V9YDwKlCBIcgqiS+zHtOQpJlnOHTevJCJ 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 = {
enable = true;
xdgOpenUsePortal = false;
@ -84,7 +84,9 @@ in
};
};
system-net.nfs = true;
system-sys.zram = false;
system-sys.zram = true;
system-sys.swap = false;
system-sys.documentation = true;
hardware = {
graphics = {
enable = true;