2024-01-02 14:05:33 +01:00
|
|
|
{ lib, inputs, config, pkgs, username, hostname, gpu, ... }: {
|
2024-01-01 00:59:07 +01:00
|
|
|
imports = [ inputs.kde2nix.nixosModules.plasma6 ];
|
|
|
|
|
2023-12-31 16:25:53 +01:00
|
|
|
# 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;
|
|
|
|
};
|
2024-01-01 06:42:36 +01:00
|
|
|
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
arc-kde-theme
|
2024-01-01 08:31:11 +01:00
|
|
|
arc-theme
|
2024-01-01 06:56:07 +01:00
|
|
|
papirus-icon-theme
|
2024-01-01 06:42:36 +01:00
|
|
|
plasma-theme-switcher
|
2024-01-01 08:31:11 +01:00
|
|
|
tailscale-systray
|
|
|
|
];
|
2024-01-02 13:33:57 +01:00
|
|
|
|
2024-01-02 14:05:33 +01:00
|
|
|
systemd.user.services = {
|
2024-01-02 14:02:53 +01:00
|
|
|
"get-theme-times" = {
|
|
|
|
enable = true;
|
|
|
|
path = [ pkgs.curl ];
|
2024-01-02 14:06:41 +01:00
|
|
|
script = "curl wttr.in?format=j1 > /tmp/wttr.in";
|
2024-01-02 14:02:53 +01:00
|
|
|
after = [ "networking-online.target" ];
|
|
|
|
serviceConfig.Type = "oneshot";
|
2024-01-02 14:03:20 +01:00
|
|
|
onSuccess = [
|
2024-01-02 14:02:53 +01:00
|
|
|
"light-theme.service"
|
|
|
|
"dark-theme.service"
|
|
|
|
];
|
|
|
|
};
|
|
|
|
light-theme = {
|
|
|
|
enable = true;
|
2024-01-02 14:12:33 +01:00
|
|
|
path = [ pkgs.at pkgs.fx pkgs.nodejs ];
|
2024-01-02 14:45:26 +01:00
|
|
|
script = ''
|
2024-01-02 14:46:53 +01:00
|
|
|
id
|
2024-01-02 14:45:26 +01:00
|
|
|
whoami
|
2024-01-02 14:47:38 +01:00
|
|
|
which at
|
2024-01-02 14:45:26 +01:00
|
|
|
echo "plasma-apply-colorscheme -platform offscreen Arc" | at `${pkgs.fx}/bin/fx /tmp/wttr.in .weather[0].astronomy[0].sunrise`
|
|
|
|
'';
|
2024-01-02 14:02:53 +01:00
|
|
|
serviceConfig.Type = "oneshot";
|
|
|
|
};
|
|
|
|
dark-theme = {
|
|
|
|
enable = true;
|
2024-01-02 14:12:33 +01:00
|
|
|
path = [ pkgs.at pkgs.fx pkgs.nodejs ];
|
2024-01-02 14:45:26 +01:00
|
|
|
script = ''
|
2024-01-02 14:46:53 +01:00
|
|
|
id
|
2024-01-02 14:45:26 +01:00
|
|
|
whoami
|
2024-01-02 14:47:38 +01:00
|
|
|
which at
|
2024-01-02 14:45:26 +01:00
|
|
|
echo "plasma-apply-colorscheme -platform offscreen ArcDark" | at `${pkgs.fx}/bin/fx /tmp/wttr.in .weather[0].astronomy[0].sunset`
|
|
|
|
'';
|
2024-01-02 14:02:53 +01:00
|
|
|
serviceConfig.Type = "oneshot";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2024-01-02 14:05:33 +01:00
|
|
|
systemd.user.timers = {
|
2024-01-02 14:02:53 +01:00
|
|
|
"light-theme" = {
|
|
|
|
enable = true;
|
|
|
|
partOf = [ "light-theme.service" ];
|
|
|
|
timerConfig.OnCalendar = [ "*-*-* *:*:00" ];
|
|
|
|
};
|
|
|
|
"dark-theme" = {
|
|
|
|
enable = true;
|
|
|
|
partOf = [ "dark-theme.service" ];
|
|
|
|
timerConfig.OnCalendar = [ "*-*-* *:*:00" ];
|
|
|
|
};
|
2024-01-02 13:26:44 +01:00
|
|
|
};
|
2024-01-02 14:45:26 +01:00
|
|
|
}
|