This commit is contained in:
cnst
2024-10-17 20:06:17 +02:00
parent f70061cc24
commit ec57cb7599
196 changed files with 1150 additions and 1271 deletions

View File

@@ -0,0 +1,17 @@
{
config,
lib,
...
}: let
inherit (lib) mkIf mkEnableOption;
cfg = config.home.userd.blueman-applet;
in {
options = {
home.userd.blueman-applet.enable = mkEnableOption "Enables blueman-applet";
};
config = mkIf cfg.enable {
services.blueman-applet = {
enable = true;
};
};
}

View File

@@ -0,0 +1,17 @@
{
config,
lib,
...
}: let
inherit (lib) mkIf mkEnableOption;
cfg = config.home.userd.copyq;
in {
options = {
home.userd.copyq.enable = mkEnableOption "Enables copyq";
};
config = mkIf cfg.enable {
services.copyq = {
enable = true;
};
};
}

View File

@@ -0,0 +1,24 @@
{
config,
lib,
...
}: let
inherit (lib) types mkOption;
cfg = config.home.userd.dconf;
in {
options = {
home.userd.dconf.settings.color-scheme = mkOption {
type = types.str;
default = "prefer-dark";
};
};
config = {
dconf = {
settings = {
"org/gnome/desktop/interface" = {
color-scheme = cfg.settings.color-scheme;
};
};
};
};
}

View File

@@ -0,0 +1,18 @@
{
config,
lib,
...
}: let
inherit (lib) mkIf mkEnableOption;
cfg = config.home.userd.gpg;
in {
options = {
home.userd.gpg.enable = mkEnableOption "Enables gpg";
};
config = mkIf cfg.enable {
services.gpg-agent = {
enable = true;
enableSshSupport = true;
};
};
}

View File

@@ -0,0 +1,91 @@
{
pkgs,
config,
...
}: {
home = {
packages = [pkgs.glib]; # gsettings
pointerCursor = {
# package = pkgs.catppuccin-cursors.latteDark;
# name = "catppuccin-latte-dark-cursors";
package = pkgs.adwaita-icon-theme;
name = "Adwaita";
size = 28;
gtk.enable = true;
x11.enable = true;
};
};
gtk = {
enable = true;
theme = {
package = pkgs.orchis-theme;
name = "Orchis-Grey-Dark-Compact";
};
iconTheme = {
package = pkgs.adwaita-icon-theme;
name = "Adwaita";
};
font = {
name = "Input Sans Narrow Light";
size = 10;
};
cursorTheme = {
# package = pkgs.catppuccin-cursors.latteDark;
# name = "catppuccin-latte-dark-cursors";
package = pkgs.adwaita-icon-theme;
name = "Adwaita";
size = 28;
};
gtk2 = {
configLocation = "${config.xdg.configHome}/gtk-2.0/gtkrc";
extraConfig = ''
gtk-xft-antialias=1
gtk-xft-hinting=1
gtk-xft-hintstyle="hintslight"
gtk-xft-rgba="rgb"
'';
};
gtk3.extraConfig = {
# Lets be easy on the eyes. This should be easy to make dependent on
# the "variant" of the theme, but I never use a light theme anyway.
gtk-application-prefer-dark-theme = true;
# Decorations
gtk-decoration-layout = "appmenu:none";
gtk-toolbar-style = "GTK_TOOLBAR_BOTH";
gtk-toolbar-icon-size = "GTK_ICON_SIZE_LARGE_TOOLBAR";
gtk-button-images = 1;
gtk-menu-images = 1;
# Silence bells and whistles, quite literally.
gtk-error-bell = 0;
gtk-enable-event-sounds = 0;
gtk-enable-input-feedback-sounds = 0;
# Fonts
gtk-xft-antialias = 1;
gtk-xft-hinting = 1;
gtk-xft-hintstyle = "hintslight";
};
gtk4.extraConfig = {
# Prefer dark theme.
gtk-application-prefer-dark-theme = true;
# Decorations.
gtk-decoration-layout = "appmenu:none";
# Sounds, again.
gtk-error-bell = 0;
gtk-enable-event-sounds = 0;
gtk-enable-input-feedback-sounds = 0;
# Fonts, you know the drill.
gtk-xft-antialias = 1;
gtk-xft-hinting = 1;
gtk-xft-hintstyle = "hintslight";
};
};
}

View File

