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

View file

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

View file

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

View file

@ -9,6 +9,6 @@ in {
extraOptions = '' extraOptions = ''
experimental-features = nix-command flakes 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"; options.sisyphus.services.pipewire.enable = lib.mkEnableOption "Pipewire";
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
sound.enable = true;
hardware.pulseaudio.enable = false;
security.rtkit.enable = true; security.rtkit.enable = true;
services.pipewire = { services.pipewire = {
enable = true; enable = true;
@ -20,6 +18,26 @@ in {
# use the example session manager (no others are packaged yet so this is enabled by default, # 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) # no need to redefine it in your config for now)
#media-session.enable = true; #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; enable = true;
# Because these are made for development purposes and not for servers # Because these are made for development purposes and not for servers
enableOnBoot = false; enableOnBoot = false;
daemon.settings.features.cdi = true;
}; };
# Updated version of deprecated enableNvidia. # Updated version of deprecated enableNvidia.

View file

@ -39,8 +39,10 @@ in {
corefonts # Calibri for Uni corefonts # Calibri for Uni
font-awesome # Dependency of Vifm & zsh config font-awesome # Dependency of Vifm & zsh config
letter # Personal font 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 # Dependency of Zellij config
noto-fonts-emoji # Dependency of Zellij config
noto-fonts-color-emoji # Emoji's! noto-fonts-color-emoji # Emoji's!
vistafonts # Microsoft fonts vistafonts # Microsoft fonts
]; ];

View file

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

View file

@ -30,6 +30,10 @@ declare -A wallpaper
wallpaper[${THEME_LIGHT}]="bg-light" wallpaper[${THEME_LIGHT}]="bg-light"
wallpaper[${THEME_DARK}]="bg-dark" wallpaper[${THEME_DARK}]="bg-dark"
declare -A icon
icon[${THEME_LIGHT}]="\uf185"
icon[${THEME_DARK}]="\uf186"
############# #############
### Logic ### ### Logic ###
############# #############
@ -48,14 +52,14 @@ while getopts ":m:g" option; do
fi fi
;; ;;
g) g)
previous_theme="$(cat ${STATE_FILE})" current_state="$(cat "${STATE_FILE}")"
if [ "${previous_theme}" == "${THEME_LIGHT}" ]; then next_state="${theme_next[${current_state}]}"
class="activated" if [ "${current_state}" == "${THEME_DARK}" ]; then
percentage=1 class='activated'
else percentage=100
percentage=0
fi 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 exit 0
;; ;;
*) *)
@ -119,7 +123,12 @@ fi
# Sway # Sway
if [ "$(command -v swaybg)" ]; then if [ "$(command -v swaybg)" ]; then
bg_path="${BG_DIR}/${wallpaper[${theme}]}" 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 fi
# Vifm # Vifm