diff --git a/etcnixos/flake.lock b/etcnixos/flake.lock index 4359537..756bf62 100644 --- a/etcnixos/flake.lock +++ b/etcnixos/flake.lock @@ -294,11 +294,11 @@ }, "nixos-hardware": { "locked": { - "lastModified": 1738638143, - "narHash": "sha256-ZYMe4c4OCtIUBn5hx15PEGr0+B1cNEpl2dsaLxwY2W0=", + "lastModified": 1738815599, + "narHash": "sha256-gpDGrlNANp8+Ag7oAHiXtUIJ1kWHqTN/6G686PpkNl0=", "owner": "NixOS", "repo": "nixos-hardware", - "rev": "9bdd53f5908453e4d03f395eb1615c3e9a351f70", + "rev": "d1f201fc627098d764ed00f736864ce673f5975e", "type": "github" }, "original": { diff --git a/etcnixos/no-rgb.nix b/etcnixos/no-rgb.nix index e3368f2..74f627a 100644 --- a/etcnixos/no-rgb.nix +++ b/etcnixos/no-rgb.nix @@ -2,21 +2,32 @@ { systemd.services.no-rgb = let - no-rgb = pkgs.writeScriptBin "no-rgb" '' - #!/bin/sh - set -e + no-rgb = ( + pkgs.writeShellApplication { + 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 - ${pkgs.openrgb}/bin/openrgb --noautoconnect --device $i --mode direct --color 000000 - done - ''; + NUM_DEVICES=$(openrgb --noautoconnect --list-devices | grep -cE '^[0-9]+: ') + + for i in $(seq 0 $((NUM_DEVICES - 1))); do + openrgb --noautoconnect --device "$i" --mode direct --color 000000 + done + ''; + } + ); in { description = "disable rgb"; serviceConfig = { - ExecStart = "${no-rgb}/bin/no-rgb"; + ExecStart = "${no-rgb}/bin/${no-rgb.name}"; Type = "oneshot"; }; wantedBy = [ "multi-user.target" ]; @@ -29,5 +40,4 @@ environment.systemPackages = with pkgs; [ openrgb-with-all-plugins ]; - } diff --git a/etcnixos/system-mreow.nix b/etcnixos/system-mreow.nix index 7464795..49d1077 100644 --- a/etcnixos/system-mreow.nix +++ b/etcnixos/system-mreow.nix @@ -86,8 +86,8 @@ enable = true; capSysNice = true; }; + programs.steam = { - enable = true; gamescopeSession.enable = true; }; @@ -106,8 +106,8 @@ TTYVTDisallocate = true; }; - #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` + # 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` security.pam.services.swaylock = { }; system.activationScripts = { @@ -116,17 +116,11 @@ #!/bin/sh rm -fr ${config.boot.lanzaboote.pkiBundle} || true 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 # https://github.com/NixOS/nixos-hardware/issues/1330 - hardware.framework.enableKmod = false; } diff --git a/home-manager/progs/eww/config/statusbar.yuck b/home-manager/progs/eww/config/statusbar.yuck index 82bea8a..97ce264 100644 --- a/home-manager/progs/eww/config/statusbar.yuck +++ b/home-manager/progs/eww/config/statusbar.yuck @@ -39,18 +39,18 @@ (defwidget window-title [] (label - :text "${windowtitle == "" ? "" : "(${windowtitle})"}")) + :text {windowtitle == "" ? "" : "(${windowtitle})"})) (defwidget brightness-ctl [] (box :visible brightnessctl-open (cmd-slider :symbol "󰃠" :value brightness :command `brightnessctl set {}%` - :max 101 :color "${ + :max 101 :color { brightness >= 80 ? "green" : brightness >= 50 ? "yellow" : brightness >= 30 ? "peach" : brightness >= 10 ? "maroon" : "red" - }"))) + }))) (defpoll brightness :interval "1s" :run-while brightnessctl-open `brightnessctl -m | awk -F, '{print $4+0}'`) @@ -105,7 +105,7 @@ (box :space-evenly false :tooltip powerstats (label - :text "${EWW_BATTERY.BAT1.status == "Charging" ? "󰂄" : + :text {EWW_BATTERY.BAT1.status == "Charging" ? "󰂄" : EWW_BATTERY.BAT1.capacity >= 90 ? "󰁹" : EWW_BATTERY.BAT1.capacity >= 80 ? "󰂂" : EWW_BATTERY.BAT1.capacity >= 70 ? "󰂁" : @@ -115,13 +115,13 @@ EWW_BATTERY.BAT1.capacity >= 30 ? "󰁽" : EWW_BATTERY.BAT1.capacity >= 20 ? "󰁼" : EWW_BATTERY.BAT1.capacity >= 10 ? "󰁻" : "󰁺" - } " - :class "${ + } + :class { EWW_BATTERY.BAT1.capacity >= 80 ? "green" : EWW_BATTERY.BAT1.capacity >= 50 ? "yellow" : EWW_BATTERY.BAT1.capacity >= 30 ? "peach" : EWW_BATTERY.BAT1.capacity >= 10 ? "maroon" : "red" - }") + }) (label :text "${EWW_BATTERY.BAT1.capacity}%" :class "yellow"))) @@ -131,7 +131,7 @@ (defwidget volume [] (eventbox :tooltip volumesink :onclick `pwvucontrol &` - (label :text "${volumevalue.count}%" :class "${volumevalue.color}"))) + (label :text "${volumevalue.count}%" :class {volumevalue.color}))) (defpoll currentworkspace :interval "1s" `scripts/currentWorkspace.fish`)