-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
144 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 <http://creativecommons.org/publicdomain/zero/1.0/>. | ||
{ | ||
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 | ||
]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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: | ||
# <condition1> , <condition2> , ... = 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 <regexp> | The regexp matches $1 | ||
# ext <regexp> | The regexp matches the extension of $1 | ||
# mime <regexp> | The regexp matches the mime type of $1 | ||
# name <regexp> | The regexp matches the basename of $1 | ||
# path <regexp> | The regexp matches the absolute path of $1 | ||
# has <program> | The program is installed (i.e. located in $PATH) | ||
# env <variable> | The environment variable "variable" is non-empty | ||
# file | $1 is a file | ||
# directory | $1 is a directory | ||
# number <n> | 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 <flags> | Change how the program is run. See below. | ||
# label <label> | Assign a label or name to the command so it can | ||
# | be started with :open_with <label> in ranger | ||
# | or `rifle -p <label>` in the standalone executable. | ||
# else | Always true. | ||
# | ||
# Flags are single characters which slightly transform the command: | ||
# f | Fork the program, make it run in the background. | ||
# | New command = setsid $command >& /dev/null & | ||
# r | Execute the command with root permissions | ||
# | New command = sudo $command | ||
# t | Run the program in a new terminal. If $TERMCMD is not defined, | ||
# | rifle will attempt to extract it from $TERM. | ||
# | New command = $TERMCMD -e $command | ||
# Note: The "New command" serves only as an illustration, the exact | ||
# implementation may differ. | ||
# Note: When using rifle in ranger, there is an additional flag "c" for | ||
# only running the current file even if you have marked multiple files. | ||
|
||
#------------------------------------------- | ||
# Misc | ||
#------------------------------------------- | ||
# Define the "editor" for text files as first action | ||
mime ^text, label editor = ${VISUAL:-$EDITOR} -- "$@" | ||
mime ^text, label pager = "$PAGER" -- "$@" | ||
!mime ^text, label editor, ext xml|json|csv|tex|py|pl|rb|js|sh|php = ${VISUAL:-$EDITOR} -- "$@" | ||
!mime ^text, label pager, ext xml|json|csv|tex|py|pl|rb|js|sh|php = "$PAGER" -- "$@" | ||
|
||
ext 1 = man "$1" | ||
ext s[wmf]c, has zsnes, X = zsnes "$1" | ||
ext s[wmf]c, has snes9x-gtk,X = snes9x-gtk "$1" | ||
ext nes, has fceux, X = fceux "$1" | ||
ext exe = wine "$1" | ||
name ^[mM]akefile$ = make | ||
|
||
#------------------------------------------- | ||
# Generic file openers | ||
#------------------------------------------- | ||
label open, has xdg-open = nohup xdg-open "$@" </dev/null &>/dev/null & | ||
label open, has open = nohup open "$@" </dev/null &>/dev/null & | ||
|
||
# Define the editor for non-text files + pager as last action | ||
!mime ^text, !ext xml|json|csv|tex|py|pl|rb|js|sh|php = ask | ||
label editor, !mime ^text, !ext xml|json|csv|tex|py|pl|rb|js|sh|php = ${VISUAL:-$EDITOR} -- "$@" | ||
label pager, !mime ^text, !ext xml|json|csv|tex|py|pl|rb|js|sh|php = "$PAGER" -- "$@" | ||
|
||
|
||
###################################################################### | ||
# The actions below are left so low down in this file on purpose, so # | ||
# they are never triggered accidentally. # | ||
###################################################################### | ||
|
||
# Execute a file as program/script. | ||
mime application/x-executable = "$1" | ||
|
||
# Move the file to trash using trash-cli. | ||
label trash, has trash-put = trash-put -- "$@" | ||
label trash = mkdir -p -- ${XDG_DATA_DIR:-$HOME/.ranger}/ranger-trash; mv -- "$@" ${XDG_DATA_DIR:-$HOME/.ranger}/ranger-trash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters