Deletged generated, testing new location scripts

This commit is contained in:
2026-04-29 09:52:40 +02:00
parent 8447a9b596
commit 8e82977bc9
16997 changed files with 410 additions and 134198 deletions
@@ -1,100 +0,0 @@
# --- This file has been auto-generated. For permanent changes alter the appropriate block in the README.org. ---
{ lib, config, pkgs, flakeRoot, ... }:
let
#################################
# FILE
#################################
confPath = "${flakeRoot}/generated/assets/2_b_installed.conf";
raw = builtins.readFile confPath;
lines = lib.splitString "\n" raw;
#################################
# CLEAN LINE
#################################
cleanLine = line:
let
noCR = lib.replaceStrings [ "\r" ] [ "" ] line;
noInlineComment = lib.head (lib.splitString "#" noCR);
in
lib.strings.trim noInlineComment;
#################################
# PARSE SECTION
#################################
parseSection = section:
let
result =
builtins.foldl'
(acc: line:
let
l = lib.strings.trim line;
in
if l == section then
acc // { active = true; }
else if lib.hasPrefix "#" l then
acc // { active = false; }
else if acc.active then
acc // { entries = acc.entries ++ [ l ]; }
else
acc
)
{ active = false; entries = []; }
lines;
in
builtins.filter (l: l != "") (map cleanLine result.entries);
#################################
# NIX PACKAGES
#################################
packageEntries = parseSection "#packages";
resolvePkg = name:
let
parts = lib.splitString "." name;
found = lib.attrByPath parts null pkgs;
in
if found == null then
throw ''
packages.nix: package not found
Token: ${name}
File : ${confPath}
''
else
found;
packages = map resolvePkg packageEntries;
#################################
# FLATPAKS
#################################
flatpakEntries = parseSection "#flatpaks";
in {
#################################
# Allow unfree
#################################
nixpkgs.config.allowUnfree = true;
#################################
# System packages (Nix)
#################################
environment.systemPackages = packages;
#################################
# Flatpak setup
#################################
services.flatpak.enable = true;
services.flatpak.remotes = [
{
name = "flathub";
location = "https://flathub.org/repo/flathub.flatpakrepo";
}
];
#################################
# Flatpak apps
#################################
services.flatpak.packages = flatpakEntries;
}
@@ -1,87 +0,0 @@
# --- This file has been auto-generated. For permanent changes alter the appropriate block in the README.org. ---
{ config, pkgs, lib, flakeRoot, ... }:
let
username = config.defaultUser or "henrov";
assetPath = "${flakeRoot}/generated/.config/emacs";
# Emacs package with Tree-sitter support
emacsPkg = pkgs.emacs-pgtk.override { withTreeSitter = true; };
# Extra packages for Emacs via Home Manager
emacsExtraPackages = epkgs: [
epkgs.manualPackages.treesit-grammars.with-all-grammars
epkgs.nerd-icons
epkgs.doom-modeline
epkgs.diminish
epkgs.eldoc
epkgs.pulsar
epkgs.which-key
epkgs.expreg
epkgs.vundo
epkgs.puni
epkgs.avy
epkgs.consult
epkgs.vertico
epkgs.marginalia
epkgs.crux
epkgs.magit
epkgs.nerd-icons-corfu
epkgs.corfu
epkgs.cape
epkgs.orderless
epkgs.yasnippet
epkgs.yasnippet-snippets
epkgs.rg
epkgs.exec-path-from-shell
epkgs.eat
epkgs.rust-mode
epkgs.rustic
epkgs.nix-mode
epkgs.hcl-mode
epkgs.shell-pop
epkgs.envrc
epkgs.nixpkgs-fmt
epkgs.f
epkgs.gptel
epkgs.catppuccin-theme
epkgs.eldoc-box
epkgs.sideline
epkgs.sideline-flymake
epkgs.sideline-eglot
];
in
{
# System-wide installation
environment.systemPackages = [
emacsPkg
];
# Home Manager user-specific configuration for your default user
home-manager.users = {
${username} = {
home.sessionVariables = {
EDITOR = "emacs";
XDG_SCREENSHOTS_DIR = "~/screenshots";
};
programs.emacs = {
enable = true;
package = emacsPkg;
extraPackages = emacsExtraPackages;
};
home.file = {
".emacs.d/early-init.el" = {
source = "${assetPath}/early-init.el";
force = true; # <-- allow overwrite
};
".emacs.d/init.el" = {
source = "${assetPath}/init.el";
force = true; # <-- allow overwrite
};
};
};
};
}
@@ -1,21 +0,0 @@
# --- This file has been auto-generated. For permanent changes alter the appropriate block in the README.org. ---
# --- This file has been auto-generated. For permanent changes alter the appropriate block in the README.org. ---
{ config, pkgs, ... }:
let
username = config.defaultUser or "henrov";
in
{
environment.systemPackages = with pkgs; [
kdePackages.kdeconnect-kde
];
systemd.user.services.kdeconnect = {
enable = true;
description = "KDE Connect daemon";
wantedBy = ["default.target"];
serviceConfig = {
ExecStart = "${pkgs.kdePackages.kdeconnect-kde}/bin/kdeconnectd";
Restart = "on-failure";
};
};
}
@@ -1,44 +0,0 @@
# --- This file has been auto-generated. For permanent changes alter the appropriate block in the README.org. ---
{ lib, pkgs, config, flakeRoot, ... }:
let
username = config.defaultUser or "henrov";
extraConfigFile = "${flakeRoot}/generated/.config/kitty/extra.conf";
extraConfig =
if builtins.pathExists extraConfigFile
then builtins.readFile extraConfigFile
else "";
in
{
#################################
# System-wide install
#################################
environment.systemPackages = [
pkgs.kitty
];
#################################
# Home Manager
#################################
home-manager.users = {
"${username}" = {
programs.kitty = {
enable = true;
settings = {
confirm_os_window_close = lib.mkForce 0;
dynamic_background_opacity = lib.mkForce true;
enable_audio_bell = lib.mkForce false;
mouse_hide_wait = lib.mkForce "-1.0";
window_padding_width = lib.mkForce 10;
background_opacity = lib.mkForce "0.5";
background_blur = lib.mkForce 5;
notify_on_command_complete = lib.mkForce "never";
};
extraConfig = ''
${extraConfig}
# Theme
include themes/Catppuccin-Mocha.conf
'';
};
};
};
}
@@ -1,31 +0,0 @@
# --- This file has been auto-generated. For permanent changes alter the appropriate block in the README.org. ---
{ lib, config, pkgs, flakeRoot, ... }:
let
# Default username fallback
username = config.defaultUser or "henrov";
# Path to the starship config in assets
starshipConfSrc = "${flakeRoot}/generated/.config/starship.toml";
in
{
#################################
# Install Starship system-wide
#################################
environment.systemPackages = [ pkgs.starship ];
#################################
# Home Manager user configuration
#################################
home-manager.users = {
${username} = {
home.file = {
".config/starship.toml" = {
text = builtins.readFile "${starshipConfSrc}";
force = true;
};
};
};
};
}
@@ -1,38 +0,0 @@
# --- This file has been auto-generated. For permanent changes alter the appropriate block in the README.org. ---
{ pkgs, config, lib, ... }:
let
# Resolve the default username from host config
username = config.defaultUser or "henrov";
in
{
############################
# System-level packages
############################
environment.systemPackages = with pkgs; [
thunar # main file manager
thunar-archive-plugin # zip, tar, rar, 7z support
thunar-volman # auto-mount removable drives
gvfs # support for external drives and network shares
xarchiver # optional GUI archive manager
tumbler # Showing thumbnails
libmtp
mtpfs
jmtpfs
];
############################
# Home Manager user-level configuration
############################
# Direct assignment to the user avoids recursiveUpdate issues
home-manager.users."${username}" = {
home.stateVersion = "26.05"; # required
home.sessionVariables = {
FILE_MANAGER = "thunar";
USERNAME = username;
};
};
# Enable gvfs as a service
services.gvfs.enable = true;
}
@@ -1,25 +0,0 @@
# --- This file has been auto-generated. For permanent changes alter the appropriate block in the README.org. ---
{ lib, config, pkgs, flakeRoot, ... }:
let
username = config.defaultUser or "henrov";
assetPath = "${flakeRoot}/generated/.config/wofi";
in
{
environment.systemPackages = [ pkgs.wofi ];
home-manager.users = {
${username} = {
home.file = {
".config/wofi/config" = {
text = builtins.readFile "${assetPath}/config";
force = true;
};
".config/wofi/style.css" = {
text = builtins.replaceStrings ["PLACEHOLDER_USERNAME"] [username] (builtins.readFile "${assetPath}/style.css");
force = true;
};
};
};
};
}
@@ -1,12 +0,0 @@
# --- This file has been auto-generated. For permanent changes alter the appropriate block in the README.org. ---
{ config, pkgs, lib, zen-browser, ... }:
let
# Grab the Zen Browser package for this host system
zenBrowser = zen-browser.packages.${pkgs.stdenv.hostPlatform.system}.default;
in
{
environment.systemPackages = [
zenBrowser
];
}
@@ -1,105 +0,0 @@
# --- This file has been auto-generated. For permanent changes alter the appropriate block in the README.org. ---
{ lib, config, pkgs, flakeRoot, ... }:
let
#################################
# User config
#################################
username = config.defaultUser or "henrov";
generatedZsh = "${flakeRoot}/generated/.config/zsh/.zshrc";
#################################
# Alias parsing
#################################
aliasFile = "${flakeRoot}/generated/assets/aliases.conf";
content = builtins.readFile aliasFile;
lines =
lib.filter (l: l != "")
(map (l:
let
noComment = builtins.head (lib.splitString "#" l);
in lib.trim noComment
) (lib.splitString "\n" content));
parseLine = line:
let
parts = lib.splitString "=" line;
in
if lib.length parts < 2 then null else {
name = lib.trim (lib.head parts);
value = lib.trim (lib.concatStringsSep "=" (lib.tail parts));
};
parsed =
lib.filter (x: x != null)
(map parseLine lines);
functions =
lib.concatStringsSep "\n"
(map (x: ''
${x.name}() {
${x.value} "$@"
}
'') parsed);
in
{
#################################
# Packages
#################################
environment.systemPackages = with pkgs; [
zsh
oh-my-zsh
starship
zsh-syntax-highlighting
];
#################################
# Zsh config location
#################################
environment.etc."zshenv".text = ''
export ZDOTDIR=$HOME/.config/zsh
'';
#################################
# Generated alias functions (system-wide)
#################################
environment.etc."profile.d/99-alias-functions.sh".text = ''
# system-wide functions generated from aliases.conf
${functions}
'';
#################################
# Global zshrc
#################################
environment.etc."zshrc".text = ''
export ZSH=${pkgs.oh-my-zsh}/share/oh-my-zsh
ZSH_THEME=""
plugins=(git sudo extract colored-man-pages command-not-found history docker kubectl)
source $ZSH/oh-my-zsh.sh
# Init starship FIRST (prompt)
eval "$(starship init zsh)"
# Load alias functions
if [ -f /etc/profile.d/99-alias-functions.sh ]; then
source /etc/profile.d/99-alias-functions.sh
fi
# Load optional generated user config
[ -f "${generatedZsh}" ] && source "${generatedZsh}"
# Syntax highlighting MUST be last
source ${pkgs.zsh-syntax-highlighting}/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
'';
#################################
# Home Manager integration
#################################
home-manager.users.${username} = {
programs.zsh.enable = true;
home.file.".config/zsh/.zshrc".source = generatedZsh;
};
}
@@ -1,10 +0,0 @@
# --- This file has been auto-generated. For permanent changes alter the appropriate block in the README.org. ---
{ lib, pkgs, config, ... }:
{
fonts.packages = with pkgs; [
nerd-fonts.iosevka
nerd-fonts.fira-code
nerd-fonts.jetbrains-mono
];
}
@@ -1,18 +0,0 @@
# --- This file has been auto-generated. For permanent changes alter the appropriate block in the README.org. ---
{ pkgs, config, lib, ... }:
let
username = config.defaultUser or "henrov";
in
{
environment.systemPackages = with pkgs; [
gtk3
gtk4
];
home-manager.users."${username}" = {
gtk = {
enable = true;
};
};
}
@@ -1,34 +0,0 @@
# --- This file has been auto-generated. For permanent changes alter the appropriate block in the README.org. ---
{ lib, config, pkgs, flakeRoot, home-manager, inputs, ... }:
let
username = config.defaultUser or "henrov";
assetPath = "${flakeRoot}/generated/.config/hypr";
hyprlandPkg =
pkgs.hyprland or
pkgs.hyprland-git or
inputs.hyprland.packages.${pkgs.system}.default;
in
{
# Install Hyprland systemwide
programs.hyprland.enable = true;
programs.hyprland.withUWSM = true;
programs.hyprland.package = hyprlandPkg;
environment.systemPackages = [ hyprlandPkg ];
# Home Manager user configuration
home-manager.users = {
${username} = {
home.activation.MakeHyprMutable = {
after = [ "writeBoundary" ];
before = [];
data = ''
rm -f $HOME/.config/hypr/*
cp ${assetPath}/* $HOME/.config/hypr/
chmod u+w $HOME/.config/hypr/*
'';
};
};
};
}
@@ -1,82 +0,0 @@
# --- This file has been auto-generated. For permanent changes alter the appropriate block in the README.org. ---
{ lib, config, pkgs, flakeRoot, stylix, ... }:
let
username = config.defaultUser or "henrov";
moduleName = "stylix";
assetPath = "${flakeRoot}/generated/.config/${moduleName}";
stylixConfFile = "${assetPath}/stylix.conf";
stylixConf =
if builtins.pathExists stylixConfFile
then builtins.readFile stylixConfFile
else "";
cursorName = "phinger-cursors-light";
cursorSize = 24;
in
{
#################################
# Enable Stylix module
#################################
imports = [
stylix.nixosModules.stylix
];
#################################
# System packages
#################################
environment.systemPackages = [
pkgs.feh
pkgs.st
];
#################################
# Stylix system config
#################################
stylix = {
enable = true;
base16Scheme = "${flakeRoot}/assets/traveldroid/theming/stylix/catppuccin-mocha.yaml";
polarity = "dark";
targets = {
gtk.enable = true;
qt.enable = true;
};
cursor = {
name = cursorName;
package = pkgs.phinger-cursors;
size = cursorSize;
};
};
#################################
# Home Manager
#################################
home-manager.users = {
"${username}" = {
#################################
# ONLY custom file (safe)
#################################
home.file.".config/stylix/stylix.conf" = {
text = stylixConf;
force = true;
};
#################################
# Environment variables
#################################
home.sessionVariables = {
STYLIX_CONF = "$HOME/.config/stylix/stylix.conf";
XCURSOR_THEME = cursorName;
XCURSOR_SIZE = toString cursorSize;
HYPRCURSOR_THEME = cursorName;
HYPRCURSOR_SIZE = toString cursorSize;
};
};
};
}
@@ -1,91 +0,0 @@
# --- This file has been auto-generated. For permanent changes alter the appropriate block in the README.org. ---
{ lib, config, pkgs, flakeRoot, ... }:
let
username = config.defaultUser or "henrov";
homeDir = "/home/${username}";
wallpaperSrc = "${flakeRoot}/assets/traveldroid/Wallpapers";
wallpaperDst = "${homeDir}/Wallpapers";
randoScript = "${homeDir}/Wallpapers/scripts/randomizeWallpapers.sh";
in
{
# Make bash available
environment.systemPackages = [ pkgs.bash pkgs.rsync pkgs.jq pkgs.awww pkgs.waypaper pkgs.socat ];
# Create the copy script using Home Manager, following Waybar style
home-manager.users = {
${username} = {
home.file = {
"copy-wallpapers.sh" = {
text = ''
#!/run/current-system/sw/bin/bash
set -euo pipefail
echo "Running as $(whoami)"
echo "Copying wallpapers from ${wallpaperSrc} to ${wallpaperDst} ..."
if [ ! -d "${wallpaperSrc}" ]; then
echo "ERROR: ${wallpaperSrc} does not exist"
exit 1
fi
mkdir -p "${wallpaperDst}"
# Simple copy, overwrite everything
cp -r "${wallpaperSrc}/." "${wallpaperDst}/"
# Fix permissions
chmod -R u+rwx "${wallpaperDst}"
echo "Done copying wallpapers."
'';
executable = true;
force = true;
};
};
};
};
# User service to run the script that copies the Wallpaperstuff
systemd.user.services.copyWallpapers = {
description = "Copy wallpapers from repo to ~/Wallpapers";
serviceConfig = {
Type = "oneshot";
ExecStart = "${homeDir}/copy-wallpapers.sh";
Restart = "no";
WorkingDirectory = homeDir;
};
wantedBy = [ "default.target" ];
};
# User service to randomize wallpapers
systemd.user.services.randomizeWallpapers = {
description = "Randomize wallpapers in ~/Wallpapers/pictures";
serviceConfig = {
Type = "oneshot";
ExecStart = "${randoScript}";
Restart = "no";
WorkingDirectory = homeDir;
};
wantedBy = [ "default.target" ];
};
############################
# Random background per workspace at logon
############################
systemd.user.services.workspaceWallpapers = {
description = "Dynamic wallpapers per workspace for Hyprland";
after = [ "graphical-session.target" ];
wants = [ "graphical-session.target" ];
serviceConfig = {
Type = "simple";
ExecStart = "${homeDir}/Wallpapers/scripts/workspace-wallpapers.sh";
Restart = "on-failure";
RestartSec = 5;
WorkingDirectory = homeDir;
Environment = [
"HYPRLAND_INSTANCE_SIGNATURE=${builtins.getEnv "HYPRLAND_INSTANCE_SIGNATURE"}"
"WAYLAND_DISPLAY=wayland-1"
"PATH=/run/current-system/sw/bin:/usr/bin:/bin"
];
};
wantedBy = [ "default.target" ];
};
}
@@ -1,40 +0,0 @@
# --- This file has been auto-generated. For permanent changes alter the appropriate block in the README.org. ---
{ lib, config, pkgs, flakeRoot, ... }:
let
username = config.defaultUser or "henrov";
waybarPath = "${flakeRoot}/generated/.config/waybar";
in
{
environment.systemPackages = [ pkgs.waybar ];
home-manager.users.${username} = {
home.file = {
".config/waybar/config.jsonc".source = "${waybarPath}/config.jsonc";
".config/waybar/style-dark.css".source = "${waybarPath}/style-dark.css";
};
home.activation.MakeMutable = {
after = [ "writeBoundary" ];
before = [];
data = ''
rm -f $HOME/.config/waybar/*
cp ${waybarPath}/* $HOME/.config/waybar/
chmod u+w $HOME/.config/waybar/*
'';
};
};
systemd.user.services.waybar = {
description = "Waybar for Hyprland";
after = [ "graphical-session.target" ];
wantedBy = [ "default.target" ];
serviceConfig = {
ExecStart = "${pkgs.waybar}/bin/waybar";
Restart = "always";
Environment = ''
WAYLAND_DISPLAY=${config.environment.sessionVariables.WAYLAND_DISPLAY or "wayland-0"}
XDG_CURRENT_DESKTOP=Hyprland
'';
};
};
}
@@ -1,25 +0,0 @@
# --- This file has been auto-generated. For permanent changes alter the appropriate block in the README.org. ---
{ lib, config, pkgs, ... }:
{
#################################
# Core Wayland packages
#################################
environment.systemPackages = with pkgs; [
wayland
wl-clipboard # optional but commonly used for copy/paste
];
#################################
# enable graphics stack
#################################
hardware.graphics.enable = true;
#################################
# Optional session variables for Wayland
#################################
environment.sessionVariables = {
# Forces some apps to use Wayland
NIXOS_OZONE_WL = "1";
};
}
@@ -1,62 +0,0 @@
# --- This file has been auto-generated. For permanent changes alter the appropriate block in the README.org. ---
{ lib, config, pkgs, flakeRoot, ... }:
let
username = config.defaultUser or "henrov";
homeDir = "/home/${username}";
basePortal = pkgs.xdg-desktop-portal-gtk;
hyprlandPortal = pkgs.xdg-desktop-portal-hyprland;
in
{
#################################
# XDG Desktop Portals (system)
#################################
xdg.portal.enable = true;
xdg.portal.xdgOpenUsePortal = true;
xdg.portal.extraPortals = [
basePortal
hyprlandPortal
];
xdg.portal.config = {
common = {
default = [ "hyprland" "gtk" ];
};
hyprland = {
default = [ "hyprland" "gtk" ];
"org.freedesktop.impl.portal.FileChooser" = [ "gtk" ];
"org.freedesktop.impl.portal.Settings" = [ "gtk" ];
"org.freedesktop.impl.portal.Screencast" = [ "hyprland" ];
"org.freedesktop.impl.portal.Screenshot" = [ "hyprland" ];
};
};
#################################
# System packages
#################################
environment.systemPackages = [
basePortal
hyprlandPortal
];
#################################
# Home Manager user config
#################################
home-manager.users.${username} = {
#################################
# XDG user directories
#################################
xdg.userDirs = {
enable = true;
createDirectories = true;
desktop = null;
download = "${homeDir}/Downloads";
documents = "${homeDir}/Documents";
pictures = "${homeDir}/Pictures";
music = null;
publicShare = null;
templates = "${homeDir}/Experiments";
videos = "${homeDir}/Videos";
extraConfig = {
XDG_PROJECTS_DIR = "${homeDir}/Projects";
XDG_WORK_DIR = "${homeDir}/Work";
};
};
};
}
@@ -1,14 +0,0 @@
# --- This file has been auto-generated. For permanent changes alter the appropriate block in the README.org. ---
{ lib, config, pkgs, ... }:
{
############################
# Audio system
############################
environment.systemPackages = with pkgs; [
pulseaudio # PulseAudio daemon
pavucontrol # GUI mixer
pamixer # CLI mixer
playerctl # Player controls
];
}
@@ -1,12 +0,0 @@
# --- This file has been auto-generated. For permanent changes alter the appropriate block in the README.org. ---
{ ... }:
{
services.avahi = {
enable = true;
nssmdns4 = true;
publish = {
enable = true;
addresses = true;
};
};
}
@@ -1,19 +0,0 @@
# --- This file has been auto-generated. For permanent changes alter the appropriate block in the README.org. ---
{ lib, config, pkgs, home-manager, ... }:
let
username = config.defaultUser or "henrov";
in
{
############################
# Bluetooth daemon
############################
hardware.bluetooth = {
enable = true;
powerOnBoot = true;
package = pkgs.bluez;
};
environment.systemPackages = with pkgs; [ blueman ];
}
@@ -1,69 +0,0 @@
# --- This file has been auto-generated. For permanent changes alter the appropriate block in the README.org. ---
{ lib, config, pkgs, flakeRoot, ... }:
let
colors = {
border = "#97C9E6";
crust = "#11111b";
mantle = "#181825";
base = "#1e1e2e";
surface0 = "#313244";
surface1 = "#45475a";
surface2 = "#585b70";
overlay0 = "#6c7086";
overlay1 = "#7f849c";
overlay2 = "#9399b2";
subtext0 = "#a6adc8";
subtext1 = "#bac2de";
text = "#cdd6f4";
rosewater = "#f5e0dc";
flamingo = "#f2cdcd";
pink = "#f5c2e7";
mauve = "#cba6f7";
red = "#f38ba8";
maroon = "#eba0ac";
peach = "#fab387";
yellow = "#f9e2af";
green = "#a6e3a1";
teal = "#94e2d5";
sapphire = "#74c7ec";
blue = "#89b4fa";
lavender = "#b4befe";
};
username = config.defaultUser or "henrov";
qmlContent = ''
pragma Singleton
// Catppuccin Mocha Palette - auto-generated, do not edit manually
import QtQuick
QtObject {
readonly property color baseAlpha: Qt.rgba(30/255, 30/255, 46/255, 0.9)
'' + lib.concatStringsSep "\n" (
lib.mapAttrsToList (name: value:
" readonly property color ${name}: \"${value}\""
) colors
) + "\n}";
in
{
home-manager.users.${username} = {
home.file = {
".config/shared/colors.css" = {
source = "${flakeRoot}/generated/.config/shared/colors.css";
force = true;
};
".config/quickshell/Colors.qml" = {
text = qmlContent;
force = true;
};
".config/quickshell/powermenu/Colors.qml" = {
text = qmlContent;
force = true;
};
".config/quickshell/powermenu/qmldir" = {
text = "singleton Colors 1.0 Colors.qml";
force = true;
};
};
};
}
@@ -1,33 +0,0 @@
# --- This file has been auto-generated. For permanent changes alter the appropriate block in the README.org. ---
{ lib, config, pkgs, flakeRoot, ... }:
let
username = config.defaultUser or "henrov";
configPath = flakeRoot + "/generated/.config/scripts";
allFiles = lib.filesystem.listFilesRecursive configPath;
toRelative = file:
let
base = toString flakeRoot + "/generated/";
relative = lib.removePrefix base (toString file);
in
builtins.unsafeDiscardStringContext relative;
isShellScript = file:
lib.hasSuffix ".sh" (toString file);
toFileEntry = file: {
name = toRelative file;
value = {
source = file;
executable = isShellScript file;
force = true;
};
};
in
{
home-manager.users = {
${username} = {
home.file = builtins.listToAttrs (map toFileEntry allFiles);
};
};
}
@@ -1,19 +0,0 @@
# --- This file has been auto-generated. For permanent changes alter the appropriate block in the README.org. ---
{ config, pkgs, ... }:
{
# Enable classic D-Bus service
services.dbus.enable = true;
# Use default dbus package (classic D-Bus)
services.dbus.dbusPackage = pkgs.dbus;
# Include some essential system packages so shell and tools exist
environment.systemPackages = with pkgs; [
bashInteractive
coreutils
];
# Do not attempt to wrap dbus-daemon-launch-helper manually
# No extra security.wrappers needed
}
@@ -1,73 +0,0 @@
# --- This file has been auto-generated. For permanent changes alter the appropriate block in the README.org. ---
{ pkgs, ... }:
{
# Use nftables as the firewall backend
networking.nftables.enable = true;
networking.firewall = {
enable = true;
filterForward = false; # don't filter forwarded traffic
# outbound is allowed by default UNLESS you've set:
# LAN-only ports — Wi-Fi interface
interfaces."wlan0" = {
allowedTCPPorts = [
22 # SSH
80 # allow HTTP globally for outbound
443 # allow HTTPS globally for outbound
631 # CUPS / IPP network printing
9100 # AppSocket/JetDirect printing
6566 # SANE network scanner
57621 # Spotify Connect
57622 # Spotify local file sync
];
allowedTCPPortRanges = [
{ from = 1714; to = 1764; } # KDE Connect
];
allowedUDPPorts = [
5353 # mDNS / Avahi (printer + device discovery)
631 # CUPS / IPP
67 # DHCP
123 # NTP time sync
1900 # UPnP device discovery
57621 # Spotify Connect
];
allowedUDPPortRanges = [
{ from = 1714; to = 1764; } # KDE Connect
];
};
# LAN-only ports — ethernet (ready for when you plug in)
interfaces."enp0s31f6" = {
allowedTCPPorts = [
631 # CUPS / IPP network printing
9100 # AppSocket/JetDirect printing
6566 # SANE network scanner
57621 # Spotify Connect
57622 # Spotify local file sync
];
allowedTCPPortRanges = [
{ from = 1714; to = 1764; } # KDE Connect
];
allowedUDPPorts = [
5353 # mDNS / Avahi (printer + device discovery)
631 # CUPS / IPP
67 # DHCP
123 # NTP time sync
1900 # UPnP device discovery
57621 # Spotify Connect
];
allowedUDPPortRanges = [
{ from = 1714; to = 1764; } # KDE Connect
];
};
};
# CLI tool for temporary rule changes without rebuilding
# Usage: sudo nixos-firewall-tool open tcp 8080
environment.systemPackages = with pkgs; [
nixos-firewall-tool
];
}
@@ -1,40 +0,0 @@
# --- This file has been auto-generated. For permanent changes alter the appropriate block in the README.org. ---
{ config, pkgs, ... }:
{
##################################################
# Core services
##################################################
# Enable GNOME Keyring
services.gnome.gnome-keyring.enable = true;
##################################################
# PAM (auto unlock keyring on login)
##################################################
security.pam.services = {
login.enableGnomeKeyring = true;
greetd.enableGnomeKeyring = true;
sddm.enableGnomeKeyring = true;
gdm.enableGnomeKeyring = true;
};
##################################################
# Environment packages
##################################################
environment.systemPackages = with pkgs; [
polkit_gnome
seahorse
libsecret
];
##################################################
# Security / Polkit
##################################################
security.polkit.enable = true;
}
@@ -1,48 +0,0 @@
# --- This file has been auto-generated. For permanent changes alter the appropriate block in the README.org. ---
{ lib, config, pkgs, flakeRoot, ... }:
let
username = config.defaultUser or "henrov";
basePath = "${flakeRoot}/generated/.config";
assetPath = "${flakeRoot}/generated/.config/hypr";
in
{
#################################
# Install hypridle system-wide
#################################
environment.systemPackages = [ pkgs.hypridle ];
#################################
# Deploy config
#################################
home-manager.users = {
${username} = {
home.file = {
".config/hypr/hypridle.conf" = {
text = builtins.readFile "${assetPath}/hypridle.conf";
force = true;
};
};
};
};
#################################
# Systemd user service
#################################
systemd.user.services.hypridle = {
description = "Hypridle (Hyprland idle daemon)";
after = [ "hyprland-session.target" ];
bindsTo = [ "hyprland-session.target" ];
serviceConfig = {
ExecStart = "${pkgs.hypridle}/bin/hypridle";
Restart = "on-failure";
RestartSec = "5s";
Environment = [
"HOME=/home/${username}"
"WAYLAND_DISPLAY=wayland-1"
"XDG_RUNTIME_DIR=/run/user/1000"
];
};
wantedBy = [ "hyprland-session.target" ];
};
}
@@ -1,49 +0,0 @@
# --- This file has been auto-generated. For permanent changes alter the appropriate block in the README.org. ---
{ lib, config, pkgs, flakeRoot, ... }:
let
username = config.defaultUser or "henrov";
basePath = "${flakeRoot}/generated/.config";
assetPath = "${flakeRoot}/generated/.config/hypr";
in
{
#################################
# Install hyprlock system-wide
#################################
environment.systemPackages = [
pkgs.hyprlock
];
#################################
# Deploy configuration file
#################################
home-manager.users = {
${username} = {
home.file = {
".config/hypr/hyprlock.conf" = {
text = builtins.readFile "${assetPath}/hyprlock.conf";
force = true;
};
};
};
};
#################################
# Optional: helper systemd user service (manual start use)
#################################
systemd.user.services.hyprlock = {
description = "Hyprlock (manual lock session)";
after = [ "graphical-session.target" ];
serviceConfig = {
ExecStart = "${pkgs.hyprlock}/bin/hyprlock";
Restart = "no";
Environment = ''
WAYLAND_DISPLAY=${config.environment.sessionVariables.WAYLAND_DISPLAY or "wayland-0"}
XDG_CURRENT_DESKTOP=Hyprland
'';
};
wantedBy = [ ];
};
}
@@ -1,39 +0,0 @@
# --- This file has been auto-generated. For permanent changes alter the appropriate block in the README.org. ---
{ config, pkgs, lib, ... }:
let
tuigreetBin = "${pkgs.tuigreet}/bin/tuigreet";
sessionsDir = "${pkgs.uwsm}/share/wayland-sessions";
in
{
#################################
# Greetd (tuigreet)
#################################
services.greetd = {
enable = true;
settings = {
default_session = {
command = ''
${tuigreetBin} \
--time \
--remember \
--remember-session \
--sessions ${sessionsDir} \
--cmd "uwsm start hyprland-uwsm.desktop"
'';
user = "greeter";
};
};
};
#################################
# Fix TTY / boot noise issues
#################################
systemd.services.greetd.serviceConfig = {
Type = "idle";
StandardInput = "tty";
StandardOutput = "tty";
StandardError = "journal";
TTYReset = true;
TTYVHangup = true;
TTYVTDisallocate = true;
};
}
@@ -1,41 +0,0 @@
# --- This file has been auto-generated. For permanent changes alter the appropriate block in the README.org. ---
{ lib, config, pkgs, ... }:
{
#################################
# Networking core
#################################
networking = {
# Let DHCP be default unless overridden elsewhere
useDHCP = lib.mkDefault true;
#################################
# NetworkManager (primary stack)
#################################
networkmanager = {
enable = true;
# Use iwd backend for WiFi
wifi.backend = "iwd";
};
#################################
# iwd (WiFi daemon)
#################################
wireless.iwd = {
enable = true;
# Allow user control via NM / CLI
settings.General.EnableNetworkConfiguration = true;
};
};
#################################
# System packages
#################################
environment.systemPackages = [
pkgs.networkmanager
pkgs.linux-firmware
pkgs.networkmanagerapplet
pkgs.networkmanager_dmenu
# pkgs.iwgtk
];
}
@@ -1,18 +0,0 @@
# --- This file has been auto-generated. For permanent changes alter the appropriate block in the README.org. ---
{ lib, config, ... }:
{
nix.settings = {
experimental-features = [ "nix-command" "flakes" ];
download-buffer-size = 536870912; # 512 MB
cores = 8;
max-jobs = "auto";
};
nix.gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 30d";
};
boot.loader.systemd-boot.configurationLimit = 3;
}
@@ -1,16 +0,0 @@
# --- This file has been auto-generated. For permanent changes alter the appropriate block in the README.org. ---
{ lib, config, pkgs, ... }:
{
############################
# Printing system
############################
services.printing.enable = true; # enable CUPS printing service
############################
# System packages for GUI management
############################
environment.systemPackages = with pkgs; [
system-config-printer # GUI to manage printers
];
}
@@ -1,44 +0,0 @@
# --- This file has been auto-generated. For permanent changes alter the appropriate block in the README.org. ---
{ pkgs, lib, config, flakeRoot, ... }:
let
username = config.defaultUser or "henrov";
quickshellPath = flakeRoot + "/generated/.config/quickshell";
allFiles = lib.filesystem.listFilesRecursive quickshellPath;
toRelative = file:
let
base = toString flakeRoot + "/generated/";
relative = lib.removePrefix base (toString file);
in
builtins.unsafeDiscardStringContext relative;
toFileEntry = file: {
name = toRelative file;
value = {
source = file;
force = true;
};
};
in
{
environment.systemPackages = with pkgs; [
quickshell
qt6.qtdeclarative
qt6.qttools
qt6.qtsvg
qt6.qtimageformats
qt6.qtmultimedia
qt6.qt5compat
];
qt = {
enable = true;
platformTheme = "qt5ct";
};
home-manager.users = {
${username} = {
home.file = builtins.listToAttrs (map toFileEntry allFiles);
};
};
}
@@ -1,40 +0,0 @@
# --- This file has been auto-generated. For permanent changes alter the appropriate block in the README.org. ---
{ lib, config, pkgs, flakeRoot, ... }:
let
username = config.defaultUser or "henrov";
assetPath = "${flakeRoot}/generated/.config/swaync";
in
{
environment.systemPackages = [ pkgs.swaynotificationcenter pkgs.libnotify ];
home-manager.users.${username} = {
# Do NOT enable services.swaync — it would claim the config files
# and conflict with our home.file entries below.
home.file = {
".config/swaync/config.json" = {
text = builtins.readFile "${assetPath}/config.json";
force = true;
};
".config/swaync/style.css" = {
text = builtins.replaceStrings ["henrov"] [username] (builtins.readFile "${assetPath}/style.css");
force = true;
};
};
};
# Autostart swaync as a systemd user service instead
systemd.user.services.swaync = {
description = "SwayNotificationCenter";
after = [ "graphical-session.target" ];
serviceConfig = {
ExecStart = "${pkgs.swaynotificationcenter}/bin/swaync";
Restart = "always";
Environment = [
"WAYLAND_DISPLAY=${config.environment.sessionVariables.WAYLAND_DISPLAY or "wayland-1"}"
"XDG_CURRENT_DESKTOP=Hyprland"
];
};
wantedBy = [ "default.target" ];
};
}