mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-04-24 06:19:11 +00:00
config: update and refactor home-manager baseline config
This commit is contained in:
parent
77fb48e95c
commit
a7e4c430d5
@ -7,58 +7,6 @@
|
|||||||
, ...
|
, ...
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
|
||||||
# The default config for our home-manager configurations. This is also to
|
|
||||||
# be used for sharing modules among home-manager users from NixOS
|
|
||||||
# configurations with `nixpkgs.useGlobalPkgs` set to `true` so avoid
|
|
||||||
# setting nixpkgs-related options here.
|
|
||||||
defaultHomeManagerConfig =
|
|
||||||
{ pkgs, config, lib, ... }: {
|
|
||||||
# Set some extra, yeah?
|
|
||||||
_module.args = defaultExtraArgs;
|
|
||||||
|
|
||||||
# Hardcoding this is not really great especially if you consider using
|
|
||||||
# other locales but its default values are already hardcoded so what
|
|
||||||
# the hell. For other users, they would have to do set these manually.
|
|
||||||
xdg.userDirs =
|
|
||||||
let
|
|
||||||
# The home directory-related options should be already taken care
|
|
||||||
# of at this point. It is an ABSOLUTE MUST that it is set properly
|
|
||||||
# since other parts of the home-manager config relies on it being
|
|
||||||
# set properly.
|
|
||||||
#
|
|
||||||
# Here are some of the common cases for setting the home directory
|
|
||||||
# options.
|
|
||||||
#
|
|
||||||
# * For exporting home-manager configurations, this is done in this
|
|
||||||
# flake definition.
|
|
||||||
# * For NixOS configs, this is done automatically by the
|
|
||||||
# home-manager NixOS module.
|
|
||||||
# * Otherwise, you'll have to manually set them.
|
|
||||||
appendToHomeDir = path: "${config.home.homeDirectory}/${path}";
|
|
||||||
in
|
|
||||||
{
|
|
||||||
desktop = appendToHomeDir "Desktop";
|
|
||||||
documents = appendToHomeDir "Documents";
|
|
||||||
download = appendToHomeDir "Downloads";
|
|
||||||
music = appendToHomeDir "Music";
|
|
||||||
pictures = appendToHomeDir "Pictures";
|
|
||||||
publicShare = appendToHomeDir "Public";
|
|
||||||
templates = appendToHomeDir "Templates";
|
|
||||||
videos = appendToHomeDir "Videos";
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.home-manager.enable = true;
|
|
||||||
|
|
||||||
manual = lib.mkDefault {
|
|
||||||
html.enable = true;
|
|
||||||
json.enable = true;
|
|
||||||
manpages.enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
home.stateVersion = lib.mkDefault "23.11";
|
|
||||||
};
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
setups.home-manager = {
|
setups.home-manager = {
|
||||||
configs = {
|
configs = {
|
||||||
@ -96,7 +44,22 @@ in
|
|||||||
inputs.sops-nix.homeManagerModules.sops
|
inputs.sops-nix.homeManagerModules.sops
|
||||||
inputs.nix-index-database.hmModules.nix-index
|
inputs.nix-index-database.hmModules.nix-index
|
||||||
|
|
||||||
defaultHomeManagerConfig
|
# The default shared config for our home-manager configurations. This
|
||||||
|
# is also to be used for sharing modules among home-manager users from
|
||||||
|
# NixOS configurations with `nixpkgs.useGlobalPkgs` set to `true` so
|
||||||
|
# avoid setting nixpkgs-related options here.
|
||||||
|
({ pkgs, config, lib, ... }: {
|
||||||
|
# Set some extra, yeah?
|
||||||
|
_module.args = defaultExtraArgs;
|
||||||
|
|
||||||
|
manual = lib.mkDefault {
|
||||||
|
html.enable = true;
|
||||||
|
json.enable = true;
|
||||||
|
manpages.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
home.stateVersion = lib.mkDefault "23.11";
|
||||||
|
})
|
||||||
];
|
];
|
||||||
|
|
||||||
standaloneConfigModules = [
|
standaloneConfigModules = [
|
||||||
@ -109,7 +72,7 @@ in
|
|||||||
xdg.userDirs.createDirectories = lib.mkForce false;
|
xdg.userDirs.createDirectories = lib.mkForce false;
|
||||||
|
|
||||||
programs.home-manager.enable = lib.mkForce true;
|
programs.home-manager.enable = lib.mkForce true;
|
||||||
targets.genericLinux.enable = true;
|
targets.genericLinux.enable = lib.mkDefault true;
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user