Refactor the Nix config management.

This commit is contained in:
Root User 2026-02-06 21:31:22 +01:00
parent 55fe63bcdb
commit aca053b4e1
Signed by: root
GPG key ID: 087F0A95E5766D72
23 changed files with 954 additions and 1764 deletions

View file

@ -0,0 +1,12 @@
{
config,
pkgs,
lib,
...
}: {
services.xserver.enable = true;
services.xserver.displayManager.gdm.enable = true;
services.xserver.desktopManager.gnome3.enable = true;
myDesktop.gnome.packages = with pkgs; [gnome.gnome-shell gnome.gnome-control-center];
}

View file

@ -0,0 +1,133 @@
{
config,
pkgs,
lib,
...
}: let
home-manager = builtins.fetchTarball "https://github.com/nix-community/home-manager/archive/release-25.11.tar.gz";
cfg = config.services.forgejo;
srv = cfg.settings.server;
in {
# Home Manager Configuration
imports = [
# Include the results of the hardware scan.
(import "${home-manager}/nixos")
];
# Enable the gnome-keyring secrets vault.
# Will be exposed through DBus to programs willing to store secrets.
services.gnome.gnome-keyring.enable = true;
# Configure security to allow seatd access
security.polkit.enable = true;
# Consolidated Sway desktop: includes greetd, alacritty, hyfetch/fastfetch, a Nerd Font and librewolf
# Enable Sway window manager
programs.sway = {
enable = true;
wrapperFeatures.gtk = true;
};
# Enable Seatd for Wayland sessions
services.seatd = {
enable = true;
logLevel = "info";
};
services.greetd.enable = true;
services.greetd.settings = {
default_session = {
command = "${pkgs.tuigreet}/bin/tuigreet --time --cmd sway";
user = "greeter";
};
};
home-manager.users.forgejoprg = {pkgs, ...}: {
home.packages = [
pkgs.atool
pkgs.httpie
pkgs.alacritty # Terminal emulator
pkgs.hyfetch # Add fetching packages
pkgs.macchina
pkgs.wayland # Wayland display server
pkgs.wlroots # Wayland compositor library
pkgs.maple-mono.NF # Font for better terminal appearance
pkgs.wl-clipboard # Clipboard utilities for Wayland
pkgs.mako # Wayland Sway Notification Daemon
pkgs.btop # Resource monitor
];
# Set Alacritty as the default terminal emulator
home.sessionVariables = {
TERMINAL = "alacritty";
};
# Use Zsh as the default shell
programs.zsh.enable = true;
# Configure Alacritty as the default terminal emulator
programs.alacritty = {
enable = true;
settings = {
# Window configuration
window = {
opacity = 1.0;
padding = {
x = 10;
y = 10;
};
};
# Font configuration - fixes spacing issues
font = {
normal = {
family = "Maple Mono NF";
style = "Regular";
};
bold = {
family = "Maple Mono NF";
style = "Bold";
};
italic = {
family = "Maple Mono NF";
style = "Italic";
};
bold_italic = {
family = "Maple Mono NF";
style = "Bold Italic";
};
size = 14.0;
};
# Colors (optional - using default Alacritty colors)
colors = {
primary = {
background = "#1e1e2e";
foreground = "#cdd6f4";
};
};
};
};
# Configure Hyfetch system info fetcher
programs.hyfetch = {
enable = true;
settings = {
preset = "lesbian"; # Use lesbian flag preset
mode = "rgb"; # Use RGB color mode
lightness = 0.55; # Set to 55% brightness
backend = "macchina"; # Use macchina as the backend
logo_size = "small"; # Make small logo
pride_month_disable = false; # Enable pride month mode (or true to disable)
pride_month_shown = []; # List of shown pride month flags
color_align = {
mode = "horizontal";
};
};
};
# The state version is required and should stay at the version you
# originally installed.
home.stateVersion = "25.11";
};
}