wording mpd!
This commit is contained in:
parent
12f1b97f1c
commit
670672948d
5 changed files with 72 additions and 123 deletions
55
flake.lock
generated
55
flake.lock
generated
|
@ -293,27 +293,6 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"fenix": {
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs": [
|
|
||||||
"nixpkgs"
|
|
||||||
],
|
|
||||||
"rust-analyzer-src": "rust-analyzer-src"
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1720333712,
|
|
||||||
"narHash": "sha256-qZmpIPUe4mwdBGmKPBJ5KzvXH6GOCXheiusTAgNjAAA=",
|
|
||||||
"owner": "nix-community",
|
|
||||||
"repo": "fenix",
|
|
||||||
"rev": "b78c98c53a46e2a2d6479a920f98aa0aeae56281",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nix-community",
|
|
||||||
"repo": "fenix",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"flake-compat": {
|
"flake-compat": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
|
@ -1934,21 +1913,6 @@
|
||||||
"type": "sourcehut"
|
"type": "sourcehut"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nur": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1720340553,
|
|
||||||
"narHash": "sha256-yltkWY9tbcTO1E9lsegEUcqcHdF+F3Yb8O79CjSAHrg=",
|
|
||||||
"owner": "nix-community",
|
|
||||||
"repo": "NUR",
|
|
||||||
"rev": "64eb60afcb54464e61d34fda417e7a5c7a935c21",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nix-community",
|
|
||||||
"repo": "NUR",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"plugin-alpha-nvim": {
|
"plugin-alpha-nvim": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
|
@ -3566,7 +3530,6 @@
|
||||||
"doom-emacs-config": "doom-emacs-config",
|
"doom-emacs-config": "doom-emacs-config",
|
||||||
"doomemacs": "doomemacs",
|
"doomemacs": "doomemacs",
|
||||||
"emacs-overlay": "emacs-overlay",
|
"emacs-overlay": "emacs-overlay",
|
||||||
"fenix": "fenix",
|
|
||||||
"home-manager": "home-manager_2",
|
"home-manager": "home-manager_2",
|
||||||
"hyprland": "hyprland",
|
"hyprland": "hyprland",
|
||||||
"hyprland-plugins": "hyprland-plugins",
|
"hyprland-plugins": "hyprland-plugins",
|
||||||
|
@ -3578,7 +3541,6 @@
|
||||||
"nixpkgs": "nixpkgs_8",
|
"nixpkgs": "nixpkgs_8",
|
||||||
"nixpkgs-wayland": "nixpkgs-wayland",
|
"nixpkgs-wayland": "nixpkgs-wayland",
|
||||||
"nixvim": "nixvim",
|
"nixvim": "nixvim",
|
||||||
"nur": "nur",
|
|
||||||
"quickshell": "quickshell",
|
"quickshell": "quickshell",
|
||||||
"schizofox": "schizofox",
|
"schizofox": "schizofox",
|
||||||
"spicetify-nix": "spicetify-nix",
|
"spicetify-nix": "spicetify-nix",
|
||||||
|
@ -3586,23 +3548,6 @@
|
||||||
"stylix": "stylix"
|
"stylix": "stylix"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"rust-analyzer-src": {
|
|
||||||
"flake": false,
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1720292183,
|
|
||||||
"narHash": "sha256-CPcdVpsgmNXYVsw4nKPrM23J5mYXtiotYMz2BjPDIKU=",
|
|
||||||
"owner": "rust-lang",
|
|
||||||
"repo": "rust-analyzer",
|
|
||||||
"rev": "058c88da66797eb588b47a4aac3e42847d1333d7",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "rust-lang",
|
|
||||||
"ref": "nightly",
|
|
||||||
"repo": "rust-analyzer",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"rust-overlay": {
|
"rust-overlay": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-utils": [
|
"flake-utils": [
|
||||||
|
|
82
flake.nix
82
flake.nix
|
@ -7,63 +7,75 @@
|
||||||
inputs = {
|
inputs = {
|
||||||
# Unstable nixpkgs baby!
|
# Unstable nixpkgs baby!
|
||||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||||
# Hyprland, my main compositor
|
# nixpkgs for wayland
|
||||||
hyprland.url = "git+https://github.com/hyprwm/Hyprland?submodules=1";
|
nixpkgs-wayland.url = "github:nix-community/nixpkgs-wayland";
|
||||||
#hyprland.url = "git+https://github.com/hyprwm/Hyprland?submodules=1&ref=aquamarine";
|
# Sandboxing
|
||||||
# Plugins for hyprland
|
nixpak = {
|
||||||
hyprland-plugins = {
|
url = "github:nixpak/nixpak";
|
||||||
url = "github:hyprwm/hyprland-plugins";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
inputs.hyprland.follows = "hyprland";
|
|
||||||
};
|
};
|
||||||
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
|
home-manager = {
|
||||||
# Plugin to get split monitor workspaces
|
url = "github:nix-community/home-manager";
|
||||||
split-monitor-workspaces = {
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
url = "github:Duckonaut/split-monitor-workspaces";
|
|
||||||
inputs.hyprland.follows = "hyprland";
|
|
||||||
};
|
};
|
||||||
# Lix because fast rebuild times are cool
|
# Lix because fast rebuild times are cool
|
||||||
lix-module = {
|
lix-module = {
|
||||||
url = "https://git.lix.systems/lix-project/nixos-module/archive/2.90.0-rc1.tar.gz";
|
url = "https://git.lix.systems/lix-project/nixos-module/archive/2.90.0-rc1.tar.gz";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
# Sandboxing
|
|
||||||
nixpak = {
|
# Hardware for my laptop
|
||||||
url = "github:nixpak/nixpak";
|
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
|
# Secret management
|
||||||
|
agenix.url = "github:ryantm/agenix";
|
||||||
|
|
||||||
|
# Hyprland, my main compositor
|
||||||
|
hyprland.url = "git+https://github.com/hyprwm/Hyprland?submodules=1";
|
||||||
|
# Plugins for hyprland
|
||||||
|
hyprland-plugins = {
|
||||||
|
url = "github:hyprwm/hyprland-plugins";
|
||||||
|
inputs.hyprland.follows = "hyprland";
|
||||||
};
|
};
|
||||||
# Wayland packages
|
# Plugin to get split monitor workspaces
|
||||||
nixpkgs-wayland.url = "github:nix-community/nixpkgs-wayland";
|
split-monitor-workspaces = {
|
||||||
neovim-nightly-overlay.url = "github:nix-community/neovim-nightly-overlay";
|
url = "github:Duckonaut/split-monitor-workspaces";
|
||||||
doomemacs = {
|
inputs.hyprland.follows = "hyprland";
|
||||||
url = "github:doomemacs/doomemacs";
|
|
||||||
flake = false;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
neovim-flake = {
|
neovim-flake = {
|
||||||
url = "github:notashelf/nvf";
|
url = "github:notashelf/nvf";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
nixvim = {
|
||||||
|
url = "github:nix-community/nixvim";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
neovim-nightly-overlay.url = "github:nix-community/neovim-nightly-overlay";
|
||||||
|
|
||||||
|
doomemacs = {
|
||||||
|
url = "github:doomemacs/doomemacs";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
|
emacs-overlay.url = "github:nix-community/emacs-overlay";
|
||||||
doom-emacs-config = {
|
doom-emacs-config = {
|
||||||
url = "github:bloxx12/doom-emacs-config";
|
url = "github:bloxx12/doom-emacs-config";
|
||||||
flake = false;
|
flake = false;
|
||||||
};
|
};
|
||||||
emacs-overlay.url = "github:nix-community/emacs-overlay";
|
|
||||||
anyrun = {
|
anyrun = {
|
||||||
url = "github:Kirottu/anyrun";
|
url = "github:Kirottu/anyrun";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
# kakoune.url = "github:mawww/kakoune";
|
|
||||||
stylix.url = "github:danth/stylix";
|
stylix.url = "github:danth/stylix";
|
||||||
home-manager = {
|
|
||||||
url = "github:nix-community/home-manager";
|
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
};
|
|
||||||
|
|
||||||
ags.url = "github:Aylur/ags";
|
ags.url = "github:Aylur/ags";
|
||||||
|
|
||||||
quickshell = {
|
quickshell = {
|
||||||
url = "git+https://git.outfoxxed.me/outfoxxed/quickshell";
|
url = "git+https://git.outfoxxed.me/outfoxxed/quickshell";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
schizofox = {
|
schizofox = {
|
||||||
url = "github:schizofox/schizofox";
|
url = "github:schizofox/schizofox";
|
||||||
inputs = {
|
inputs = {
|
||||||
|
@ -72,17 +84,5 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
spicetify-nix.url = "github:the-argus/spicetify-nix";
|
spicetify-nix.url = "github:the-argus/spicetify-nix";
|
||||||
nur = {url = "github:nix-community/NUR";};
|
|
||||||
nixvim = {
|
|
||||||
url = "github:nix-community/nixvim";
|
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
};
|
|
||||||
|
|
||||||
agenix.url = "github:ryantm/agenix";
|
|
||||||
|
|
||||||
fenix = {
|
|
||||||
url = "github:nix-community/fenix";
|
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,30 +18,36 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
systemd.services.mpd.environment = {
|
||||||
|
# https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/609
|
||||||
|
XDG_RUNTIME_DIR = "/run/user/1000";
|
||||||
|
};
|
||||||
|
services.mpd = {
|
||||||
|
enable = true;
|
||||||
|
inherit (cfg) musicDirectory;
|
||||||
|
user = username;
|
||||||
|
extraConfig = ''
|
||||||
|
user "${username}"
|
||||||
|
restore_paused "yes"
|
||||||
|
|
||||||
|
follow_outside_symlinks "yes"
|
||||||
|
follow_inside_symlinks "yes"
|
||||||
|
|
||||||
|
audio_output {
|
||||||
|
type "pipewire"
|
||||||
|
name "PipeWire Sound Server"
|
||||||
|
}
|
||||||
|
|
||||||
|
audio_output {
|
||||||
|
type "fifo"
|
||||||
|
name "FIFO"
|
||||||
|
path "/tmp/mpd.fifo"
|
||||||
|
format "44100:16:2"
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
};
|
||||||
home-manager.users.${username} = {
|
home-manager.users.${username} = {
|
||||||
services = {
|
services = {
|
||||||
mpd = {
|
|
||||||
enable = true;
|
|
||||||
inherit (cfg) musicDirectory;
|
|
||||||
extraConfig = ''
|
|
||||||
user "${username}"
|
|
||||||
restore_paused "yes"
|
|
||||||
|
|
||||||
follow_outside_symlinks "yes"
|
|
||||||
follow_inside_symlinks "yes"
|
|
||||||
|
|
||||||
audio_output {
|
|
||||||
type "pipewire"
|
|
||||||
name "PipeWire Sound Server"
|
|
||||||
}
|
|
||||||
audio_output {
|
|
||||||
type "fifo"
|
|
||||||
name "FIFO"
|
|
||||||
path "/tmp/mpd.fifo"
|
|
||||||
format "44100:16:2"
|
|
||||||
}
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
mpd-mpris = {
|
mpd-mpris = {
|
||||||
enable = true;
|
enable = true;
|
||||||
mpd = {
|
mpd = {
|
||||||
|
|
|
@ -12,6 +12,7 @@ in {
|
||||||
hardware.pulseaudio.enable = false;
|
hardware.pulseaudio.enable = false;
|
||||||
services.pipewire = {
|
services.pipewire = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
alsa.enable = true;
|
||||||
pulse.enable = true;
|
pulse.enable = true;
|
||||||
};
|
};
|
||||||
security.rtkit.enable = true;
|
security.rtkit.enable = true;
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
with lib; let
|
with lib; let
|
||||||
cfg = config.modules.programs.ncmpcpp;
|
cfg = config.modules.programs.ncmpcpp;
|
||||||
inherit (config.modules.other.system) username;
|
inherit (config.modules.other.system) username;
|
||||||
|
inherit (config.modules.services.mpd) musicDirectory;
|
||||||
in {
|
in {
|
||||||
options.modules.programs.ncmpcpp.enable = mkEnableOption "ncmpcpp";
|
options.modules.programs.ncmpcpp.enable = mkEnableOption "ncmpcpp";
|
||||||
|
|
||||||
|
@ -16,11 +17,8 @@ in {
|
||||||
programs.ncmpcpp = {
|
programs.ncmpcpp = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.ncmpcpp.override {visualizerSupport = true;};
|
package = pkgs.ncmpcpp.override {visualizerSupport = true;};
|
||||||
mpdMusicDir = "/home/${username}/Nextcloud/Media/Music";
|
mpdMusicDir = "${musicDirectory}";
|
||||||
settings = {
|
settings = {
|
||||||
mpd_host = "127.0.0.1";
|
|
||||||
mpd_port = "6600";
|
|
||||||
/*
|
|
||||||
alternative_header_first_line_format = "$5{$b%t$/b}$9";
|
alternative_header_first_line_format = "$5{$b%t$/b}$9";
|
||||||
alternative_header_second_line_format = "$3by $7{$b%a$/b}$9 $3from $7{$b%b$/b}$9 $5{(%y)}";
|
alternative_header_second_line_format = "$3by $7{$b%a$/b}$9 $3from $7{$b%b$/b}$9 $5{(%y)}";
|
||||||
song_list_format = "♫ $2%n$(end) $9 $3%a$(end) $(245)-$9 $(246)%t$9 $R{ $5%y$9}$(end) $(246)%lq$(end)";
|
song_list_format = "♫ $2%n$(end) $9 $3%a$(end) $(245)-$9 $(246)%t$9 $R{ $5%y$9}$(end) $(246)%lq$(end)";
|
||||||
|
@ -79,7 +77,6 @@ in {
|
||||||
visualizer_data_source = "/tmp/mpd.fifo";
|
visualizer_data_source = "/tmp/mpd.fifo";
|
||||||
visualizer_type = "wave_filled";
|
visualizer_type = "wave_filled";
|
||||||
visualizer_look = "▉▋";
|
visualizer_look = "▉▋";
|
||||||
*/
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue