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>
This commit is contained in:
@@ -93,6 +93,5 @@ makeEnable config "myModules.base" true {
|
|||||||
|
|
||||||
programs.dconf.enable = true;
|
programs.dconf.enable = true;
|
||||||
|
|
||||||
home-manager.users = forEachUser (import ./home-manager.nix);
|
|
||||||
nix.settings.trusted-users = realUsers ++ ["gitea-runner"];
|
nix.settings.trusted-users = realUsers ++ ["gitea-runner"];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -155,7 +155,7 @@
|
|||||||
}
|
}
|
||||||
{
|
{
|
||||||
pr = 483705; # codex: 0.89.0 -> 0.92.0
|
pr = 483705; # codex: 0.89.0 -> 0.92.0
|
||||||
hash = "sha256-tkZP0ATAAuBNnJGo+xjXJD0byXAgeKoB+U3ZUaoCTHM=";
|
hash = "sha256-ZaiuRfl7gei0AyjPvLJidP3qfIaNbrvKROhKwmoiE5o=";
|
||||||
}
|
}
|
||||||
# claude-code
|
# claude-code
|
||||||
# {
|
# {
|
||||||
|
|||||||
@@ -1,5 +1,12 @@
|
|||||||
{ pkgs, ... }:
|
{ 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 = ''
|
xdg.configFile."greenclip.toml".text = ''
|
||||||
[greenclip]
|
[greenclip]
|
||||||
history_file = "~/.cache/greenclip.history"
|
history_file = "~/.cache/greenclip.history"
|
||||||
|
|||||||
@@ -3,12 +3,3 @@ switch *args:
|
|||||||
|
|
||||||
fix-local-path-issue:
|
fix-local-path-issue:
|
||||||
nix flake update imalison-taffybar
|
nix flake update imalison-taffybar
|
||||||
|
|
||||||
|
|
||||||
expire-home-manager-generations:
|
|
||||||
#!/usr/bin/env bash
|
|
||||||
set -euxo pipefail
|
|
||||||
for user in $(awk -F':' '{ if ($3 >= 1000 && $7 !~ /nologin|false|sync|shutdown|halt/) print $1 }' /etc/passwd); do
|
|
||||||
echo $user
|
|
||||||
sudo su - $user -c 'home-manager expire-generations -1days'
|
|
||||||
done
|
|
||||||
|
|||||||
@@ -19,6 +19,7 @@
|
|||||||
home-manager.useGlobalPkgs = true;
|
home-manager.useGlobalPkgs = true;
|
||||||
home-manager.useUserPackages = true;
|
home-manager.useUserPackages = true;
|
||||||
home-manager.backupFileExtension = "backup";
|
home-manager.backupFileExtension = "backup";
|
||||||
|
home-manager.sharedModules = [ ./home-manager.nix ];
|
||||||
|
|
||||||
nix = rec {
|
nix = rec {
|
||||||
extraOptions = ''
|
extraOptions = ''
|
||||||
|
|||||||
Reference in New Issue
Block a user