updates for my nixos system

This commit is contained in:
Maddie H 2023-04-15 19:27:45 +01:00
parent 0fda8d240b
commit 5e13aedf36
Signed by: maddie
GPG Key ID: C296DE8C9053683F
18 changed files with 157 additions and 40 deletions

View File

@ -32,7 +32,7 @@
}; };
in in
{ {
nixosConfigurations."luna" = nixpkgs.lib.nixosSystem { nixosConfigurations."MDesktop" = nixpkgs.lib.nixosSystem {
specialArgs = { inherit username; }; specialArgs = { inherit username; };
pkgs = nixpkgs_x86_64; pkgs = nixpkgs_x86_64;
system = "x86_64-linux"; system = "x86_64-linux";

View File

@ -6,5 +6,6 @@
jetbrains.goland jetbrains.goland
jetbrains.webstorm jetbrains.webstorm
jetbrains.pycharm-professional jetbrains.pycharm-professional
android-studio
]; ];
} }

View File

@ -2,6 +2,7 @@
{ {
home.packages = with pkgs; [ home.packages = with pkgs; [
imagemagick # Manipulates images
libheif # Manage .heif files from phones libheif # Manage .heif files from phones
gcolor2 # Color viewer and eyedropper gcolor2 # Color viewer and eyedropper
ffmpeg # Video manipulator ffmpeg # Video manipulator

View File

@ -3,8 +3,9 @@
{ {
home.packages = with pkgs; [ home.packages = with pkgs; [
pulsemixer # TUI sound mixer pulsemixer # TUI sound mixer
pamixer # CLI sound mixer
playerctl # Manages media players playerctl # Manages media players
pamixer # CLI sound mixer
yt-dlp # Media downloader
cava # Music visualiser cava # Music visualiser
]; ];
@ -12,4 +13,9 @@
source = ./audio/ytdlp-music.sh; source = ./audio/ytdlp-music.sh;
executable = true; executable = true;
}; };
home.file.".local/bin/volume" = {
source = ./audio/volume.sh;
executable = true;
};
} }

24
maddie/nixos/audio/volume.sh Executable file
View File

@ -0,0 +1,24 @@
#!/usr/bin/env sh
COMMAND="$@"
[ -z $COMMAND ] && echo "usage: volume [up|down|mute]" && exit 1
if [ $COMMAND = "up" ]; then
pamixer --allow-boost -i 5
elif [ $COMMAND = "down" ]; then
pamixer --allow-boost -d 5
elif [ $COMMAND = "mute" ]; then
pamixer -t
else
echo "volume: command not found" && exit 1
fi
MUTED="$(pamixer --get-mute)"
if [ $MUTED = "true" ]; then
MUTE_CHAR="!"
else
MUTE_CHAR=""
fi
VOLUME=$(pamixer --get-volume)
echo "$VOLUME""$MUTE_CHAR" > /tmp/volume.fifo

View File

@ -1,29 +1,29 @@
#!/bin/sh #!/bin/sh
# ____ _ while getopts "lrpm:u:" options; do
# | __ ) ___ ___ ___| | _____ _ _
# | _ \ / _ \/ __/ __| |/ / _ \ | | |
# | |_) | (_) \__ \__ \ < __/ |_| |
# |____/ \___/|___/___/_|\_\___|\__, |
# |___/ v1.2
# GitHub: https://github.com/SpyHoodle/bosskey
function refresh_statusbar() {
case $1 in
dwmblocks)
# Refresh dwmblocks as it only updates when told so
kill -35 $(pidof dwmblocks)
;;
esac
}
while getopts "lmpur" options; do
case $options in case $options in
m) m)
# Mute the volume devices=$OPTARG
pamixer --mute if echo "$devices" | grep "mic" &>/dev/null; then
# Mute the microphone
pamixer --default-source --mute
fi
if echo "$devices" | grep "vol" &>/dev/null; then
# Mute the volume
pamixer --mute
fi
;;
u)
devices=$OPTARG
if echo "$devices"| grep "mic" &>/dev/null; then
# Mute the microphone
pamixer --default-source --unmute
fi
if echo "$devices" | grep "vol" &>/dev/null; then
# Unmute the volume
pamixer --unmute
fi
;; ;;
p) p)
@ -35,16 +35,5 @@ while getopts "lmpur" options; do
# Lock the screen using slock(1) # Lock the screen using slock(1)
slock slock
;; ;;
u)
# Unmute the audio
pamixer --unmute
;;
r)
# Refresh a dwmblocks status bar
refresh_statusbar "dwmblocks"
;;
esac esac
done done

