changing scripts to get swayidle working

This commit is contained in:
Matt Nish-Lapidus 2025-06-29 14:53:28 -04:00
parent 260e597860
commit e113d9775d
20 changed files with 137 additions and 58 deletions

109
flake.lock generated
View file

@ -90,11 +90,11 @@
"nixpkgs-stable": "nixpkgs-stable"
},
"locked": {
"lastModified": 1751127789,
"narHash": "sha256-Z0s5KRmigd6doImx6Kh4GRP/hlY8jMtT8KC1mqcPHv4=",
"lastModified": 1751216990,
"narHash": "sha256-KMcGSznyttkf3C2Gv4LNCPYOfvjj7Qk/Mu2Og2yCsbk=",
"owner": "nix-community",
"repo": "emacs-overlay",
"rev": "c5cc6bc833e686b5477e1a7054c5a0ee3039d413",
"rev": "562e5da816da90627ed5775d4ba6f968bde0ff57",
"type": "github"
},
"original": {
@ -103,6 +103,28 @@
"type": "github"
}
},
"envfs": {
"inputs": {
"flake-parts": "flake-parts_2",
"nixpkgs": [
"nixpkgs"
],
"treefmt-nix": "treefmt-nix_2"
},
"locked": {
"lastModified": 1750727754,
"narHash": "sha256-Jkl9YSIDqZqmymdChoiZAmbdps7JIAcfgszZ1YCoGPk=",
"owner": "Mic92",
"repo": "envfs",
"rev": "5e51a84f22679426402eb2ad8f96120185e1306d",
"type": "github"
},
"original": {
"owner": "Mic92",
"repo": "envfs",
"type": "github"
}
},
"flake-compat": {
"locked": {
"lastModified": 1733328505,
@ -201,6 +223,27 @@
}
},
"flake-parts_2": {
"inputs": {
"nixpkgs-lib": [
"envfs",
"nixpkgs"
]
},
"locked": {
"lastModified": 1709336216,
"narHash": "sha256-Dt/wOWeW6Sqm11Yh+2+t0dfEWxoMxGBvv3JpIocFl9E=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "f7b3c975cf067e56e7cda6cb098ebe3fb4d74ca2",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-parts_3": {
"inputs": {
"nixpkgs-lib": "nixpkgs-lib_2"
},
@ -415,11 +458,11 @@
]
},
"locked": {
"lastModified": 1750973805,
"narHash": "sha256-BZXgag7I0rnL/HMHAsBz3tQrfKAibpY2vovexl2lS+Y=",
"lastModified": 1751146119,
"narHash": "sha256-gvjG95TCnUVJkvQvLMlnC4NqiqFyBdJk3o8/RwuHeaU=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "080e8b48b0318b38143d5865de9334f46d51fce3",
"rev": "76d0c31fce2aa0c71409de953e2f9113acd5b656",
"type": "github"
},
"original": {
@ -561,11 +604,11 @@
"xwayland-satellite-unstable": "xwayland-satellite-unstable"
},
"locked": {
"lastModified": 1751106385,
"narHash": "sha256-lP/ZZk9doHFD/GR7sKh+PadDijURRDki6S8adVMt7v8=",
"lastModified": 1751179061,
"narHash": "sha256-E3SA2IZf72CR3wklJM+cF1ZOVjy6r8ZqbsOPXodNjWo=",
"owner": "sodiboo",
"repo": "niri-flake",
"rev": "d6be81f7553b90cd0e9528ddd7df665705b536e3",
"rev": "cc5722e779f3b32bdd918e473777c39da67ab1b6",
"type": "github"
},
"original": {
@ -659,7 +702,7 @@
},
"nix-rice": {
"inputs": {
"flake-parts": "flake-parts_2",
"flake-parts": "flake-parts_3",
"git-hooks-nix": "git-hooks-nix",
"kitty-themes-src": "kitty-themes-src",
"nixpkgs": [
@ -782,11 +825,11 @@
},
"nixpkgs-stable": {
"locked": {
"lastModified": 1750646418,
"narHash": "sha256-4UAN+W0Lp4xnUiHYXUXAPX18t+bn6c4Btry2RqM9JHY=",
"lastModified": 1751048012,
"narHash": "sha256-MYbotu4UjWpTsq01wglhN5xDRfZYLFtNk7SBY0BcjkU=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "1f426f65ac4e6bf808923eb6f8b8c2bfba3d18c5",
"rev": "a684c58d46ebbede49f280b653b9e56100aa3877",
"type": "github"
},
"original": {
@ -996,6 +1039,7 @@
"disko": "disko",
"emacs-lsp-booster": "emacs-lsp-booster",
"emacs-overlay": "emacs-overlay",
"envfs": "envfs",
"home-manager": "home-manager",
"isd": "isd",
"musnix": "musnix",
@ -1227,6 +1271,27 @@
"type": "github"
}
},
"treefmt-nix_2": {
"inputs": {
"nixpkgs": [
"envfs",
"nixpkgs"
]
},
"locked": {
"lastModified": 1710781103,
"narHash": "sha256-nehQK/XTFxfa6rYKtbi8M1w+IU1v5twYhiyA4dg1vpg=",
"owner": "numtide",
"repo": "treefmt-nix",
"rev": "7ee5aaac63c30d3c97a8c56efe89f3b2aa9ae564",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "treefmt-nix",
"type": "github"
}
},
"uv2nix": {
"inputs": {
"nixpkgs": [
@ -1343,11 +1408,11 @@
"rust-overlay": "rust-overlay_2"
},
"locked": {
"lastModified": 1750821680,
"narHash": "sha256-Bu5unTxnqok2RoU5P394Gh0vRaoyI/5xlOOJDF6akrc=",
"lastModified": 1751176151,
"narHash": "sha256-7bK5eoK0ySlct/cbehTrkGcTcSMOLXSnh+RJiswVzEU=",
"owner": "Supreeeme",
"repo": "xwayland-satellite",
"rev": "2e7c318ac2bbf699b6ab92ef91e661e16415dfac",
"rev": "91d463851e24c190cc912471861b5414ac8fe65c",
"type": "github"
},
"original": {
@ -1376,11 +1441,11 @@
"xwayland-satellite-unstable": {
"flake": false,
"locked": {
"lastModified": 1750821680,
"narHash": "sha256-Bu5unTxnqok2RoU5P394Gh0vRaoyI/5xlOOJDF6akrc=",
"lastModified": 1751176151,
"narHash": "sha256-7bK5eoK0ySlct/cbehTrkGcTcSMOLXSnh+RJiswVzEU=",
"owner": "Supreeeme",
"repo": "xwayland-satellite",
"rev": "2e7c318ac2bbf699b6ab92ef91e661e16415dfac",
"rev": "91d463851e24c190cc912471861b5414ac8fe65c",
"type": "github"
},
"original": {
@ -1419,11 +1484,11 @@
]
},
"locked": {
"lastModified": 1751127508,
"narHash": "sha256-fU2FQKNxO5gkADRFMS2S54M/LKsTewMpGRm+KJRLdFo=",
"lastModified": 1751200680,
"narHash": "sha256-sVep+p1XtL4tpArd1of+8mA3mJ9T0NsHNOCLGKxxRns=",
"owner": "0xc000022070",
"repo": "zen-browser-flake",
"rev": "5962b5db7babbb1607dcd2d1d6db9ab540cc108d",
"rev": "35ba63ea42a57e8470e605b178e5228a29edbcbe",
"type": "github"
},
"original": {

View file

@ -13,6 +13,11 @@
inputs.nixpkgs.follows = "nixpkgs";
};
envfs = {
url = "github:Mic92/envfs";
inputs.nixpkgs.follows = "nixpkgs";
};
disko = {
url = "github:nix-community/disko";
inputs.nixpkgs.follows = "nixpkgs";

View file

@ -1,3 +1,3 @@
#!/bin/sh
brillo -e -O
brillo -e -u 150000 -S 15
#!/usr/bin/env sh
/run/current-system/sw/bin/brillo -e -O
/run/current-system/sw/bin/brillo -e -u 150000 -S 15

View file

@ -1,2 +1,2 @@
#!/bin/sh
#!/usr/bin/env sh
niri msg action power-off-monitors

View file

@ -1,2 +1,2 @@
#!/bin/sh
systemctl suspend
#!/usr/bin/env sh
/run/current-system/sw/bin/systemctl suspend

View file

@ -1,2 +1,2 @@
#!/bin/sh
#!/usr/bin/env sh
wl-present mirror eDP-1

View file

@ -1,3 +1,3 @@
#!/bin/sh
#!/usr/bin/env sh
sleep 10
/etc/profiles/per-user/emenel/bin/filen-desktop

View file

@ -1,2 +1,2 @@
#!/bin/sh
#!/usr/bin/env sh
niri msg action screenshot-window --id="$(niri msg --json pick-window | jq .id)"

View file

@ -1,2 +1,2 @@
#!/bin/sh
brillo -e -u 15000 -I
#!/usr/bin/env sh
/run/current-system/sw/bin/brillo -e -u 15000 -I

View file

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env sh
# TODO: support config locations:
# ./.piku-server

View file

@ -1,2 +1,2 @@
#!/bin/sh
#!/usr/bin/env sh
GDK_BACKEND=x11 /etc/profiles/per-user/emenel/bin/reaper

View file

@ -1,2 +1,2 @@
#!/bin/sh
pidof swaylock || swaylock
#!/usr/bin/env sh
/run/current-system/sw/bin/pidof /etc/profiles/per-user/emenel/bin/swaylock || /etc/profiles/per-user/emenel/bin/swaylock

View file

@ -1,2 +1,2 @@
#!/bin/sh
#!/usr/bin/env sh
wezterm --config-file /home/emenel/.config/wezterm/launcher.lua start --always-new-process "$1"

View file

@ -1,2 +1,2 @@
#!/bin/sh
#!/usr/bin/env sh
wezterm --config-file /home/emenel/.config/wezterm/launcher.lua start --class floatapp --always-new-process "$1"

View file

@ -1,2 +1,2 @@
#!/bin/sh
#!/usr/bin/env sh
wezterm --config-file /home/emenel/.config/wezterm/launcher.lua start --class launcher --always-new-process "$1"

View file

@ -96,6 +96,11 @@
];
};
extraOptions = ''
keep-outputs = true
keep-derivations = true
'';
# registry = {
# emenel-templates.flake = inputs.emenel-templates;
# };
@ -274,7 +279,7 @@
clean = {
enable = true;
dates = "daily";
extraArgs = "--keep 4";
extraArgs = "--keep 4 --nogcroots";
};
flake = "/home/emenel/source/nixos-config";
package = pkgs.nh;
@ -296,7 +301,11 @@
];
};
services.tailscale.enable = true;
services.envfs.enable = true;
services.envfs = {
enable = true;
extraFallbackPathCommands = "ln -s $''{pkgs.bash}/bin/bash $out/bash";
};
services.gnome.sushi.enable = true;

View file

@ -8,7 +8,7 @@
path = [ "/run/current-system/bin/" "/run/current-system/sw/" ];
script = ''
#!/bin/sh
#!/usr/bin/env sh
hda-verb /dev/snd/hwC3D0 0x20 0x500 0x7
hda-verb /dev/snd/hwC3D0 0x20 0x500 0x7
hda-verb /dev/snd/hwC3D0 0x20 0x500 0x10

View file

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env sh
set -ex

View file

@ -90,9 +90,9 @@
];
programs = {
# bash = {
# enable = true;
# };
bash = {
enable = true;
};
nix-index = {
enable = true;
enableFishIntegration = true;

View file

@ -1,4 +1,4 @@
{ pkgs, ... }:
{
services.swayidle = {
enable = true;
@ -24,31 +24,31 @@
# battery timers
{
timeout = 90;
command = "systemd-ac-power || loginctl lock-session";
command = "${pkgs.systemd}/bin/systemd-ac-power || ${pkgs.systemd}/bin/loginctl lock-session";
}
{
timeout = 120;
command = "systemd-ac-power || /home/emenel/.local/bin/lock-power-off-monitors";
command = "${pkgs.systemd}/bin/systemd-ac-power || /home/emenel/.local/bin/lock-power-off-monitors";
}
{
timeout = 180;
command = "systemd-ac-power || /home/emenel/.local/bin/lock-suspend";
command = "${pkgs.systemd}/bin/systemd-ac-power || /home/emenel/.local/bin/lock-suspend";
}
# ac power timers
{
timeout = 180;
command = "systemd-ac-power && loginctl lock-session";
command = "${pkgs.systemd}/bin/systemd-ac-power && ${pkgs.systemd}/bin/loginctl lock-session";
}
{
timeout = 240;
command = "systemd-ac-power || /home/emenel/.local/bin/lock-power-off-monitors";
command = "${pkgs.systemd}/bin/systemd-ac-power || /home/emenel/.local/bin/lock-power-off-monitors";
}
{
timeout = 600;
command = "systemd-ac-power && /home/emenel/.local/bin/lock-suspend";
command = "${pkgs.systemd}/bin/systemd-ac-power && /home/emenel/.local/bin/lock-suspend";
}
];
@ -58,11 +58,11 @@
programs.swaylock = {
enable = true;
settings = {
color = "808080";
font-size = 24;
color = "000000";
font-size = 32;
indicator-idle-visible = true;
indicator-radius = 100;
line-color = "ffffff";
indicator-radius = 250;
line-color = "cccccc";
show-failed-attempts = true;
};
};