@@ -0,0 +1,140 @@
{
config,
pkgs,
lib,
...
}: let
inherit (lib) types mkOption mkIf;
cfg = config.home.userd.gtk;
in {
options = {
home.userd.gtk.enable = mkOption {
type = types.bool;
default = true;
description = "Enable GTK configuration.";
};
home.userd.gtk.theme = mkOption {
type = types.str;
default = "Orchis-Grey-Dark-Compact";
description = "GTK theme name.";
};
home.userd.gtk.themePackage = mkOption {
type = types.package;
default = pkgs.orchis-theme;
description = "GTK theme package.";
};
home.userd.gtk.iconTheme = mkOption {
type = types.str;
default = "Adwaita";
description = "GTK icon theme name.";
};
home.userd.gtk.iconThemePackage = mkOption {
type = types.package;
default = pkgs.adwaita-icon-theme;
description = "GTK icon theme package.";
};
home.userd.gtk.font = mkOption {
type = types.attrsOf types.anything;
default = {
name = "Input Sans Narrow Light";
size = 10;
};
description = "GTK font configuration.";
};
home.userd.gtk.cursorTheme = mkOption {
type = types.attrsOf types.anything;
default = {
name = "Adwaita";
size = 28;
package = pkgs.adwaita-icon-theme;
};
description = "Cursor theme configuration.";
};
};
config = mkIf cfg.enable {
home = {
packages = [pkgs.glib];
pointerCursor = {
package = cfg.cursorTheme.package;
name = cfg.cursorTheme.name;
size = cfg.cursorTheme.size;
gtk.enable = true;
x11.enable = true;
};
};
gtk = {
enable = true;
theme = {
package = cfg.themePackage;
name = cfg.theme;
};
iconTheme = {
package = cfg.iconThemePackage;
name = cfg.iconTheme;
};
font = {
name = cfg.font.name;
size = cfg.font.size;
};
cursorTheme = {
package = cfg.cursorTheme.package;
name = cfg.cursorTheme.name;
size = cfg.cursorTheme.size;
};
gtk2 = {
extraConfig = ''
gtk-xft-antialias=1
gtk-xft-hinting=1
gtk-xft-hintstyle="hintslight"
gtk-xft-rgba="rgb"
'';
};
gtk3.extraConfig = {
gtk-application-prefer-dark-theme = true;
gtk-decoration-layout = "appmenu:none";
gtk-toolbar-style = "GTK_TOOLBAR_BOTH";
gtk-toolbar-icon-size = "GTK_ICON_SIZE_LARGE_TOOLBAR";
gtk-button-images = 1;
gtk-menu-images = 1;
gtk-error-bell = 0;
gtk-enable-event-sounds = 0;
gtk-enable-input-feedback-sounds = 0;
gtk-xft-antialias = 1;
gtk-xft-hinting = 1;
gtk-xft-hintstyle = "hintslight";
};
gtk4.extraConfig = {
gtk-application-prefer-dark-theme = true;
gtk-decoration-layout = "appmenu:none";
gtk-error-bell = 0;
gtk-enable-event-sounds = 0;
gtk-enable-input-feedback-sounds = 0;
gtk-xft-antialias = 1;
gtk-xft-hinting = 1;
gtk-xft-hintstyle = "hintslight";
};
};
};
}

View File

@@ -0,0 +1,39 @@
{
config,
lib,
...
}: let
inherit (lib) mkIf mkEnableOption;
cfg = config.home.userd.mako;
in {
options = {
home.userd.mako.enable = mkEnableOption "Enables mako";
};
config = mkIf cfg.enable {
services.mako = {
enable = true;
iconPath = "$HOME/.nix-profile/share/icons/Gruvbox-Plus-Dark";
font = "FiraCode Nerd Font Medium 12";
padding = "20";
margin = "10";
anchor = "top-right";
width = 400;
height = 150;
borderSize = 2;
defaultTimeout = 12000;
backgroundColor = "#3c3836dd";
borderColor = "#689d6add";
textColor = "#d5c4a1dd";
layer = "overlay";
extraConfig = ''
max-history=50
max-visible=4
outer-margin=25
icon-location=right
max-icon-size=48
[mode=do-not-disturb]
invisible=1
'';
};
};
}

View File

@@ -0,0 +1,19 @@
{pkgs, ...}: {
systemd.user.services.polkit-gnome-authentication-agent-1 = {
Unit.Description = "polkit-gnome-authentication-agent-1";
Install = {
WantedBy = ["graphical-session.target"];
Wants = ["graphical-session.target"];
After = ["graphical-session.target"];
};
Service = {
Type = "simple";
ExecStart = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1";
Restart = "on-failure";
RestartSec = 1;
TimeoutStopSec = 10;
};
};
}

View File

@@ -0,0 +1,18 @@
{
config,
lib,
...
}: let
inherit (lib) mkIf mkEnableOption;
cfg = config.home.userd.syncthing;
in {
options = {
home.userd.syncthing.enable = mkEnableOption "Enables syncthing";
};
config = mkIf cfg.enable {
services.syncthing = {
enable = true;
tray.enable = false;
};
};
}

View File

@@ -0,0 +1,19 @@
{
config,
lib,
...
}: let
inherit (lib) mkIf mkEnableOption;
cfg = config.home.userd.udiskie;
in {
options = {
home.userd.udiskie.enable = mkEnableOption "Enables udiskie";
};
config = mkIf cfg.enable {
services.udiskie = {
enable = true;
tray = "always";
notify = false;
};
};
}

View File

@@ -0,0 +1,16 @@
{config, ...}: {
xdg = {
userDirs = {
enable = true;
createDirectories = true;
desktop = "${config.home.homeDirectory}/desktop";
documents = "${config.home.homeDirectory}/documents";
download = "${config.home.homeDirectory}/downloads";
music = "${config.home.homeDirectory}/media/music";
pictures = "${config.home.homeDirectory}/media/images";
publicShare = "${config.home.homeDirectory}/documents/share";
templates = "${config.home.homeDirectory}/documents/templates";
videos = "${config.home.homeDirectory}/media/videos";
};
};
}