From c496b8f22341f26abf8ee25dcbc720d0314fbf63 Mon Sep 17 00:00:00 2001 From: willemml Date: Wed, 8 Feb 2023 15:09:11 -0800 Subject: [PATCH] iterm service, remove spotifyd service, touchup overlays --- home/darwin/launchd.nix | 27 ----------------- home/programs.nix | 47 +---------------------------- overlays/chromium-mac.nix | 2 +- overlays/darwin-zsh-completions.nix | 2 +- overlays/firefox-mac.nix | 2 +- overlays/freecad-mac.nix | 2 +- overlays/pinentry-mac.nix | 2 +- overlays/pinentry-touchid.nix | 2 +- overlays/qbittorrent-mac.nix | 2 +- overlays/spotify-mac.nix | 2 +- overlays/vlc-mac.nix | 2 +- system/darwin.nix | 8 +++++ 12 files changed, 18 insertions(+), 82 deletions(-) diff --git a/home/darwin/launchd.nix b/home/darwin/launchd.nix index a5e62d9..e82ae40 100644 --- a/home/darwin/launchd.nix +++ b/home/darwin/launchd.nix @@ -20,32 +20,5 @@ }; }; - - 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" - "--bitrate" - "320" - "--device-type" - "computer" - "--volume_controller" - "softvol" - ]; - KeepAlive = true; - UserName = "${config.home.username}"; - StandardOutPath = "${config.home.homeDirectory}/Library/Logs/spotifyd-stdout.log"; - StandardErrorPath = - "${config.home.homeDirectory}/Library/Logs/spotifyd-stderr.log"; - }; - }; }; } diff --git a/home/programs.nix b/home/programs.nix index 42bf3eb..91e32b8 100644 --- a/home/programs.nix +++ b/home/programs.nix @@ -85,52 +85,8 @@ starship = { enable = true; enableZshIntegration = true; + enableBashIntegration = true; package = pkgs.starship; - settings = { - format = - "$os[](fg:#979797 bg:#444444)$directory$git_branch$git_status[](fg:#444444)$fill[](fg:#444444)$cmd_duration$time$line_break$character"; - fill = { - symbol = "·"; - style = "fg:#505050"; - }; - cmd_duration = { - disabled = false; - min_time = 1500; - style = "fg:#979797 bg:#444444"; - format = "[ $duration  ]($style)"; - }; - os = { - disabled = false; - style = "fg:#eaeaea bg:#444444"; - format = "[ $symbol ]($style)"; - symbols.Macos = ""; - }; - directory = { - disabled = false; - style = "fg:#149dff bg:#444444"; - format = "[  $path ]($style)"; - truncation_length = 3; - truncation_symbol = ""; - }; - git_branch = { - disabled = false; - symbol = ""; - style = "fg:#53d306 bg:#444444"; - format = "[[](fg:#979797 bg:#444444)  $symbol $branch ]($style)"; - }; - git_status = { - disabled = false; - style = "bg:#444444"; - format = - "[[$staged](fg:#cca107 bg:#444444)[$modified](fg:#cca107 bg:#444444)[$untracked](fg:#149dff bg:#444444)[$conflicted](fg:#ed0505 bg:#444444)]($style)"; - }; - time = { - disabled = false; - style = "fg:#4d7573 bg:#444444"; - format = "[ $time  ]($style)"; - time_format = "%T"; - }; - }; }; zoxide = { @@ -196,7 +152,6 @@ np = "nix-shell -p"; org = "z ${config.home.sessionVariables.ORGDIR}"; ubc = "z ${config.home.sessionVariables.UBCDIR}"; - nbpkgs = "nix-build --arg pkgs 'import {}'"; }; }; diff --git a/overlays/chromium-mac.nix b/overlays/chromium-mac.nix index 6889533..be0b455 100644 --- a/overlays/chromium-mac.nix +++ b/overlays/chromium-mac.nix @@ -1,4 +1,4 @@ -{ pkgs }: +{ pkgs ? import {} }: let versions = { diff --git a/overlays/darwin-zsh-completions.nix b/overlays/darwin-zsh-completions.nix index 9fc863b..c465bb2 100644 --- a/overlays/darwin-zsh-completions.nix +++ b/overlays/darwin-zsh-completions.nix @@ -1,6 +1,6 @@ # taken from nix-darwin repo # https://github.com/LnL7/nix-darwin/blob/87b9d090ad39b25b2400029c64825fc2a8868943/modules/examples/lnl.nix -{ pkgs }: +{ pkgs ? import {} }: pkgs.runCommand "darwin-zsh-completions-0.0.0" { preferLocalBuild = true; } diff --git a/overlays/firefox-mac.nix b/overlays/firefox-mac.nix index fb46761..85c1fd0 100644 --- a/overlays/firefox-mac.nix +++ b/overlays/firefox-mac.nix @@ -1,4 +1,4 @@ -{ pkgs }: +{ pkgs ? import {} }: let version = "109.0.1"; diff --git a/overlays/freecad-mac.nix b/overlays/freecad-mac.nix index 14777d3..417e167 100644 --- a/overlays/freecad-mac.nix +++ b/overlays/freecad-mac.nix @@ -1,4 +1,4 @@ -{ pkgs }: +{ pkgs ? import {} }: let version = "0.20.2"; diff --git a/overlays/pinentry-mac.nix b/overlays/pinentry-mac.nix index 7079648..90bdabd 100644 --- a/overlays/pinentry-mac.nix +++ b/overlays/pinentry-mac.nix @@ -1,4 +1,4 @@ -{ pkgs }: +{ pkgs ? import {} }: pkgs.stdenv.mkDerivation { name = "pinentry-mac"; diff --git a/overlays/pinentry-touchid.nix b/overlays/pinentry-touchid.nix index c8995dd..52a83e4 100644 --- a/overlays/pinentry-touchid.nix +++ b/overlays/pinentry-touchid.nix @@ -1,4 +1,4 @@ -{ pkgs }: +{ pkgs ? import {} }: pkgs.stdenv.mkDerivation { name = "pinentry-touchid"; diff --git a/overlays/qbittorrent-mac.nix b/overlays/qbittorrent-mac.nix index c32c771..33b268b 100644 --- a/overlays/qbittorrent-mac.nix +++ b/overlays/qbittorrent-mac.nix @@ -1,4 +1,4 @@ -{ pkgs }: +{ pkgs ? import {} }: let version = "4.4.5"; diff --git a/overlays/spotify-mac.nix b/overlays/spotify-mac.nix index d634253..9e16a61 100644 --- a/overlays/spotify-mac.nix +++ b/overlays/spotify-mac.nix @@ -1,4 +1,4 @@ -{ pkgs }: +{ pkgs ? import {} }: let appName = "Spotify"; diff --git a/overlays/vlc-mac.nix b/overlays/vlc-mac.nix index 25312f3..d74b280 100644 --- a/overlays/vlc-mac.nix +++ b/overlays/vlc-mac.nix @@ -1,4 +1,4 @@ -{ pkgs }: +{ pkgs ? import {} }: let appName = "VLC"; diff --git a/system/darwin.nix b/system/darwin.nix index 3ec251e..5a3522b 100644 --- a/system/darwin.nix +++ b/system/darwin.nix @@ -32,6 +32,14 @@ vlc-mac ]; + launchd.user.agents.iterm2 = { + command = "${pkgs.iterm2}/Applications/iTerm2.app/Contents/MacOS/iTerm2"; + serviceConfig = { + KeepAlive = true; + ProcessType = "Adaptive"; + }; + }; + nix = { extraOptions = '' experimental-features = nix-command flakes