Compare commits

...

4 commits

9 changed files with 55 additions and 27 deletions

View file

@ -2,7 +2,7 @@
description = "System configuration of my machines using flakes";
inputs = {
nixpkgs.url = "nixpkgs/nixos-24.05";
nixpkgs.url = "nixpkgs/nixos-24.11";
nixpkgs-unstable.url = "nixpkgs/nixos-unstable";
devshell = {
@ -11,7 +11,7 @@
};
flake-utils.url = "github:numtide/flake-utils";
home-manager = {
url = "github:nix-community/home-manager/release-24.05";
url = "github:nix-community/home-manager/release-24.11";
inputs.nixpkgs.follows = "nixpkgs";
};
openconnect-sso = {
@ -41,9 +41,9 @@
unfreePackages = pkg: builtins.elem (nixpkgs.lib.getName pkg) [
"corefonts"
"nvidia-settings" "nvidia-x11" "nvidia-persistenced"
"Oracle_VM_VirtualBox_Extension_Pack"
"Oracle_VirtualBox_Extension_Pack"
"spotify"
"steam" "steam-original" "steam-run"
"steam" "steam-unwrapped" "steam-run"
"vista-fonts"
"nvidia-persistenced" # Docker
];

View file

@ -101,11 +101,9 @@ in {
dejavu_fonts
font-awesome
noto-fonts
noto-fonts-cjk
noto-fonts-cjk-sans
noto-fonts-cjk-serif
noto-fonts-emoji
source-han-sans
source-han-sans-japanese
source-han-serif-japanese
];
security.polkit.enable = true;

View file

@ -37,9 +37,8 @@ in {
# };
hardware = {
opengl = {
graphics = {
enable = true;
driSupport = true;
driSupport32Bit = true;
};

View file

@ -9,6 +9,6 @@ in {
extraOptions = ''
experimental-features = nix-command flakes
'';
package = pkgs.nixFlakes;
package = pkgs.nixVersions.stable;
};
}

View file

@ -6,8 +6,6 @@ in {
options.sisyphus.services.pipewire.enable = lib.mkEnableOption "Pipewire";
config = lib.mkIf cfg.enable {
sound.enable = true;
hardware.pulseaudio.enable = false;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
@ -20,6 +18,26 @@ in {
# use the example session manager (no others are packaged yet so this is enabled by default,
# no need to redefine it in your config for now)
#media-session.enable = true;
wireplumber = {
enable = true;
# Fix pops after silence
extraConfig."99-disable-suspend" = {
"monitor.alsa.rules" = [
{
matches = [
# Headphone jack on laptop
{ "node.name" = "alsa_output.pci-0000_00_1f.3.analog-stereo"; }
];
actions = {
update-props = {
"session.suspend-timeout-seconds" = 0;
};
};
}
];
};
};
};
};
}

View file

@ -10,6 +10,8 @@ in {
enable = true;
# Because these are made for development purposes and not for servers
enableOnBoot = false;
daemon.settings.features.cdi = true;
};
# Updated version of deprecated enableNvidia.

View file

@ -39,8 +39,10 @@ in {
corefonts # Calibri for Uni
font-awesome # Dependency of Vifm & zsh config
letter # Personal font
noto-fonts-cjk # Dependency of Zellij config
noto-fonts-cjk-sans # Dependency of Zellij config
noto-fonts-cjk-serif # Dependency of Zellij config
noto-fonts # Dependency of Zellij config
noto-fonts-emoji # Dependency of Zellij config
noto-fonts-color-emoji # Emoji's!
vistafonts # Microsoft fonts
];

View file

@ -22,15 +22,15 @@ while getopts ":bvt:p:" options; do
;;
v)
# Get volume (don't use pamixer because that is way slower)
value=$( amixer sget 'Master' \
| grep -o '\[[0-9]*%\]' \
| tr -d '][%' \
| head -n1 )
value=$( pactl get-sink-volume @DEFAULT_SINK@ \
| grep -o '[0-9]*%' \
| tr -d '%' \
| head -n1 )
title="Volume: ${value}%"
category='sysinfo'
# If audio disabled, set value to zero.
if [ "$( amixer sget 'Master' | grep -o '\[\(on\|off\)\]' | head -n1 )" == "[off]" ] ; then
if [ "$( pactl get-sink-mute @DEFAULT_SINK@ | grep -o '\(yes\|no\)' | head -n1 )" == 'yes' ] ; then
title="Volume: ${value}% (Disabled)"
value=0
fi

View file

@ -30,6 +30,10 @@ declare -A wallpaper
wallpaper[${THEME_LIGHT}]="bg-light"
wallpaper[${THEME_DARK}]="bg-dark"
declare -A icon
icon[${THEME_LIGHT}]="\uf185"
icon[${THEME_DARK}]="\uf186"
#############
### Logic ###
#############
@ -48,14 +52,14 @@ while getopts ":m:g" option; do
fi
;;
g)
previous_theme="$(cat ${STATE_FILE})"
if [ "${previous_theme}" == "${THEME_LIGHT}" ]; then
class="activated"
percentage=1
else
percentage=0
current_state="$(cat "${STATE_FILE}")"
next_state="${theme_next[${current_state}]}"
if [ "${current_state}" == "${THEME_DARK}" ]; then
class='activated'
percentage=100
fi
printf '{ "class": "%s", "percentage": %d }' "${class}" "${percentage}"
printf '{"text": "%s", "alt": "%s", "tooltip": "Set theme to %s", "percentage": %d, "class": "%s"}' \
"${icon[${current_state}]}" "${gsettings_alt[${next_state}]}" "${next_state}" "${percentage:=0}" "${class:="none"}"
exit 0
;;
*)
@ -119,7 +123,12 @@ fi
# Sway
if [ "$(command -v swaybg)" ]; then
bg_path="${BG_DIR}/${wallpaper[${theme}]}"
/run/current-system/sw/bin/cp "${bg_path}" "${STATE_DIR}/bg" && swaymsg reload &
/run/current-system/sw/bin/cp "${bg_path}" "${STATE_DIR}/bg"
if [ "$(command -v swaymsg)" ]; then
pkill swaybg && swaymsg exec "swaybg -m fill -i ${STATE_DIR}/bg" &
elif [ "$(command -v hyprctl)" ]; then
pkill swaybg && hyprctl keyword exec "swaybg -m fill -i ${STATE_DIR}/bg" &
fi
fi
# Vifm