Refactor codebase to use nix modules
This commit is contained in:
parent
a4735423b4
commit
ffada2703c
114 changed files with 1018 additions and 744 deletions
38
hmModules/services/home/default.nix
Normal file
38
hmModules/services/home/default.nix
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
options = {
|
||||
extraPkgs = lib.mkOption { default = []; };
|
||||
};
|
||||
|
||||
config = {
|
||||
# Let Home Manager install and manage itself.
|
||||
programs.home-manager.enable = true;
|
||||
|
||||
home.sessionVariables = {
|
||||
GRADLE_USER_HOME = "${config.xdg.dataHome}/gradle";
|
||||
CUDA_CACHE_PATH = "${config.xdg.cacheHome}/nv";
|
||||
};
|
||||
|
||||
xdg = {
|
||||
enable = true;
|
||||
mimeApps.enable = true;
|
||||
userDirs = let
|
||||
home = config.home.homeDirectory;
|
||||
in {
|
||||
enable = true;
|
||||
documents = "${home}/dox";
|
||||
publicShare = "${home}/dox/public";
|
||||
templates = "${home}/dox/templates";
|
||||
music = "${home}/med/mus";
|
||||
pictures = "${home}/med/pix";
|
||||
videos = "${home}/med/vid";
|
||||
desktop = "${home}/dwn";
|
||||
download = "${home}/dwn";
|
||||
};
|
||||
};
|
||||
|
||||
home.homeDirectory = "/home/" + config.home.username;
|
||||
home.packages = config.extraPkgs;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue