cleanup
This commit is contained in:
parent
ed160b8280
commit
af09e1e1f9
6
etcnixos/flake.lock
generated
6
etcnixos/flake.lock
generated
@ -294,11 +294,11 @@
|
|||||||
},
|
},
|
||||||
"nixos-hardware": {
|
"nixos-hardware": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1738638143,
|
"lastModified": 1738815599,
|
||||||
"narHash": "sha256-ZYMe4c4OCtIUBn5hx15PEGr0+B1cNEpl2dsaLxwY2W0=",
|
"narHash": "sha256-gpDGrlNANp8+Ag7oAHiXtUIJ1kWHqTN/6G686PpkNl0=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixos-hardware",
|
"repo": "nixos-hardware",
|
||||||
"rev": "9bdd53f5908453e4d03f395eb1615c3e9a351f70",
|
"rev": "d1f201fc627098d764ed00f736864ce673f5975e",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|||||||
@ -2,21 +2,32 @@
|
|||||||
{
|
{
|
||||||
systemd.services.no-rgb =
|
systemd.services.no-rgb =
|
||||||
let
|
let
|
||||||
no-rgb = pkgs.writeScriptBin "no-rgb" ''
|
no-rgb = (
|
||||||
#!/bin/sh
|
pkgs.writeShellApplication {
|
||||||
set -e
|
name = "no-rgb";
|
||||||
|
runtimeInputs = with pkgs; [
|
||||||
|
openrgb
|
||||||
|
coreutils
|
||||||
|
gnugrep
|
||||||
|
];
|
||||||
|
|
||||||
NUM_DEVICES=$(${pkgs.openrgb}/bin/openrgb --noautoconnect --list-devices | ${pkgs.gnugrep}/bin/grep -E '^[0-9]+: ' | ${pkgs.coreutils}/bin/wc -l)
|
text = ''
|
||||||
|
#!/bin/sh
|
||||||
|
set -e
|
||||||
|
|
||||||
for i in $(${pkgs.coreutils}/bin/seq 0 $(($NUM_DEVICES - 1))); do
|
NUM_DEVICES=$(openrgb --noautoconnect --list-devices | grep -cE '^[0-9]+: ')
|
||||||
${pkgs.openrgb}/bin/openrgb --noautoconnect --device $i --mode direct --color 000000
|
|
||||||
done
|
for i in $(seq 0 $((NUM_DEVICES - 1))); do
|
||||||
'';
|
openrgb --noautoconnect --device "$i" --mode direct --color 000000
|
||||||
|
done
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
);
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
description = "disable rgb";
|
description = "disable rgb";
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
ExecStart = "${no-rgb}/bin/no-rgb";
|
ExecStart = "${no-rgb}/bin/${no-rgb.name}";
|
||||||
Type = "oneshot";
|
Type = "oneshot";
|
||||||
};
|
};
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
@ -29,5 +40,4 @@
|
|||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
openrgb-with-all-plugins
|
openrgb-with-all-plugins
|
||||||
];
|
];
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -86,8 +86,8 @@
|
|||||||
enable = true;
|
enable = true;
|
||||||
capSysNice = true;
|
capSysNice = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.steam = {
|
programs.steam = {
|
||||||
enable = true;
|
|
||||||
gamescopeSession.enable = true;
|
gamescopeSession.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -106,8 +106,8 @@
|
|||||||
TTYVTDisallocate = true;
|
TTYVTDisallocate = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
#weird hack to get swaylock working? idk, if you don't put this here, password entry doesnt work
|
# weird hack to get swaylock working? idk, if you don't put this here, password entry doesnt work
|
||||||
#if I move to another lock screen program, i will have to replace `swaylock`
|
# if I move to another lock screen program, i will have to replace `swaylock`
|
||||||
security.pam.services.swaylock = { };
|
security.pam.services.swaylock = { };
|
||||||
|
|
||||||
system.activationScripts = {
|
system.activationScripts = {
|
||||||
@ -116,17 +116,11 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
rm -fr ${config.boot.lanzaboote.pkiBundle} || true
|
rm -fr ${config.boot.lanzaboote.pkiBundle} || true
|
||||||
mkdir -p ${config.boot.lanzaboote.pkiBundle}
|
mkdir -p ${config.boot.lanzaboote.pkiBundle}
|
||||||
${pkgs.gnutar}/bin/tar xf /etc/nixos/secrets/secureboot.tar -C ${config.boot.lanzaboote.pkiBundle}
|
${pkgs.gnutar}/bin/tar xf ${./secrets/secureboot.tar} -C ${config.boot.lanzaboote.pkiBundle}
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
# https://github.com/NixOS/nixos-hardware/pull/1253
|
|
||||||
# hardware.framework.laptop13.audioEnhancement = {
|
|
||||||
# enable = true;
|
|
||||||
# };i
|
|
||||||
|
|
||||||
# disable framework kernel module
|
# disable framework kernel module
|
||||||
# https://github.com/NixOS/nixos-hardware/issues/1330
|
# https://github.com/NixOS/nixos-hardware/issues/1330
|
||||||
|
|
||||||
hardware.framework.enableKmod = false;
|
hardware.framework.enableKmod = false;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -39,18 +39,18 @@
|
|||||||
|
|
||||||
(defwidget window-title []
|
(defwidget window-title []
|
||||||
(label
|
(label
|
||||||
:text "${windowtitle == "" ? "" : "(${windowtitle})"}"))
|
:text {windowtitle == "" ? "" : "(${windowtitle})"}))
|
||||||
|
|
||||||
(defwidget brightness-ctl []
|
(defwidget brightness-ctl []
|
||||||
(box :visible brightnessctl-open
|
(box :visible brightnessctl-open
|
||||||
(cmd-slider :symbol "" :value brightness
|
(cmd-slider :symbol "" :value brightness
|
||||||
:command `brightnessctl set {}%`
|
:command `brightnessctl set {}%`
|
||||||
:max 101 :color "${
|
:max 101 :color {
|
||||||
brightness >= 80 ? "green" :
|
brightness >= 80 ? "green" :
|
||||||
brightness >= 50 ? "yellow" :
|
brightness >= 50 ? "yellow" :
|
||||||
brightness >= 30 ? "peach" :
|
brightness >= 30 ? "peach" :
|
||||||
brightness >= 10 ? "maroon" : "red"
|
brightness >= 10 ? "maroon" : "red"
|
||||||
}")))
|
})))
|
||||||
|
|
||||||
|
|
||||||
(defpoll brightness :interval "1s" :run-while brightnessctl-open `brightnessctl -m | awk -F, '{print $4+0}'`)
|
(defpoll brightness :interval "1s" :run-while brightnessctl-open `brightnessctl -m | awk -F, '{print $4+0}'`)
|
||||||
@ -105,7 +105,7 @@
|
|||||||
(box :space-evenly false
|
(box :space-evenly false
|
||||||
:tooltip powerstats
|
:tooltip powerstats
|
||||||
(label
|
(label
|
||||||
:text "${EWW_BATTERY.BAT1.status == "Charging" ? "" :
|
:text {EWW_BATTERY.BAT1.status == "Charging" ? "" :
|
||||||
EWW_BATTERY.BAT1.capacity >= 90 ? "" :
|
EWW_BATTERY.BAT1.capacity >= 90 ? "" :
|
||||||
EWW_BATTERY.BAT1.capacity >= 80 ? "" :
|
EWW_BATTERY.BAT1.capacity >= 80 ? "" :
|
||||||
EWW_BATTERY.BAT1.capacity >= 70 ? "" :
|
EWW_BATTERY.BAT1.capacity >= 70 ? "" :
|
||||||
@ -115,13 +115,13 @@
|
|||||||
EWW_BATTERY.BAT1.capacity >= 30 ? "" :
|
EWW_BATTERY.BAT1.capacity >= 30 ? "" :
|
||||||
EWW_BATTERY.BAT1.capacity >= 20 ? "" :
|
EWW_BATTERY.BAT1.capacity >= 20 ? "" :
|
||||||
EWW_BATTERY.BAT1.capacity >= 10 ? "" : ""
|
EWW_BATTERY.BAT1.capacity >= 10 ? "" : ""
|
||||||
} "
|
}
|
||||||
:class "${
|
:class {
|
||||||
EWW_BATTERY.BAT1.capacity >= 80 ? "green" :
|
EWW_BATTERY.BAT1.capacity >= 80 ? "green" :
|
||||||
EWW_BATTERY.BAT1.capacity >= 50 ? "yellow" :
|
EWW_BATTERY.BAT1.capacity >= 50 ? "yellow" :
|
||||||
EWW_BATTERY.BAT1.capacity >= 30 ? "peach" :
|
EWW_BATTERY.BAT1.capacity >= 30 ? "peach" :
|
||||||
EWW_BATTERY.BAT1.capacity >= 10 ? "maroon" : "red"
|
EWW_BATTERY.BAT1.capacity >= 10 ? "maroon" : "red"
|
||||||
}")
|
})
|
||||||
(label :text "${EWW_BATTERY.BAT1.capacity}%" :class "yellow")))
|
(label :text "${EWW_BATTERY.BAT1.capacity}%" :class "yellow")))
|
||||||
|
|
||||||
|
|
||||||
@ -131,7 +131,7 @@
|
|||||||
(defwidget volume []
|
(defwidget volume []
|
||||||
(eventbox :tooltip volumesink
|
(eventbox :tooltip volumesink
|
||||||
:onclick `pwvucontrol &`
|
:onclick `pwvucontrol &`
|
||||||
(label :text "${volumevalue.count}%" :class "${volumevalue.color}")))
|
(label :text "${volumevalue.count}%" :class {volumevalue.color})))
|
||||||
|
|
||||||
|
|
||||||
(defpoll currentworkspace :interval "1s" `scripts/currentWorkspace.fish`)
|
(defpoll currentworkspace :interval "1s" `scripts/currentWorkspace.fish`)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user