Merge branch 'master' of git.bitlab21.com:sam/nixos

This commit is contained in:
sam 2024-07-05 16:34:11 +01:00
commit 37192edd83
9 changed files with 116 additions and 17 deletions

View File

@ -97,11 +97,11 @@
]
},
"locked": {
"lastModified": 1717285511,
"narHash": "sha256-iKzJcpdXih14qYVcZ9QC9XuZYnPc6T8YImb6dX166kw=",
"lastModified": 1719877454,
"narHash": "sha256-g5N1yyOSsPNiOlFfkuI/wcUjmtah+nxdImJqrSATjOU=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "2a55567fcf15b1b1c7ed712a2c6fadaec7412ea8",
"rev": "4e3583423212f9303aa1a6337f8dffb415920e4f",
"type": "github"
},
"original": {
@ -206,11 +206,11 @@
]
},
"locked": {
"lastModified": 1718530513,
"narHash": "sha256-BmO8d0r+BVlwWtMLQEYnwmngqdXIuyFzMwvmTcLMee8=",
"lastModified": 1719827385,
"narHash": "sha256-qs+nU20Sm8czHg3bhGCqiH+8e13BJyRrKONW34g3i50=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "a1fddf0967c33754271761d91a3d921772b30d0e",
"rev": "391ca6e950c2525b4f853cbe29922452c14eda82",
"type": "github"
},
"original": {
@ -262,11 +262,11 @@
]
},
"locked": {
"lastModified": 1719128254,
"narHash": "sha256-I7jMpq0CAOZA/i70+HDQO/ulLttyQu/K70cSESiMX7A=",
"lastModified": 1719845423,
"narHash": "sha256-ZLHDmWAsHQQKnmfyhYSHJDlt8Wfjv6SQhl2qek42O7A=",
"owner": "lnl7",
"repo": "nix-darwin",
"rev": "50581970f37f06a4719001735828519925ef8310",
"rev": "ec12b88104d6c117871fad55e931addac4626756",
"type": "github"
},
"original": {
@ -368,11 +368,11 @@
"treefmt-nix": "treefmt-nix"
},
"locked": {
"lastModified": 1719469291,
"narHash": "sha256-Efir01r7ThPabDBFOygX1UDyerJFHelbRGdMo/VNw14=",
"lastModified": 1719923896,
"narHash": "sha256-/hfE2x9NbT13d53o9uq6MuMipV19pJUQzpsZIhlvsiM=",
"owner": "nix-community",
"repo": "nixvim",
"rev": "8f52e4d1e34039937efb0ee05825b9963ef29739",
"rev": "d384cf656cb1b21d90eee1b007a6ade6f90768f5",
"type": "github"
},
"original": {
@ -455,11 +455,11 @@
]
},
"locked": {
"lastModified": 1719243788,
"narHash": "sha256-9T9mSY35EZSM1KAwb7K9zwQ78qTlLjosZgtUGnw4rn4=",
"lastModified": 1719887753,
"narHash": "sha256-p0B2r98UtZzRDM5miGRafL4h7TwGRC4DII+XXHDHqek=",
"owner": "numtide",
"repo": "treefmt-nix",
"rev": "065a23edceff48f948816b795ea8cc6c0dee7cdf",
"rev": "bdb6355009562d8f9313d9460c0d3860f525bc6c",
"type": "github"
},
"original": {

View File

@ -13,6 +13,7 @@
fonts = {
fontconfig = {
enable = true;
defaultFonts = {
serif = [ "NotoSans Nerd Font" ];
sansSerif = [ "Linux Biolinum O" ];

View File

@ -9,6 +9,7 @@
./picom.nix
./xresources.nix
./dunst.nix
./music_player.nix
# Status bar scripts
./scripts/sb-cpu-pct.nix

View File

@ -0,0 +1,65 @@
{ pkgs, config, ... }:
{
home.file."mus/music_data".source = config.lib.file.mkOutOfStoreSymlink /media/music/music_data;
home.packages = [
pkgs.ffmpeg
pkgs.nsxiv
pkgs.kunst
pkgs.mpc-cli
pkgs.jq
pkgs.imagemagick
];
services.mpd = {
enable = true;
package = pkgs.mpd;
extraConfig = ''
music_directory "~/mus/music_data"
playlist_directory "~/.local/share/mpd/playlists"
log_file "~/.local/share/mpd/log"
db_file "~/.local/share/mpd/database"
pid_file "~/.local/share/mpd/pid"
state_file "~/.local/share/mpd/state"
sticker_file "~/.local/share/mpd/sticker.sql"
auto_update "yes"
audio_output {
type "pipewire"
name "PipeWire Sound Server"
}
audio_output {
type "fifo"
name "Visualizer feed"
path "/tmp/mpd.fifo"
format "44100:16:2"
}
bind_to_address "127.0.0.1" '';
musicDirectory = "~/mus/music_data";
};
programs.ncmpcpp = {
enable = true;
package = (pkgs.ncmpcpp.override { visualizerSupport = true; });
mpdMusicDir = "~/mus/music_data";
settings = {
mpd_host = "127.0.0.1";
mpd_port = "6600";
visualizer_data_source = "/tmp/mpd.fifo";
visualizer_output_name = "Visualizer Feed";
visualizer_in_stereo = "yes";
visualizer_type = "spectrum";
visualizer_fps = "60";
visualizer_autoscale = "no";
visualizer_look = "";
visualizer_color = "169, 170, 169, 135, 134, 133, 129, 128, 127, 126, 125, 124";
visualizer_spectrum_smooth_look = "yes";
visualizer_spectrum_dft_size = "3";
};
};
}

View File

@ -16,8 +16,8 @@
domain = "git.bitlab21.com";
owner = "sam";
repo = "dwm";
rev = "e34d0ecdd98e52164c135b560a5583aa11be89b7";
sha256 = "sha256-er1zi2xYK7AB6oR7JmfkfehesKTw9P4bcgjafj2lIIU=";
rev = "ee95ad6795dc51217008363e56fe313d1cfdbaf4";
sha256 = "sha256-L+TAv0g9VhvM+O5gpbKoCk5fCsktWzjQCa2JkN0Xjt4=";
};
};
};

View File

@ -0,0 +1,8 @@
{
fileSystems."/media/music" = {
device = "10.0.10.30:/mnt/media/music";
fsType = "nfs";
options = [ "noatime" "_netdev" ];
};
}

View File

@ -30,6 +30,7 @@ in
../common/optional/pipewire.nix
../common/optional/openssh.nix
../common/optional/dwm.nix
../common/optional/nfs-mounts/music.nix
];

View File

@ -5,4 +5,5 @@ pkgs: {
dmenu = pkgs.callPackage ./dmenu { };
nsxiv = pkgs.callPackage ./nsxiv { };
sqlfmt = pkgs.callPackage ./sqlfmt { };
kunst = pkgs.callPackage ./kunst { };
}

22
pkgs/kunst/default.nix Normal file
View File

@ -0,0 +1,22 @@
{ pkgs ? import <nixpkgs> { }
, fetchFromGitea ? pkgs.fetchFromGitea
}:
pkgs.stdenv.mkDerivation {
pname = "kunst";
name = "kunst";
src = fetchFromGitea {
domain = "git.bitlab21.com";
owner = "sam";
repo = "kunst";
rev = "efff362ab9ea14cae2bb6c5d246601011e345732";
sha256 = "sha256-AeAYh2z2Ty9rYfgm+EhYB99OI87aWqLURDbfT0N3wUg=";
};
installPhase = ''
mkdir -p $out/bin
mv kunst $out/bin
chmod 755 $out/bin/kunst
'';
}