2024-01-14 17:33:16 +01:00
|
|
|
{ stylix }: { config, pkgs, lib, ... }:
|
|
|
|
let
|
|
|
|
cfg = config.jconfig;
|
|
|
|
in
|
|
|
|
{
|
2024-01-14 18:58:08 +01:00
|
|
|
imports = [ ./gui ] ++ lib.optional (cfg.enable && cfg.styling.enable) stylix.nixosModules.stylix;
|
2024-01-14 17:33:16 +01:00
|
|
|
|
2024-01-14 18:58:08 +01:00
|
|
|
options = import ../options.nix;
|
2024-01-14 17:33:16 +01:00
|
|
|
|
|
|
|
config = lib.optionalAttrs cfg.enable {
|
|
|
|
boot.plymouth.enable = cfg.styling.enable;
|
|
|
|
stylix = lib.optionalAttrs cfg.styling.enable (import ./stylix-config.nix);
|
|
|
|
|
|
|
|
# Enable unlocking the gpg-agent at boot (configured through home.nix)
|
|
|
|
security.pam.services.login.gnupg.enable = true;
|
|
|
|
|
|
|
|
environment.systemPackages = [
|
|
|
|
# Dev tools
|
|
|
|
pkgs.gcc
|
|
|
|
pkgs.just
|
|
|
|
pkgs.clang
|
|
|
|
# CLI tools
|
|
|
|
pkgs.fd
|
|
|
|
pkgs.bat
|
|
|
|
pkgs.skim
|
|
|
|
pkgs.ripgrep
|
|
|
|
pkgs.du-dust
|
|
|
|
pkgs.curl
|
|
|
|
pkgs.wget
|
|
|
|
pkgs.eza
|
|
|
|
];
|
|
|
|
|
|
|
|
# Shell prompt
|
|
|
|
programs.starship.enable = true;
|
|
|
|
programs.starship.settings = lib.optionalAttrs cfg.styling.enable {
|
|
|
|
format = "$time$all";
|
|
|
|
add_newline = false;
|
|
|
|
cmd_duration.min_time = 500;
|
|
|
|
cmd_duration.show_milliseconds = true;
|
|
|
|
time.format = "[$time](bold yellow) ";
|
|
|
|
time.disabled = false;
|
|
|
|
status.format = "[$signal_name$common_meaning$maybe_int](red)";
|
|
|
|
status.symbol = "[✗](bold red)";
|
|
|
|
status.disabled = false;
|
|
|
|
sudo.disabled = false;
|
|
|
|
};
|
|
|
|
# Default shell
|
|
|
|
programs.zsh.enable = true;
|
|
|
|
users.defaultUserShell = pkgs.zsh;
|
|
|
|
|
|
|
|
# Open ports for spotifyd
|
|
|
|
networking.firewall.allowedUDPPorts = [ 5353 ];
|
|
|
|
networking.firewall.allowedTCPPorts = [ 2020 ];
|
|
|
|
|
|
|
|
# Nix Settings
|
|
|
|
nix.gc.automatic = true;
|
|
|
|
nix.gc.dates = "weekly";
|
|
|
|
nix.gc.options = "--delete-older-than 30d";
|
|
|
|
# run between 0 and 45min after boot if run was missed
|
|
|
|
nix.gc.randomizedDelaySec = "45min";
|
|
|
|
nix.settings.auto-optimise-store = true;
|
|
|
|
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
|
|
|
};
|
|
|
|
}
|