diff --git a/modules/nixos/console.nix b/modules/nixos/console.nix index b28fe8d..5e7953f 100644 --- a/modules/nixos/console.nix +++ b/modules/nixos/console.nix @@ -2,15 +2,17 @@ config, lib, ... -}: let +}: +let inherit (config.rose-pine) sources; cfg = config.console.rose-pine; enable = cfg.enable && config.console.enable; palette = (lib.importJSON "${sources.rose-pine-palette}/palette.json").${cfg.flavor}.colors; -in { - options.console.rose-pine = lib.rp.mkRosePineOpt {name = "console";}; +in +{ + options.console.rose-pine = lib.rp.mkRosePineOpt { name = "console"; }; config.console.colors = lib.mkIf enable ( # Manually populate with colors from rose-pine/linux-tty diff --git a/modules/nixos/globals.nix b/modules/nixos/globals.nix index becb113..709312e 100644 --- a/modules/nixos/globals.nix +++ b/modules/nixos/globals.nix @@ -1,6 +1,7 @@ -{lib, ...}: { +{ lib, ... }: +{ config = { - assertions = [(lib.rp.assertMinimumVersion "24.05")]; + assertions = [ (lib.rp.assertMinimumVersion "24.05") ]; }; options.rose-pine = { @@ -18,9 +19,10 @@ description = "Global Rosé Pine accent"; }; - sources = let - defaultSources = import ../../.sources; - in + sources = + let + defaultSources = import ../../.sources; + in lib.mkOption { type = lib.types.lazyAttrsOf lib.types.raw; default = defaultSources; diff --git a/modules/nixos/grub.nix b/modules/nixos/grub.nix index afef32a..9561a66 100644 --- a/modules/nixos/grub.nix +++ b/modules/nixos/grub.nix @@ -2,13 +2,15 @@ config, lib, ... -}: let +}: +let inherit (config.rose-pine) sources; cfg = config.boot.loader.grub.rose-pine; enable = cfg.enable && config.boot.loader.grub.enable; -in { - options.boot.loader.grub.rose-pine = lib.rp.mkRosePineOpt {name = "grub";}; +in +{ + options.boot.loader.grub.rose-pine = lib.rp.mkRosePineOpt { name = "grub"; }; config.boot.loader.grub = lib.mkIf enable { theme = sources.grub; diff --git a/modules/nixos/sddm.nix b/modules/nixos/sddm.nix index fab4c10..90f6539 100644 --- a/modules/nixos/sddm.nix +++ b/modules/nixos/sddm.nix @@ -3,18 +3,21 @@ config, pkgs, ... -}: let +}: +let inherit (config.rose-pine) sources; + cfg = config.services.displayManager.sddm.rose-pine; enable = cfg.enable && config.services.displayManager.sddm.enable; -in { - options.services.displayManager.sddm.rose-pine = lib.rp.mkRosePineOpt {name = "sddm";}; +in +{ + options.services.displayManager.sddm.rose-pine = lib.rp.mkRosePineOpt { name = "sddm"; }; config = lib.mkIf enable { services.displayManager.sddm.theme = "rose-pine"; environment.systemPackages = [ - (pkgs.callPackage ./sddm-rose-pine-pkg.nix {inherit sources;}) + (pkgs.callPackage ./sddm-rose-pine-pkg.nix { inherit sources; }) ]; }; }