diff --git a/flake.lock b/flake.lock index 1d717c4..8c6262b 100644 --- a/flake.lock +++ b/flake.lock @@ -7,11 +7,11 @@ ] }, "locked": { - "lastModified": 1719236180, - "narHash": "sha256-VZAfBk2Lo8hQy/NQ4XVSpTICT0ownXBUi1QvGfdlxaM=", + "lastModified": 1719401812, + "narHash": "sha256-QONBQ/arBsKZNJuSd3sMIkSYFlBoRJpvf1jGlMfcOuI=", "owner": "nix-community", "repo": "disko", - "rev": "dd4d1663ccf7fbdb32361b9afe9e71206584cd4c", + "rev": "b6a1262796b2990ec3cc60bb2ec23583f35b2f43", "type": "github" }, "original": { @@ -27,11 +27,11 @@ ] }, "locked": { - "lastModified": 1719180626, - "narHash": "sha256-vZAzm5KQpR6RGple1dzmSJw5kPivES2heCFM+ZWkt0I=", + "lastModified": 1719418488, + "narHash": "sha256-Hu75KIbGLJA8qe42rO5WkRQ+E+BuzjS42bNEZcy9zT8=", "owner": "nix-community", "repo": "home-manager", - "rev": "6b1f90a8ff92e81638ae6eb48cd62349c3e387bb", + "rev": "607f969f5dca2dc100cbc53e24ab49ac24ef8987", "type": "github" }, "original": { @@ -58,11 +58,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1719075281, - "narHash": "sha256-CyyxvOwFf12I91PBWz43iGT1kjsf5oi6ax7CrvaMyAo=", + "lastModified": 1719254875, + "narHash": "sha256-ECni+IkwXjusHsm9Sexdtq8weAq/yUyt1TWIemXt3Ko=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "a71e967ef3694799d0c418c98332f7ff4cc5f6af", + "rev": "2893f56de08021cffd9b6b6dfc70fd9ccd51eb60", "type": "github" }, "original": { @@ -105,11 +105,11 @@ "nixpkgs-stable": "nixpkgs-stable" }, "locked": { - "lastModified": 1719111739, - "narHash": "sha256-kr2QzRrplzlCP87ddayCZQS+dhGW98kw2zy7+jUXtF4=", + "lastModified": 1719268571, + "narHash": "sha256-pcUk2Fg5vPXLUEnFI97qaB8hto/IToRfqskFqsjvjb8=", "owner": "Mic92", "repo": "sops-nix", - "rev": "5e2e9421e9ed2b918be0a441c4535cfa45e04811", + "rev": "c2ea1186c0cbfa4d06d406ae50f3e4b085ddc9b3", "type": "github" }, "original": { diff --git a/hosts/common/default.nix b/hosts/common/default.nix index 92064fd..80ea8f7 100644 --- a/hosts/common/default.nix +++ b/hosts/common/default.nix @@ -38,6 +38,7 @@ supportedFilesystems = [ "btrfs" "ntfs" ]; }; + hardware.graphics.enable32Bit = true; networking.networkmanager.enable = true; i18n.defaultLocale = "en_US.UTF-8"; diff --git a/hosts/eirene/base/default.nix b/hosts/eirene/base/default.nix index 0501280..e8e8c7e 100644 --- a/hosts/eirene/base/default.nix +++ b/hosts/eirene/base/default.nix @@ -29,15 +29,12 @@ }; }; - graphics = { - enable32Bit = true; - extraPackages = with pkgs; [ - amdvlk - driversi686Linux.amdvlk - rocmPackages.clr - rocmPackages.clr.icd - ]; - }; + graphics.extraPackages = with pkgs; [ + amdvlk + driversi686Linux.amdvlk + rocmPackages.clr + rocmPackages.clr.icd + ]; }; services = { @@ -55,13 +52,10 @@ wayland.windowManager.hyprland.settings = { monitor = "eDP-1, 2560x1600@165, 0x0, 1.25"; env = [ "WLR_DRM_DEVICES,$HOME/.config/hypr/card" ]; - device = [ - { - name = "syna2ba6:00-06cb:ce44-touchpad"; - natural_scroll = "true"; - sensitivity = 0.5; - } - ]; + device = [{ + name = "syna2ba6:00-06cb:ce44-touchpad"; + sensitivity = 0.5; + }]; }; theme = { @@ -81,4 +75,9 @@ ln -sf $CARD $HOME/.config/hypr/card ''; }]; + + nixpkgs.config = { + cudaSupport = true; + rocmSupport = true; + }; } diff --git a/users/common/default.nix b/users/common/default.nix index 50b9f7a..74ccbfa 100644 --- a/users/common/default.nix +++ b/users/common/default.nix @@ -24,6 +24,7 @@ home.stateVersion = "24.05"; systemd.user.startServices = "sd-switch"; nix.settings = config.nix.settings; + nixpkgs.config = config.nixpkgs.config; }]; }; diff --git a/users/configs/btop/default.nix b/users/configs/btop/default.nix new file mode 100644 index 0000000..209172f --- /dev/null +++ b/users/configs/btop/default.nix @@ -0,0 +1,38 @@ +{ user ? throw "user argument is required", gpu ? false }: { config, lib, pkgs, ... }: + +let + hmConfig = config.home-manager.users."${user.name}"; +in +{ + home-manager.users."${user.name}" = { + programs = { + btop = { + enable = true; + settings = { + color_theme = "matugen"; + theme_background = false; + presets = ""; + vim_keys = true; + shown_boxes = "cpu mem net proc gpu0 gpu1"; + update_ms = 1000; + proc_tree = true; + cpu_single_graph = true; + disks_filter = "/ /nix /persist /cache"; + }; + }; + + matugen.settings.templates.btop = { + input_path = ./theme.theme; + output_path = "${hmConfig.xdg.configHome}/btop/themes/matugen.theme"; + }; + }; + + theme.extraConfig = "${lib.meta.getExe (pkgs.writeShellApplication { + name = "reload-btop"; + runtimeInputs = with pkgs; [ procps ]; + text = '' + pkill btop -SIGUSR2 + ''; + })} &"; + }; +} diff --git a/users/configs/btop/theme.theme b/users/configs/btop/theme.theme new file mode 100644 index 0000000..5561d71 --- /dev/null +++ b/users/configs/btop/theme.theme @@ -0,0 +1,50 @@ +theme[main_bg]="{{colors.surface.default.hex}}" +theme[main_fg]="{{colors.on_surface.default.hex}}" + +theme[title]="{{colors.on_surface.default.hex}}" +theme[hi_fg]="{{colors.primary.default.hex}}" + +theme[selected_bg]="{{colors.primary_container.default.hex}}" +theme[selected_fg]="{{colors.on_primary_container.default.hex}}" +theme[inactive_fg]="{{colors.surface_variant.default.hex}}" + +theme[graph_text]="{{colors.on_surface_variant.default.hex}}" +theme[proc_misc]="{{colors.primary.default.hex}}" + +theme[cpu_box]="{{colors.outline.default.hex}}" +theme[mem_box]="{{colors.outline.default.hex}}" +theme[net_box]="{{colors.outline.default.hex}}" +theme[proc_box]="{{colors.outline.default.hex}}" +theme[div_line]="{{colors.outline_variant.default.hex}}" + +theme[temp_start]="{{colors.primary.default.hex}}" +theme[temp_mid]="" +theme[temp_end]="{{colors.error.default.hex}}" + +theme[cpu_start]="{{colors.primary.default.hex}}" +theme[cpu_mid]="" +theme[cpu_end]="{{colors.error.default.hex}}" + +theme[used_start]="{{colors.primary.default.hex}}" +theme[used_mid]="" +theme[used_end]="{{colors.secondary.default.hex}}" + +theme[available_start]="{{colors.tertiary.default.hex}}" +theme[available_mid]="" +theme[available_end]="{{colors.secondary.default.hex}}" + +theme[cached_start]="{{colors.primary.default.hex}}" +theme[cached_mid]="" +theme[cached_end]="{{colors.secondary.default.hex}}" + +theme[free_start]="{{colors.tertiary.default.hex}}" +theme[free_mid]="" +theme[free_end]="{{colors.secondary.default.hex}}" + +theme[download_start]="{{colors.primary.default.hex}}" +theme[download_mid]="" +theme[download_end]="{{colors.secondary.default.hex}}" + +theme[upload_start]="{{colors.primary.default.hex}}" +theme[upload_mid]="" +theme[upload_end]="{{colors.tertiary.default.hex}}" diff --git a/users/configs/hyprland/default.nix b/users/configs/hyprland/default.nix index 64ad2f5..2a408de 100644 --- a/users/configs/hyprland/default.nix +++ b/users/configs/hyprland/default.nix @@ -113,14 +113,14 @@ in ''; }; - programs.zsh.loginExtra = lib.mkAfter '' - if [ -z "$WAYLAND_DISPLAY" ] && [ -n "$XDG_VTNR" ] && [ "$XDG_VTNR" -eq 1 ]; then - hyprland &> /tmp/hyprland.log - fi - ''; + programs = { + zsh.loginExtra = lib.mkAfter '' + if [ -z "$WAYLAND_DISPLAY" ] && [ -n "$XDG_VTNR" ] && [ "$XDG_VTNR" -eq 1 ]; then + hyprland &> /tmp/hyprland.log + fi + ''; - programs.matugen.settings.templates = { - hyprland = { + matugen.settings.templates.hyprland = { input_path = ./theme.conf; output_path = "${hmConfig.xdg.configHome}/hypr/theme.conf"; }; diff --git a/users/configs/kitty/default.nix b/users/configs/kitty/default.nix index 3370fa5..f043c38 100644 --- a/users/configs/kitty/default.nix +++ b/users/configs/kitty/default.nix @@ -5,16 +5,16 @@ let in { home-manager.users."${user.name}" = { - programs.kitty = { - enable = true; - extraConfig = '' - confirm_os_window_close 0 - include theme.conf - ''; - }; - - programs.matugen.settings.templates = { + programs = { kitty = { + enable = true; + extraConfig = '' + confirm_os_window_close 0 + include theme.conf + ''; + }; + + matugen.settings.templates.kitty = { input_path = ./theme.conf; output_path = "${hmConfig.xdg.configHome}/kitty/theme.conf"; }; diff --git a/users/nick/nogui.nix b/users/nick/nogui.nix index 69934f2..a755777 100644 --- a/users/nick/nogui.nix +++ b/users/nick/nogui.nix @@ -10,6 +10,7 @@ in (import ../configs/git { inherit user; }) (import ../configs/neovim { inherit user; }) (import ../configs/gpg-agent { inherit user; }) + (import ../configs/btop { inherit user; }) ]; sops.secrets.nick-password = {