View File

@ -5,6 +5,6 @@
home.file.".xinitrc".text = '' home.file.".xinitrc".text = ''
# Start kdeconnect when entering a graphical session # Start kdeconnect when entering a graphical session
systemctl restart --user kdeconnect & systemctl restart --user kdeconnect.service &
''; '';
} }

View File

@ -2,7 +2,7 @@
{ {
home.packages = with pkgs; [ home.packages = with pkgs; [
openrgb openrgb-with-all-plugins
]; ];
home.file.".xinitrc".text = '' home.file.".xinitrc".text = ''

View File

@ -0,0 +1,7 @@
{ config, pkgs, ... }:
{
home.packages = with pkgs; [
popcorntime
];
}

View File

@ -5,4 +5,9 @@
enable = true; enable = true;
storePath = "${config.xdg.dataHome}/password-store"; storePath = "${config.xdg.dataHome}/password-store";
}; };
home.file.".xinitrc".text = ''
# Restart pass-secret-service as it tends to start failed
systemctl restart --user pass-secret-service.service &
'';
} }

View File

@ -0,0 +1,7 @@
{ config, pkgs, ... }:
{
home.packages = with pkgs; [
syncplay
];
}

20
maddie/nixos/xob.nix Normal file
View File

@ -0,0 +1,20 @@
{ config, pkgs, ... }:
{
home.packages = with pkgs; [
xob
];
home.file.".xinitrc".text = ''
# Create FIFO for xob
rm -rf /tmp/volume.fifo
mkfifo /tmp/volume.fifo
# Start xob
(tail -f /tmp/volume.fifo | xob) &
'';
xdg.configFile."xob" = {
source = ./xob;
};
}

View File

@ -0,0 +1,35 @@
default = {
x = {relative = 1; offset = -48;};
y = {relative = 0.5; offset = 0;};
length = {relative = 0.3; offset = 0;};
thickness = 24;
outline = 3;
border = 4;
padding = 3;
orientation = "vertical";
overflow = "proportional";
color = {
normal = {
fg = "#ffffff";
bg = "#00000090";
border = "#ffffff";
};
alt = {
fg = "#555555";
bg = "#00000090";
border = "#555555";
};
overflow = {
fg = "#ff0000";
bg = "#00000090";
border = "#ff0000";
};
altoverflow = {
fg = "#550000";
bg = "#00000090";
border = "#550000";
};
};
};

View File

@ -5,8 +5,8 @@
src = final.fetchFromGitHub { src = final.fetchFromGitHub {
owner = "SpyHoodle"; owner = "SpyHoodle";
repo = "dwm"; repo = "dwm";
rev = "7dab824afc125afba150949f12f38def1ffd47a8"; rev = "dca69fedae1e29d946ece4c8325907732015f83f";
sha256 = "sha256-qINiKWz8+POCjOL5UA7Mrxw4ZZgJ5D1eGatN1RCeE9M="; sha256 = "sha256-OezFDY2Gxu+qqT3hdGb+g+YyqV+8R8gSN3ux5+QvL4o=";
}; };
}); });
st = prev.st.overrideAttrs (oldAttrs: { st = prev.st.overrideAttrs (oldAttrs: {

View File

@ -5,7 +5,7 @@
networking.useDHCP = lib.mkDefault true; networking.useDHCP = lib.mkDefault true;
# Hostname # Hostname
networking.hostName = "luna"; networking.hostName = "MDesktop";
# Enable wireless support & configuration # Enable wireless support & configuration
networking.wireless.enable = true; networking.wireless.enable = true;

View File

@ -36,6 +36,11 @@ let
}; };
in in
{ {
environment.systemPackages = with pkgs; [
rnnoise
rnnoise-plugin
];
environment.etc."pipewire/pipewire.conf.d/99-input-denoising.conf" = { environment.etc."pipewire/pipewire.conf.d/99-input-denoising.conf" = {
source = json.generate "99-input-denoising.conf" pw_rnnoise_config; source = json.generate "99-input-denoising.conf" pw_rnnoise_config;
}; };

View File

@ -0,0 +1,9 @@
{ config, username, ... }:
{
hardware.openrazer = {
enable = true;
users = [ "${username}" ];
devicesOffOnScreensaver = false;
};
}

View File

@ -0,0 +1,8 @@
{ config, pkgs, ... }:
{
services.hardware.openrgb = {
enable = true;
package = pkgs.openrgb-with-all-plugins;
};
}