Compare commits
4 commits
9ec49279d8
...
d4431509de
Author | SHA1 | Date | |
---|---|---|---|
d4431509de | |||
8aa7a431a9 | |||
c9438566c8 | |||
24cf33066e |
6 changed files with 102 additions and 40 deletions
64
flake.lock
generated
64
flake.lock
generated
|
@ -482,11 +482,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1749221014,
|
||||
"narHash": "sha256-mqrpuP/lfyDmta5hJWTwWgdF5lwdiubcGs7oRvcTZ2s=",
|
||||
"lastModified": 1749657191,
|
||||
"narHash": "sha256-QLilaHuhGxiwhgceDWESj9gFcKIdEp7+9lRqNGpN8S4=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "96482a538e6103579d254b139759d0536177370b",
|
||||
"rev": "faeab32528a9360e9577ff4082de2d35c6bbe1ce",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -526,11 +526,11 @@
|
|||
"pre-commit-hooks": "pre-commit-hooks"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1748904204,
|
||||
"narHash": "sha256-kbY82p5J5HP/y132Pn6JVO1/PKV/TqF336FsDArWkLo=",
|
||||
"lastModified": 1749682763,
|
||||
"narHash": "sha256-DDhns3NS6L5OlYR0mSX03I5D7uGLyyd3MZegd1wTCyc=",
|
||||
"ref": "refs/heads/main",
|
||||
"rev": "fca0a30470b7040489feeb2a86bad05bf9b1aa95",
|
||||
"revCount": 17983,
|
||||
"rev": "ee0655240270480d7f6063dcf12ec47f04d2ded6",
|
||||
"revCount": 18025,
|
||||
"type": "git",
|
||||
"url": "https://git@git.lix.systems/lix-project/lix"
|
||||
},
|
||||
|
@ -569,11 +569,11 @@
|
|||
"xwayland-satellite-unstable": "xwayland-satellite-unstable"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1749144707,
|
||||
"narHash": "sha256-JcSmySCB3pOtzeWMaEksZgaiNedEDIC6qyBezkK+92Q=",
|
||||
"lastModified": 1749639406,
|
||||
"narHash": "sha256-uRWykdzOlpdXfAZAJLPdBD3y25Gnk9qxAlpGaTfcZLA=",
|
||||
"owner": "sodiboo",
|
||||
"repo": "niri-flake",
|
||||
"rev": "32d49ef427be377c82d32ce74ff3082c2c992199",
|
||||
"rev": "a38e8adc092396b2f5e288d91573086da4fd0cfc",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -602,11 +602,11 @@
|
|||
"niri-unstable": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1749112952,
|
||||
"narHash": "sha256-ajI1cXa2AgdZSELvlVaQZd0XMi4eM8H3Ys0Ek8a/roI=",
|
||||
"lastModified": 1749634836,
|
||||
"narHash": "sha256-V2QM8Gz2rtqn13+1eKGDl4PugfIbvlWt/9ln3Mzkbv0=",
|
||||
"owner": "YaLTeR",
|
||||
"repo": "niri",
|
||||
"rev": "242ebf294514cc22f4f9d83c0566c8ffe1cb8d8a",
|
||||
"rev": "07080a0431d86d64efed6fa557c2a02cb9041e93",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -851,11 +851,11 @@
|
|||
},
|
||||
"nixpkgs-stable_2": {
|
||||
"locked": {
|
||||
"lastModified": 1749086602,
|
||||
"narHash": "sha256-DJcgJMekoxVesl9kKjfLPix2Nbr42i7cpEHJiTnBUwU=",
|
||||
"lastModified": 1749494155,
|
||||
"narHash": "sha256-FG4DEYBpROupu758beabUk9lhrblSf5hnv84v1TLqMc=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "4792576cb003c994bd7cc1edada3129def20b27d",
|
||||
"rev": "88331c17ba434359491e8d5889cce872464052c2",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -914,11 +914,11 @@
|
|||
},
|
||||
"nixpkgs_5": {
|
||||
"locked": {
|
||||
"lastModified": 1748929857,
|
||||
"narHash": "sha256-lcZQ8RhsmhsK8u7LIFsJhsLh/pzR9yZ8yqpTzyGdj+Q=",
|
||||
"lastModified": 1749285348,
|
||||
"narHash": "sha256-frdhQvPbmDYaScPFiCnfdh3B/Vh81Uuoo0w5TkWmmjU=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "c2a03962b8e24e669fb37b7df10e7c79531ff1a4",
|
||||
"rev": "3e3afe5174c561dee0df6f2c2b2236990146329f",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -930,11 +930,11 @@
|
|||
},
|
||||
"nixpkgs_6": {
|
||||
"locked": {
|
||||
"lastModified": 1748929857,
|
||||
"narHash": "sha256-lcZQ8RhsmhsK8u7LIFsJhsLh/pzR9yZ8yqpTzyGdj+Q=",
|
||||
"lastModified": 1749285348,
|
||||
"narHash": "sha256-frdhQvPbmDYaScPFiCnfdh3B/Vh81Uuoo0w5TkWmmjU=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "c2a03962b8e24e669fb37b7df10e7c79531ff1a4",
|
||||
"rev": "3e3afe5174c561dee0df6f2c2b2236990146329f",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -961,10 +961,10 @@
|
|||
},
|
||||
"nixpkgs_8": {
|
||||
"locked": {
|
||||
"lastModified": 1748693115,
|
||||
"narHash": "sha256-StSrWhklmDuXT93yc3GrTlb0cKSS0agTAxMGjLKAsY8=",
|
||||
"path": "/nix/store/dax78flrvcdir20swzlcm64va09nh5x8-source",
|
||||
"rev": "910796cabe436259a29a72e8d3f5e180fc6dfacc",
|
||||
"lastModified": 1748929857,
|
||||
"narHash": "sha256-lcZQ8RhsmhsK8u7LIFsJhsLh/pzR9yZ8yqpTzyGdj+Q=",
|
||||
"path": "/nix/store/1zw47fx5h4x65n914j4b9iz0j3v17aw0-source",
|
||||
"rev": "c2a03962b8e24e669fb37b7df10e7c79531ff1a4",
|
||||
"type": "path"
|
||||
},
|
||||
"original": {
|
||||
|
@ -1170,11 +1170,11 @@
|
|||
"tinted-zed": "tinted-zed"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1749165619,
|
||||
"narHash": "sha256-E1KgTswgmzBGv+8WijQRghlyIP6k+LPzj9j8bq9BlLU=",
|
||||
"lastModified": 1749670558,
|
||||
"narHash": "sha256-luB+SFNy+etZK3PVznJSLps1DPYsGya6o/67Emcrtb0=",
|
||||
"owner": "danth",
|
||||
"repo": "stylix",
|
||||
"rev": "8456dfa7f60e6b4499b0498fc88e9b8b57d4d7d7",
|
||||
"rev": "e7fa0e5cc2336b6b25310d5e49c149f14fdbc1bb",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -1436,11 +1436,11 @@
|
|||
"xwayland-satellite-unstable": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1748488455,
|
||||
"narHash": "sha256-IiLr1alzKFIy5tGGpDlabQbe6LV1c9ABvkH6T5WmyRI=",
|
||||
"lastModified": 1749315541,
|
||||
"narHash": "sha256-bEik1BfVOFnWvtOrcOHluos/edJ8f+G2y1QySbt/0Ak=",
|
||||
"owner": "Supreeeme",
|
||||
"repo": "xwayland-satellite",
|
||||
"rev": "3ba30b149f9eb2bbf42cf4758d2158ca8cceef73",
|
||||
"rev": "da2ecb5be816de35e2efe23a408a1c49fe8b11ba",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
|
@ -265,8 +265,8 @@ in
|
|||
|
||||
"XF86AudioRaiseVolume".action = sh "wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 0.1+";
|
||||
"XF86AudioLowerVolume".action = sh "wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 0.1-";
|
||||
"XF86Launch6".action = sh "wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 0.1-";
|
||||
"XF86Tools".action = sh "wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 0.1+";
|
||||
"XF86Launch6".action = sh "wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 0.1+";
|
||||
"XF86Tools".action = sh "wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 0.1-";
|
||||
"XF86AudioMute".action = sh "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle";
|
||||
"XF86AudioMicMute".action = sh "wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle";
|
||||
|
||||
|
@ -284,10 +284,12 @@ in
|
|||
|
||||
"Mod+Q".action = close-window;
|
||||
|
||||
"XF86AudioPrev".action = sh "mpc prev";
|
||||
"XF86AudioNext".action = sh "mpc next";
|
||||
"XF86AudioPlay".action = sh "mpc toggle";
|
||||
"XF86Launch5".action = sh "mpc toggle";
|
||||
"XF86AudioPrev".action = sh "supersonic -previous";
|
||||
"XF86AudioNext".action = sh "supersonic -next";
|
||||
"XF86AudioPlay".action = sh "supersonic -play-pause";
|
||||
|
||||
"XF86Launch5".action = sh "supersonic -play-pause";
|
||||
|
||||
}
|
||||
(binds {
|
||||
suffixes."Left" = "column-left";
|
||||
|
|
|
@ -65,7 +65,36 @@ let
|
|||
|
||||
print("[I] Everything should be... well, not-shiny, captain!")
|
||||
|
||||
if verb == "lights/ledsoff":
|
||||
elif verb == "monitors/off":
|
||||
print("[I] Got a 'monitors off' request. Adding DPMS nulls.")
|
||||
|
||||
# Turn off monitors for any X11 anything.
|
||||
for auth in g`/tmp/xauth_*`:
|
||||
print(f"[I] Turning off monitors on X instance with auth file {auth}.")
|
||||
!(env DISPLAY=:0 XAUTHORITY=@(auth) xset dpms force off)
|
||||
|
||||
# Turn off monitors on each niri session,
|
||||
sockets = g`/var/run/user/1000/niri*.sock`
|
||||
for socket in sockets:
|
||||
print(f"[I] Turning off monitors on niri instance {socket}.")
|
||||
!(env NIRI_SOCKET=@(socket) niri msg action power-off-monitors)
|
||||
|
||||
|
||||
elif verb == "monitors/on":
|
||||
print("[I] Got a 'monitors on' request. Removing DPMS nulls.")
|
||||
|
||||
# Turn off monitors for any X11 anything.
|
||||
for auth in g`/tmp/xauth_*`:
|
||||
print(f"[I] Turning on monitors on X instance with auth file {auth}.")
|
||||
!(env DISPLAY=:0 XAUTHORITY=@(auth) xset dpms force on)
|
||||
|
||||
# Turn off monitors on each niri session,
|
||||
sockets = g`/var/run/user/1000/niri*.sock`
|
||||
for socket in sockets:
|
||||
print(f"[I] Turning on monitors on niri instance {socket}.")
|
||||
!(env NIRI_SOCKET=@(socket) niri msg action power-on-monitors)
|
||||
|
||||
elif verb == "lights/ledsoff":
|
||||
print("[I] Turning off RGB leds.")
|
||||
!(${ledOffScript}/bin/ledsoff)
|
||||
|
||||
|
@ -102,12 +131,21 @@ let
|
|||
|
||||
print("----------------------------")
|
||||
'';
|
||||
statusScript = pkgs.writeScriptBin "trailblazer-status-daemon" ''
|
||||
#!${pkgs.xonsh}/bin/xonsh
|
||||
|
||||
print("[I] Trailblazer status service started. Updating every 10s.")
|
||||
while True:
|
||||
sleep 10
|
||||
mosquitto_pub -h mitsuru -t trailblazer/monitors/status -m $(cat /sys/class/drm/card1-HDMI-A-1/dpms)
|
||||
'';
|
||||
in
|
||||
{
|
||||
system.stateVersion = "23.11";
|
||||
|
||||
imports = [
|
||||
#./ups.nix
|
||||
./energy.nix
|
||||
./scanner.nix
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
../../configs/build-machine-users.nix
|
||||
|
@ -221,6 +259,16 @@ in
|
|||
|
||||
script = "${commandScript}/bin/trailblazer-command-daemon";
|
||||
};
|
||||
systemd.services.trailblazer-status = {
|
||||
description = "trailblazer status service";
|
||||
|
||||
# Start once we're online.
|
||||
wantedBy = [ "default.target" ];
|
||||
wants = [ "network-online.target" ];
|
||||
after = [ "network-online.target" ];
|
||||
|
||||
script = "${statusScript}/bin/trailblazer-status-daemon";
|
||||
};
|
||||
|
||||
#
|
||||
# Let trailblazer share its GPS with the house devices.
|
||||
|
|
8
nixos/hosts/trailblazer/energy.nix
Normal file
8
nixos/hosts/trailblazer/energy.nix
Normal file
|
@ -0,0 +1,8 @@
|
|||
#
|
||||
# Energy savings for trailblazer.
|
||||
#
|
||||
{ ... }:
|
||||
{
|
||||
# Allow WoL from being targeted by e.g. a SSH connection.
|
||||
networking.interfaces."enp14s0".wakeOnLan.policy = [ "magic" "unicast" ];
|
||||
}
|
|
@ -95,6 +95,8 @@ with pkgs;
|
|||
libsecret
|
||||
lz4
|
||||
minipro
|
||||
mitmproxy
|
||||
mitmproxy2swagger
|
||||
moreutils
|
||||
mosquitto
|
||||
mpc-cli
|
||||
|
@ -109,6 +111,7 @@ with pkgs;
|
|||
openssh
|
||||
python3
|
||||
python3Packages.matplotlib
|
||||
python3Packages.swagger-ui-bundle
|
||||
pv
|
||||
qpdf
|
||||
rclone
|
||||
|
@ -249,6 +252,7 @@ with pkgs;
|
|||
++ (
|
||||
if (!is-hm-standalone && !is-droid) then
|
||||
[
|
||||
ethtool
|
||||
]
|
||||
else
|
||||
[ ]
|
||||
|
|
|
@ -58,7 +58,7 @@ with pkgs;
|
|||
|
||||
# Office.
|
||||
thunderbird
|
||||
libreoffice-fresh
|
||||
(libreoffice-fresh.override { extraMakeWrapperArgs = ["--unset" "WAYLAND_DISPLAY"]; })
|
||||
krita
|
||||
xournalpp
|
||||
kdePackages.itinerary
|
||||
|
|
Loading…
Add table
Reference in a new issue