Automatic wallpaper switching whee

This commit is contained in:
Daniel Flanagan 2024-01-30 19:36:52 -06:00
parent decb9e46df
commit ce1a01c5d1
Signed by: lytedev
GPG key ID: 5B2020A0F9921EF4
5 changed files with 64 additions and 22 deletions

View file

@ -31,6 +31,7 @@ with builtins;
"sway-laptop" "sway-laptop"
"swaylock" "swaylock"
"tmux" "tmux"
"wallpaper-manager"
"waybar" "waybar"
"wezterm" "wezterm"
"zellij" "zellij"

View file

@ -262,7 +262,9 @@
"${mod}+p" = "focus parent"; "${mod}+p" = "focus parent";
"${mod}+period" = "focus child"; "${mod}+period" = "focus child";
"${mod}+comma" = "focus child"; "${mod}+comma" = "focus child";
"${mod}+tab" = "workspace back_and_forth"; "${mod}+tab" = "workspace back_and_forth";
"alt+tab" = "workspace back_and_forth";
"${mod}+minus" = "gaps inner current minus 5"; "${mod}+minus" = "gaps inner current minus 5";
"${mod}+plus" = "gaps inner current plus 5"; "${mod}+plus" = "gaps inner current plus 5";

View file

@ -0,0 +1,21 @@
{
pkgs,
lib,
...
}: {
systemd.user.services.variety = {
Unit = {
Description = "Wallapaper downloader and changer";
After = ["graphical-session.target"];
};
Install.WantedBy = ["graphical-session.target"];
Service = {
Environment = [
"PATH=${lib.makeBinPath (with pkgs; [variety])}"
];
ExecStart = ''
${pkgs.variety}/bin/variety
'';
};
};
}

View file

@ -1,4 +1,5 @@
{ {
pkgs,
inputs, inputs,
system, system,
outputs, outputs,

View file

@ -2,7 +2,6 @@
flake, flake,
inputs, inputs,
outputs, outputs,
lib,
# config, # config,
pkgs, pkgs,
... ...
@ -18,7 +17,7 @@ in {
gnome gnome
podman podman
lutris lutris
postgres # postgres
wifi wifi
# hyprland # hyprland
]; ];
@ -28,6 +27,10 @@ in {
environment = { environment = {
systemPackages = with pkgs; [ systemPackages = with pkgs; [
spotify
discord
slack
variety # wallpaper switcher that I use with GNOME
radeontop radeontop
sops sops
]; ];
@ -38,7 +41,7 @@ in {
sway sway
pass pass
firefox-no-tabs firefox-no-tabs
# sway-laptop wallpaper-manager
# hyprland # hyprland
]; ];
@ -140,11 +143,24 @@ in {
systemd.sleep.extraConfig = "HibernateDelaySec=90m"; systemd.sleep.extraConfig = "HibernateDelaySec=90m";
services.fwupd.enable = true; services.fwupd.enable = true;
# source: https://github.com/NixOS/nixos-hardware/tree/master/framework/13-inch/7040-amd#getting-the-fingerprint-sensor-to-work
# we need fwupd 1.9.7 to downgrade the fingerprint sensor firmware
# services.fwupd.package =
# (import (builtins.fetchTarball {
# url = "https://github.com/NixOS/nixpkgs/archive/bb2009ca185d97813e75736c2b8d1d8bb81bde05.tar.gz";
# sha256 = "sha256:003qcrsq5g5lggfrpq31gcvj82lb065xvr7bpfa8ddsw8x4dnysk";
# }) {
# inherit (pkgs) system;
# })
# .fwupd;
services.fwupd.extraRemotes = ["lvfs-testing"]; services.fwupd.extraRemotes = ["lvfs-testing"];
hardware.opengl.extraPackages = [ hardware.opengl.extraPackages = [
# pkgs.rocmPackages.clr.icd # pkgs.rocmPackages.clr.icd
pkgs.amdvlk pkgs.amdvlk
# encoding/decoding acceleration # encoding/decoding acceleration
pkgs.libvdpau-va-gl pkgs.libvdpau-va-gl
pkgs.vaapiVdpau pkgs.vaapiVdpau
@ -169,12 +185,14 @@ in {
# https://wiki.archlinux.org/title/Power_management/Suspend_and_hibernate#Hibernation_into_swap_file # https://wiki.archlinux.org/title/Power_management/Suspend_and_hibernate#Hibernation_into_swap_file
# many of these come from https://wiki.archlinux.org/title/Framework_Laptop_13#Suspend # many of these come from https://wiki.archlinux.org/title/Framework_Laptop_13#Suspend
kernelParams = [ kernelParams = [
"rtc_cmos.use_acpi_alarm=1"
"amdgpu.sg_display=0" "amdgpu.sg_display=0"
"acpi_osi=\"!Windows 2020\"" "acpi_osi=\"!Windows 2020\""
# "nvme.noacpi=1" # maybe causing crashes upon waking?
# NOTE(oninstall): # NOTE(oninstall):
"resume_offset=3421665" "resume_offset=3421665"
# "nvme.noacpi=1" # maybe causing crashes upon waking?
"rtc_cmos.use_acpi_alarm=1"
]; ];
initrd.availableKernelModules = ["xhci_pci" "nvme" "thunderbolt"]; initrd.availableKernelModules = ["xhci_pci" "nvme" "thunderbolt"];
kernelModules = ["kvm-amd"]; kernelModules = ["kvm-amd"];
@ -188,33 +206,32 @@ in {
# simply resume the power state at the time of hibernation # simply resume the power state at the time of hibernation
powerOnBoot = false; powerOnBoot = false;
}; };
powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand"; powerManagement.cpuFreqGovernor = "ondemand";
services.power-profiles-daemon = { services.power-profiles-daemon = {
enable = true; enable = true;
}; };
powerManagement.powertop.enable = true;
# disabled stuff here for posterity
services.fprintd = { services.fprintd = {
enable = false; enable = true;
# tod.enable = true; # tod.enable = true;
# tod.driver = pkgs.libfprint-2-tod1-goodix; # tod.driver = pkgs.libfprint-2-tod1-goodix;
}; };
services.tlp = {
enable = false;
settings = {
CPU_ENERGY_PERF_POLICY_ON_BAT = "power";
CPU_SCALING_GOVERNOR_ON_BAT = "ondemand";
CPU_MIN_PERF_ON_BAT = 0;
CPU_MAX_PERF_ON_BAT = 60;
CPU_SCALING_GOVERNOR_ON_AC = "performance"; # services.tlp = {
CPU_ENERGY_PERF_POLICY_ON_AC = "performance"; # enable = true;
CPU_MIN_PERF_ON_AC = 0; # settings = {
CPU_MAX_PERF_ON_AC = 100; # CPU_ENERGY_PERF_POLICY_ON_BAT = "power";
}; # CPU_SCALING_GOVERNOR_ON_BAT = "ondemand";
}; # CPU_MIN_PERF_ON_BAT = 0;
# CPU_MAX_PERF_ON_BAT = 80;
# CPU_SCALING_GOVERNOR_ON_AC = "performance";
# CPU_ENERGY_PERF_POLICY_ON_AC = "performance";
# CPU_MIN_PERF_ON_AC = 0;
# CPU_MAX_PERF_ON_AC = 100;
# };
# };
networking.firewall.allowedTCPPorts = [ networking.firewall.allowedTCPPorts = [
8000 # dev stuff 8000 # dev stuff