mirror of
https://github.com/willemml/dotfiles.nix.git
synced 2025-04-13 19:57:19 +00:00
move spotifyd
This commit is contained in:
parent
f26588204b
commit
dfc17e0b17
7 changed files with 78 additions and 66 deletions
|
@ -49,7 +49,7 @@
|
||||||
{
|
{
|
||||||
darwinConfigurations = {
|
darwinConfigurations = {
|
||||||
zeus = darwin.lib.darwinSystem {
|
zeus = darwin.lib.darwinSystem {
|
||||||
inherit system;
|
inherit system pkgs;
|
||||||
modules = [
|
modules = [
|
||||||
./system/darwin.nix
|
./system/darwin.nix
|
||||||
home-manager.darwinModules.home-manager
|
home-manager.darwinModules.home-manager
|
||||||
|
|
|
@ -1,28 +0,0 @@
|
||||||
{ config, lib, pkgs, ... }:
|
|
||||||
|
|
||||||
# see https://github.com/nix-community/home-manager/issues/1341
|
|
||||||
|
|
||||||
{
|
|
||||||
disabledModules = [ "targets/darwin/linkapps.nix" ];
|
|
||||||
|
|
||||||
home.activation = lib.mkIf pkgs.stdenv.isDarwin {
|
|
||||||
copyApplications = let
|
|
||||||
apps = pkgs.buildEnv {
|
|
||||||
name = "home-manager-applications";
|
|
||||||
paths = config.home.packages;
|
|
||||||
pathsToLink = "/Applications";
|
|
||||||
};
|
|
||||||
in lib.hm.dag.entryAfter [ "writeBoundary" ] ''
|
|
||||||
baseDir="$HOME/Applications/Home Manager Apps"
|
|
||||||
if [ -d "$baseDir" ]; then
|
|
||||||
rm -rf "$baseDir"
|
|
||||||
fi
|
|
||||||
mkdir -p "$baseDir"
|
|
||||||
for appFile in ${apps}/Applications/*; do
|
|
||||||
target="$baseDir/$(basename "$appFile")"
|
|
||||||
$DRY_RUN_CMD cp ''${VERBOSE_ARG:+-v} -fHRL "$appFile" "$baseDir"
|
|
||||||
$DRY_RUN_CMD chmod ''${VERBOSE_ARG:+-v} -R +w "$target"
|
|
||||||
done
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -17,7 +17,7 @@ let
|
||||||
zotero = "Zotero";
|
zotero = "Zotero";
|
||||||
};
|
};
|
||||||
in {
|
in {
|
||||||
imports = [ ./launchd.nix ./apps.nix ];
|
imports = [ ./launchd.nix ];
|
||||||
|
|
||||||
home.file.".gnupg/gpg-agent.conf".text = mkIf stdenv.isDarwin ''
|
home.file.".gnupg/gpg-agent.conf".text = mkIf stdenv.isDarwin ''
|
||||||
pinentry-program "${pkgs.pinentry-touchid}/bin/pinentry-touchid"
|
pinentry-program "${pkgs.pinentry-touchid}/bin/pinentry-touchid"
|
||||||
|
@ -51,31 +51,12 @@ in {
|
||||||
NSGlobalDomain = {
|
NSGlobalDomain = {
|
||||||
AppleLanguages = [ "en-CA" ];
|
AppleLanguages = [ "en-CA" ];
|
||||||
AppleLocale = "en_CA";
|
AppleLocale = "en_CA";
|
||||||
AppleMeasurementUnits = "Centimeters";
|
|
||||||
AppleMetricUnits = true;
|
|
||||||
AppleTemperatureUnit = "Celsius";
|
|
||||||
NSAutomaticCapitalizationEnabled = false;
|
|
||||||
NSAutomaticDashSubstitutionEnabled = false;
|
|
||||||
NSAutomaticPeriodSubstitutionEnabled = false;
|
|
||||||
NSAutomaticQuoteSubstitutionEnabled = false;
|
|
||||||
NSAutomaticSpellingCorrectionEnabled = false;
|
|
||||||
};
|
};
|
||||||
"com.apple.Safari" = {
|
"com.apple.Safari" = {
|
||||||
AutoOpenSafeDownloads = false;
|
AutoOpenSafeDownloads = false;
|
||||||
IncludeDevelopMenu = true;
|
IncludeDevelopMenu = true;
|
||||||
ShowFullURLInSmartSearchField = true;
|
ShowFullURLInSmartSearchField = true;
|
||||||
};
|
};
|
||||||
"com.apple.dock" = {
|
|
||||||
autohide = true;
|
|
||||||
launchanim = false;
|
|
||||||
magnification = false;
|
|
||||||
minimize-to-application = true;
|
|
||||||
mru-spaces = false;
|
|
||||||
orientation = "bottom";
|
|
||||||
static-only = true;
|
|
||||||
tilesize = 35;
|
|
||||||
workspaces-swoosh-animation-off = true;
|
|
||||||
};
|
|
||||||
"com.apple.menuextra.clock" = {
|
"com.apple.menuextra.clock" = {
|
||||||
DateFormat = "EEE d MMM HH:mm:ss";
|
DateFormat = "EEE d MMM HH:mm:ss";
|
||||||
FlashDateSeparators = false;
|
FlashDateSeparators = false;
|
||||||
|
|
|
@ -156,6 +156,8 @@ in {
|
||||||
|
|
||||||
WarnOnEmptyTrash = false;
|
WarnOnEmptyTrash = false;
|
||||||
|
|
||||||
|
_FXShowPosixPathInTitle = true;
|
||||||
|
|
||||||
_FXSortFoldersFirst = true;
|
_FXSortFoldersFirst = true;
|
||||||
|
|
||||||
_FXSortFoldersFirstOnDesktop = true;
|
_FXSortFoldersFirstOnDesktop = true;
|
||||||
|
|
|
@ -14,9 +14,32 @@
|
||||||
KeepAlive = true;
|
KeepAlive = true;
|
||||||
UserName = "${config.home.username}";
|
UserName = "${config.home.username}";
|
||||||
ProcessType = "Adaptive";
|
ProcessType = "Adaptive";
|
||||||
StandardOutPath = "${config.home.homeDirectory}/.emacs.d/daemon-stdout";
|
StandardOutPath = "${config.home.homeDirectory}/Library/Logs/emacs-stdout.log";
|
||||||
StandardErrorPath =
|
StandardErrorPath =
|
||||||
"${config.home.homeDirectory}/.emacs.d/daemon-stderr";
|
"${config.home.homeDirectory}/Library/Logs/emacs-stderr.log";
|
||||||
|
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
agents.spotifyd = {
|
||||||
|
enable = true;
|
||||||
|
config = {
|
||||||
|
ProgramArguments = [
|
||||||
|
"${pkgs.spotifyd}/bin/spotifyd"
|
||||||
|
"--no-daemon"
|
||||||
|
"--username-cmd"
|
||||||
|
"${pkgs.pass}/bin/pass 'music/spotify' | grep login | cut -f2 -d ' '"
|
||||||
|
"--password-cmd"
|
||||||
|
"${pkgs.pass}/bin/pass 'music/spotify' | head -n1"
|
||||||
|
"--backend"
|
||||||
|
"portaudio"
|
||||||
|
];
|
||||||
|
KeepAlive = true;
|
||||||
|
UserName = "${config.home.username}";
|
||||||
|
StandardOutPath = "${config.home.homeDirectory}/Library/Logs/spotifyd-stdout.log";
|
||||||
|
StandardErrorPath =
|
||||||
|
"${config.home.homeDirectory}/Library/Logs/spotifyd-stderr.log";
|
||||||
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -7,9 +7,8 @@ let
|
||||||
freecad-mac
|
freecad-mac
|
||||||
gnused
|
gnused
|
||||||
iterm2
|
iterm2
|
||||||
karabiner-elements
|
|
||||||
pinentry_mac
|
|
||||||
pinentry-touchid
|
pinentry-touchid
|
||||||
|
pinentry_mac
|
||||||
qbittorrent-mac
|
qbittorrent-mac
|
||||||
spoof-mac
|
spoof-mac
|
||||||
spotify-mac
|
spotify-mac
|
||||||
|
@ -61,6 +60,7 @@ in
|
||||||
rustup
|
rustup
|
||||||
shellcheck
|
shellcheck
|
||||||
spotify-tui
|
spotify-tui
|
||||||
|
spotifyd
|
||||||
sqlite
|
sqlite
|
||||||
texinfo
|
texinfo
|
||||||
texlive.combined.scheme-full
|
texlive.combined.scheme-full
|
||||||
|
|
|
@ -1,31 +1,65 @@
|
||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
services.nix-daemon.enable = true;
|
environment.systemPackages = with pkgs; [ ];
|
||||||
services.spotifyd = {
|
|
||||||
enable = true;
|
|
||||||
settings.use_keyring = true;
|
|
||||||
settings.username_cmd = "${pkgs.pass}/bin/pass 'music/spotify' | grep login | cut -f2 -d ' '";
|
|
||||||
settings.password_cmd = "${pkgs.pass}/bin/pass 'music/spotify' | head -n1";
|
|
||||||
};
|
|
||||||
|
|
||||||
nix.package = pkgs.nix;
|
nix.package = pkgs.nix;
|
||||||
|
|
||||||
|
programs.bash.enable = true;
|
||||||
|
|
||||||
programs.zsh.enable = true;
|
programs.zsh.enable = true;
|
||||||
|
|
||||||
|
services.nix-daemon.enable = true;
|
||||||
|
|
||||||
system = {
|
system = {
|
||||||
defaults = {
|
defaults = {
|
||||||
loginwindow.SHOWFULLNAME = false;
|
loginwindow = {
|
||||||
loginwindow.GuestEnabled = false;
|
SHOWFULLNAME = false;
|
||||||
loginwindow.DisableConsoleAccess = true;
|
GuestEnabled = false;
|
||||||
finder._FXShowPosixPathInTitle = true;
|
DisableConsoleAccess = true;
|
||||||
|
};
|
||||||
LaunchServices.LSQuarantine = false;
|
LaunchServices.LSQuarantine = false;
|
||||||
|
dock = {
|
||||||
|
autohide = true;
|
||||||
|
launchanim = false;
|
||||||
|
minimize-to-application = true;
|
||||||
|
mru-spaces = false;
|
||||||
|
orientation = "bottom";
|
||||||
|
static-only = true;
|
||||||
|
tilesize = 35;
|
||||||
|
};
|
||||||
|
NSGlobalDomain = {
|
||||||
|
"com.apple.sound.beep.feedback" = 1;
|
||||||
|
AppleICUForce24HourTime = true;
|
||||||
|
AppleInterfaceStyle = "Dark";
|
||||||
|
AppleMeasurementUnits = "Centimeters";
|
||||||
|
AppleMetricUnits = 1;
|
||||||
|
AppleShowAllExtensions = true;
|
||||||
|
AppleShowScrollBars = "WhenScrolling";
|
||||||
|
AppleTemperatureUnit = "Celsius";
|
||||||
|
NSAutomaticCapitalizationEnabled = false;
|
||||||
|
NSAutomaticDashSubstitutionEnabled = false;
|
||||||
|
NSAutomaticPeriodSubstitutionEnabled = false;
|
||||||
|
NSAutomaticQuoteSubstitutionEnabled = false;
|
||||||
|
NSAutomaticSpellingCorrectionEnabled = false;
|
||||||
|
NSAutomaticWindowAnimationsEnabled = false;
|
||||||
|
NSDocumentSaveNewDocumentsToCloud = false;
|
||||||
|
NSNavPanelExpandedStateForSaveMode = true;
|
||||||
|
NSNavPanelExpandedStateForSaveMode2 = true;
|
||||||
|
NSTableViewDefaultSizeMode = 1;
|
||||||
|
NSTextShowsControlCharacters = true;
|
||||||
|
NSWindowResizeTime = 0.0;
|
||||||
|
};
|
||||||
|
trackpad = {
|
||||||
|
FirstClickThreshold = 0;
|
||||||
|
SecondClickThreshold = 2;
|
||||||
|
Clicking = true;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
keyboard = {
|
keyboard = {
|
||||||
enableKeyMapping = true;
|
enableKeyMapping = true;
|
||||||
|
|
||||||
remapCapsLockToEscape = true;
|
remapCapsLockToEscape = true;
|
||||||
|
|
||||||
# see https://developer.apple.com/library/content/technotes/tn2450/_index.html for more info
|
# see https://developer.apple.com/library/content/technotes/tn2450/_index.html for more info
|
||||||
userKeyMapping = [{
|
userKeyMapping = [{
|
||||||
HIDKeyboardModifierMappingSrc = 30064771303; # remap right command to right control.
|
HIDKeyboardModifierMappingSrc = 30064771303; # remap right command to right control.
|
||||||
|
|
Loading…
Add table
Reference in a new issue