liminalOS/reference/modules/default.nix

138 lines
3.9 KiB
Nix
Raw Normal View History

2024-12-30 18:38:42 -08:00
{
config,
pkgs,
lib,
2024-12-31 17:52:29 -08:00
inputs,
2024-12-30 18:38:42 -08:00
...
}:
{
imports = [
../secrets/nixos
../users/youwen/nixos.nix
];
# systemd.services.suntheme = {
# wantedBy = [ "default.target" ];
# after = [
# "network.target"
# "atd.service"
# ];
# wants = [ "atd.service" ];
# description = "Run suntheme to set daemons";
# serviceConfig = {
# Type = "oneshot";
# RemainAfterExit = "yes";
# ExecStart = ''${inputs.suntheme.packages.${pkgs.system}.default}/bin/suntheme'';
# };
# };
#
# environment.systemPackages = [
# (pkgs.writeShellScriptBin "light.sh" ''
# /nix/var/nix/profiles/system/specialisation/dawn/bin/switch-to-configuration test
# '')
# (pkgs.writeShellScriptBin "dark.sh" ''
# /nix/var/nix/profiles/nix/system/bin/switch-to-configuration test
# '')
# ];
systemd.services = {
colorscheme-dawn = {
description = "Set system colorscheme to dawn";
unitConfig = {
ConditionPathExists = [
"/etc/polarity"
"/nix/var/nix/profiles/system/specialisation/dawn/bin/switch-to-configuration"
];
};
serviceConfig = {
Type = "oneshot";
User = "root";
PermissionsStartOnly = true;
ExecStart = "/nix/var/nix/profiles/system/specialisation/dawn/bin/switch-to-configuration test";
};
};
colorscheme-dusk = {
description = "Set system colorscheme to dusk";
unitConfig = {
ConditionPathExists = [
"/etc/polarity"
"/nix/var/nix/profiles/system/bin/switch-to-configuration"
];
};
serviceConfig = {
Type = "oneshot";
User = "root";
PermissionsStartOnly = true;
ExecStart = "/nix/var/nix/profiles/system/bin/switch-to-configuration test";
};
};
};
systemd.timers = {
colorscheme-dawn = {
wantedBy = [ "timers.target" ];
description = "Schedule system colorscheme change to dawn at 7 AM";
timerConfig = {
OnCalendar = "*-*-* 07:00:00";
Persistent = true;
Unit = "colorscheme-dawn.service";
};
};
colorscheme-dusk = {
wantedBy = [ "timers.target" ];
description = "Schedule system colorscheme change to dusk at 7 PM";
timerConfig = {
OnCalendar = "*-*-* 19:00:00";
Persistent = true;
Unit = "colorscheme-dusk.service";
};
};
};
nix.extraOptions = ''
!include ${config.age.secrets.nix_config_github_pat.path}
'';
2024-12-27 21:12:09 -08:00
nix.settings.trusted-users = [ "youwen" ];
2024-12-30 18:38:42 -08:00
liminalOS.theming = {
2024-12-30 18:38:42 -08:00
# wallpaper = "${inputs.wallpapers}/aesthetic/afterglow_city_skyline_at_night.png";
2024-12-31 17:52:29 -08:00
# wallpaper = "${
# pkgs.fetchFromGitHub {
# owner = "dharmx";
# repo = "walls";
# rev = "6bf4d733ebf2b484a37c17d742eb47e5139e6a14";
# hash = "sha256-YdPkJ+Bm0wq/9LpuST6s3Aj13ef670cQOxAEIhJg26E=";
# sparseCheckout = [ "radium" ];
# }
# }/radium/a_mountain_range_at_night.png";
wallpaper = lib.mkDefault (
pkgs.fetchurl {
url = "https://code.youwen.dev/youwen5/wallpapers/raw/branch/main/anime-with-people/eternal-blue.jpg";
hash = "sha256-PCyWyFgMxVYgDjPMtFbQoMTzN61zdUtiP6Lmgc3dRfk=";
}
);
base16Scheme = lib.mkDefault "${pkgs.base16-schemes}/share/themes/oxocarbon-dark.yaml";
polarity = lib.mkDefault "dark";
2024-12-30 18:38:42 -08:00
};
environment.etc.polarity.text = "dusk";
specialisation = {
dawn.configuration = {
environment.etc."specialisation".text = "dawn";
environment.etc.polarity.text = "dawn";
liminalOS.theming = {
wallpaper = pkgs.fetchurl {
2025-02-04 16:33:02 -08:00
url = "https://w.wallhaven.cc/full/ex/wallhaven-exlxjr.jpg";
hash = "sha256-SZT8hNe58Njf5XMrZvj97XCP2DSycpoc6u17Lc0IH7Y=";
};
# base16Scheme = "${pkgs.base16-schemes}/share/themes/oxocarbon-dark.yaml";
base16Scheme = null;
polarity = "light";
};
};
};
}