Files
dotfiles/nixos/home-manager.nix
Ivan Malison 7a1a612397 Use home-manager.sharedModules for shared user config
Replace manual forEachUser pattern with built-in sharedModules for
applying config to all home-manager users. Add automatic garbage
collection of old generations (weekly, older than 7 days) and remove
the now-unnecessary expire-home-manager-generations justfile recipe.

Also update codex PR patch hash (upstream patch was modified).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 19:48:50 -08:00

117 lines
3.0 KiB
Nix

{ pkgs, ... }:
{
# Automatic garbage collection of old home-manager generations
nix.gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 7d";
};
xdg.configFile."greenclip.toml".text = ''
[greenclip]
history_file = "~/.cache/greenclip.history"
max_history_length = 50
max_selection_size_bytes = 0
trim_space_from_selection = true
use_primary_selection_as_input = false
blacklisted_applications = []
enable_image_support = true
image_cache_directory = "~/.cache/greenclip"
static_history = []
'';
xsession = {
enable = true;
preferStatusNotifierItems = true;
importedVariables = [ "GDK_PIXBUF_ICON_LOADER" ];
};
home.keyboard = null;
home.emptyActivationPath = false;
programs.home-manager.enable = true;
programs.ssh = {
enable = true;
enableDefaultConfig = false;
matchBlocks = {
"*" = {
forwardAgent = true;
addKeysToAgent = "no";
compression = false;
serverAliveInterval = 0;
serverAliveCountMax = 3;
hashKnownHosts = false;
userKnownHostsFile = "~/.ssh/known_hosts";
controlMaster = "no";
controlPath = "~/.ssh/master-%r@%n:%p";
controlPersist = "no";
};
};
};
services.gpg-agent = {
enable = true;
defaultCacheTtl = 8 * 60 * 60;
maxCacheTtl = 8 * 60 * 60;
enableSshSupport = true;
extraConfig = ''
allow-emacs-pinentry
allow-loopback-pinentry
'';
};
systemd.user.services.setxkbmap = {
Unit = {
Description = "Set up keyboard in X";
After = [ "graphical-session-pre.target" ];
PartOf = [ "graphical-session.target" ];
};
Install = { WantedBy = [ "graphical-session.target" ]; };
Service = {
Type = "oneshot";
RemainAfterExit = true;
ExecStart = "/usr/bin/env load_xkb_map";
};
};
gtk = {
enable = true;
iconTheme = {
package = pkgs.numix-icon-theme-circle;
name = "Numix-Circle";
};
font = {
package = pkgs.noto-fonts-color-emoji;
name = "Noto Sans";
size = 10;
};
gtk3.extraConfig = {
gtk-application-prefer-dark-theme = true;
gtk-button-images = 1;
gtk-cursor-theme-name = "breeze_cursors";
gtk-cursor-theme-size = 24;
gtk-decoration-layout = "icon:minimize,maximize,close";
gtk-enable-animations = true;
gtk-enable-event-sounds = 1;
gtk-enable-input-feedback-sounds = 1;
gtk-fallback-icon-theme = "gnome";
gtk-key-theme-name = "Emacs";
gtk-menu-images = 1;
gtk-modules = "colorreload-gtk-module";
gtk-primary-button-warps-slider = false;
gtk-theme-name = "Arc";
gtk-toolbar-icon-size = "GTK_ICON_SIZE_LARGE_TOOLBAR";
gtk-toolbar-style = "GTK_TOOLBAR_BOTH_HORIZ";
gtk-xft-antialias = 1;
gtk-xft-dpi = 98304;
gtk-xft-hinting = 1;
gtk-xft-hintstyle = "hintslight";
gtk-xft-rgba = "rgb";
};
};
}