Add custom impermanence module
Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
{
|
||||
username ? throw "username argument is required",
|
||||
user ? throw "user argument is required",
|
||||
home ? throw "home argument is required",
|
||||
}:
|
||||
{
|
||||
config,
|
||||
@@ -7,9 +8,6 @@
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
hmConfig = config.home-manager.users.${username};
|
||||
in
|
||||
{
|
||||
networking.firewall = {
|
||||
allowedTCPPorts = [ 57621 ];
|
||||
@@ -17,11 +15,11 @@ in
|
||||
};
|
||||
|
||||
environment.persistence = {
|
||||
"/persist".users.${username}.directories = [ "${hmConfig.xdg.relativeConfigHome}/spotify" ];
|
||||
"/cache".users.${username}.directories = [ "${hmConfig.xdg.relativeCacheHome}/spotify" ];
|
||||
"/persist"."${home}/.config/spotify" = { };
|
||||
"/cache"."${home}/.cache/spotify" = { };
|
||||
};
|
||||
|
||||
home-manager.users.${username} = {
|
||||
home-manager.users.${user} = {
|
||||
imports = [ inputs.spicetify-nix.homeManagerModules.default ];
|
||||
|
||||
programs.spicetify =
|
||||
@@ -37,7 +35,7 @@ in
|
||||
|
||||
theme = spicePkgs.themes.sleek // {
|
||||
extraCommands = ''
|
||||
export COLORS_CSS_PATH="${hmConfig.xdg.configHome}/spotify/colors.css"
|
||||
export COLORS_CSS_PATH="${home}/.config/spotify/colors.css"
|
||||
'';
|
||||
|
||||
additionalCss = ''
|
||||
@@ -60,6 +58,6 @@ in
|
||||
];
|
||||
};
|
||||
|
||||
theme.templates."${hmConfig.xdg.configHome}/spotify/colors.css".source = ./colors.css;
|
||||
theme.templates."${home}/.config/spotify/colors.css".source = ./colors.css;
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user