mirror of
https://forgejo.merr.is/annika/nixos.git
synced 2026-02-04 06:10:04 -05:00
Tryint To Add spotifyd And SOPS
This commit is contained in:
parent
dd3dc90fa3
commit
cdf1c024c0
3 changed files with 58 additions and 0 deletions
|
|
@ -54,6 +54,11 @@ inputs.nixpkgs.lib.nixosSystem {
|
||||||
|
|
||||||
# Theming?
|
# Theming?
|
||||||
|
|
||||||
|
sops = {
|
||||||
|
defaultSopsFile = ../../secrets/secrets.yaml;
|
||||||
|
defaultSopsFormat = "yaml";
|
||||||
|
age.keyFile = "/home/annika/.config/sops/age/keys.txt";
|
||||||
|
};
|
||||||
|
|
||||||
# TODO: Temporary, remove eventually!
|
# TODO: Temporary, remove eventually!
|
||||||
networking.networkmanager.enable = true;
|
networking.networkmanager.enable = true;
|
||||||
|
|
@ -104,6 +109,7 @@ inputs.nixpkgs.lib.nixosSystem {
|
||||||
firefox.enable = true;
|
firefox.enable = true;
|
||||||
netbird.enable = true;
|
netbird.enable = true;
|
||||||
prusa-slicer.enable = true;
|
prusa-slicer.enable = true;
|
||||||
|
spotifyd.enable = true;
|
||||||
# Programming Stuff
|
# Programming Stuff
|
||||||
nixpkgs-fmt.enable = true;
|
nixpkgs-fmt.enable = true;
|
||||||
vscode.enable = true;
|
vscode.enable = true;
|
||||||
|
|
|
||||||
|
|
@ -6,5 +6,6 @@
|
||||||
./firefox.nix
|
./firefox.nix
|
||||||
./netbird.nix
|
./netbird.nix
|
||||||
./prusa-slicer.nix
|
./prusa-slicer.nix
|
||||||
|
./spotifyd.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
51
modules/common/applications/spotifyd.nix
Normal file
51
modules/common/applications/spotifyd.nix
Normal file
|
|
@ -0,0 +1,51 @@
|
||||||
|
{ config, pkgs, lib, ... }:
|
||||||
|
{
|
||||||
|
options = {
|
||||||
|
spotifyd = {
|
||||||
|
enable = lib.mkEnableOption {
|
||||||
|
description = "Enable spotifyd";
|
||||||
|
default = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
config = lib.mkIf (config.spotifyd.enable) {
|
||||||
|
home-manager.users.${config.user} = {
|
||||||
|
home.packages = [
|
||||||
|
pkgs.spotifyd
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
sops = {
|
||||||
|
secrets."spotifyd/settings/global/password" = { };
|
||||||
|
|
||||||
|
templates = {
|
||||||
|
"spotifyd.conf" = {
|
||||||
|
owner = "annika";
|
||||||
|
content = ''
|
||||||
|
[global]
|
||||||
|
username = "me@annikamerris.com"
|
||||||
|
password = "${config.sops.placeholder."spotifyd/settings/global/password"}"
|
||||||
|
use_mpris = true
|
||||||
|
device_name = "kim-nix"
|
||||||
|
device_type = "computer"
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Install and setup spotifyd
|
||||||
|
# sops.templates.
|
||||||
|
systemd.user.services.spotifyd = {
|
||||||
|
description = "spotify daemon";
|
||||||
|
documentation = [ "https://github.com/Spotifyd/spotifyd" ];
|
||||||
|
|
||||||
|
wantedBy = [ "default.target" ];
|
||||||
|
|
||||||
|
serviceConfig = {
|
||||||
|
ExecStart =
|
||||||
|
"${pkgs.spotifyd}/bin/spotifyd --no-daemon --config-path ${config.sops.templates."spotifyd.conf".path}";
|
||||||
|
Restart = "always";
|
||||||
|
RestartSec = 12;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue