Add syncthing base
Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
@@ -1,5 +1,9 @@
|
||||
{ config, inputs, lib, ... }:
|
||||
|
||||
{
|
||||
config,
|
||||
inputs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
users = lib.attrsets.filterAttrs (_: config: config.isNormalUser) config.users.users;
|
||||
in
|
||||
@@ -10,19 +14,17 @@ in
|
||||
[
|
||||
"d /persist/home 0755 root root -"
|
||||
"d /cache/home 0755 root root -"
|
||||
] ++
|
||||
lib.attrsets.mapAttrsToList (user: config: "d /persist${config.home} 0700 ${user} users -") users ++
|
||||
lib.attrsets.mapAttrsToList (user: config: "d /cache${config.home} 0700 ${user} users -") users
|
||||
]
|
||||
++ lib.attrsets.mapAttrsToList (user: config: "d /persist${config.home} 0700 ${user} users -") users
|
||||
++ lib.attrsets.mapAttrsToList (user: config: "d /cache${config.home} 0700 ${user} users -") users
|
||||
);
|
||||
|
||||
home-manager.users = lib.attrsets.mapAttrs
|
||||
(user: config: ({
|
||||
imports = [ inputs.impermanence.nixosModules.home-manager.impermanence ];
|
||||
home-manager.users = lib.attrsets.mapAttrs (user: config: {
|
||||
imports = [ inputs.impermanence.nixosModules.home-manager.impermanence ];
|
||||
|
||||
home.persistence = {
|
||||
"/persist${config.home}".allowOther = true;
|
||||
"/cache${config.home}".allowOther = true;
|
||||
};
|
||||
}))
|
||||
users;
|
||||
home.persistence = {
|
||||
"/persist${config.home}".allowOther = true;
|
||||
"/cache${config.home}".allowOther = true;
|
||||
};
|
||||
}) users;
|
||||
}
|
||||
|
@@ -1,20 +1,22 @@
|
||||
{ config, inputs, lib, ... }:
|
||||
|
||||
{
|
||||
config,
|
||||
inputs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
users = lib.attrsets.filterAttrs (_: config: config.isNormalUser) config.users.users;
|
||||
sopsKeyPath = ".config/sops-nix/key.txt";
|
||||
in
|
||||
{
|
||||
home-manager.users = lib.attrsets.mapAttrs
|
||||
(user: config: ({
|
||||
imports = [ inputs.sops-nix.homeManagerModules.sops ];
|
||||
home-manager.users = lib.attrsets.mapAttrs (user: config: {
|
||||
imports = [ inputs.sops-nix.homeManagerModules.sops ];
|
||||
|
||||
sops.age.keyFile = "/persist${config.home}/${sopsKeyPath}";
|
||||
sops.age.keyFile = "/persist${config.home}/${sopsKeyPath}";
|
||||
|
||||
home = {
|
||||
persistence."/persist${config.home}".files = [ sopsKeyPath ];
|
||||
sessionVariables.SOPS_AGE_KEY_FILE = "${config.home}/${sopsKeyPath}";
|
||||
};
|
||||
}))
|
||||
users;
|
||||
home = {
|
||||
persistence."/persist${config.home}".files = [ sopsKeyPath ];
|
||||
sessionVariables.SOPS_AGE_KEY_FILE = "${config.home}/${sopsKeyPath}";
|
||||
};
|
||||
}) users;
|
||||
}
|
||||
|
@@ -1,35 +1,32 @@
|
||||
{ config, lib, ... }:
|
||||
|
||||
let
|
||||
users = lib.attrsets.filterAttrs (_: config: config.isNormalUser) config.users.users;
|
||||
in
|
||||
{
|
||||
home-manager.users = lib.attrsets.mapAttrs
|
||||
(user: cfg: ({
|
||||
xdg = {
|
||||
enable = true;
|
||||
mimeApps.enable = true;
|
||||
home-manager.users = lib.attrsets.mapAttrs (user: cfg: {
|
||||
xdg = {
|
||||
enable = true;
|
||||
mimeApps.enable = true;
|
||||
|
||||
userDirs = {
|
||||
enable = true;
|
||||
extraConfig = {
|
||||
XDG_VM_DIR = "${cfg.home}/VMs";
|
||||
XDG_GIT_DIR = "${cfg.home}/git";
|
||||
};
|
||||
userDirs = {
|
||||
enable = true;
|
||||
extraConfig = {
|
||||
XDG_VM_DIR = "${cfg.home}/VMs";
|
||||
XDG_GIT_DIR = "${cfg.home}/git";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
home.persistence."/persist${cfg.home}".directories = [
|
||||
"Desktop" # userDirs.desktop
|
||||
"Documents" # userDirs.documents
|
||||
"Downloads" # userDirs.download
|
||||
"Music" # userDirs.music
|
||||
"Pictures" # userDirs.pictures
|
||||
"Templates" # userDirs.templates
|
||||
"Videos" # userDirs.videos
|
||||
"VMs"
|
||||
"git"
|
||||
];
|
||||
}))
|
||||
users;
|
||||
home.persistence."/persist${cfg.home}".directories = [
|
||||
"Desktop" # userDirs.desktop
|
||||
"Documents" # userDirs.documents
|
||||
"Downloads" # userDirs.download
|
||||
"Music" # userDirs.music
|
||||
"Pictures" # userDirs.pictures
|
||||
"Templates" # userDirs.templates
|
||||
"Videos" # userDirs.videos
|
||||
"VMs"
|
||||
"git"
|
||||
];
|
||||
}) users;
|
||||
}
|
||||
|
@@ -1,5 +1,4 @@
|
||||
{ config, inputs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
inputs.home-manager.nixosModules.default
|
||||
@@ -10,22 +9,26 @@
|
||||
];
|
||||
|
||||
home-manager = {
|
||||
extraSpecialArgs = { inherit inputs; };
|
||||
extraSpecialArgs = {
|
||||
inherit inputs;
|
||||
};
|
||||
backupFileExtension = "bak";
|
||||
useGlobalPkgs = true;
|
||||
sharedModules = [{
|
||||
imports = [
|
||||
./options/home-manager/xdg
|
||||
./options/home-manager/hyprland
|
||||
./options/home-manager/matugen
|
||||
./options/home-manager/theme
|
||||
];
|
||||
sharedModules = [
|
||||
{
|
||||
imports = [
|
||||
./options/home-manager/xdg
|
||||
./options/home-manager/hyprland
|
||||
./options/home-manager/matugen
|
||||
./options/home-manager/theme
|
||||
];
|
||||
|
||||
home.stateVersion = "24.05";
|
||||
systemd.user.startServices = "sd-switch";
|
||||
nix.settings = config.nix.settings;
|
||||
nixpkgs.config = config.nixpkgs.config;
|
||||
}];
|
||||
home.stateVersion = "24.05";
|
||||
systemd.user.startServices = "sd-switch";
|
||||
nix.settings = config.nix.settings;
|
||||
nixpkgs.config = config.nixpkgs.config;
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
programs.dconf.enable = true;
|
||||
|
@@ -1,22 +1,26 @@
|
||||
{ lib, ... }:
|
||||
|
||||
let
|
||||
userOptions = with lib; with types; { config, ... }: {
|
||||
options.email = mkOption {
|
||||
type = nullOr str;
|
||||
description = "Email address of the user.";
|
||||
};
|
||||
userOptions =
|
||||
with lib;
|
||||
with types;
|
||||
{ config, ... }:
|
||||
{
|
||||
options.email = mkOption {
|
||||
type = nullOr str;
|
||||
description = "Email address of the user.";
|
||||
};
|
||||
|
||||
options.fullName = mkOption {
|
||||
type = nullOr str;
|
||||
description = "Full name of the user.";
|
||||
options.fullName = mkOption {
|
||||
type = nullOr str;
|
||||
description = "Full name of the user.";
|
||||
};
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
options = with lib; with types; {
|
||||
users.users = mkOption {
|
||||
type = attrsOf (submodule userOptions);
|
||||
options =
|
||||
with lib;
|
||||
with types;
|
||||
{
|
||||
users.users = mkOption { type = attrsOf (submodule userOptions); };
|
||||
};
|
||||
};
|
||||
}
|
||||
|
@@ -1,32 +1,43 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.wayland.windowManager.hyprland;
|
||||
in
|
||||
{
|
||||
options.wayland.windowManager.hyprland = with lib; with types; {
|
||||
initExtraConfig = mkOption {
|
||||
type = lines;
|
||||
default = "";
|
||||
description = "Extra configuration lines to add to exec-once";
|
||||
};
|
||||
options.wayland.windowManager.hyprland =
|
||||
with lib;
|
||||
with types;
|
||||
{
|
||||
initExtraConfig = mkOption {
|
||||
type = lines;
|
||||
default = "";
|
||||
description = "Extra configuration lines to add to exec-once";
|
||||
};
|
||||
|
||||
reloadExtraConfig = mkOption {
|
||||
type = lines;
|
||||
default = "";
|
||||
description = "Extra configuration lines to add to exec";
|
||||
reloadExtraConfig = mkOption {
|
||||
type = lines;
|
||||
default = "";
|
||||
description = "Extra configuration lines to add to exec";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
wayland.windowManager.hyprland.settings.exec-once = lib.meta.getExe (pkgs.writeShellApplication {
|
||||
name = "init-hyprland";
|
||||
text = cfg.initExtraConfig;
|
||||
});
|
||||
wayland.windowManager.hyprland.settings.exec-once = lib.meta.getExe (
|
||||
pkgs.writeShellApplication {
|
||||
name = "init-hyprland";
|
||||
text = cfg.initExtraConfig;
|
||||
}
|
||||
);
|
||||
|
||||
wayland.windowManager.hyprland.settings.exec = lib.meta.getExe (pkgs.writeShellApplication {
|
||||
name = "reload-hyprland";
|
||||
text = cfg.reloadExtraConfig;
|
||||
});
|
||||
wayland.windowManager.hyprland.settings.exec = lib.meta.getExe (
|
||||
pkgs.writeShellApplication {
|
||||
name = "reload-hyprland";
|
||||
text = cfg.reloadExtraConfig;
|
||||
}
|
||||
);
|
||||
};
|
||||
}
|
||||
|
@@ -1,18 +1,25 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.programs.matugen;
|
||||
in
|
||||
{
|
||||
# https://github.com/Theaninova/matugen/blob/add-home-manager-module/hm-module.nix
|
||||
options.programs.matugen = with lib; with types; {
|
||||
enable = mkEnableOption "matugen";
|
||||
package = mkPackageOption pkgs "matugen" { };
|
||||
settings = mkOption {
|
||||
type = attrsOf anything;
|
||||
description = "Settings to write to config.toml.";
|
||||
options.programs.matugen =
|
||||
with lib;
|
||||
with types;
|
||||
{
|
||||
enable = mkEnableOption "matugen";
|
||||
package = mkPackageOption pkgs "matugen" { };
|
||||
settings = mkOption {
|
||||
type = attrsOf anything;
|
||||
description = "Settings to write to config.toml.";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
home.packages = [ cfg.package ];
|
||||
|
@@ -1,11 +1,18 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.theme;
|
||||
init = pkgs.writeShellApplication {
|
||||
name = "theme";
|
||||
runtimeInputs = with pkgs; [ coreutils-full ];
|
||||
bashOptions = [ "nounset" "pipefail" ];
|
||||
runtimeInputs = with pkgs; [ coreutils ];
|
||||
bashOptions = [
|
||||
"nounset"
|
||||
"pipefail"
|
||||
];
|
||||
runtimeEnv = {
|
||||
CONFIG = cfg.configDir;
|
||||
DEFAULT_WALLPAPER = cfg.wallpaper;
|
||||
@@ -17,336 +24,348 @@ let
|
||||
in
|
||||
{
|
||||
# https://github.com/Theaninova/TheaninovOS/blob/master/modules/home-manager/theme/md3-evo.nix
|
||||
options.theme = with lib; with types; {
|
||||
enable = mkEnableOption "theme";
|
||||
options.theme =
|
||||
with lib;
|
||||
with types;
|
||||
{
|
||||
enable = mkEnableOption "theme";
|
||||
|
||||
configDir = mkOption {
|
||||
type = str;
|
||||
default = "${config.xdg.configHome}/theme";
|
||||
description = "The path to the theme config directory.";
|
||||
};
|
||||
|
||||
wallpaper = mkOption {
|
||||
type = path;
|
||||
description = "The path to the default wallpaper";
|
||||
};
|
||||
|
||||
pkg = mkOption {
|
||||
type = package;
|
||||
default = init;
|
||||
readOnly = true;
|
||||
description = "The package containing the `theme` script";
|
||||
};
|
||||
|
||||
extraConfig = mkOption {
|
||||
type = lines;
|
||||
default = "";
|
||||
description = "Extra configuration lines to add to the theme script.";
|
||||
};
|
||||
|
||||
flavour = mkOption {
|
||||
type = enum [
|
||||
"content"
|
||||
"expressive"
|
||||
"fidelity"
|
||||
"fruit-salad"
|
||||
"monochrome"
|
||||
"neutral"
|
||||
"rainbow"
|
||||
"tonal-spot"
|
||||
];
|
||||
default = "tonal-spot";
|
||||
description = "The flavour of the theme.";
|
||||
};
|
||||
|
||||
mode = mkOption {
|
||||
type = enum [ "dark" "light" ];
|
||||
default = "dark";
|
||||
description = "The default mode of the theme.";
|
||||
};
|
||||
|
||||
contrast = mkOption {
|
||||
type = numbers.between (-1) 1;
|
||||
default = 0;
|
||||
description = "Use a modified contrast.";
|
||||
};
|
||||
|
||||
opacity = mkOption {
|
||||
type = numbers.between 0 1;
|
||||
default = 1;
|
||||
description = "The opacity of apps.";
|
||||
};
|
||||
|
||||
radius = mkOption {
|
||||
type = ints.unsigned;
|
||||
default = 8;
|
||||
description = "The radius of corners.";
|
||||
};
|
||||
|
||||
padding = mkOption {
|
||||
type = ints.unsigned;
|
||||
default = 8;
|
||||
description = "The padding of windows.";
|
||||
};
|
||||
|
||||
blur = mkOption {
|
||||
type = ints.unsigned;
|
||||
default = 0;
|
||||
description = "The blur amount of windows.";
|
||||
};
|
||||
|
||||
color = {
|
||||
semantic = {
|
||||
blend = mkOption {
|
||||
type = bool;
|
||||
default = false;
|
||||
description = "Blend the colors.";
|
||||
};
|
||||
|
||||
danger = mkOption {
|
||||
type = str;
|
||||
default = "#ff0000";
|
||||
description = "The color of danger.";
|
||||
};
|
||||
|
||||
warning = mkOption {
|
||||
type = str;
|
||||
default = "#ffff00";
|
||||
description = "The color of warning.";
|
||||
};
|
||||
|
||||
success = mkOption {
|
||||
type = str;
|
||||
default = "#00ff00";
|
||||
description = "The color of success.";
|
||||
};
|
||||
|
||||
info = mkOption {
|
||||
type = str;
|
||||
default = "#0000ff";
|
||||
description = "The color of info.";
|
||||
};
|
||||
configDir = mkOption {
|
||||
type = str;
|
||||
default = "${config.xdg.configHome}/theme";
|
||||
description = "The path to the theme config directory.";
|
||||
};
|
||||
|
||||
syntax = {
|
||||
blend = mkOption {
|
||||
type = bool;
|
||||
default = true;
|
||||
description = "Blend the colors.";
|
||||
};
|
||||
|
||||
keywords = mkOption {
|
||||
type = str;
|
||||
default = "#ff8000";
|
||||
description = "The color of keywords.";
|
||||
};
|
||||
|
||||
functions = mkOption {
|
||||
type = str;
|
||||
default = "#0000ff";
|
||||
description = "The color of functions.";
|
||||
};
|
||||
|
||||
properties = mkOption {
|
||||
type = str;
|
||||
default = "#ff00ff";
|
||||
description = "The color of properties.";
|
||||
};
|
||||
|
||||
constants = mkOption {
|
||||
type = str;
|
||||
default = "#ff00ff";
|
||||
description = "The color of constants.";
|
||||
};
|
||||
|
||||
strings = mkOption {
|
||||
type = str;
|
||||
default = "#00ff00";
|
||||
description = "The color of variables.";
|
||||
};
|
||||
|
||||
numbers = mkOption {
|
||||
type = str;
|
||||
default = "#00ffff";
|
||||
description = "The color of numbers.";
|
||||
};
|
||||
|
||||
structures = mkOption {
|
||||
type = str;
|
||||
default = "#ffff00";
|
||||
description = "The color of structures.";
|
||||
};
|
||||
|
||||
types = mkOption {
|
||||
type = str;
|
||||
default = "#00ffff";
|
||||
description = "The color of types.";
|
||||
};
|
||||
wallpaper = mkOption {
|
||||
type = path;
|
||||
description = "The path to the default wallpaper";
|
||||
};
|
||||
|
||||
ansi = {
|
||||
blend = mkOption {
|
||||
type = bool;
|
||||
default = true;
|
||||
description = "Blend the colors.";
|
||||
};
|
||||
|
||||
red = mkOption {
|
||||
type = str;
|
||||
default = "#ff0000";
|
||||
description = "The color of red.";
|
||||
};
|
||||
|
||||
green = mkOption {
|
||||
type = str;
|
||||
default = "#00ff00";
|
||||
description = "The color of green.";
|
||||
};
|
||||
|
||||
yellow = mkOption {
|
||||
type = str;
|
||||
default = "#ffff00";
|
||||
description = "The color of yellow.";
|
||||
};
|
||||
|
||||
orange = mkOption {
|
||||
type = str;
|
||||
default = "#ff8000";
|
||||
description = "The color of orange.";
|
||||
};
|
||||
|
||||
blue = mkOption {
|
||||
type = str;
|
||||
default = "#0000ff";
|
||||
description = "The color of blue.";
|
||||
};
|
||||
|
||||
magenta = mkOption {
|
||||
type = str;
|
||||
default = "#ff00ff";
|
||||
description = "The color of magenta.";
|
||||
};
|
||||
|
||||
cyan = mkOption {
|
||||
type = str;
|
||||
default = "#00ffff";
|
||||
description = "The color of cyan.";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
font = {
|
||||
sansSerif = {
|
||||
names = mkOption {
|
||||
type = listOf str;
|
||||
default = [ "Roboto" ];
|
||||
description = "The sans serif font families.";
|
||||
};
|
||||
|
||||
packages = mkOption {
|
||||
type = listOf package;
|
||||
default = with pkgs; [ roboto ];
|
||||
description = "The sans serif font packages.";
|
||||
};
|
||||
pkg = mkOption {
|
||||
type = package;
|
||||
default = init;
|
||||
readOnly = true;
|
||||
description = "The package containing the `theme` script";
|
||||
};
|
||||
|
||||
serif = {
|
||||
names = mkOption {
|
||||
type = listOf str;
|
||||
default = [ "Roboto Serif" ];
|
||||
description = "The serif font families.";
|
||||
};
|
||||
|
||||
packages = mkOption {
|
||||
type = listOf package;
|
||||
default = with pkgs; [ roboto-serif ];
|
||||
description = "The serif font packages.";
|
||||
};
|
||||
extraConfig = mkOption {
|
||||
type = lines;
|
||||
default = "";
|
||||
description = "Extra configuration lines to add to the theme script.";
|
||||
};
|
||||
|
||||
monospace = {
|
||||
names = mkOption {
|
||||
type = listOf str;
|
||||
default = [ "JetBrainsMono Nerd Font" ];
|
||||
description = "The monospace font families.";
|
||||
};
|
||||
|
||||
packages = mkOption {
|
||||
type = listOf package;
|
||||
default = with pkgs; [ (nerdfonts.override { fonts = [ "JetBrainsMono" ]; }) ];
|
||||
description = "The monospace font packages.";
|
||||
};
|
||||
};
|
||||
|
||||
emoji = {
|
||||
names = mkOption {
|
||||
type = listOf str;
|
||||
default = [ "Noto Emoji" "Font Awesome" ];
|
||||
description = "The emoji font families.";
|
||||
};
|
||||
|
||||
packages = mkOption {
|
||||
type = listOf package;
|
||||
default = with pkgs; [ noto-fonts-color-emoji font-awesome ];
|
||||
description = "The emoji font packages.";
|
||||
};
|
||||
};
|
||||
|
||||
size = mkOption {
|
||||
type = ints.positive;
|
||||
default = 12;
|
||||
description = "The font size.";
|
||||
};
|
||||
};
|
||||
|
||||
icon = {
|
||||
names = mkOption {
|
||||
type = listOf str;
|
||||
default = [ "Adwaita" ];
|
||||
description = "The icon theme names.";
|
||||
};
|
||||
|
||||
packages = mkOption {
|
||||
type = listOf package;
|
||||
default = with pkgs; [
|
||||
adwaita-icon-theme
|
||||
nixos-icons
|
||||
flavour = mkOption {
|
||||
type = enum [
|
||||
"content"
|
||||
"expressive"
|
||||
"fidelity"
|
||||
"fruit-salad"
|
||||
"monochrome"
|
||||
"neutral"
|
||||
"rainbow"
|
||||
"tonal-spot"
|
||||
];
|
||||
description = "The icon theme packages.";
|
||||
default = "tonal-spot";
|
||||
description = "The flavour of the theme.";
|
||||
};
|
||||
|
||||
mode = mkOption {
|
||||
type = enum [
|
||||
"dark"
|
||||
"light"
|
||||
];
|
||||
default = "dark";
|
||||
description = "The default mode of the theme.";
|
||||
};
|
||||
|
||||
contrast = mkOption {
|
||||
type = numbers.between (-1) 1;
|
||||
default = 0;
|
||||
description = "Use a modified contrast.";
|
||||
};
|
||||
|
||||
opacity = mkOption {
|
||||
type = numbers.between 0 1;
|
||||
default = 1;
|
||||
description = "The opacity of apps.";
|
||||
};
|
||||
|
||||
radius = mkOption {
|
||||
type = ints.unsigned;
|
||||
default = 8;
|
||||
description = "The radius of corners.";
|
||||
};
|
||||
|
||||
padding = mkOption {
|
||||
type = ints.unsigned;
|
||||
default = 8;
|
||||
description = "The padding of windows.";
|
||||
};
|
||||
|
||||
blur = mkOption {
|
||||
type = ints.unsigned;
|
||||
default = 0;
|
||||
description = "The blur amount of windows.";
|
||||
};
|
||||
|
||||
color = {
|
||||
semantic = {
|
||||
blend = mkOption {
|
||||
type = bool;
|
||||
default = false;
|
||||
description = "Blend the colors.";
|
||||
};
|
||||
|
||||
danger = mkOption {
|
||||
type = str;
|
||||
default = "#ff0000";
|
||||
description = "The color of danger.";
|
||||
};
|
||||
|
||||
warning = mkOption {
|
||||
type = str;
|
||||
default = "#ffff00";
|
||||
description = "The color of warning.";
|
||||
};
|
||||
|
||||
success = mkOption {
|
||||
type = str;
|
||||
default = "#00ff00";
|
||||
description = "The color of success.";
|
||||
};
|
||||
|
||||
info = mkOption {
|
||||
type = str;
|
||||
default = "#0000ff";
|
||||
description = "The color of info.";
|
||||
};
|
||||
};
|
||||
|
||||
syntax = {
|
||||
blend = mkOption {
|
||||
type = bool;
|
||||
default = true;
|
||||
description = "Blend the colors.";
|
||||
};
|
||||
|
||||
keywords = mkOption {
|
||||
type = str;
|
||||
default = "#ff8000";
|
||||
description = "The color of keywords.";
|
||||
};
|
||||
|
||||
functions = mkOption {
|
||||
type = str;
|
||||
default = "#0000ff";
|
||||
description = "The color of functions.";
|
||||
};
|
||||
|
||||
properties = mkOption {
|
||||
type = str;
|
||||
default = "#ff00ff";
|
||||
description = "The color of properties.";
|
||||
};
|
||||
|
||||
constants = mkOption {
|
||||
type = str;
|
||||
default = "#ff00ff";
|
||||
description = "The color of constants.";
|
||||
};
|
||||
|
||||
strings = mkOption {
|
||||
type = str;
|
||||
default = "#00ff00";
|
||||
description = "The color of variables.";
|
||||
};
|
||||
|
||||
numbers = mkOption {
|
||||
type = str;
|
||||
default = "#00ffff";
|
||||
description = "The color of numbers.";
|
||||
};
|
||||
|
||||
structures = mkOption {
|
||||
type = str;
|
||||
default = "#ffff00";
|
||||
description = "The color of structures.";
|
||||
};
|
||||
|
||||
types = mkOption {
|
||||
type = str;
|
||||
default = "#00ffff";
|
||||
description = "The color of types.";
|
||||
};
|
||||
};
|
||||
|
||||
ansi = {
|
||||
blend = mkOption {
|
||||
type = bool;
|
||||
default = true;
|
||||
description = "Blend the colors.";
|
||||
};
|
||||
|
||||
red = mkOption {
|
||||
type = str;
|
||||
default = "#ff0000";
|
||||
description = "The color of red.";
|
||||
};
|
||||
|
||||
green = mkOption {
|
||||
type = str;
|
||||
default = "#00ff00";
|
||||
description = "The color of green.";
|
||||
};
|
||||
|
||||
yellow = mkOption {
|
||||
type = str;
|
||||
default = "#ffff00";
|
||||
description = "The color of yellow.";
|
||||
};
|
||||
|
||||
orange = mkOption {
|
||||
type = str;
|
||||
default = "#ff8000";
|
||||
description = "The color of orange.";
|
||||
};
|
||||
|
||||
blue = mkOption {
|
||||
type = str;
|
||||
default = "#0000ff";
|
||||
description = "The color of blue.";
|
||||
};
|
||||
|
||||
magenta = mkOption {
|
||||
type = str;
|
||||
default = "#ff00ff";
|
||||
description = "The color of magenta.";
|
||||
};
|
||||
|
||||
cyan = mkOption {
|
||||
type = str;
|
||||
default = "#00ffff";
|
||||
description = "The color of cyan.";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
font = {
|
||||
sansSerif = {
|
||||
names = mkOption {
|
||||
type = listOf str;
|
||||
default = [ "Roboto" ];
|
||||
description = "The sans serif font families.";
|
||||
};
|
||||
|
||||
packages = mkOption {
|
||||
type = listOf package;
|
||||
default = with pkgs; [ roboto ];
|
||||
description = "The sans serif font packages.";
|
||||
};
|
||||
};
|
||||
|
||||
serif = {
|
||||
names = mkOption {
|
||||
type = listOf str;
|
||||
default = [ "Roboto Serif" ];
|
||||
description = "The serif font families.";
|
||||
};
|
||||
|
||||
packages = mkOption {
|
||||
type = listOf package;
|
||||
default = with pkgs; [ roboto-serif ];
|
||||
description = "The serif font packages.";
|
||||
};
|
||||
};
|
||||
|
||||
monospace = {
|
||||
names = mkOption {
|
||||
type = listOf str;
|
||||
default = [ "JetBrainsMono Nerd Font" ];
|
||||
description = "The monospace font families.";
|
||||
};
|
||||
|
||||
packages = mkOption {
|
||||
type = listOf package;
|
||||
default = with pkgs; [ (nerdfonts.override { fonts = [ "JetBrainsMono" ]; }) ];
|
||||
description = "The monospace font packages.";
|
||||
};
|
||||
};
|
||||
|
||||
emoji = {
|
||||
names = mkOption {
|
||||
type = listOf str;
|
||||
default = [
|
||||
"Noto Emoji"
|
||||
"Font Awesome"
|
||||
];
|
||||
description = "The emoji font families.";
|
||||
};
|
||||
|
||||
packages = mkOption {
|
||||
type = listOf package;
|
||||
default = with pkgs; [
|
||||
noto-fonts-color-emoji
|
||||
font-awesome
|
||||
];
|
||||
description = "The emoji font packages.";
|
||||
};
|
||||
};
|
||||
|
||||
size = mkOption {
|
||||
type = ints.positive;
|
||||
default = 12;
|
||||
description = "The font size.";
|
||||
};
|
||||
};
|
||||
|
||||
icon = {
|
||||
names = mkOption {
|
||||
type = listOf str;
|
||||
default = [ "Adwaita" ];
|
||||
description = "The icon theme names.";
|
||||
};
|
||||
|
||||
packages = mkOption {
|
||||
type = listOf package;
|
||||
default = with pkgs; [
|
||||
adwaita-icon-theme
|
||||
nixos-icons
|
||||
];
|
||||
description = "The icon theme packages.";
|
||||
};
|
||||
};
|
||||
|
||||
cursor = {
|
||||
names = mkOption {
|
||||
type = listOf str;
|
||||
default = [ "Adwaita" ];
|
||||
description = "The cursor names.";
|
||||
};
|
||||
|
||||
packages = mkOption {
|
||||
type = listOf package;
|
||||
default = with pkgs; [ adwaita-icon-theme ];
|
||||
description = "The cursor theme packages.";
|
||||
};
|
||||
|
||||
size = mkOption {
|
||||
type = ints.positive;
|
||||
default = 32;
|
||||
description = "The cursor size.";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
cursor = {
|
||||
names = mkOption {
|
||||
type = listOf str;
|
||||
default = [ "Adwaita" ];
|
||||
description = "The cursor names.";
|
||||
};
|
||||
|
||||
packages = mkOption {
|
||||
type = listOf package;
|
||||
default = with pkgs; [ adwaita-icon-theme ];
|
||||
description = "The cursor theme packages.";
|
||||
};
|
||||
|
||||
size = mkOption {
|
||||
type = ints.positive;
|
||||
default = 32;
|
||||
description = "The cursor size.";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
home = {
|
||||
packages =
|
||||
[ cfg.pkg ] ++
|
||||
cfg.font.sansSerif.packages ++
|
||||
cfg.font.serif.packages ++
|
||||
cfg.font.monospace.packages ++
|
||||
cfg.font.emoji.packages ++
|
||||
cfg.icon.packages ++
|
||||
cfg.cursor.packages;
|
||||
[ cfg.pkg ]
|
||||
++ cfg.font.sansSerif.packages
|
||||
++ cfg.font.serif.packages
|
||||
++ cfg.font.monospace.packages
|
||||
++ cfg.font.emoji.packages
|
||||
++ cfg.icon.packages
|
||||
++ cfg.cursor.packages;
|
||||
|
||||
pointerCursor = {
|
||||
name = builtins.head cfg.cursor.names;
|
||||
|
@@ -1,48 +1,42 @@
|
||||
{ config, lib, ... }:
|
||||
|
||||
let
|
||||
cfg = config.xdg;
|
||||
in
|
||||
{
|
||||
options.xdg = with lib; with types; {
|
||||
relativeCacheHome = mkOption {
|
||||
type = str;
|
||||
default = ".cache";
|
||||
description = "Relative path to directory holding application caches.";
|
||||
};
|
||||
options.xdg =
|
||||
with lib;
|
||||
with types;
|
||||
{
|
||||
relativeCacheHome = mkOption {
|
||||
type = str;
|
||||
default = ".cache";
|
||||
description = "Relative path to directory holding application caches.";
|
||||
};
|
||||
|
||||
cacheHome = mkOption {
|
||||
default = "${config.home.homeDirectory}/${cfg.relativeCacheHome}";
|
||||
};
|
||||
cacheHome = mkOption { default = "${config.home.homeDirectory}/${cfg.relativeCacheHome}"; };
|
||||
|
||||
relativeConfigHome = mkOption {
|
||||
type = str;
|
||||
default = ".config";
|
||||
description = "Relative path to directory holding application configurations.";
|
||||
};
|
||||
relativeConfigHome = mkOption {
|
||||
type = str;
|
||||
default = ".config";
|
||||
description = "Relative path to directory holding application configurations.";
|
||||
};
|
||||
|
||||
configHome = mkOption {
|
||||
default = "${config.home.homeDirectory}/${cfg.relativeConfigHome}";
|
||||
};
|
||||
configHome = mkOption { default = "${config.home.homeDirectory}/${cfg.relativeConfigHome}"; };
|
||||
|
||||
relativeDataHome = mkOption {
|
||||
type = str;
|
||||
default = ".local/share";
|
||||
description = "Relative path to directory holding application data.";
|
||||
};
|
||||
relativeDataHome = mkOption {
|
||||
type = str;
|
||||
default = ".local/share";
|
||||
description = "Relative path to directory holding application data.";
|
||||
};
|
||||
|
||||
dataHome = mkOption {
|
||||
default = "${config.home.homeDirectory}/${cfg.relativeDataHome}";
|
||||
};
|
||||
dataHome = mkOption { default = "${config.home.homeDirectory}/${cfg.relativeDataHome}"; };
|
||||
|
||||
relativeStateHome = mkOption {
|
||||
type = str;
|
||||
default = ".local/state";
|
||||
description = "Relative path to directory holding application states.";
|
||||
};
|
||||
relativeStateHome = mkOption {
|
||||
type = str;
|
||||
default = ".local/state";
|
||||
description = "Relative path to directory holding application states.";
|
||||
};
|
||||
|
||||
stateHome = mkOption {
|
||||
default = "${config.home.homeDirectory}/${cfg.relativeStateHome}";
|
||||
stateHome = mkOption { default = "${config.home.homeDirectory}/${cfg.relativeStateHome}"; };
|
||||
};
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user