Regenerated
This commit is contained in:
@@ -0,0 +1,52 @@
|
||||
{ lib, pkgs, config, ... }:
|
||||
|
||||
let
|
||||
#################################
|
||||
# Determine default username
|
||||
#################################
|
||||
username = config.defaultUser or "henrov";
|
||||
moduleName = "kitty";
|
||||
|
||||
#################################
|
||||
# Paths to assets
|
||||
#################################
|
||||
assetPath = ../../../assets/traveldroid/conf/${moduleName};
|
||||
programFiles = builtins.readDir assetPath;
|
||||
|
||||
# Convert asset files into a nix attribute set
|
||||
files = lib.genAttrs (builtins.attrNames programFiles) (name: {
|
||||
source = "${assetPath}/${name}";
|
||||
});
|
||||
|
||||
in
|
||||
{
|
||||
#################################
|
||||
# System-wide packages
|
||||
#################################
|
||||
environment.systemPackages = [
|
||||
pkgs.kitty
|
||||
];
|
||||
|
||||
#################################
|
||||
# Home Manager user configuration
|
||||
#################################
|
||||
_module.args.hmUsers = {
|
||||
${username} = {
|
||||
|
||||
# Enable Kitty through Home Manager
|
||||
programs.kitty.enable = true;
|
||||
|
||||
# Extra user-specific config snippet
|
||||
programs.kitty.extraConfig = ''
|
||||
# Include the Catppuccin-Mocha theme
|
||||
include themes/Catppuccin-Mocha.conf
|
||||
'';
|
||||
|
||||
# Map all asset files into ~/.config/kitty/
|
||||
home.file = lib.mkMerge (
|
||||
map (name: { ".config/${moduleName}/${name}" = { source = files.${name}.source; }; })
|
||||
(builtins.attrNames files)
|
||||
);
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
{ lib, config, pkgs, flakeRoot, ... }:
|
||||
|
||||
let
|
||||
#################################
|
||||
# Read package list from config file
|
||||
#################################
|
||||
packagesConfPath = "${flakeRoot}/assets/traveldroid/conf/packages.conf";
|
||||
raw = builtins.readFile packagesConfPath;
|
||||
|
||||
rawLines = lib.splitString "\n" raw;
|
||||
|
||||
# Guard against splitting into characters accidentally
|
||||
_guard = assert !(builtins.stringLength raw > 1 && builtins.length rawLines == builtins.stringLength raw); true;
|
||||
|
||||
# Clean each line: remove CRs, comments, trim whitespace
|
||||
cleanLine = line:
|
||||
let
|
||||
noCR = lib.replaceStrings [ "\r" ] [ "" ] line;
|
||||
noInlineComment = lib.head (lib.splitString "#" noCR);
|
||||
in
|
||||
lib.strings.trim noInlineComment;
|
||||
|
||||
# Filter out empty lines
|
||||
entries = builtins.filter (l: l != "") (map cleanLine rawLines);
|
||||
|
||||
# Resolve attribute paths in pkgs
|
||||
resolvePkg = name:
|
||||
let
|
||||
parts = lib.splitString "." name;
|
||||
found = lib.attrByPath parts null pkgs;
|
||||
in
|
||||
if found == null then
|
||||
(throw ''
|
||||
packages.nix: package not found in pkgs
|
||||
Token : ${builtins.toJSON name}
|
||||
packages.conf : ${packagesConfPath}
|
||||
Hint : check the attribute name on search.nixos.org/packages
|
||||
'')
|
||||
else
|
||||
found;
|
||||
|
||||
# Final system-wide package list
|
||||
packages = builtins.seq _guard (map resolvePkg entries);
|
||||
|
||||
in {
|
||||
#################################
|
||||
# Allow unfree packages globally
|
||||
#################################
|
||||
nixpkgs.config = { allowUnfree = true; };
|
||||
|
||||
#################################
|
||||
# System packages
|
||||
#################################
|
||||
environment.systemPackages = packages;
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
{ lib, config, pkgs, flakeRoot, ... }:
|
||||
|
||||
let
|
||||
# Default username fallback
|
||||
username = config.defaultUser or "henrov";
|
||||
|
||||
# Path to the starship config in assets
|
||||
starshipConfSrc = "${flakeRoot}/assets/traveldroid/conf/starship.toml";
|
||||
in
|
||||
{
|
||||
#################################
|
||||
# Enable Starship system-wide
|
||||
#################################
|
||||
environment.systemPackages = [ pkgs.starship ];
|
||||
|
||||
#################################
|
||||
# Home Manager user configuration
|
||||
#################################
|
||||
_module.args.hmUsers = {
|
||||
${username} = {
|
||||
programs.starship = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
# Copy the starship.toml from assets to ~/.config/starship.toml
|
||||
home.file = {
|
||||
".config/starship.toml" = { source = starshipConfSrc; };
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
{ 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
|
||||
];
|
||||
|
||||
############################
|
||||
# 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;
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
{ 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 = lib.mkForce [
|
||||
zenBrowser
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
#################################
|
||||
# Zsh configuration
|
||||
#################################
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
enableCompletion = true;
|
||||
syntaxHighlighting.enable = true;
|
||||
|
||||
# Oh My Zsh integration
|
||||
ohMyZsh = {
|
||||
enable = true;
|
||||
theme = ""; # default theme, you can override per user
|
||||
plugins = [
|
||||
"git"
|
||||
"sudo"
|
||||
"extract"
|
||||
"colored-man-pages"
|
||||
"command-not-found"
|
||||
"history"
|
||||
"docker"
|
||||
"kubectl"
|
||||
];
|
||||
};
|
||||
|
||||
# Uncomment if you want additional features
|
||||
# autosuggestion.enable = true;
|
||||
# autocd = true;
|
||||
# dotDir = "${config.xdg.configHome}/zsh";
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{ lib, pkgs, config, ... }:
|
||||
|
||||
{
|
||||
fonts.packages = with pkgs; [
|
||||
nerd-fonts.iosevka
|
||||
nerd-fonts.fira-code
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
{ pkgs, config, lib, ... }:
|
||||
|
||||
let
|
||||
# Resolve the username from the host config
|
||||
username = config.defaultUser or "henrov";
|
||||
in
|
||||
{
|
||||
############################
|
||||
# System-level GTK packages
|
||||
############################
|
||||
environment.systemPackages = with pkgs; [
|
||||
gtk3
|
||||
gtk4
|
||||
];
|
||||
|
||||
############################
|
||||
# Home Manager user-level GTK configuration
|
||||
############################
|
||||
# Directly assign the GTK config to the user, no recursiveUpdate
|
||||
home-manager.users."${username}" = {
|
||||
gtk = {
|
||||
enable = true;
|
||||
|
||||
# GTK theme
|
||||
theme = {
|
||||
name = "Catppuccin-Mocha-Standard-Blue-Dark";
|
||||
package = pkgs.magnetic-catppuccin-gtk;
|
||||
};
|
||||
|
||||
# Icon theme
|
||||
iconTheme = {
|
||||
name = "Papirus-Dark";
|
||||
package = pkgs.papirus-icon-theme;
|
||||
};
|
||||
|
||||
# Extra GTK3 / GTK4 settings
|
||||
gtk3.extraConfig = {
|
||||
"gtk-application-prefer-dark-theme" = 1;
|
||||
};
|
||||
gtk4.extraConfig = {
|
||||
"gtk-application-prefer-dark-theme" = 1;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
{ lib, config, pkgs, flakeRoot, home-manager, inputs, ... }:
|
||||
|
||||
let
|
||||
username = config.defaultUser or "henrov";
|
||||
assetPath = "${flakeRoot}/assets/traveldroid/conf/hypr/";
|
||||
|
||||
# Read all files in the asset directory
|
||||
assetFiles = builtins.attrNames (builtins.readDir assetPath);
|
||||
|
||||
# Convert files to Home Manager xdg config entries
|
||||
hyprFiles = lib.genAttrs assetFiles (f: {
|
||||
# Destination path in home directory
|
||||
name = ".config/hypr/${f}";
|
||||
# Source file path
|
||||
value = { source = "${assetPath}/${f}"; };
|
||||
});
|
||||
|
||||
# Determine Hyprland package
|
||||
hyprlandPkg =
|
||||
pkgs.hyprland or
|
||||
pkgs.hyprland-git or
|
||||
inputs.hyprland.packages.${pkgs.system}.default;
|
||||
in
|
||||
{
|
||||
environment.systemPackages = [ hyprlandPkg ];
|
||||
|
||||
_module.args.hmUsers = {
|
||||
${username} = {
|
||||
home.packages = [ hyprlandPkg ];
|
||||
|
||||
# Merge all files in the asset folder into ~/.config/hypr/
|
||||
home.file = lib.mkMerge hyprFiles;
|
||||
|
||||
# Optional: Hyprland settings
|
||||
settings.general."col.active_border" = "0xff97cbcd 0xff89b4fa";
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
{ lib, config, pkgs, ... }:
|
||||
|
||||
let
|
||||
username = config.defaultUser or "henrov";
|
||||
moduleName = "stylix";
|
||||
|
||||
# Path to stylix assets
|
||||
assetPath = ../../../assets/system/conf/${moduleName};
|
||||
|
||||
# Read all files in the asset directory
|
||||
programFiles = builtins.readDir assetPath;
|
||||
|
||||
files = lib.genAttrs (builtins.attrNames programFiles) (name: {
|
||||
source = "${assetPath}/${name}";
|
||||
});
|
||||
|
||||
# Optional stylix.conf
|
||||
stylixConfFile = "${assetPath}/stylix.conf";
|
||||
stylixConf =
|
||||
if builtins.pathExists stylixConfFile
|
||||
then builtins.readFile stylixConfFile
|
||||
else "";
|
||||
|
||||
# Cursor defaults
|
||||
cursorName = "phinger-cursors-light";
|
||||
cursorSize = 24;
|
||||
in
|
||||
{
|
||||
############################
|
||||
# System packages
|
||||
############################
|
||||
environment.systemPackages = [
|
||||
pkgs.feh
|
||||
pkgs.st
|
||||
];
|
||||
|
||||
############################
|
||||
# Home Manager user settings
|
||||
############################
|
||||
# Use the _module.args.hmUsers style to avoid "option does not exist"
|
||||
_module.args.hmUsers = {
|
||||
"${username}" = {
|
||||
# Copy all stylix config files into ~/.config/stylix/
|
||||
xdg.configFile =
|
||||
lib.mapAttrs' (name: value: {
|
||||
name = "${moduleName}/${name}";
|
||||
value = { inherit (value) source; };
|
||||
}) files;
|
||||
|
||||
# Optionally include stylix.conf
|
||||
home.file."${moduleName}/stylix.conf".text = stylixConf;
|
||||
|
||||
# Session variables
|
||||
home.sessionVariables = {
|
||||
STYLIX_CONF = "$HOME/.config/stylix/stylix.conf";
|
||||
|
||||
XCURSOR_THEME = cursorName;
|
||||
XCURSOR_SIZE = toString cursorSize;
|
||||
HYPRCURSOR_THEME = cursorName;
|
||||
HYPRCURSOR_SIZE = toString cursorSize;
|
||||
};
|
||||
|
||||
# Enable GTK target for Stylix
|
||||
stylix = {
|
||||
enable = true;
|
||||
targets = {
|
||||
gtk = { enable = true; };
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
{ lib, config, pkgs, flakeRoot, ... }:
|
||||
|
||||
let
|
||||
username = config.defaultUser or "henrov";
|
||||
|
||||
moduleName = "waybar";
|
||||
assetPath = "${flakeRoot}/assets/traveldroid/conf/${moduleName}";
|
||||
in
|
||||
{
|
||||
#################################
|
||||
# System packages
|
||||
#################################
|
||||
environment.systemPackages = [
|
||||
pkgs.waybar
|
||||
];
|
||||
|
||||
#################################
|
||||
# Home Manager integration
|
||||
#################################
|
||||
_module.args.hmUsers = {
|
||||
${username} = {
|
||||
|
||||
# Install Waybar for the user as well (optional but recommended)
|
||||
home.packages = [ pkgs.waybar ];
|
||||
|
||||
# Place config files into ~/.config/waybar/
|
||||
xdg.configFile = {
|
||||
"${moduleName}/config".source = "${assetPath}/config";
|
||||
"${moduleName}/style.css".source = "${assetPath}/style.css";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
{ lib, config, pkgs, ... }:
|
||||
|
||||
{
|
||||
#################################
|
||||
# Core Wayland packages
|
||||
#################################
|
||||
environment.systemPackages = with pkgs; [
|
||||
wayland
|
||||
wl-clipboard # optional but commonly used for copy/paste
|
||||
];
|
||||
|
||||
#################################
|
||||
# Optional: enable graphics stack
|
||||
#################################
|
||||
hardware.graphics.enable = true;
|
||||
|
||||
#################################
|
||||
# Optional session variables for Wayland
|
||||
#################################
|
||||
environment.sessionVariables = {
|
||||
# Forces some apps to use Wayland
|
||||
NIXOS_OZONE_WL = "1";
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
{ lib, config, pkgs, inputs, ... }:
|
||||
|
||||
let
|
||||
#################################
|
||||
# Default username fallback
|
||||
#################################
|
||||
username = config.defaultUser or "henrov";
|
||||
|
||||
#################################
|
||||
# Determine XDG portal package
|
||||
#################################
|
||||
xdgPortalHyprlandPkg =
|
||||
pkgs.xdg-desktop-portal-hyprland or
|
||||
inputs.xdgPortalHyprland.packages.${pkgs.system}.default;
|
||||
in
|
||||
{
|
||||
#################################
|
||||
# System-wide packages
|
||||
#################################
|
||||
environment.systemPackages = [
|
||||
xdgPortalHyprlandPkg
|
||||
];
|
||||
|
||||
#################################
|
||||
# Home Manager user config
|
||||
#################################
|
||||
_module.args.hmUsers = {
|
||||
${username} = {
|
||||
home.packages = [
|
||||
xdgPortalHyprlandPkg
|
||||
];
|
||||
|
||||
# Enable XDG portal integration for Hyprland
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
extraPortals = [ xdgPortalHyprlandPkg ];
|
||||
config.hyprland = {
|
||||
"org.freedesktop.impl.portal.Screencast" = [ "hyprland" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
#################################
|
||||
# System-level DBus service
|
||||
#################################
|
||||
services.dbus = lib.mkForce {
|
||||
enable = true; # Force DBus to be enabled
|
||||
};
|
||||
|
||||
#################################
|
||||
# dbus-broker configuration
|
||||
#################################
|
||||
environment.etc."dbus-broker/launch.conf".text = ''
|
||||
[General]
|
||||
LogLevel=warning
|
||||
MaxConnectionsPerUser=2048
|
||||
'';
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
{ pkgs, user, ... } :
|
||||
let
|
||||
username = config.defaultUser or "henrov";
|
||||
bashPath = "${pkgs.bash}/bin/bash";
|
||||
tuigreetPath = "${pkgs.tuigreet}/bin/tuigreet";
|
||||
hyprlandSess = "${pkgs.hyprland}/share/wayland-sessions";
|
||||
in
|
||||
{
|
||||
services.greetd = {
|
||||
enable = true;
|
||||
|
||||
settings.default_session = {
|
||||
user = "greeter";
|
||||
# Explicitly invoke bash to avoid missing-shell errors
|
||||
command = "${bashPath} -c '${tuigreetPath} --time --remember --remember-session --sessions ${hyprlandSess}'";
|
||||
};
|
||||
};
|
||||
|
||||
systemd.services.greetd.serviceConfig = {
|
||||
Type = "idle";
|
||||
StandardInput = "tty";
|
||||
StandardOutput = "tty";
|
||||
StandardError = "journal";
|
||||
TTYReset = true;
|
||||
TTYVHangup = true;
|
||||
TTYVTDisallocate = true;
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
{ lib, config, pkgs, ... }:
|
||||
|
||||
{
|
||||
#################################
|
||||
# Networking core
|
||||
#################################
|
||||
networking = {
|
||||
# Let DHCP be default unless overridden elsewhere
|
||||
useDHCP = lib.mkDefault true;
|
||||
|
||||
# Hostname comes from host.nix, do NOT redefine here
|
||||
|
||||
#################################
|
||||
# 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;
|
||||
};
|
||||
|
||||
#################################
|
||||
# Firewall
|
||||
#################################
|
||||
firewall = {
|
||||
enable = true;
|
||||
|
||||
# KDE Connect support
|
||||
allowedTCPPortRanges = [
|
||||
{ from = 1714; to = 1764; }
|
||||
];
|
||||
|
||||
allowedUDPPortRanges = [
|
||||
{ from = 1714; to = 1764; }
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
#################################
|
||||
# System packages
|
||||
#################################
|
||||
environment.systemPackages = [
|
||||
pkgs.networkmanager
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{ lib, config, ... }:
|
||||
|
||||
{
|
||||
nix.settings = {
|
||||
experimental-features = [ "nix-command" "flakes" ];
|
||||
download-buffer-size = 536870912; # 512 MB
|
||||
cores = 2;
|
||||
max-jobs = 1;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user