modules: rename nixosModules.style to nixosModules.theme

This commit is contained in:
Anthony Rodriguez 2024-10-22 13:44:47 +02:00
parent df51d1b29d
commit 2d295004d0
Signed by: nezia
GPG key ID: EE3BE97C040A86CE
11 changed files with 28 additions and 40 deletions

View file

@ -1,4 +1,8 @@
{pkgs, ...}: let
{
inputs,
pkgs,
...
}: let
betterfox = pkgs.fetchFromGitHub {
owner = "yokoffing";
repo = "betterfox";
@ -56,7 +60,6 @@ in {
profiles = {
nezia = {
settings = {
"browser.urlbar.suggest.searches" = true;
"browser.search.suggest.enabled" = true;
"ui.key.menuAccessKeyFocuses" = false;
};
@ -68,7 +71,6 @@ in {
stylus
ublock-origin
violentmonkey
idontcareaboutcookies
];
# https://git.jacekpoz.pl/poz/niksos/src/commit/a48647a1c5bc6877a1100a65f4dc169b2fc11ed7/hosts/hape/firefox.nix

View file

@ -1,6 +1,6 @@
{
inputs,
nixosConfig,
osConfig,
lib,
pkgs,
...
@ -15,7 +15,7 @@
font = "monospace:size=14";
};
colors = let
inherit (inputs.basix.schemeData.base16.${nixosConfig.style.scheme}) palette;
inherit (inputs.basix.schemeData.base16.${osConfig.theme.scheme}) palette;
in {
background = "${palette.base00}ff";
text = "${palette.base05}ff";

View file

@ -6,10 +6,10 @@
lib,
...
}: let
isDark = inputs.basix.schemeData.base16.${osConfig.style.scheme}.variant == "dark";
isDark = inputs.basix.schemeData.base16.${osConfig.theme.scheme}.variant == "dark";
in {
home.pointerCursor = {
inherit (osConfig.style.cursorTheme) name package size;
inherit (osConfig.theme.cursorTheme) name package size;
gtk.enable = true;
x11.enable = true;
};
@ -35,11 +35,11 @@ in {
gtk2.configLocation = "${config.xdg.configHome}/gtk-2.0/gtkrc";
iconTheme = {
inherit (osConfig.style.gtk.iconTheme) name package;
inherit (osConfig.theme.gtk.iconTheme) name package;
};
theme = lib.mkIf (!osConfig.services.xserver.desktopManager.gnome.enable) {
inherit (osConfig.style.gtk.theme) name package;
inherit (osConfig.theme.gtk.theme) name package;
};
};
dconf.settings = {

View file

@ -6,7 +6,7 @@
osConfig,
...
}: let
colors = inputs.basix.schemeData.base16.${osConfig.style.scheme}.palette;
colors = inputs.basix.schemeData.base16.${osConfig.theme.scheme}.palette;
in {
imports = [./binds.nix];

View file

@ -2,7 +2,7 @@
{
pkgs,
lib,
nixosConfig,
osConfig,
...
}: {
systemd.user.services.swaybg = {
@ -11,7 +11,7 @@
PartOf = ["graphical-session.target"];
};
Service = {
ExecStart = "${lib.getExe pkgs.swaybg} -i ${nixosConfig.style.wallpaper} -m fill";
ExecStart = "${lib.getExe pkgs.swaybg} -i ${osConfig.theme.wallpaper} -m fill";
Restart = "on-failure";
};
Install.WantedBy = ["graphical-session.target"];

View file

@ -1,10 +1,10 @@
{
inputs,
pkgs,
nixosConfig,
osConfig,
...
}: let
inherit (inputs.basix.schemeData.base16.${nixosConfig.style.scheme}) palette;
inherit (inputs.basix.schemeData.base16.${osConfig.theme.scheme}) palette;
in {
# requires `security.pam.services.swaylock = { };` at the system level or else
# unlock will not work.

View file

@ -1,6 +1,6 @@
{
inputs,
nixosConfig,
osConfig,
config,
lib,
...
@ -14,7 +14,7 @@
shell = "${lib.getExe config.programs.fish.package}";
};
colors = let
schemeData = inputs.basix.schemeData.base16.${nixosConfig.style.scheme};
schemeData = inputs.basix.schemeData.base16.${osConfig.theme.scheme};
in {
background = schemeData.palette.base00;
foreground = schemeData.palette.base05;

View file

@ -14,19 +14,7 @@ in {
modules = [
./vamos
self.nixosModules.style
({pkgs, ...}: {
style = let
wallpaper = pkgs.fetchurl {
url = "https://raw.githubusercontent.com/NixOS/nixos-artwork/e0cf0eb237dc5baba86661a3572b20a6183c1876/wallpapers/nix-wallpaper-nineish-catppuccin-frappe.png?raw=true";
hash = "sha256-/HAtpGwLxjNfJvX5/4YZfM8jPNStaM3gisK8+ImRmQ4=";
};
in {
gtk.enable = true;
inherit wallpaper;
};
})
self.nixosModules.theme
inputs.nixos-hardware.nixosModules.framework-13-7040-amd
];
@ -38,12 +26,6 @@ in {
modules = [
./solaire
self.nixosModules.style
{
style = {
gtk.enable = false;
wallpaper = ../wallpapers/lucy-edgerunners-wallpaper.jpg;
};
}
];
};
}

View file

@ -1,3 +1,3 @@
{
style = import ./style;
theme = import ./theme;
}

View file

@ -7,7 +7,7 @@
inherit (lib.types) string path package;
in {
imports = [./gtk.nix];
options.style = {
options.theme = {
scheme = mkOption {
description = ''
Name of the tinted-scheming color scheme to use.
@ -22,6 +22,10 @@ in {
'';
type = path;
example = lib.literalExpression "./wallpaper.png";
default = pkgs.fetchurl {
url = "https://raw.githubusercontent.com/NixOS/nixos-artwork/e0cf0eb237dc5baba86661a3572b20a6183c1876/wallpapers/nix-wallpaper-nineish-catppuccin-frappe.png?raw=true";
hash = "sha256-/HAtpGwLxjNfJvX5/4YZfM8jPNStaM3gisK8+ImRmQ4=";
};
};
cursorTheme = {

View file

@ -8,9 +8,9 @@
inherit (lib) mkOption mkEnableOption;
inherit (lib.types) package str;
cfg = config.style.gtk;
cfg = config.theme.gtk;
in {
options.style.gtk = {
options.theme.gtk = {
enable = mkEnableOption "enable GTK theming options";
theme = {
name = mkOption {
@ -57,7 +57,7 @@ in {
${toString themePath} set by the GTK module does not exist!
To suppress this message, make sure that
`config.modules.style.gtk.theme.package` contains
`config.modules.theme.gtk.theme.package` contains
the path `${cfg.theme.name}`
'';
})