@ -10,13 +10,16 @@
|
|||||||
./programs.nix
|
./programs.nix
|
||||||
./services.nix
|
./services.nix
|
||||||
./sops.nix
|
./sops.nix
|
||||||
./stylix.nix
|
|
||||||
./users.nix
|
./users.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
desktop.niri.enable = true;
|
desktop.niri.enable = true;
|
||||||
environment.memoryAllocator.provider = "mimalloc";
|
environment.memoryAllocator.provider = "mimalloc";
|
||||||
locale.ukrainian.enable = true;
|
locale.ukrainian.enable = true;
|
||||||
|
module.stylix = {
|
||||||
|
enable = true;
|
||||||
|
theme = "nord";
|
||||||
|
};
|
||||||
opentabletdriver.enable = false;
|
opentabletdriver.enable = false;
|
||||||
qmk-vial.enable = true;
|
qmk-vial.enable = true;
|
||||||
security.basic.enable = true;
|
security.basic.enable = true;
|
||||||
|
@ -1,50 +0,0 @@
|
|||||||
{
|
|
||||||
pkgs,
|
|
||||||
inputs,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
imports = with inputs; [
|
|
||||||
stylix.nixosModules.stylix
|
|
||||||
];
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
nerd-fonts.iosevka
|
|
||||||
];
|
|
||||||
stylix = {
|
|
||||||
enable = true;
|
|
||||||
base16Scheme = "${pkgs.base16-schemes}/share/themes/nord-light.yaml";
|
|
||||||
polarity = "light";
|
|
||||||
cursor = {
|
|
||||||
package = pkgs.nordzy-cursor-theme;
|
|
||||||
name = "Nordzy-cursors-white";
|
|
||||||
size = 32;
|
|
||||||
};
|
|
||||||
image = builtins.fetchurl {
|
|
||||||
url = "https://w.wallhaven.cc/full/l8/wallhaven-l8l9gq.png";
|
|
||||||
name = "wallhaven-l8l9gq.png";
|
|
||||||
sha256 = "0ypr44sg0fn55m1b52dgr1nnscpi2p6rfkjsm7vvrdqw7bafbx2z";
|
|
||||||
};
|
|
||||||
opacity.terminal = 0.9;
|
|
||||||
fonts = {
|
|
||||||
sizes = {
|
|
||||||
applications = 13;
|
|
||||||
desktop = 14;
|
|
||||||
popups = 13;
|
|
||||||
terminal = 15;
|
|
||||||
};
|
|
||||||
serif = {
|
|
||||||
package = pkgs.nerd-fonts.iosevka;
|
|
||||||
name = "Iosevka Nerd Font Propo";
|
|
||||||
};
|
|
||||||
sansSerif = config.stylix.fonts.serif;
|
|
||||||
monospace = {
|
|
||||||
package = pkgs.nerd-fonts.iosevka-term;
|
|
||||||
name = "IosevkaTerm Nerd Font Mono";
|
|
||||||
};
|
|
||||||
emoji = {
|
|
||||||
package = pkgs.noto-fonts-emoji;
|
|
||||||
name = "Noto Color Emoji";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
@ -1,50 +0,0 @@
|
|||||||
{
|
|
||||||
pkgs,
|
|
||||||
inputs,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
imports = with inputs; [
|
|
||||||
stylix.nixosModules.stylix
|
|
||||||
];
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
nerd-fonts.iosevka
|
|
||||||
];
|
|
||||||
stylix = {
|
|
||||||
enable = true;
|
|
||||||
base16Scheme = "${pkgs.base16-schemes}/share/themes/nord.yaml";
|
|
||||||
polarity = "dark";
|
|
||||||
cursor = {
|
|
||||||
package = pkgs.nordzy-cursor-theme;
|
|
||||||
name = "Nordzy-cursors";
|
|
||||||
size = 32;
|
|
||||||
};
|
|
||||||
image = builtins.fetchurl {
|
|
||||||
url = "https://w.wallhaven.cc/full/l8/wallhaven-l8l9gq.png";
|
|
||||||
name = "wallhaven-l8l9gq.png";
|
|
||||||
sha256 = "0ypr44sg0fn55m1b52dgr1nnscpi2p6rfkjsm7vvrdqw7bafbx2z";
|
|
||||||
};
|
|
||||||
opacity.terminal = 0.9;
|
|
||||||
fonts = {
|
|
||||||
sizes = {
|
|
||||||
applications = 13;
|
|
||||||
desktop = 14;
|
|
||||||
popups = 13;
|
|
||||||
terminal = 15;
|
|
||||||
};
|
|
||||||
serif = {
|
|
||||||
package = pkgs.nerd-fonts.iosevka;
|
|
||||||
name = "Iosevka Nerd Font Propo";
|
|
||||||
};
|
|
||||||
sansSerif = config.stylix.fonts.serif;
|
|
||||||
monospace = {
|
|
||||||
package = pkgs.nerd-fonts.iosevka-term;
|
|
||||||
name = "IosevkaTerm Nerd Font Mono";
|
|
||||||
};
|
|
||||||
emoji = {
|
|
||||||
package = pkgs.noto-fonts-emoji;
|
|
||||||
name = "Noto Color Emoji";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
@ -19,6 +19,11 @@
|
|||||||
|
|
||||||
locale.ukrainian.enable = true;
|
locale.ukrainian.enable = true;
|
||||||
|
|
||||||
|
module.stylix = {
|
||||||
|
enable = true;
|
||||||
|
theme = "nord";
|
||||||
|
};
|
||||||
|
|
||||||
opentabletdriver.enable = false;
|
opentabletdriver.enable = false;
|
||||||
|
|
||||||
qmk-vial.enable = true;
|
qmk-vial.enable = true;
|
||||||
|
@ -1,50 +0,0 @@
|
|||||||
{
|
|
||||||
pkgs,
|
|
||||||
inputs,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
imports = with inputs; [
|
|
||||||
stylix.nixosModules.stylix
|
|
||||||
];
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
nerd-fonts.iosevka
|
|
||||||
];
|
|
||||||
stylix = {
|
|
||||||
enable = true;
|
|
||||||
base16Scheme = "${pkgs.base16-schemes}/share/themes/nord-light.yaml";
|
|
||||||
polarity = "light";
|
|
||||||
cursor = {
|
|
||||||
package = pkgs.nordzy-cursor-theme;
|
|
||||||
name = "Nordzy-cursors-white";
|
|
||||||
size = 32;
|
|
||||||
};
|
|
||||||
image = builtins.fetchurl {
|
|
||||||
url = "https://w.wallhaven.cc/full/l8/wallhaven-l8l9gq.png";
|
|
||||||
name = "wallhaven-l8l9gq.png";
|
|
||||||
sha256 = "0ypr44sg0fn55m1b52dgr1nnscpi2p6rfkjsm7vvrdqw7bafbx2z";
|
|
||||||
};
|
|
||||||
opacity.terminal = 0.9;
|
|
||||||
fonts = {
|
|
||||||
sizes = {
|
|
||||||
applications = 13;
|
|
||||||
desktop = 14;
|
|
||||||
popups = 13;
|
|
||||||
terminal = 15;
|
|
||||||
};
|
|
||||||
serif = {
|
|
||||||
package = pkgs.nerd-fonts.iosevka;
|
|
||||||
name = "Iosevka Nerd Font Propo";
|
|
||||||
};
|
|
||||||
sansSerif = config.stylix.fonts.serif;
|
|
||||||
monospace = {
|
|
||||||
package = pkgs.nerd-fonts.iosevka-term;
|
|
||||||
name = "IosevkaTerm Nerd Font Mono";
|
|
||||||
};
|
|
||||||
emoji = {
|
|
||||||
package = pkgs.noto-fonts-emoji;
|
|
||||||
name = "Noto Color Emoji";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
@ -1,50 +0,0 @@
|
|||||||
{
|
|
||||||
pkgs,
|
|
||||||
inputs,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
imports = with inputs; [
|
|
||||||
stylix.nixosModules.stylix
|
|
||||||
];
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
nerd-fonts.iosevka
|
|
||||||
];
|
|
||||||
stylix = {
|
|
||||||
enable = true;
|
|
||||||
base16Scheme = "${pkgs.base16-schemes}/share/themes/nord.yaml";
|
|
||||||
polarity = "dark";
|
|
||||||
cursor = {
|
|
||||||
package = pkgs.nordzy-cursor-theme;
|
|
||||||
name = "Nordzy-cursors";
|
|
||||||
size = 32;
|
|
||||||
};
|
|
||||||
image = builtins.fetchurl {
|
|
||||||
url = "https://w.wallhaven.cc/full/l8/wallhaven-l8l9gq.png";
|
|
||||||
name = "wallhaven-l8l9gq.png";
|
|
||||||
sha256 = "0ypr44sg0fn55m1b52dgr1nnscpi2p6rfkjsm7vvrdqw7bafbx2z";
|
|
||||||
};
|
|
||||||
opacity.terminal = 0.9;
|
|
||||||
fonts = {
|
|
||||||
sizes = {
|
|
||||||
applications = 13;
|
|
||||||
desktop = 14;
|
|
||||||
popups = 13;
|
|
||||||
terminal = 15;
|
|
||||||
};
|
|
||||||
serif = {
|
|
||||||
package = pkgs.nerd-fonts.iosevka;
|
|
||||||
name = "Iosevka Nerd Font Propo";
|
|
||||||
};
|
|
||||||
sansSerif = config.stylix.fonts.serif;
|
|
||||||
monospace = {
|
|
||||||
package = pkgs.nerd-fonts.iosevka-term;
|
|
||||||
name = "IosevkaTerm Nerd Font Mono";
|
|
||||||
};
|
|
||||||
emoji = {
|
|
||||||
package = pkgs.noto-fonts-emoji;
|
|
||||||
name = "Noto Color Emoji";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
@ -19,6 +19,11 @@
|
|||||||
|
|
||||||
locale.ukrainian.enable = true;
|
locale.ukrainian.enable = true;
|
||||||
|
|
||||||
|
module.stylix = {
|
||||||
|
enable = true;
|
||||||
|
theme = "nord";
|
||||||
|
};
|
||||||
|
|
||||||
opentabletdriver.enable = false;
|
opentabletdriver.enable = false;
|
||||||
|
|
||||||
qmk-vial.enable = true;
|
qmk-vial.enable = true;
|
||||||
|
@ -1,50 +0,0 @@
|
|||||||
{
|
|
||||||
pkgs,
|
|
||||||
inputs,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
imports = with inputs; [
|
|
||||||
stylix.nixosModules.stylix
|
|
||||||
];
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
nerd-fonts.iosevka
|
|
||||||
];
|
|
||||||
stylix = {
|
|
||||||
enable = true;
|
|
||||||
base16Scheme = "${pkgs.base16-schemes}/share/themes/nord-light.yaml";
|
|
||||||
polarity = "light";
|
|
||||||
cursor = {
|
|
||||||
package = pkgs.nordzy-cursor-theme;
|
|
||||||
name = "Nordzy-cursors-white";
|
|
||||||
size = 32;
|
|
||||||
};
|
|
||||||
image = builtins.fetchurl {
|
|
||||||
url = "https://w.wallhaven.cc/full/l8/wallhaven-l8l9gq.png";
|
|
||||||
name = "wallhaven-l8l9gq.png";
|
|
||||||
sha256 = "0ypr44sg0fn55m1b52dgr1nnscpi2p6rfkjsm7vvrdqw7bafbx2z";
|
|
||||||
};
|
|
||||||
opacity.terminal = 0.9;
|
|
||||||
fonts = {
|
|
||||||
sizes = {
|
|
||||||
applications = 13;
|
|
||||||
desktop = 14;
|
|
||||||
popups = 13;
|
|
||||||
terminal = 15;
|
|
||||||
};
|
|
||||||
serif = {
|
|
||||||
package = pkgs.nerd-fonts.iosevka;
|
|
||||||
name = "Iosevka Nerd Font Propo";
|
|
||||||
};
|
|
||||||
sansSerif = config.stylix.fonts.serif;
|
|
||||||
monospace = {
|
|
||||||
package = pkgs.nerd-fonts.iosevka-term;
|
|
||||||
name = "IosevkaTerm Nerd Font Mono";
|
|
||||||
};
|
|
||||||
emoji = {
|
|
||||||
package = pkgs.noto-fonts-emoji;
|
|
||||||
name = "Noto Color Emoji";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
@ -1,50 +0,0 @@
|
|||||||
{
|
|
||||||
pkgs,
|
|
||||||
inputs,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
imports = with inputs; [
|
|
||||||
stylix.nixosModules.stylix
|
|
||||||
];
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
nerd-fonts.iosevka
|
|
||||||
];
|
|
||||||
stylix = {
|
|
||||||
enable = true;
|
|
||||||
base16Scheme = "${pkgs.base16-schemes}/share/themes/nord.yaml";
|
|
||||||
polarity = "dark";
|
|
||||||
cursor = {
|
|
||||||
package = pkgs.nordzy-cursor-theme;
|
|
||||||
name = "Nordzy-cursors";
|
|
||||||
size = 32;
|
|
||||||
};
|
|
||||||
image = builtins.fetchurl {
|
|
||||||
url = "https://w.wallhaven.cc/full/l8/wallhaven-l8l9gq.png";
|
|
||||||
name = "wallhaven-l8l9gq.png";
|
|
||||||
sha256 = "0ypr44sg0fn55m1b52dgr1nnscpi2p6rfkjsm7vvrdqw7bafbx2z";
|
|
||||||
};
|
|
||||||
opacity.terminal = 0.9;
|
|
||||||
fonts = {
|
|
||||||
sizes = {
|
|
||||||
applications = 13;
|
|
||||||
desktop = 14;
|
|
||||||
popups = 13;
|
|
||||||
terminal = 15;
|
|
||||||
};
|
|
||||||
serif = {
|
|
||||||
package = pkgs.nerd-fonts.iosevka;
|
|
||||||
name = "Iosevka Nerd Font Propo";
|
|
||||||
};
|
|
||||||
sansSerif = config.stylix.fonts.serif;
|
|
||||||
monospace = {
|
|
||||||
package = pkgs.nerd-fonts.iosevka-term;
|
|
||||||
name = "IosevkaTerm Nerd Font Mono";
|
|
||||||
};
|
|
||||||
emoji = {
|
|
||||||
package = pkgs.noto-fonts-emoji;
|
|
||||||
name = "Noto Color Emoji";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
@ -7,7 +7,7 @@
|
|||||||
}: let
|
}: let
|
||||||
inherit (lib) mkIf mkEnableOption mkDefault mkForce getExe;
|
inherit (lib) mkIf mkEnableOption mkDefault mkForce getExe;
|
||||||
inherit (osConfig.networking) hostId;
|
inherit (osConfig.networking) hostId;
|
||||||
inherit (config.stylix) colors;
|
inherit (config.lib.stylix) colors;
|
||||||
cfg = config.desktop.niri;
|
cfg = config.desktop.niri;
|
||||||
cursorSize = config.stylix.cursor.size;
|
cursorSize = config.stylix.cursor.size;
|
||||||
cursorName = config.stylix.cursor.name;
|
cursorName = config.stylix.cursor.name;
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
|
./locale.nix
|
||||||
./opentabletdriver.nix
|
./opentabletdriver.nix
|
||||||
./qmk-vial.nix
|
./qmk-vial.nix
|
||||||
./locale.nix
|
./stylix.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
139
modules/nixos/system/misc/stylix.nix
Normal file
139
modules/nixos/system/misc/stylix.nix
Normal file
@ -0,0 +1,139 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
inputs,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
inherit (lib) mkEnableOption mkOption mkIf;
|
||||||
|
inherit (lib) optionalAttrs;
|
||||||
|
inherit (lib.types) bool str;
|
||||||
|
inherit (config.system) stateVersion;
|
||||||
|
|
||||||
|
cfg = config.module.stylix;
|
||||||
|
|
||||||
|
cursorSize = 32;
|
||||||
|
|
||||||
|
iosevkaPackage =
|
||||||
|
if stateVersion == "24.11"
|
||||||
|
then pkgs.nerdfonts.override {fonts = ["Iosevka"];}
|
||||||
|
else pkgs.nerd-fonts.iosevka;
|
||||||
|
iosevkaTermPackage =
|
||||||
|
if stateVersion == "24.11"
|
||||||
|
then pkgs.nerdfonts.override {fonts = ["Iosevka Term"];}
|
||||||
|
else pkgs.nerd-fonts.iosevka-term;
|
||||||
|
|
||||||
|
themes = {
|
||||||
|
nord = {
|
||||||
|
polarity = "dark";
|
||||||
|
scheme = "${pkgs.base16-schemes}/share/themes/nord.yaml";
|
||||||
|
wallpaper = builtins.fetchurl {
|
||||||
|
url = "https://w.wallhaven.cc/full/l8/wallhaven-l8l9gq.png";
|
||||||
|
name = "wallhaven-l8l9gq.png";
|
||||||
|
sha256 = "0ypr44sg0fn55m1b52dgr1nnscpi2p6rfkjsm7vvrdqw7bafbx2z";
|
||||||
|
};
|
||||||
|
|
||||||
|
serif = {
|
||||||
|
package = iosevkaPackage;
|
||||||
|
name = "Iosevka Nerd Font Propo";
|
||||||
|
};
|
||||||
|
|
||||||
|
monospace = {
|
||||||
|
package = iosevkaTermPackage;
|
||||||
|
name = "IosevkaTerm Nerd Font Mono";
|
||||||
|
};
|
||||||
|
|
||||||
|
cursor = {
|
||||||
|
package = pkgs.nordzy-cursor-theme;
|
||||||
|
name = "Nordzy-cursors";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
nord-light = {
|
||||||
|
polarity = "light";
|
||||||
|
scheme = "${pkgs.base16-schemes}/share/themes/nord-light.yaml";
|
||||||
|
wallpaper = builtins.fetchurl {
|
||||||
|
url = "https://w.wallhaven.cc/full/l8/wallhaven-l8l9gq.png";
|
||||||
|
name = "wallhaven-l8l9gq.png";
|
||||||
|
sha256 = "0ypr44sg0fn55m1b52dgr1nnscpi2p6rfkjsm7vvrdqw7bafbx2z";
|
||||||
|
};
|
||||||
|
|
||||||
|
serif = {
|
||||||
|
package = iosevkaPackage;
|
||||||
|
name = "Iosevka Nerd Font Propo";
|
||||||
|
};
|
||||||
|
|
||||||
|
monospace = {
|
||||||
|
package = iosevkaTermPackage;
|
||||||
|
name = "IosevkaTerm Nerd Font Mono";
|
||||||
|
};
|
||||||
|
|
||||||
|
cursor = {
|
||||||
|
package = pkgs.nordzy-cursor-theme;
|
||||||
|
name = "Nordzy-cursors-white";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
in {
|
||||||
|
imports = with inputs; [
|
||||||
|
stylix.nixosModules.stylix
|
||||||
|
];
|
||||||
|
|
||||||
|
options = {
|
||||||
|
module.stylix = {
|
||||||
|
enable = mkEnableOption "enable stylix";
|
||||||
|
|
||||||
|
useCursor = mkOption {
|
||||||
|
type = bool;
|
||||||
|
default = true;
|
||||||
|
description = "enable cursor settings";
|
||||||
|
};
|
||||||
|
theme = mkOption {
|
||||||
|
type = str;
|
||||||
|
default = "nord";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
stylix =
|
||||||
|
{
|
||||||
|
enable = true;
|
||||||
|
image = themes.${cfg.theme}.wallpaper;
|
||||||
|
autoEnable = true;
|
||||||
|
polarity = themes.${cfg.theme}.polarity;
|
||||||
|
base16Scheme = themes.${cfg.theme}.scheme;
|
||||||
|
|
||||||
|
opacity = {
|
||||||
|
applications = 1.0;
|
||||||
|
terminal = 1.0;
|
||||||
|
popups = 1.0;
|
||||||
|
desktop = 1.0;
|
||||||
|
};
|
||||||
|
|
||||||
|
fonts = {
|
||||||
|
sizes = {
|
||||||
|
applications = 13;
|
||||||
|
terminal = 13;
|
||||||
|
popups = 14;
|
||||||
|
desktop = 13;
|
||||||
|
};
|
||||||
|
|
||||||
|
serif = {
|
||||||
|
inherit (themes.${cfg.theme}.serif) package name;
|
||||||
|
};
|
||||||
|
sansSerif = config.stylix.fonts.serif;
|
||||||
|
monospace = {
|
||||||
|
inherit (themes.${cfg.theme}.monospace) package name;
|
||||||
|
};
|
||||||
|
emoji = config.stylix.fonts.serif;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
// optionalAttrs cfg.useCursor {
|
||||||
|
cursor = {
|
||||||
|
inherit (themes.${cfg.theme}.cursor) package name;
|
||||||
|
size = cursorSize;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Reference in New Issue
Block a user