From e08b3d178410d748a5624417d60f2abdfcdf7e77 Mon Sep 17 00:00:00 2001 From: Tibo De Peuter Date: Tue, 24 Oct 2023 12:43:44 +0200 Subject: [PATCH] [spotify] Move adblock around --- nixos/flake.lock | 18 +++++++++--------- nixos/modules/programs/default.nix | 1 + .../programs/spotify-adblock/default.nix | 11 +++++++++++ nixos/users/tdpeuter/default.nix | 2 ++ 4 files changed, 23 insertions(+), 9 deletions(-) create mode 100644 nixos/modules/programs/spotify-adblock/default.nix diff --git a/nixos/flake.lock b/nixos/flake.lock index e397f53..ba37cbe 100644 --- a/nixos/flake.lock +++ b/nixos/flake.lock @@ -62,11 +62,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1697655685, - "narHash": "sha256-79Kuv+QdgsVc+rkibuAgWHnh8IXrLBTOKg5nM0Qvux0=", + "lastModified": 1697851979, + "narHash": "sha256-lJ8k4qkkwdvi+t/Xc6Fn74kUuobpu9ynPGxNZR6OwoA=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "80c1aab725151632ddc2a20caeb914e76dd0673c", + "rev": "5550a85a087c04ddcace7f892b0bdc9d8bb080c8", "type": "github" }, "original": { @@ -77,11 +77,11 @@ }, "nixpkgs-stable": { "locked": { - "lastModified": 1697332183, - "narHash": "sha256-ACYvYsgLETfEI2xM1jjp8ZLVNGGC0onoCGe+69VJGGE=", + "lastModified": 1697929210, + "narHash": "sha256-RkQZif6QhswEwv7484mrKfIU8XmIWm+ED6llbr4IyxM=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "0e1cff585c1a85aeab059d3109f66134a8f76935", + "rev": "fb000224952bf7749a9e8b3779104ef7ea4465c8", "type": "github" }, "original": { @@ -125,11 +125,11 @@ "nixpkgs-stable": "nixpkgs-stable" }, "locked": { - "lastModified": 1697339241, - "narHash": "sha256-ITsFtEtRbCBeEH9XrES1dxZBkE1fyNNUfIyQjQ2AYQs=", + "lastModified": 1697943852, + "narHash": "sha256-DaBxUPaZhQ3yLCmAATshYB7qo7NwcMvSFWz9T3bjYYY=", "owner": "Mic92", "repo": "sops-nix", - "rev": "51186b8012068c417dac7c31fb12861726577898", + "rev": "30a0ba4a20703b4bfe047fe5def1fc24978e322c", "type": "github" }, "original": { diff --git a/nixos/modules/programs/default.nix b/nixos/modules/programs/default.nix index 335dd93..6a41a2f 100644 --- a/nixos/modules/programs/default.nix +++ b/nixos/modules/programs/default.nix @@ -3,5 +3,6 @@ ./home-manager ./sops ./ssh + ./spotify-adblock ]; } diff --git a/nixos/modules/programs/spotify-adblock/default.nix b/nixos/modules/programs/spotify-adblock/default.nix new file mode 100644 index 0000000..fc80856 --- /dev/null +++ b/nixos/modules/programs/spotify-adblock/default.nix @@ -0,0 +1,11 @@ +{ config, lib, pkgs, ... }: + +let + cfg = config.sisyphus.programs.spotify-adblock; +in { + options.sisyphus.programs.spotify-adblock.enable = lib.mkEnableOption "Spotify adblock"; + + config = lib.mkIf cfg.enable { + environment.etc."spotify-adblock/config.toml".source = "${pkgs.spotify-adblock}/config.toml"; + }; +} diff --git a/nixos/users/tdpeuter/default.nix b/nixos/users/tdpeuter/default.nix index 56f51b8..20db00d 100644 --- a/nixos/users/tdpeuter/default.nix +++ b/nixos/users/tdpeuter/default.nix @@ -38,6 +38,8 @@ in { vistafonts # Microsoft fonts ]; + sisyphus.programs.spotify-adblock.enable = true; + home-manager.users.tdpeuter = lib.mkIf config.sisyphus.programs.home-manager.enable { programs.home-manager.enable = true;