2026-05-11 19:44:07 +01:00
|
|
|
# home-manager/fred.nix
|
2026-04-16 20:33:40 +01:00
|
|
|
{ config, pkgs, lib, inputs, osConfig, ... }:
|
|
|
|
|
let
|
|
|
|
|
isDesktop = lib.elem osConfig.networking.hostName [ "FredOS-Gaming" "FredOS-Macbook" ];
|
|
|
|
|
in
|
2026-01-20 08:41:53 +00:00
|
|
|
{
|
|
|
|
|
home.stateVersion = "25.11";
|
2026-05-11 19:44:07 +01:00
|
|
|
|
2026-01-20 08:41:53 +00:00
|
|
|
home.packages = with pkgs; [
|
|
|
|
|
#
|
|
|
|
|
];
|
2026-02-24 19:17:42 +00:00
|
|
|
|
2026-02-24 19:18:42 +00:00
|
|
|
home.file.".config/nixpkgs/config.nix".text = ''
|
|
|
|
|
{ allowUnfree = true; }
|
|
|
|
|
'';
|
2026-04-16 20:17:38 +01:00
|
|
|
|
2026-05-11 19:44:07 +01:00
|
|
|
# Wallpaper source — consumed by stylix's image option (set in
|
2026-07-08 10:13:14 +01:00
|
|
|
# settings/stylix.nix) and by quickshell's wallpaper layer.
|
2026-04-16 20:17:38 +01:00
|
|
|
home.file.".local/share/backgrounds/wallpaper.png".source =
|
|
|
|
|
"${inputs.self}/walls/wallpaper.png";
|
|
|
|
|
|
2026-05-11 19:44:07 +01:00
|
|
|
# btop — stylix's btop target writes the colour theme; we keep our
|
|
|
|
|
# non-colour preferences here.
|
2026-05-18 13:53:19 +01:00
|
|
|
programs.btop = {
|
2026-05-11 19:44:07 +01:00
|
|
|
enable = true;
|
|
|
|
|
settings = {
|
|
|
|
|
theme_background = false;
|
|
|
|
|
vim_keys = false;
|
2026-07-08 10:32:22 +01:00
|
|
|
proc_filter_kernel = true;
|
2026-05-11 19:44:07 +01:00
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
# Ghostty — stylix's ghostty target writes the colour theme.
|
|
|
|
|
programs.ghostty = lib.mkIf isDesktop {
|
|
|
|
|
enable = true;
|
|
|
|
|
settings = {
|
2026-07-29 21:46:13 +01:00
|
|
|
font-family = "CaskaydiaCove NF";
|
2026-05-11 19:44:07 +01:00
|
|
|
font-size = 11;
|
|
|
|
|
font-thicken = true;
|
|
|
|
|
window-padding-x = 10;
|
|
|
|
|
window-padding-y = 10;
|
|
|
|
|
window-padding-balance = true;
|
|
|
|
|
background-opacity = 0.98;
|
|
|
|
|
confirm-close-surface = false;
|
|
|
|
|
gtk-titlebar = false;
|
2026-05-16 17:52:18 +01:00
|
|
|
gtk-single-instance = true;
|
2026-07-29 22:45:02 +01:00
|
|
|
# keeps the warm instance alive with zero windows
|
|
|
|
|
quit-after-last-window-closed = false;
|
2026-05-11 19:44:07 +01:00
|
|
|
cursor-style = "bar";
|
|
|
|
|
cursor-style-blink = true;
|
|
|
|
|
};
|
|
|
|
|
};
|
2026-05-11 21:16:47 +01:00
|
|
|
|
2026-07-31 09:05:39 +01:00
|
|
|
# spotify-player — native librespot TUI replacing the Electron Spotify app.
|
|
|
|
|
# stylix's spotify-player target writes the colour theme.
|
|
|
|
|
# MPRIS (quickshell's media card), notifications and streaming are all on by
|
2026-07-31 12:22:11 +01:00
|
|
|
# default on Linux, so only the off-by-default visualiser needs setting.
|
2026-07-31 09:05:39 +01:00
|
|
|
programs.spotify-player = lib.mkIf isDesktop {
|
|
|
|
|
enable = true;
|
2026-07-31 23:29:18 +01:00
|
|
|
# 26.05 ships 0.23.0, whose Web API token is cached with refresh_token =
|
|
|
|
|
# null: once it expires (~1h) nothing can renew it and the library just
|
|
|
|
|
# spins until the app is restarted. 0.24.1 treats a non-renewable cached
|
|
|
|
|
# token as unusable and re-runs the PKCE flow instead. Drop this override
|
|
|
|
|
# once the pinned channel reaches 0.24.1.
|
|
|
|
|
package = pkgs.spotify-player.overrideAttrs (old: rec {
|
|
|
|
|
version = "0.24.1";
|
|
|
|
|
src = pkgs.fetchFromGitHub {
|
|
|
|
|
owner = "aome510";
|
|
|
|
|
repo = "spotify-player";
|
|
|
|
|
tag = "v${version}";
|
|
|
|
|
hash = "sha256-+GADmRl4XMwV8TfYZjEeyKDDfda3bDPzeerhYryX6vA=";
|
|
|
|
|
};
|
|
|
|
|
cargoDeps = pkgs.rustPlatform.fetchCargoVendor {
|
|
|
|
|
inherit src;
|
|
|
|
|
hash = "sha256-CSZ5sZ+d7Jhi43ipaWXKupYPFgWCbCx4RMTQN8emu9o=";
|
|
|
|
|
};
|
|
|
|
|
});
|
2026-07-31 15:31:26 +01:00
|
|
|
settings = {
|
|
|
|
|
enable_audio_visualization = true;
|
|
|
|
|
# Our own Spotify app rather than the built-in default (ncspot's client
|
|
|
|
|
# ID, shared by every spotify-player/ncspot install). Spotify rate-limits
|
|
|
|
|
# per client ID, and exhausting the shared one surfaced here as
|
|
|
|
|
# "Token is not valid" and an endlessly loading library. Public PKCE
|
|
|
|
|
# client, no secret involved, so it's fine in the repo.
|
|
|
|
|
# Redirect URI registered: http://127.0.0.1:8989/login
|
|
|
|
|
client_id = "265506bc7bbd4032bf0fee708b321d3e";
|
|
|
|
|
};
|
2026-07-31 09:05:39 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
# Upstream ships no .desktop file (TUI only), so the launcher can't find it.
|
|
|
|
|
xdg.desktopEntries.spotify-player = lib.mkIf isDesktop {
|
|
|
|
|
name = "Spotify Player";
|
|
|
|
|
genericName = "Music Player";
|
|
|
|
|
exec = "ghostty --title=spotify-player -e spotify_player";
|
|
|
|
|
icon = "spotify";
|
|
|
|
|
terminal = false;
|
|
|
|
|
categories = [ "Audio" "Music" "Player" "AudioVideo" ];
|
|
|
|
|
};
|
|
|
|
|
|
2026-07-07 14:01:12 +01:00
|
|
|
# Warm Ghostty instance — new windows attach via gtk-single-instance.
|
|
|
|
|
systemd.user.services.ghostty-daemon = lib.mkIf isDesktop {
|
|
|
|
|
Unit = {
|
|
|
|
|
Description = "Ghostty warm instance (no window)";
|
|
|
|
|
After = [ "graphical-session.target" ];
|
|
|
|
|
PartOf = [ "graphical-session.target" ];
|
|
|
|
|
};
|
|
|
|
|
Service = {
|
|
|
|
|
Type = "simple";
|
|
|
|
|
ExecStart = "${pkgs.ghostty}/bin/ghostty --initial-window=false";
|
|
|
|
|
Restart = "always";
|
|
|
|
|
};
|
|
|
|
|
Install.WantedBy = [ "graphical-session.target" ];
|
|
|
|
|
};
|
|
|
|
|
|
2026-01-20 08:41:53 +00:00
|
|
|
}
|