Compare commits
No commits in common. "32971e91bf4618c9c09f5fb728dbe67757d8b08a" and "00bb0ea051b2658b71fb1937e05b7d469fbe8227" have entirely different histories.
32971e91bf
...
00bb0ea051
10 changed files with 54 additions and 35 deletions
|
@ -24,7 +24,10 @@
|
|||
};
|
||||
});
|
||||
formatter = eachSystem (pkgs: treefmtEval.${pkgs.system}.config.build.wrapper);
|
||||
nixosConfigurations = import ./hosts {inherit inputs;};
|
||||
nixosConfigurations = let
|
||||
lib' = import ./lib {inherit inputs lib';};
|
||||
in
|
||||
import ./hosts {inherit inputs lib';};
|
||||
packages = eachSystem (pkgs: import ./pkgs {inherit inputs pkgs;});
|
||||
deploy.nodes = import ./nodes {inherit inputs;};
|
||||
checks = builtins.mapAttrs (_: deployLib: deployLib.deployChecks self.deploy) deploy-rs.lib;
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
font = "monospace:size=14";
|
||||
};
|
||||
colors = let
|
||||
inherit (osConfig.theme.scheme) palette;
|
||||
inherit (inputs.basix.schemeData.base16.${osConfig.theme.scheme}) palette;
|
||||
in {
|
||||
background = "${palette.base00}ff";
|
||||
text = "${palette.base05}ff";
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
{
|
||||
inputs,
|
||||
pkgs,
|
||||
config,
|
||||
osConfig,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
isDark = osConfig.theme.scheme.variant == "dark";
|
||||
isDark = inputs.basix.schemeData.base16.${osConfig.theme.scheme}.variant == "dark";
|
||||
in {
|
||||
home.pointerCursor = {
|
||||
inherit (osConfig.theme.cursorTheme) name package size;
|
||||
|
|
|
@ -1,11 +1,13 @@
|
|||
{
|
||||
inputs,
|
||||
lib,
|
||||
pkgs,
|
||||
config,
|
||||
osConfig,
|
||||
...
|
||||
}: let
|
||||
inherit (osConfig.theme.scheme) palette;
|
||||
inherit (inputs.basix.schemeData.base16.${osConfig.theme.scheme}) palette;
|
||||
inherit (lib) getExe mkIf;
|
||||
in {
|
||||
imports = [./binds.nix];
|
||||
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
{
|
||||
inputs,
|
||||
pkgs,
|
||||
osConfig,
|
||||
...
|
||||
}: let
|
||||
inherit (osConfig.theme.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.
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
{
|
||||
inputs,
|
||||
lib,
|
||||
osConfig,
|
||||
...
|
||||
}: let
|
||||
inherit (osConfig.theme.scheme) palette;
|
||||
inherit (inputs.basix.schemeData.base16.${osConfig.theme.scheme}) palette;
|
||||
inherit (builtins) concatStringsSep;
|
||||
inherit (lib) mapAttrsToList;
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
inputs,
|
||||
osConfig,
|
||||
config,
|
||||
lib,
|
||||
|
@ -16,7 +17,7 @@
|
|||
inherit (lib) mapAttrs;
|
||||
inherit (lib.strings) removePrefix;
|
||||
# because someone thought this was a great idea: https://github.com/tinted-theming/schemes/commit/61058a8d2e2bd4482b53d57a68feb56cdb991f0b
|
||||
palette = mapAttrs (_: color: removePrefix "#" color) osConfig.theme.scheme.palette;
|
||||
palette = mapAttrs (_: color: removePrefix "#" color) inputs.basix.schemeData.base16.${osConfig.theme.scheme}.palette;
|
||||
in {
|
||||
background = palette.base00;
|
||||
foreground = palette.base05;
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
{inputs, ...}: let
|
||||
lib' = import ../lib;
|
||||
mkSystem = args:
|
||||
inputs.nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {inherit inputs lib';};
|
||||
modules = args.modules or [];
|
||||
};
|
||||
{
|
||||
inputs,
|
||||
lib',
|
||||
...
|
||||
}: let
|
||||
inherit (lib') mkSystem;
|
||||
in {
|
||||
vamos = mkSystem {
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
./vamos
|
||||
../modules
|
||||
|
@ -15,6 +15,7 @@ in {
|
|||
};
|
||||
|
||||
solaire = mkSystem {
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
./solaire
|
||||
../modules
|
||||
|
@ -22,6 +23,7 @@ in {
|
|||
};
|
||||
|
||||
anastacia = mkSystem {
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
./anastacia
|
||||
];
|
||||
|
|
|
@ -1,4 +1,9 @@
|
|||
{lib, ...}: let
|
||||
{
|
||||
inputs,
|
||||
lib',
|
||||
...
|
||||
}: let
|
||||
inherit (inputs.nixpkgs) lib;
|
||||
# convert rrggbb hex to rgba(r, g, b, a)
|
||||
rgba = c: let
|
||||
r = toString (hexToDec (builtins.substring 0 2 c));
|
||||
|
@ -84,6 +89,23 @@
|
|||
# Create a KDE konsole color scheme from base16 colors
|
||||
mkKonsoleColorScheme = pkgs: scheme:
|
||||
pkgs.writeText "${scheme.name}.colorscheme" (schemeToKonsole scheme);
|
||||
|
||||
# https://github.com/diniamo/niqs/blob/caf396bb470619fa06936a379eec6e283c3c3d95/lib/default.nix#L13-L35C7
|
||||
mkSystem = {system, ...} @ args:
|
||||
lib.nixosSystem {
|
||||
system = null;
|
||||
specialArgs = {inherit inputs;};
|
||||
modules =
|
||||
[
|
||||
{
|
||||
_module.args = {
|
||||
inherit system lib';
|
||||
};
|
||||
nixpkgs = {inherit system;};
|
||||
}
|
||||
]
|
||||
++ args.modules or [];
|
||||
};
|
||||
in {
|
||||
inherit mkKonsoleColorScheme rgba;
|
||||
inherit mkKonsoleColorScheme rgba mkSystem;
|
||||
}
|
||||
|
|
|
@ -1,33 +1,22 @@
|
|||
{
|
||||
inputs,
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkEnableOption mkOption mkIf attrNames;
|
||||
inherit (lib.types) path package enum;
|
||||
cfg = config.theme;
|
||||
inherit (lib) mkEnableOption mkOption;
|
||||
inherit (lib.types) string path package;
|
||||
in {
|
||||
imports = [./gtk.nix];
|
||||
options.theme = {
|
||||
enable = mkEnableOption "theme";
|
||||
schemeName = mkOption {
|
||||
scheme = mkOption {
|
||||
description = ''
|
||||
Name of the tinted-scheming color scheme to use.
|
||||
'';
|
||||
type = enum (attrNames inputs.basix.schemeData.base16);
|
||||
example = "catppuccin-macchiato";
|
||||
type = string;
|
||||
example = lib.literalExpression "catppuccin-macchiato";
|
||||
default = "catppuccin-macchiato";
|
||||
};
|
||||
|
||||
scheme = mkOption {
|
||||
description = ''
|
||||
Resolved scheme from the tinted-scheming library.
|
||||
'';
|
||||
type = lib.types.attrs;
|
||||
};
|
||||
|
||||
wallpaper = mkOption {
|
||||
description = ''
|
||||
Location of the wallpaper that will be used throughout the system.
|
||||
|
@ -62,7 +51,4 @@ in {
|
|||
};
|
||||
};
|
||||
};
|
||||
config.theme = mkIf cfg.enable {
|
||||
scheme = inputs.basix.schemeData.base16.${config.theme.schemeName};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue