diff --git a/flake.nix b/flake.nix index 603ef3f..961aacf 100644 --- a/flake.nix +++ b/flake.nix @@ -16,9 +16,12 @@ }; }; - outputs = { self, nixpkgs, nixos-hardware, agenix, ... } @ inputs: { + outputs = { self, nixpkgs, nixos-hardware, agenix, spicetify-nix, ... } @ inputs: { nixosConfigurations.rhea-laptop = nixpkgs.lib.nixosSystem { - specialArgs = { inherit inputs; }; + specialArgs = { + inherit inputs; + inherit spicetify-nix; + }; system = "x86_64-linux"; diff --git a/home/default.nix b/home/default.nix index 65665a5..a3ef7f8 100644 --- a/home/default.nix +++ b/home/default.nix @@ -1,4 +1,4 @@ -{ config, pkgs, inputs, ... }: +{ config, pkgs, inputs, spicetify-nix, ... }: { imports = [ inputs.home-manager.nixosModules.home-manager @@ -9,6 +9,11 @@ home-manager = { useUserPackages = true; useGlobalPkgs = true; + + extraSpecialArgs = { + inherit spicetify-nix; + }; + users.rhea = { /* The home.stateVersion option does not have a default and must be set */ home.stateVersion = "24.05"; @@ -37,25 +42,10 @@ ./packages.nix ./alacritty.nix ./zsh.nix + ./spicetify.nix + ./keyring.nix ]; - # TODO: modularize this, it didn't work in the first place.. - programs.spicetify = - let - spicePkgs = inputs.spicetify-nix.legacyPackages.${pkgs.system}; - in - { - enable = true; - enabledExtensions = with spicePkgs.extensions; [ - shuffle - trashbin - featureShuffle - history - oneko - ]; - theme = spicePkgs.themes.text; - }; - home.pointerCursor = { gtk.enable = true; package = pkgs.posy-cursors; diff --git a/home/spicetify.nix b/home/spicetify.nix new file mode 100644 index 0000000..df35742 --- /dev/null +++ b/home/spicetify.nix @@ -0,0 +1,18 @@ +{ inputs, pkgs, config, spicetify-nix, ... }: +{ + programs.spicetify = + let + spicePkgs = spicetify-nix.legacyPackages.${pkgs.system}; + in + { + enable = true; + enabledExtensions = with spicePkgs.extensions; [ + shuffle + trashbin + featureShuffle + history + oneko + ]; + theme = spicePkgs.themes.text; + }; +} \ No newline at end of file