From a172869a4a830f1d010bf1277828ba0f4c6a3292 Mon Sep 17 00:00:00 2001 From: lucy Date: Mon, 31 Aug 2026 17:54:31 +0200 Subject: [PATCH] add quickshell --- flake.nix | 7 +++++- modules/home.nix | 19 +++++++++++++++ modules/hosts/nerv/configuration.nix | 12 +++++++++- modules/programs/foot.nix | 4 ++++ modules/programs/quickshell.nix | 36 ++++++++++++++++++++++++++++ theme.nix | 6 ++--- 6 files changed, 79 insertions(+), 5 deletions(-) create mode 100644 modules/programs/quickshell.nix diff --git a/flake.nix b/flake.nix index 0b42623..0d87c5d 100644 --- a/flake.nix +++ b/flake.nix @@ -29,7 +29,11 @@ specialArgs = { inherit inputs; }; modules = [ ./theme.nix - { config.theming.theme = "catppuccin-mocha"; } + ({ pkgs, ... }: { + config.theming.theme = "catppuccin-mocha"; + config.theming.font = "Iosevka"; + config.theming.fontPackage = pkgs.iosevka; + }) base16.nixosModule ({ config, ... }: { scheme = "${config.theming.theme}"; }) ./modules/hosts/nerv/configuration.nix @@ -43,6 +47,7 @@ ./modules/programs/emacs.nix ./modules/programs/niri.nix ./modules/programs/foot.nix + ./modules/programs/quickshell.nix ]; } ]; diff --git a/modules/home.nix b/modules/home.nix index 9093a86..c770b05 100644 --- a/modules/home.nix +++ b/modules/home.nix @@ -13,11 +13,29 @@ in nixfmt clang kdePackages.qtdeclarative + fuzzel ]; home.stateVersion = "26.05"; + home.pointerCursor = { + enable = true; + name = "macOS"; + package = pkgs.apple-cursor; + size = 24; + }; gtk = { enable = true; colorScheme = "dark"; + iconTheme = { + name = "Papirus-Dark"; + package = pkgs.papirus-icon-theme; + }; + font = { + name = config.theming.font; + package = config.theming.fontPackage; + size = 12; + }; + cursorTheme.name = "macOS"; + cursorTheme.size = 24; gtk3.extraCss = '' @define-color theme_bg_color ${c.base00}; @define-color theme_fg_color ${c.base05}; @@ -58,5 +76,6 @@ in @define-color success_color ${c.base0B}; ''; }; + dconf.settings."org/gnome/desktop/interface".color-scheme = "prefer-dark"; }; } diff --git a/modules/hosts/nerv/configuration.nix b/modules/hosts/nerv/configuration.nix index e7c84ea..da7f513 100644 --- a/modules/hosts/nerv/configuration.nix +++ b/modules/hosts/nerv/configuration.nix @@ -20,7 +20,10 @@ networking.networkmanager.enable = true; # enable flakes - nix.settings.experimental-features = [ "nix-command" "flakes" ]; + nix.settings.experimental-features = [ + "nix-command" + "flakes" + ]; # use proprietary nvidia drivers hardware.graphics.enable = true; @@ -39,6 +42,10 @@ i18n.defaultLocale = "en_US.UTF-8"; services.desktopManager.gnome.enable = true; services.displayManager.gdm.enable = true; + programs.niri = { + enable = true; + + }; services.xserver.xkb.layout = "us"; services.pipewire = { enable = true; @@ -62,6 +69,9 @@ git clang ]; + fonts.packages = [ + config.theming.fontPackage + ]; system.stateVersion = "26.05"; # Did you read the comment? } diff --git a/modules/programs/foot.nix b/modules/programs/foot.nix index 18acca0..cef2d41 100644 --- a/modules/programs/foot.nix +++ b/modules/programs/foot.nix @@ -11,6 +11,10 @@ in home-manager.users.lucy.programs.foot = { enable = true; settings = { + main = { + font = "${config.theming.font}:size=12"; + pad = "10x10"; + }; colors-dark = { background = c.base00; diff --git a/modules/programs/quickshell.nix b/modules/programs/quickshell.nix new file mode 100644 index 0000000..b601367 --- /dev/null +++ b/modules/programs/quickshell.nix @@ -0,0 +1,36 @@ +{ pkgs, config, ... }: +let + c = config.scheme.withHashtag; +in +{ + + home-manager.users.lucy = { + programs.quickshell.enable = true; + programs.quickshell.systemd.enable = true; + xdg.configFile."quickshell/Colors.js" = { + enable = true; + text = '' + const colors = { + base00: "${c.base00}", + base01: "${c.base01}", + base02: "${c.base02}", + base03: "${c.base03}", + base04: "${c.base04}", + base05: "${c.base05}", + base06: "${c.base06}", + base07: "${c.base07}", + base08: "${c.base08}", + base09: "${c.base09}", + base0A: "${c.base0A}", + base0B: "${c.base0B}", + base0C: "${c.base0C}", + base0D: "${c.base0D}", + base0E: "${c.base0E}", + base0F: "${c.base0F}", + } + ''; + force = true; + }; + + }; +} diff --git a/theme.nix b/theme.nix index e4d0841..9d01887 100644 --- a/theme.nix +++ b/theme.nix @@ -1,12 +1,12 @@ -{ lib, inputs}: { +{ lib, inputs, ...}: { options.theming.theme = lib.mkOption { type = lib.types.str; - apply = name: "${inputs.tt-schemes}/base16/${name}"; + apply = name: "${inputs.tt-schemes}/base16/${name}.yaml"; }; options.theming.font = lib.mkOption { type = lib.types.str; }; options.theming.fontPackage = lib.mkOption { - type = lib.types.pkgs; + type = lib.types.package; }; }