refactor: my.home -> my.hm for disambiguilty (e.g. my.home.home)

This commit is contained in:
2025-10-03 22:17:04 +08:00
parent 1eaee50e82
commit faba8a05e6
44 changed files with 54 additions and 56 deletions

View File

@@ -15,7 +15,7 @@
systemd.services."systemd-machine-id-commit".enable = !config.my.persist.enable;
my = {
home = {
hm = {
# nicely reload system units when changing configs
systemd.user.startServices = "sd-switch";
home.stateVersion = "24.11";

View File

@@ -1,6 +1,6 @@
{ lib, username, ... }:
{
my.home.programs.zsh.shellAliases = {
my.hm.programs.zsh.shellAliases = {
localproxy_on = "export http_proxy=http://192.168.128.1:7890 https_proxy=http://192.168.128.1:7890 all_proxy=socks://192.168.128.1:7890";
};
my = {

View File

@@ -4,7 +4,7 @@
...
}:
{
my.home = {
my.hm = {
home.packages = with pkgs; [
localsend

View File

@@ -4,7 +4,7 @@
...
}:
{
my.home = {
my.hm = {
home.packages = with pkgs; [
localsend

View File

@@ -193,7 +193,7 @@
recursive = true;
})
++ [
(lib.mkAliasOptionModule [ "my" "home" ] [ "home-manager" "users" vars.username ])
(lib.mkAliasOptionModule [ "my" "hm" ] [ "home-manager" "users" vars.username ])
./config/base.nix
./config/hosts/${hostname}
inputs.chaotic.nixosModules.default

View File

@@ -36,7 +36,7 @@
optionName = packageName;
config' = lib.mkMerge [
{
my.home.home.packages = [ (lib.getAttrFromPath packagePath pkgs) ];
my.hm.home.packages = [ (lib.getAttrFromPath packagePath pkgs) ];
}
extraConfig
];
@@ -55,7 +55,7 @@
config' = lib.mkMerge [
{
my.home.programs = lib.setAttrByPath [ programName "enable" ] true;
my.hm.programs = lib.setAttrByPath [ programName "enable" ] true;
}
extraConfig
];

View File

@@ -21,6 +21,6 @@ lib.my.makeSwitch {
};
users.extraUsers.${username}.extraGroups = [ "audio" ];
my.persist.homeDirs = [ ".local/state/wireplumber" ];
my.home.home.packages = [ pkgs.pwvucontrol ];
my.hm.home.packages = [ pkgs.pwvucontrol ];
};
}

View File

@@ -15,7 +15,7 @@ lib.my.makeSwitch {
];
config' = {
my = {
home = {
hm = {
home.packages = with pkgs; [
playerctl
go-musicfox
@@ -23,7 +23,7 @@ lib.my.makeSwitch {
sops.secrets.go-musicfox = {
sopsFile = secrets."go-musicfox.ini";
format = "binary";
path = "${config.my.home.xdg.configHome}/go-musicfox/go-musicfox.ini";
path = "${config.my.hm.xdg.configHome}/go-musicfox/go-musicfox.ini";
};
};

View File

@@ -13,7 +13,7 @@ lib.my.makeSwitch {
"mpd"
];
config' = {
my.home = {
my.hm = {
home.packages = with pkgs.stable; [
mpd
mpc-cli

View File

@@ -48,7 +48,7 @@ lib.my.makeSwitch {
programs.dconf.enable = true;
my.home = {
my.hm = {
home.packages = with pkgs; [
lsd
fd

View File

@@ -14,7 +14,7 @@ lib.my.makeHomePackageConfig {
"btop"
];
extraConfig = {
my.home.xdg.configFile."btop" = {
my.hm.xdg.configFile."btop" = {
source = ./config;
recursive = true;
};

View File

@@ -15,9 +15,9 @@ lib.my.makeSwitch {
];
config' = {
my.persist.homeDirs = [ ".local/share/zoxide" ];
my.home =
my.hm =
let
stateHome = config.my.home.xdg.stateHome;
stateHome = config.my.hm.xdg.stateHome;
zsh-syntax-highlighting = pkgs.fetchFromGitHub {
owner = "zsh-users";
repo = "zsh-syntax-highlighting";
@@ -78,7 +78,7 @@ lib.my.makeSwitch {
};
programs.zsh = {
enable = true;
dotDir = "${config.my.home.xdg.configHome}/zsh";
dotDir = "${config.my.hm.xdg.configHome}/zsh";
history = {
path = "${stateHome}/zsh_history";
ignorePatterns = [

View File

@@ -16,7 +16,7 @@ lib.my.makeHomeProgramConfig {
"git"
];
extraConfig = {
my.home = {
my.hm = {
programs.git = {
userName = "${userfullname}";
userEmail = "${useremail}";

View File

@@ -16,7 +16,7 @@ lib.my.makeHomeProgramConfig {
"jj"
];
extraConfig = {
my.home = {
my.hm = {
programs.jujutsu = {
settings = {
user = {

View File

@@ -13,7 +13,7 @@ lib.my.makeHomeProgramConfig {
"neovim"
];
extraConfig = {
my.home = {
my.hm = {
xdg.configFile."nvim/init.lua".source = ./nvim/init.lua;
xdg.configFile."nvim/lua" = {
source = ./nvim/lua;

View File

@@ -13,7 +13,7 @@ lib.my.makeHomeProgramConfig {
"vscode"
];
extraConfig = {
my.home = {
my.hm = {
programs.vscode = {
package = pkgs.vscodium;
};

View File

@@ -13,7 +13,7 @@ lib.my.makeSwitch {
"c"
];
config' = {
my.home.home.packages = with pkgs; [
my.hm.home.packages = with pkgs; [
gcc
clang-tools
cmake

View File

@@ -14,7 +14,7 @@ lib.my.makeHomePackageConfig {
"go"
];
extraConfig = {
my.home.home.packages = with pkgs; [
my.hm.home.packages = with pkgs; [
gotools
gopls
];

View File

@@ -13,7 +13,7 @@ lib.my.makeSwitch {
"java"
];
config' = {
my.home.home.packages = with pkgs; [
my.hm.home.packages = with pkgs; [
openjdk24
java-language-server
];

View File

@@ -13,7 +13,7 @@ lib.my.makeSwitch {
"js"
];
config' = {
my.home = {
my.hm = {
home.packages = with pkgs; [
nodejs
typescript

View File

@@ -13,7 +13,7 @@ lib.my.makeSwitch {
"lua"
];
config' = {
my.home.home.packages = with pkgs; [
my.hm.home.packages = with pkgs; [
luajit
stylua
lua-language-server

View File

@@ -14,7 +14,7 @@ lib.my.makeHomePackageConfig {
"python"
];
extraConfig = {
my.home.home.packages = with pkgs; [
my.hm.home.packages = with pkgs; [
uv
pyright
];

View File

@@ -13,7 +13,7 @@ lib.my.makeSwitch {
"qml"
];
config' = {
my.home.home.packages = with pkgs; [
my.hm.home.packages = with pkgs; [
kdePackages.qtdeclarative
];
};

View File

@@ -13,7 +13,7 @@ lib.my.makeSwitch {
"rust"
];
config' = {
my.home = {
my.hm = {
home.packages = with pkgs; [
(fenix.stable.withComponents [
"cargo"

View File

@@ -12,7 +12,7 @@ lib.my.makeSwitch {
"misc"
];
config' = {
my.home = {
my.hm = {
home.packages = with pkgs; [
gnumake
github-cli # gh

View File

@@ -13,7 +13,7 @@ lib.my.makeHomeProgramConfig {
"chromium"
];
extraConfig = {
my.home.programs.chromium = {
my.hm.programs.chromium = {
package = pkgs.ungoogled-chromium;
extensions = [
{

View File

@@ -13,7 +13,7 @@ lib.my.makeHomeProgramConfig {
"zen"
];
extraConfig = {
my.home.programs.zen-browser = {
my.hm.programs.zen-browser = {
enable = true;
nativeMessagingHosts = [ pkgs.firefoxpwa ];
policies = {

View File

@@ -13,7 +13,7 @@ lib.my.makeSwitch {
"minecraft"
];
config' = {
my.home.home.packages = [
my.hm.home.packages = [
(pkgs.hmcl.overrideAttrs {
postFixup = ''
substituteInPlace $out/share/applications/HMCL.desktop --replace-fail 'Exec=hmcl' 'Exec=sh -c "cd ~/.local/share/hmcl; hmcl"'

View File

@@ -14,6 +14,6 @@ lib.my.makeHomePackageConfig {
"dunst"
];
extraConfig = {
my.home.xdg.configFile."dunst/dunstrc".source = ./dunstrc;
my.hm.xdg.configFile."dunst/dunstrc".source = ./dunstrc;
};
}

View File

@@ -14,7 +14,7 @@ lib.my.makeHomePackageConfig {
"swaync"
];
extraConfig = {
my.home = {
my.hm = {
programs.niri.settings.binds."Mod+End".action.spawn = [
"swaync-client"
"-t"

View File

@@ -13,7 +13,7 @@ lib.my.makeSwitch {
"obs-studio"
];
config' = {
my.home.home.packages = with pkgs; [
my.hm.home.packages = with pkgs; [
(pkgs.wrapOBS {
plugins = with pkgs.obs-studio-plugins; [
wlrobs

View File

@@ -25,7 +25,7 @@ lib.my.makeSwitch {
};
};
my.home = {
my.hm = {
stylix = {
enable = true;
autoEnable = false;
@@ -52,7 +52,7 @@ lib.my.makeSwitch {
name = "Adwaita";
};
gtk2 = {
configLocation = "${config.my.home.xdg.configHome}/gtk-2.0/gtkrc";
configLocation = "${config.my.hm.xdg.configHome}/gtk-2.0/gtkrc";
};
gtk3 = {
theme = {

View File

@@ -8,7 +8,7 @@ lib.my.makeHomeProgramConfig {
"alacritty"
];
extraConfig = {
my.home.programs.alacritty.settings = {
my.hm.programs.alacritty.settings = {
general.import = [ ./tokyonight-storm.toml ];
cursor.style = {
shape = "Block";

View File

@@ -8,7 +8,7 @@ lib.my.makeHomeProgramConfig {
"foot"
];
extraConfig = {
my.home.programs.foot = {
my.hm.programs.foot = {
server.enable = true;
settings = {
main = {

View File

@@ -8,7 +8,7 @@ lib.my.makeHomeProgramConfig {
"ghostty"
];
extraConfig = {
my.home.programs.ghostty = {
my.hm.programs.ghostty = {
enableBashIntegration = true;
enableZshIntegration = true;
installBatSyntax = true;

View File

@@ -8,7 +8,7 @@ lib.my.makeHomeProgramConfig {
"kitty"
];
extraConfig = {
my.home.programs.kitty = {
my.hm.programs.kitty = {
settings = {
cursor_blink_interval = 0;
remember_window_size = "no";

View File

@@ -12,7 +12,7 @@ lib.my.makeSwitch {
"wine"
];
config' = {
my.home.home.packages = with pkgs; [
my.hm.home.packages = with pkgs; [
wineWayland
proton-ge-custom
bottles

View File

@@ -6,7 +6,7 @@
}:
{
config = lib.mkIf config.my.desktop.wm.niri.enable {
my.home.programs.niri.settings = {
my.hm.programs.niri.settings = {
input = {
focus-follows-mouse = {
enable = true;
@@ -132,7 +132,7 @@
];
binds =
with config.my.home.lib.niri.actions;
with config.my.hm.lib.niri.actions;
{
"Ctrl+Alt+T".action.spawn = [
"kitty"

View File

@@ -51,7 +51,7 @@ in
wayland.enable = true;
};
};
my.home = {
my.hm = {
home.packages = with pkgs; [
xwayland-satellite-unstable

View File

@@ -194,7 +194,7 @@ lib.my.makeSwitch {
)
)
];
my.home.programs.niri.settings = {
my.hm.programs.niri.settings = {
binds."Mod+Space".action.spawn = [
"fcitx5-remote"
"-t"

View File

@@ -55,11 +55,11 @@ lib.my.makeSwitch {
group = "users";
mode = "0400";
};
my.home.nix.extraOptions = ''
my.hm.nix.extraOptions = ''
!include ${config.sops.secrets.nix-github-token.path}
'';
my.home.home.packages = [ pkgs.nixd ];
my.hm.home.packages = [ pkgs.nixd ];
# uncomment to enable auto gc
/*

View File

@@ -23,7 +23,7 @@ in
config = lib.mkIf cfg.enable {
sops.age.sshKeyFile = cfg.sshKeyFile;
users.users.${username}.extraGroups = [ "keys" ];
my.home = {
my.hm = {
sops.age.sshKeyFile = cfg.sshKeyFile;
home.packages = [
pkgs.sops

View File

@@ -103,11 +103,9 @@ lib.my.makeSwitch {
username
];
my.home = {
home = {
inherit username;
homeDirectory = "/home/${username}";
};
my.hm.home = {
inherit username;
homeDirectory = "/home/${username}";
};
};
}

View File

@@ -21,9 +21,9 @@ in
};
config = lib.mkIf cfg.enable {
my.home =
my.hm =
let
homedir = config.my.home.home.homeDirectory;
homedir = config.my.hm.home.homeDirectory;
in
{
home.packages = with pkgs; [