From e2604dddd007411be63efac42dc0ffb3940667a2 Mon Sep 17 00:00:00 2001 From: noe Date: Thu, 22 May 2025 15:34:17 -0700 Subject: [PATCH] awawa --- .../features}/scarlett-air.nix | 27 ++++++++++++------- home-manager/noe/hosts/aerial.nix | 1 + nixos/features/fonts.nix | 1 + nixos/features/steam.nix | 5 ++++ nixos/hosts/aerial/default.nix | 2 -- nixos/hosts/static-sites/default.nix | 4 +++ pkgs/default.nix | 1 + pkgs/kelmscott-mono/default.nix | 19 +++++++++++++ 8 files changed, 48 insertions(+), 12 deletions(-) rename {nixos/hosts/aerial => home-manager/features}/scarlett-air.nix (60%) create mode 100644 pkgs/kelmscott-mono/default.nix diff --git a/nixos/hosts/aerial/scarlett-air.nix b/home-manager/features/scarlett-air.nix similarity index 60% rename from nixos/hosts/aerial/scarlett-air.nix rename to home-manager/features/scarlett-air.nix index d5135d0..0b243af 100644 --- a/nixos/hosts/aerial/scarlett-air.nix +++ b/home-manager/features/scarlett-air.nix @@ -4,6 +4,7 @@ #!${pkgs.stdenv.shell} which=0 controlName="" + newValue=$${1:-2} find_control() { for i in /dev/snd/controlC*; do @@ -12,6 +13,8 @@ if [[ -z $r ]]; then ((which++)) continue + else + break fi echo "found: $r" @@ -28,17 +31,21 @@ continue fi - ${amixer} cset -c $which "$controlName" 2 && exit 0 + ${amixer} cset -c $which "$controlName" "$newValue" && exit 0 done ''; in { - systemd.user.services.scarlett-air = { - enable = true; - wantedBy = [ "graphical-session.target" ]; - description = "Enables yellow Air on the DAC"; - serviceConfig = { - Type = "oneshot"; - ExecStart = "${script}/bin/scarlett-air"; - }; - }; + home.packages = [ + script + ]; + + # systemd.user.services.scarlett-air = { + # enable = true; + # wantedBy = [ "graphical-session.target" ]; + # description = "Enables yellow Air on the DAC"; + # serviceConfig = { + # Type = "oneshot"; + # ExecStart = "${script}/bin/scarlett-air"; + # }; + # }; } diff --git a/home-manager/noe/hosts/aerial.nix b/home-manager/noe/hosts/aerial.nix index c586de9..f87a0f8 100644 --- a/home-manager/noe/hosts/aerial.nix +++ b/home-manager/noe/hosts/aerial.nix @@ -7,6 +7,7 @@ ../../features/vesktop ../../features/retroarch.nix ../../features/wallpaper.nix + ../../features/scarlett-air.nix ]; home.packages = with pkgs; let diff --git a/nixos/features/fonts.nix b/nixos/features/fonts.nix index 58383b8..78177cd 100644 --- a/nixos/features/fonts.nix +++ b/nixos/features/fonts.nix @@ -6,6 +6,7 @@ nerd-fonts.fira-code nerd-fonts.fira-code noto-fonts-cjk-sans + local-pkgs.kelmscott-mono ]; fontDir.enable = true; diff --git a/nixos/features/steam.nix b/nixos/features/steam.nix index 26748d9..7eca645 100644 --- a/nixos/features/steam.nix +++ b/nixos/features/steam.nix @@ -7,6 +7,7 @@ keyutils gamemode mangohud + steamtinkerlaunch ]; extraCompatPackages = with pkgs; [ proton-ge-bin @@ -14,4 +15,8 @@ remotePlay.openFirewall = true; protontricks.enable = true; }; + + environment.systemPackages = [ + pkgs.steamtinkerlaunch + ]; } diff --git a/nixos/hosts/aerial/default.nix b/nixos/hosts/aerial/default.nix index 693d8f2..c1b833e 100644 --- a/nixos/hosts/aerial/default.nix +++ b/nixos/hosts/aerial/default.nix @@ -17,8 +17,6 @@ ../../features/tailscale.nix ../../features/telemetry ../../features/wine.nix - - ./scarlett-air.nix ]; home-manager.users.noe = import ../../../home-manager/noe/hosts/aerial.nix; diff --git a/nixos/hosts/static-sites/default.nix b/nixos/hosts/static-sites/default.nix index aa2e44c..2603c8c 100644 --- a/nixos/hosts/static-sites/default.nix +++ b/nixos/hosts/static-sites/default.nix @@ -67,6 +67,10 @@ in rec { proxy_set_header user-agent ""; proxy_method GET; + # no dot, assume a dir path + rewrite (/[^.]+)[^/]$ $1/ redirect; + + # pronouns/ => pronouns/index.html; rewrite (.*)/$ $1/index.html; ''; }; diff --git a/pkgs/default.nix b/pkgs/default.nix index 041c82a..d073c57 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -4,5 +4,6 @@ beyond-all-reason = import ./beyond-all-reason.nix { inherit pkgs; }; mspaint = import ./mspaint { inherit pkgs; }; wallpaper = import ./wallpaper { inherit pkgs; }; + kelmscott-mono = import ./kelmscott-mono { inherit pkgs; }; } \ No newline at end of file diff --git a/pkgs/kelmscott-mono/default.nix b/pkgs/kelmscott-mono/default.nix new file mode 100644 index 0000000..2f8f4b3 --- /dev/null +++ b/pkgs/kelmscott-mono/default.nix @@ -0,0 +1,19 @@ +{ pkgs, ... }: pkgs.stdenvNoCC.mkDerivation (finalAttrs: { + pname = "kelmscott-mono"; + version = "1.0"; + + src = pkgs.fetchFromGitHub { + owner = "seeddisperser"; + repo = "kelmscott-mono"; + rev = "54fa2edd797ba381678c420a1cbc6e38d2c1c5d5"; + hash = "sha256-xyydL/T6z9DnmIb9paSnVK/JjVTpxSM45V9jj2GSU78="; + }; + + installPhase = '' + runHook preInstall + + install -Dm644 *.otf -t $out/share/fonts/opentype + + runHook postInstall + ''; +})