diff --git a/machines/pcLexell/gui.nix b/machines/pcLexell/gui.nix index 234d88b..7f51ea2 100644 --- a/machines/pcLexell/gui.nix +++ b/machines/pcLexell/gui.nix @@ -42,6 +42,8 @@ in { obsidian tor-browser-bundle-bin #hyprdim + gthumb # image viewver; automatically bind to xdg + mpv # Video player ]; programs.hyprland = { #enable = true; diff --git a/machines/pcLexell/mpd.nix b/machines/pcLexell/mpd.nix new file mode 100644 index 0000000..01502f2 --- /dev/null +++ b/machines/pcLexell/mpd.nix @@ -0,0 +1,40 @@ +# Infrastructure config by ASCIIMoth +# +# To the extent possible under law, the person who associated CC0 with +# this work has waived all copyright and related or neighboring rights +# to it. +# +# You should have received a copy of the CC0 legalcode along with this +# work. If not, see . +{ + config, + pkgs, + lib, + inputs, + ... +}: let + constants = import ./constants.nix; +in { + services.mpd = { + enable = true; + musicDirectory = "/home/${constants.MainUser}/mpd"; + user = "${constants.MainUser}"; + extraConfig = '' + auto_update "no" + restore_paused "yes" + audio_output { + type "pipewire" + name "${constants.MainUser} PipeWire Output" + } + ''; + #network.listenAddress = "any"; # if you want to allow non-localhost connections + #startWhenNeeded = true; # systemd feature: only start MPD service upon connection to its socket + }; + systemd.services.mpd.environment = { + XDG_RUNTIME_DIR = "/run/user/1000"; + }; + environment.systemPackages = with pkgs; [ + ncmpcpp + mpc-cli + ]; +} diff --git a/machines/pcLexell/ranger.nix b/machines/pcLexell/ranger.nix index 60366d4..092cf03 100644 --- a/machines/pcLexell/ranger.nix +++ b/machines/pcLexell/ranger.nix @@ -21,6 +21,7 @@ LOCKED_REV=$(read-or-value $LOCKSFILE "NONE") ACTUAL_REV=$(readlink -f $NIX_RANGER) if [ "$LOCKED_REV" != "$ACTUAL_REV" ]; then + rm -rf $REAL_RANGER cp -rL $NIX_RANGER $REAL_RANGER chmod -R +w $REAL_RANGER echo -n "$ACTUAL_REV" > $LOCKSFILE diff --git a/machines/pcLexell/ranger/rifle.conf b/machines/pcLexell/ranger/rifle.conf new file mode 100644 index 0000000..4a93c19 --- /dev/null +++ b/machines/pcLexell/ranger/rifle.conf @@ -0,0 +1,89 @@ +# vim: ft=cfg +# +# This is the configuration file of "rifle", ranger's file executor/opener. +# Each line consists of conditions and a command. For each line the conditions +# are checked and if they are met, the respective command is run. +# +# Syntax: +# , , ... = command +# +# The command can contain these environment variables: +# $1-$9 | The n-th selected file +# $@ | All selected files +# +# If you use the special command "ask", rifle will ask you what program to run. +# +# Prefixing a condition with "!" will negate its result. +# These conditions are currently supported: +# match | The regexp matches $1 +# ext | The regexp matches the extension of $1 +# mime | The regexp matches the mime type of $1 +# name | The regexp matches the basename of $1 +# path | The regexp matches the absolute path of $1 +# has | The program is installed (i.e. located in $PATH) +# env | The environment variable "variable" is non-empty +# file | $1 is a file +# directory | $1 is a directory +# number | change the number of this command to n +# terminal | stdin, stderr and stdout are connected to a terminal +# X | A graphical environment is available (darwin, Xorg, or Wayland) +# +# There are also pseudo-conditions which have a "side effect": +# flag | Change how the program is run. See below. +# label