From 9cdd54c6e86a19b0c36e24ea3dc96309764050fe Mon Sep 17 00:00:00 2001 From: Sweetbread Date: Sun, 13 Apr 2025 18:22:04 +0300 Subject: [PATCH] feat: add dependencies to host in home-manager --- host/Eclipse/configuration.nix | 5 ++++- host/Impreza/configuration.nix | 7 +++++-- host/Rias/configuration.nix | 5 ++++- host/Senko/configuration.nix | 7 +++++-- modules/user.nix | 5 +++-- modules/user/packages/art.nix | 4 +++- user/chest/home.nix | 3 ++- user/chest/modules/hyprland.nix | 2 +- user/chest/modules/style.nix | 8 ++++++-- user/common.nix | 6 +++++- 10 files changed, 38 insertions(+), 14 deletions(-) diff --git a/host/Eclipse/configuration.nix b/host/Eclipse/configuration.nix index bf36536..4b2757d 100644 --- a/host/Eclipse/configuration.nix +++ b/host/Eclipse/configuration.nix @@ -1,4 +1,6 @@ -{ config, pkgs, pkgs-stable, pkgs-fixed, lib, inputs, ...}: { +{ config, pkgs, pkgs-stable, pkgs-fixed, lib, inputs, ...}: let + laptop = false; +in { imports = [ ./secrets/secrets.nix ./modules/aagl.nix @@ -19,6 +21,7 @@ inherit pkgs-fixed; inherit lib; inherit inputs; + inherit laptop; name = "chest"; }) ]; diff --git a/host/Impreza/configuration.nix b/host/Impreza/configuration.nix index d3a6187..9beb715 100644 --- a/host/Impreza/configuration.nix +++ b/host/Impreza/configuration.nix @@ -1,4 +1,6 @@ -{ config, pkgs, pkgs-stable, pkgs-fixed, lib, inputs, ...}: { +{ config, pkgs, pkgs-stable, pkgs-fixed, lib, inputs, ...}: let + laptop = true; +in { imports = [ ./secrets/secrets.nix ./modules/grub.nix @@ -16,6 +18,7 @@ inherit pkgs-fixed; inherit lib; inherit inputs; + inherit laptop; name = "chest"; }) ]; @@ -23,5 +26,5 @@ nixpkgs.config.allowBroken = true; programs.gamemode.enable = true; hardware.bluetooth.enable = true; - host.laptop = true; + host.laptop = laptop; } diff --git a/host/Rias/configuration.nix b/host/Rias/configuration.nix index 692cfc4..d65c98b 100644 --- a/host/Rias/configuration.nix +++ b/host/Rias/configuration.nix @@ -1,4 +1,6 @@ -{ config, pkgs, pkgs-stable, pkgs-fixed, lib, inputs, ...}: { +{ config, pkgs, pkgs-stable, pkgs-fixed, lib, inputs, ...}: let + laptop = false; +in { imports = [ ./secrets/secrets.nix ./modules/grub.nix @@ -19,6 +21,7 @@ inherit pkgs-fixed; inherit lib; inherit inputs; + inherit laptop; name = "sweetbread"; fullname = "Sweet Bread"; }) diff --git a/host/Senko/configuration.nix b/host/Senko/configuration.nix index 6680d34..f41e63a 100644 --- a/host/Senko/configuration.nix +++ b/host/Senko/configuration.nix @@ -1,4 +1,6 @@ -{ config, pkgs, pkgs-stable, pkgs-fixed, lib, inputs, ...}: { +{ config, pkgs, pkgs-stable, pkgs-fixed, lib, inputs, ...}: let + laptop = true; +in { imports = [ ./secrets/secrets.nix ./modules/grub.nix @@ -17,13 +19,14 @@ inherit pkgs-fixed; inherit lib; inherit inputs; + inherit laptop; name = "sweetbread"; fullname = "Sweet Bread"; }) ]; hardware.bluetooth.enable = true; - host.laptop = true; + host.laptop = laptop; environment.systemPackages = [ pkgs.dbgate ]; } diff --git a/modules/user.nix b/modules/user.nix index 29a265b..3c7e6e1 100644 --- a/modules/user.nix +++ b/modules/user.nix @@ -1,4 +1,4 @@ -{ +{ config, lib, ... }: { imports = [ ./user/qt.nix ./user/sops.nix @@ -12,8 +12,9 @@ ./user/wofi.nix ./user/mako.nix ./user/ghostty.nix + ./user/packages/art.nix ./user/packages/desktop.nix ./user/packages/coding.nix ./user/packages/utils.nix - ]; + ] ; } diff --git a/modules/user/packages/art.nix b/modules/user/packages/art.nix index 06be069..66bac78 100644 --- a/modules/user/packages/art.nix +++ b/modules/user/packages/art.nix @@ -1,4 +1,6 @@ -{ pkgs-fixed, ... }: { +{ pkgs-fixed, lib, host, ... }: + +lib.mkIf (!host.laptop) { home.packages = with pkgs-fixed; [ (blender.override { cudaSupport = true; }) aseprite diff --git a/user/chest/home.nix b/user/chest/home.nix index b661873..11a0ef6 100644 --- a/user/chest/home.nix +++ b/user/chest/home.nix @@ -1,4 +1,4 @@ -{ pkgs, pkgs-fixed, ... }: { +{ pkgs, pkgs-fixed, host, ... }: { disabledModules = [ ../../modules/user/packages/coding.nix ]; home.packages = with pkgs; [ nautilus @@ -7,4 +7,5 @@ python3 pkgs-fixed.jetbrains.pycharm-community ]; + programs.hyprlock.enable = host.laptop; } diff --git a/user/chest/modules/hyprland.nix b/user/chest/modules/hyprland.nix index f59c1d6..12ec87b 100644 --- a/user/chest/modules/hyprland.nix +++ b/user/chest/modules/hyprland.nix @@ -15,7 +15,7 @@ in { settings = { monitor = ",preferred,auto,1"; - exec-once =["${lib.getExe pkgs.linux-wallpaperengine} /mnt/D/SteamLibrary/steamapps/workshop/content/431960/816353979 --assets-dir /mnt/D/SteamLibrary/steamapps/common/wallpaper_engine/assets --screen-root DP-1 --noautomute"]; + exec-once =["${lib.getExe pkgs.linux-wallpaperengine} ~/.local/share/wpe/wallpaper --assets-dir ~/.local/share/wpe/assets --screen-root DP-1 --noautomute"]; general = { gaps_in = 5; gaps_out = 5; diff --git a/user/chest/modules/style.nix b/user/chest/modules/style.nix index 4d4eb35..27d317d 100644 --- a/user/chest/modules/style.nix +++ b/user/chest/modules/style.nix @@ -1,4 +1,4 @@ -{ pkgs, config, lib, ... }: { +{ pkgs, config, lib, host, ... }: { stylix = { enable = true; targets = { @@ -21,7 +21,11 @@ dark = "Pop-Dark"; }; - cursor = { + cursor = if host.name == "Impreza" then { + name = "catppuccin-mocha-pink-cursors"; + size = 16; + package = pkgs.catppuccin-cursors.mochaPink; + } else { name = "catppuccin-mocha-peach-cursors"; size = 16; package = pkgs.catppuccin-cursors.mochaPeach; diff --git a/user/common.nix b/user/common.nix index 7feeb15..471074b 100644 --- a/user/common.nix +++ b/user/common.nix @@ -1,4 +1,4 @@ -{ pkgs, pkgs-stable, pkgs-fixed, lib, inputs, name, fullname ? name, ... }: { +{ config, pkgs, pkgs-stable, pkgs-fixed, lib, inputs, laptop, name, fullname ? name, ... }: { imports = [ inputs.home-manager.nixosModules.home-manager { home-manager = { @@ -27,6 +27,10 @@ inherit inputs; inherit pkgs-stable; inherit pkgs-fixed; + host = { + laptop = laptop; + name = config.networking.hostName; + }; }; }; }