From 2d6a58c9538b5ec9a3fe0190e7ff45e67b12a891 Mon Sep 17 00:00:00 2001 From: xbazzi Date: Sat, 22 Feb 2025 15:32:58 -0700 Subject: [PATCH] Something something --- home/dconf.nix | 10 +++++----- home/kitty.nix | 2 +- home/zsh.nix | 4 ++-- system/configuration.nix | 3 +++ system/default.nix | 1 + system/network.nix | 11 ++++++----- system/openrgb.nix | 33 +++++++++++++++++++++++++++++++++ system/packages.nix | 2 ++ 8 files changed, 53 insertions(+), 13 deletions(-) create mode 100644 system/openrgb.nix diff --git a/home/dconf.nix b/home/dconf.nix index d5f41fd..251960b 100644 --- a/home/dconf.nix +++ b/home/dconf.nix @@ -36,7 +36,7 @@ "org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom3" = { binding = "f"; - command = "kitty -- zsh -c 'yazi; exec zsh'"; + command = "kitty -- zsh -c 'exec yazi; exec zsh'"; name = "open-yazi"; }; @@ -51,10 +51,10 @@ command = "firefox"; name = "open-firefox"; }; - "org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom5" = { - binding = "y+e"; - command = "kitty --start-as=normal -- bash -ic 'repo'"; - name = "open-repos"; + "org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom6" = { + binding = "y"; + command = "kitty --start-as=normal -- zsh -ic 'repos'"; + name = "open-projects"; }; "org/gnome/shell" = { diff --git a/home/kitty.nix b/home/kitty.nix index 8302186..6570060 100755 --- a/home/kitty.nix +++ b/home/kitty.nix @@ -10,7 +10,7 @@ enable_audio_bell = false; mouse_hide_wait = "-1.0"; window_padding_width = 5; - background_opacity = "0.90"; + background_opacity = "0.95"; background_blur = 5; background = "#17041c"; hide_window_decorations = true; diff --git a/home/zsh.nix b/home/zsh.nix index 25d0b70..51f191d 100755 --- a/home/zsh.nix +++ b/home/zsh.nix @@ -18,8 +18,8 @@ fi rm -f -- "$tmp" } - function proj() { - lsn -ld ~/repos/* --color=never | \ + function repos() { + eza -ld ~/repos/* --color=never | \ awk '{print $7}' | \ fzf --reverse | xargs -I{} code {} -n && exit } diff --git a/system/configuration.nix b/system/configuration.nix index dde0c72..33bc559 100755 --- a/system/configuration.nix +++ b/system/configuration.nix @@ -12,6 +12,9 @@ nix.settings.experimental-features = [ "nix-command" "flakes" ]; + # OpenRGB + services.hardware.openrgb.enable = true; + # Bootloader. boot.loader.systemd-boot.enable = true; boot.loader.efi.canTouchEfiVariables = true; diff --git a/system/default.nix b/system/default.nix index a02de8b..c5b5e88 100755 --- a/system/default.nix +++ b/system/default.nix @@ -6,6 +6,7 @@ ./configuration.nix ./fonts.nix ./ssh.nix + # ./openrgb.nix # ./stylix.nix ./gnome.nix ./yazi.nix diff --git a/system/network.nix b/system/network.nix index de023db..dcc9bbd 100755 --- a/system/network.nix +++ b/system/network.nix @@ -4,9 +4,9 @@ # networking.networkmanager.enable = true; - systemd.services."NetworkManager-wait-online" = { - serviceConfig.TimeoutStartSec = "20s"; - }; + # systemd.services."NetworkManager-wait-online" = { + # serviceConfig.TimeoutStartSec = "20s"; + # }; networking = { hostName = "nixos"; @@ -16,8 +16,9 @@ address = "10.29.90.110"; prefixLength = 22; }]; + mtu = 9000; }; - nameservers = [ "10.29.90.1" "10.133.7.1" ]; + nameservers = [ "10.29.90.1" ]; search = [ "lan.xbazzi.com" ]; defaultGateway = { @@ -27,7 +28,7 @@ hosts = { "127.0.0.1" = [ "localhost" ]; - "10.29.90.110" = [ "nixos" "nixos.lan.xbazzi.com" ]; + "10.29.90.110" = [ "nixos" ]; }; }; diff --git a/system/openrgb.nix b/system/openrgb.nix new file mode 100644 index 0000000..496221c --- /dev/null +++ b/system/openrgb.nix @@ -0,0 +1,33 @@ +{ pkgs, lib, ... }: + +{ +# OpenRGB +services.hardware.openrgb.enable = true; + + # NO RGB + let + no-rgb = pkgs.writeScriptBin "no-rgb" '' + #!/bin/sh + NUM_DEVICES=$(${pkgs.openrgb}/bin/openrgb --noautoconnect --list-devices | grep -E '^[0-9]+: ' | wc -l) + + for i in $(seq 0 $(($NUM_DEVICES - 1))); do + ${pkgs.openrgb}/bin/openrgb --noautoconnect --device $i --mode static --color 000000 + done + ''; + in { + config = { + services.udev.packages = [ pkgs.openrgb ]; + boot.kernelModules = [ "i2c-dev" ]; + hardware.i2c.enable = true; + + systemd.services.no-rgb = { + description = "no-rgb"; + serviceConfig = { + ExecStart = "${no-rgb}/bin/no-rgb"; + Type = "oneshot"; + }; + wantedBy = [ "multi-user.target" ]; + }; + }; + } +} \ No newline at end of file diff --git a/system/packages.nix b/system/packages.nix index c81a8fb..411b3ec 100755 --- a/system/packages.nix +++ b/system/packages.nix @@ -36,6 +36,8 @@ variety fzf eza + linuxPackages_latest.perf + minicom ]; programs.nix-ld.enable = true;