refactor: simplify HM extraSpecialArgs
This commit is contained in:
parent
300d7aa00a
commit
fa5caa32d7
7 changed files with 18 additions and 22 deletions
|
@ -55,12 +55,8 @@
|
||||||
extraSpecialArgs = {
|
extraSpecialArgs = {
|
||||||
nur = nur.nixosModules.nur;
|
nur = nur.nixosModules.nur;
|
||||||
sops = sops.homeManagerModules.sops;
|
sops = sops.homeManagerModules.sops;
|
||||||
machine = {
|
flakePath = "/Users/winston/.config/nixpkgs";
|
||||||
username = "winston";
|
machine.personal = true;
|
||||||
homeDirectory = "/Users/winston";
|
|
||||||
personal = true;
|
|
||||||
flakePath = "/Users/winston/.config/nixpkgs";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
6
home.nix
6
home.nix
|
@ -92,8 +92,8 @@ in
|
||||||
xdg = {
|
xdg = {
|
||||||
enable = true;
|
enable = true;
|
||||||
userDirs.enable = isLinux;
|
userDirs.enable = isLinux;
|
||||||
cacheHome = "${machine.homeDirectory}/.cache";
|
cacheHome = "${config.home.homeDirectory}/.cache";
|
||||||
configHome = "${machine.homeDirectory}/.config";
|
configHome = "${config.home.homeDirectory}/.config";
|
||||||
dataHome = "${machine.homeDirectory}/.local/share";
|
dataHome = "${config.home.homeDirectory}/.local/share";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ config, lib, machine, pkgs, ... }:
|
{ config, lib, flakePath, pkgs, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
inherit (pkgs.stdenv.hostPlatform) isLinux;
|
inherit (pkgs.stdenv.hostPlatform) isLinux;
|
||||||
|
@ -168,7 +168,7 @@ in
|
||||||
xdg = lib.mkIf isLinux {
|
xdg = lib.mkIf isLinux {
|
||||||
configFile = {
|
configFile = {
|
||||||
"i3" = {
|
"i3" = {
|
||||||
source = config.lib.file.mkOutOfStoreSymlink "${machine.flakePath}/modules/i3";
|
source = config.lib.file.mkOutOfStoreSymlink "${flakePath}/modules/i3";
|
||||||
recursive = true;
|
recursive = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ config, pkgs, machine, ... }:
|
{ config, pkgs, flakePath, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
programs.neovim = {
|
programs.neovim = {
|
||||||
|
@ -72,7 +72,7 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
xdg.configFile."nvim" = {
|
xdg.configFile."nvim" = {
|
||||||
source = config.lib.file.mkOutOfStoreSymlink "${machine.flakePath}/modules/nvim";
|
source = config.lib.file.mkOutOfStoreSymlink "${flakePath}/modules/nvim";
|
||||||
recursive = true;
|
recursive = true;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ config, lib, machine, pkgs, ... }:
|
{ config, flakePath, lib, pkgs, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
inherit (pkgs.stdenv.hostPlatform) isLinux;
|
inherit (pkgs.stdenv.hostPlatform) isLinux;
|
||||||
|
@ -20,11 +20,11 @@ in
|
||||||
home.file = {
|
home.file = {
|
||||||
"${config.xdg.configHome}/Code/User/settings.json" = {
|
"${config.xdg.configHome}/Code/User/settings.json" = {
|
||||||
enable = isLinux;
|
enable = isLinux;
|
||||||
source = config.lib.file.mkOutOfStoreSymlink "${machine.flakePath}/modules/vscode/settings.json";
|
source = config.lib.file.mkOutOfStoreSymlink "${flakePath}/modules/vscode/settings.json";
|
||||||
};
|
};
|
||||||
"Library/Application Support/Code/User/settings.json" = {
|
"Library/Application Support/Code/User/settings.json" = {
|
||||||
enable = isDarwin;
|
enable = isDarwin;
|
||||||
source = config.lib.file.mkOutOfStoreSymlink "${machine.flakePath}/modules/vscode/settings.json";
|
source = config.lib.file.mkOutOfStoreSymlink "${flakePath}/modules/vscode/settings.json";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
{ config, machine, ... }:
|
{ config, flakePath, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
xdg.configFile = {
|
xdg.configFile = {
|
||||||
"wezterm" = {
|
"wezterm" = {
|
||||||
source = config.lib.file.mkOutOfStoreSymlink "${machine.flakePath}/modules/wezterm";
|
source = config.lib.file.mkOutOfStoreSymlink "${flakePath}/modules/wezterm";
|
||||||
recursive = true;
|
recursive = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ config, lib, pkgs, machine, ... }:
|
{ config, flakePath, lib, pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
programs = {
|
programs = {
|
||||||
|
@ -33,7 +33,7 @@
|
||||||
enableSyntaxHighlighting = true;
|
enableSyntaxHighlighting = true;
|
||||||
|
|
||||||
initExtra = let
|
initExtra = let
|
||||||
functionsDir = "${machine.homeDirectory}/${config.programs.zsh.dotDir}/functions";
|
functionsDir = "${config.home.homeDirectory}/${config.programs.zsh.dotDir}/functions";
|
||||||
in
|
in
|
||||||
''
|
''
|
||||||
for conf in "${functionsDir}"/**/*.zsh; do
|
for conf in "${functionsDir}"/**/*.zsh; do
|
||||||
|
@ -87,11 +87,11 @@
|
||||||
|
|
||||||
xdg.configFile = {
|
xdg.configFile = {
|
||||||
"lsd" = {
|
"lsd" = {
|
||||||
source = config.lib.file.mkOutOfStoreSymlink "${machine.flakePath}/modules/lsd/themes";
|
source = config.lib.file.mkOutOfStoreSymlink "${flakePath}/modules/lsd/themes";
|
||||||
recursive = true;
|
recursive = true;
|
||||||
};
|
};
|
||||||
"zsh/functions" = {
|
"zsh/functions" = {
|
||||||
source = config.lib.file.mkOutOfStoreSymlink "${machine.flakePath}/modules/zsh/functions";
|
source = config.lib.file.mkOutOfStoreSymlink "${flakePath}/modules/zsh/functions";
|
||||||
recursive = true;
|
recursive = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue