Added Guard for Server Configuration; Builds are all successfull

This commit is contained in:
2026-04-10 21:32:38 +02:00
parent 90c1396ea5
commit 46fb7622e9
6 changed files with 115 additions and 111 deletions

53
home/catppuccin.nix Normal file
View File

@@ -0,0 +1,53 @@
{
lib,
isDarwin,
inputs,
...
}:
{
imports = [ inputs.catppuccin.homeModules.catppuccin ];
catppuccin = {
enable = false;
accent = "sky";
flavor = "mocha";
eza.enable = true;
fzf.enable = true;
bat.enable = true;
element-desktop = lib.mkIf (!isDarwin) {
enable = true;
accent = "green";
};
btop.enable = true;
cava = {
enable = true;
transparent = true;
};
kitty.enable = true;
lazygit.enable = true;
yazi.enable = true;
fish.enable = true;
cursors = lib.mkIf (!isDarwin) {
enable = true;
accent = "sapphire";
};
hyprland = lib.mkIf (!isDarwin) { enable = true; };
hyprlock = lib.mkIf (!isDarwin) {
enable = true;
useDefaultConfig = false;
};
waybar = lib.mkIf (!isDarwin) {
enable = true;
mode = "createLink";
};
mako.enable = lib.mkIf (!isDarwin) true;
mpv.enable = lib.mkIf (!isDarwin) true;
newsboat.enable = true;
mangohud.enable = lib.mkIf (!isDarwin) true;
gtk.icon.enable = lib.mkIf (!isDarwin) true;
kvantum = lib.mkIf (!isDarwin) {
enable = true;
apply = true;
};
};
}

View File

@@ -5,6 +5,7 @@
self,
lib,
isDarwin,
isServer,
...
}:
{
@@ -16,93 +17,37 @@
./xdg.nix
./neovim
./python.nix
inputs.sops-nix.homeManagerModules.sops
]
++ lib.optionals (!isDarwin && !isServer) [
./desktop
./catppuccin.nix
]
++ lib.optionals isDarwin [
./desktop/sketchybar
./catppuccin.nix
]
++ lib.optionals (!isServer) [
./nixcord.nix
./spicetify.nix
./floorp.nix
./obsidian.nix
inputs.sops-nix.homeManagerModules.sops
]
++ lib.optionals (!isDarwin) [ ./desktop ]
++ lib.optionals isDarwin [
./desktop/sketchybar
inputs.catppuccin.homeModules.catppuccin
];
nixpkgs.config.allowUnfree = true;
#targets.darwin.copyApps.enableChecks = isDarwin;
catppuccin = {
enable = false;
accent = "sky";
flavor = "mocha";
eza.enable = true;
fzf.enable = true;
bat.enable = true;
element-desktop = lib.mkIf (!isDarwin) {
enable = true;
accent = "green";
};
btop.enable = true;
cava = lib.mkIf (!isDarwin) {
enable = true;
transparent = true;
};
kitty.enable = true;
lazygit.enable = true;
yazi.enable = true;
fish.enable = true;
cursors = lib.mkIf (!isDarwin) {
enable = true;
accent = "sapphire";
};
hyprland = lib.mkIf (!isDarwin) { enable = true; };
hyprlock = lib.mkIf (!isDarwin) {
enable = true;
useDefaultConfig = false;
};
waybar = lib.mkIf (!isDarwin) {
enable = true;
mode = "createLink";
};
mako.enable = lib.mkIf (!isDarwin) true;
mpv.enable = lib.mkIf (!isDarwin) true;
newsboat.enable = lib.mkIf (!isDarwin) true;
mangohud.enable = lib.mkIf (!isDarwin) true;
gtk.icon.enable = lib.mkIf (!isDarwin) true;
kvantum = lib.mkIf (!isDarwin) {
enable = true;
apply = true;
};
};
home = {
# activation.checkAppManagementPermission = lib.mkForce "";
username = primaryUser;
stateVersion = "26.05";
sessionVariables = lib.mkIf (!isDarwin) {
sessionVariables = lib.mkIf (!isDarwin && !isServer) {
GROQ_API_KEY = config.sops.secrets.GROQ_API_KEY.path;
OPENWEATHER_API_KEY = config.sops.secrets.OPENWEATHER_API_KEY.path;
};
file = {
file = lib.mkIf (!isServer) {
"Pictures/Avatar" = {
source = "${self}/assets/avatar";
recursive = true;
};
"Pictures/Wallpapers" = {
source = "${self}/assets/wallpapers";
recursive = true;
@@ -118,7 +63,6 @@
"/Users/${primaryUser}/.config/nix/secrets/keys.txt"
else
"/home/${primaryUser}/.config/nix/secrets/keys.txt";
secrets = {
GROQ_API_KEY = { };
OPENWEATHER_API_KEY = { };

View File

@@ -1,7 +1,6 @@
{ pkgs, inputs, ... }:
{ pkgs, ... }:
{
imports = [
inputs.catppuccin.homeModules.catppuccin
./hyprland
./rofi
./waybar

View File

@@ -1,4 +1,5 @@
{ pkgs, ... }: {
{ pkgs, ... }:
{
# LSP configuration: Language Server Protocol provides IDE features
# like autocomplete, go-to-definition, diagnostics, and more.
programs.nixvim = {
@@ -80,6 +81,10 @@
};
# Install LSP servers
extraPackages = with pkgs; [ lua-language-server nil rust-analyzer ];
extraPackages = with pkgs; [
lua-language-server
nil
rust-analyzer
];
};
}

19
nixos/catppuccin.nix Normal file
View File

@@ -0,0 +1,19 @@
{ inputs, ... }:
{
imports = [ inputs.catppuccin.nixosModules.catppuccin ];
catppuccin = {
enable = true;
accent = "sky";
flavor = "mocha";
cache.enable = true;
cursors = {
enable = true;
accent = "sapphire";
};
fcitx5.enable = false;
forgejo.enable = false;
gitea.enable = false;
sddm.enable = false;
};
}

View File

@@ -1,43 +1,28 @@
{
pkgs,
inputs,
lib,
primaryUser,
isServer,
...
}:
{
imports = [
./fonts.nix
./sops.nix
./locale.nix
./tailscale.nix
./ssh.nix
]
++ lib.optionals (!isServer) [
./regreet.nix
./plymouth.nix
./audio.nix
./ssh.nix
./locale.nix
./tailscale.nix
./virt.nix
./webcam.nix
inputs.catppuccin.nixosModules.catppuccin
./virt.nix
./catppuccin.nix
];
catppuccin = {
enable = true;
accent = "sky";
flavor = "mocha";
cache.enable = true;
cursors = {
enable = true;
accent = "sapphire";
};
fcitx5.enable = false;
forgejo.enable = false;
gitea.enable = false;
sddm.enable = false;
};
# nix config
nix = {
settings = {
experimental-features = [
@@ -59,8 +44,6 @@
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
];
};
# Garbage collection
gc = {
automatic = true;
dates = "weekly";
@@ -68,39 +51,38 @@
};
};
# Disable Docs
documentation = {
enable = true;
doc.enable = false; # Skip large documentation
man.enable = false; # Keep man pages
info.enable = false; # Skip info pages
doc.enable = false;
man.enable = false;
info.enable = false;
};
nixpkgs.config = {
allowUnfree = true;
};
nixpkgs.config.allowUnfree = true;
programs = {
fish.enable = true;
}
// lib.optionalAttrs (!isServer) {
dconf.enable = true;
hyprland = {
enable = true;
package = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.hyprland;
};
steam.enable = true;
dconf.enable = true;
appimage = {
enable = true;
binfmt = true;
};
};
security = {
security = lib.mkIf (!isServer) {
pam.services.swaylock = { };
polkit.enable = true;
apparmor.enable = false;
};
services.gnome = {
services.gnome = lib.mkIf (!isServer) {
tinysparql.enable = true;
localsearch.enable = true;
};
@@ -111,6 +93,8 @@
isNormalUser = true;
extraGroups = [
"wheel"
]
++ lib.optionals (!isServer) [
"video"
"audio"
"libvirtd"