67 lines
1.6 KiB
Nix
67 lines
1.6 KiB
Nix
{
|
|
username ? throw "username argument is required",
|
|
}:
|
|
{
|
|
config,
|
|
inputs,
|
|
pkgs,
|
|
...
|
|
}:
|
|
let
|
|
userConfig = config.users.users.${username};
|
|
hmConfig = config.home-manager.users.${username};
|
|
in
|
|
{
|
|
networking.firewall = {
|
|
allowedTCPPorts = [ 57621 ];
|
|
allowedUDPPorts = [ 5353 ];
|
|
};
|
|
|
|
home-manager.users.${username} = {
|
|
imports = [ inputs.spicetify-nix.homeManagerModules.default ];
|
|
|
|
programs.spicetify =
|
|
let
|
|
spicePkgs = inputs.spicetify-nix.legacyPackages.${pkgs.system};
|
|
in
|
|
{
|
|
enable = true;
|
|
|
|
spicetifyPackage = pkgs.spicetify-cli.overrideAttrs (oldAttrs: {
|
|
patches = oldAttrs.patches or [ ] ++ [ ./user-colors.patch ];
|
|
});
|
|
|
|
theme = spicePkgs.themes.sleek // {
|
|
extraCommands = ''
|
|
export COLORS_CSS_PATH="${hmConfig.xdg.configHome}/spotify/colors.css"
|
|
'';
|
|
|
|
additionalCss = ''
|
|
.main-topBar-topbarContentRight button {
|
|
background-color: unset !important;
|
|
}
|
|
'';
|
|
};
|
|
|
|
enabledExtensions = with spicePkgs.extensions; [
|
|
loopyLoop
|
|
trashbin
|
|
fullAlbumDate
|
|
phraseToPlaylist
|
|
songStats
|
|
copyToClipboard
|
|
betterGenres
|
|
adblock
|
|
autoSkip
|
|
];
|
|
};
|
|
|
|
theme.templates."${hmConfig.xdg.configHome}/spotify/colors.css".source = ./colors.css;
|
|
|
|
home.persistence = {
|
|
"/persist${userConfig.home}".directories = [ "${hmConfig.xdg.relativeConfigHome}/spotify" ];
|
|
"/cache${userConfig.home}".directories = [ "${hmConfig.xdg.relativeCacheHome}/spotify" ];
|
|
};
|
|
};
|
|
}
|