52 lines
1.8 KiB
Nix
52 lines
1.8 KiB
Nix
{ lib, inputs, config, pkgs, hostname, gpu, ... }: {
|
|
imports = [ inputs.kde2nix.nixosModules.plasma6 ];
|
|
|
|
# Enable sound with pipewire.
|
|
sound.enable = true;
|
|
hardware.pulseaudio.enable = false;
|
|
security.rtkit.enable = true;
|
|
services.pipewire = {
|
|
enable = true;
|
|
alsa.enable = true;
|
|
alsa.support32Bit = true;
|
|
pulse.enable = true;
|
|
};
|
|
|
|
# Configure keymap in X11
|
|
services.xserver = {
|
|
enable = true;
|
|
layout = "us";
|
|
xkbVariant = "";
|
|
autorun = true;
|
|
videoDrivers = [ ] ++ lib.optional (builtins.isString gpu) gpu;
|
|
};
|
|
|
|
services.xserver = {
|
|
# https://nixos.org/manual/nixos/stable/index.html#chap-gnome
|
|
# Enable the KDE Plasma 6 Desktop Environment.
|
|
desktopManager.plasma6.enable = true;
|
|
};
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
arc-kde-theme
|
|
arc-theme
|
|
papirus-icon-theme
|
|
plasma-theme-switcher
|
|
tailscale-systray
|
|
];
|
|
|
|
# Schedule cronjobs for changing the theme
|
|
services.cron = {
|
|
enable = true;
|
|
systemCronJobs = [
|
|
# Set the 'at' jobs for changing the theme
|
|
''0 12 * * * albert curl -s wttr.in?format=j1 > /tmp/wttr.in''
|
|
''0 * * * * albert sleep 10; echo "plasma-apply-colorscheme -platform offscreen Arc" | at `fx /tmp/wttr.in .weather[0].astronomy[0].sunrise`''
|
|
''0 * * * * albert sleep 10; echo "plasma-apply-colorscheme -platform offscreen ArcDark" | at `fx /tmp/wttr.in .weather[0].astronomy[0].sunset` ''
|
|
# At reboot as well
|
|
''@reboot albert curl -s wttr.in?format=j1 > /tmp/wttr.in''
|
|
''@reboot albert sleep 10; echo "plasma-apply-colorscheme -platform offscreen Arc" | at `fx /tmp/wttr.in .weather[0].astronomy[0].sunrise`''
|
|
''@reboot albert sleep 10; echo "plasma-apply-colorscheme -platform offscreen ArcDark" | at `fx /tmp/wttr.in .weather[0].astronomy[0].sunset` ''
|
|
];
|
|
};
|
|
}
|