Regenerated
This commit is contained in:
+30
-2
@@ -642,21 +642,49 @@ This sets up tuigreeter which is not fancy but imo fits the aesthetic I am aimin
|
||||
{ lib, config, pkgs, flakeRoot, ... }:
|
||||
|
||||
let
|
||||
# Default username fallback
|
||||
username = config.defaultUser or "henrov";
|
||||
|
||||
# Hyprland session executable
|
||||
hyprlandSession = "${pkgs.hyprland}/bin/Hyprland";
|
||||
|
||||
# Path to your custom greeter.toml
|
||||
greeterConfSrc = "${flakeRoot}/assets/traveldroid/conf/greeter.toml";
|
||||
|
||||
in
|
||||
{
|
||||
environment.systemPackages = [ pkgs.tuigreet ];
|
||||
##############################
|
||||
# System packages
|
||||
##############################
|
||||
environment.systemPackages = [
|
||||
pkgs.tuigreet
|
||||
];
|
||||
|
||||
##############################
|
||||
# Greetd configuration
|
||||
##############################
|
||||
services.greetd = {
|
||||
enable = true;
|
||||
|
||||
# Use tuigreet as the greeter
|
||||
settings.default_session = {
|
||||
# This is how greetd calls the greeter
|
||||
command = "${pkgs.tuigreet}/bin/tuigreet --remember --time --time-format '%I:%M %p | %a • %h | %F' --session ${hyprlandSession}";
|
||||
};
|
||||
};
|
||||
|
||||
##############################
|
||||
# Home Manager user integration
|
||||
##############################
|
||||
_module.args.hmUsers = {
|
||||
${username} = {
|
||||
# Copy greeter.toml to ~/.config/greeter.toml
|
||||
home.file = {
|
||||
".config/greeter.toml" = {
|
||||
source = greeterConfSrc;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
#+END_SRC
|
||||
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
# Default tuigreet greeter configuration
|
||||
# Place this in ./assets/system/conf/greeter.toml
|
||||
|
||||
[general]
|
||||
# Show time at the top
|
||||
show_time = true
|
||||
time_format = "%I:%M %p | %a • %h | %F"
|
||||
|
||||
# Remember last logged-in user
|
||||
remember_user = true
|
||||
|
||||
# Welcome message
|
||||
welcome_message = "Welcome to Droidnix!"
|
||||
|
||||
[prompt]
|
||||
# Symbol for input prompt
|
||||
symbol = "➜"
|
||||
# Colors
|
||||
user_color = "green"
|
||||
password_color = "yellow"
|
||||
prompt_color = "cyan"
|
||||
|
||||
[session]
|
||||
# Default session to launch after login
|
||||
# Must match a valid NixOS session binary
|
||||
command = "Hyprland"
|
||||
|
||||
# Optional: extra command-line args for the session
|
||||
args = []
|
||||
|
||||
# Optional: background image (can be a full path)
|
||||
#background = "/path/to/background.png"
|
||||
@@ -1,54 +0,0 @@
|
||||
{ pkgs, config, lib, flakeRoot, ... }:
|
||||
|
||||
{
|
||||
############################
|
||||
# Bootloader (GRUB)
|
||||
############################
|
||||
boot.loader = {
|
||||
grub = {
|
||||
enable = true;
|
||||
efiSupport = true;
|
||||
devices = [ "nodev" ]; # pas aan naar je echte EFI-device indien nodig
|
||||
useOSProber = true;
|
||||
};
|
||||
timeout = 5;
|
||||
};
|
||||
|
||||
############################
|
||||
# Kernel / boot settings
|
||||
############################
|
||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
|
||||
boot.kernelParams = [
|
||||
"quiet"
|
||||
"splash" # REQUIRED for Plymouth
|
||||
"udev.log_level=3"
|
||||
"rd.systemd.show_status=false"
|
||||
];
|
||||
|
||||
boot.consoleLogLevel = 0;
|
||||
boot.supportedFilesystems = [ "ntfs" ];
|
||||
|
||||
############################
|
||||
# Plymouth
|
||||
############################
|
||||
boot.plymouth = {
|
||||
enable = true;
|
||||
theme = "rings";
|
||||
|
||||
themePackages = [
|
||||
(pkgs.adi1090x-plymouth-themes.override {
|
||||
selected_themes = [ "rings" ];
|
||||
})
|
||||
];
|
||||
};
|
||||
|
||||
boot.initrd.systemd.enable = true;
|
||||
|
||||
############################
|
||||
# Clean state
|
||||
############################
|
||||
# Remove any old theme environment.etc symlinks
|
||||
#environment.etc = lib.mkForce {};
|
||||
system.stateVersion = "26.05";
|
||||
}
|
||||
@@ -1,47 +0,0 @@
|
||||
{
|
||||
hostname,
|
||||
pkgs,
|
||||
lib,
|
||||
modulesPath,
|
||||
user,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
{
|
||||
imports = [
|
||||
# (modulesPath + "/installer/scan/not-detected.nix")
|
||||
#../../hardware/hardware.nix
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [
|
||||
"xhci_pci"
|
||||
"nvme"
|
||||
"usb_storage"
|
||||
"sd_mod"
|
||||
"rtsx_usb_sdmmc"
|
||||
];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/69433a14-fbaf-401b-af85-cd1bbf02b4e2";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/811D-0676";
|
||||
fsType = "vfat";
|
||||
options = [
|
||||
"fmask=0077"
|
||||
"dmask=0077"
|
||||
];
|
||||
};
|
||||
|
||||
swapDevices = [
|
||||
{ device = "/dev/disk/by-uuid/b6c557c2-7682-460b-a5e7-8f6f2f429a3a"; }
|
||||
];
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
@@ -1,43 +0,0 @@
|
||||
{ lib, config, pkgs, flakeRoot, import-tree, home-manager, ... }:
|
||||
|
||||
let
|
||||
hostname = "traveldroid";
|
||||
|
||||
modulesPath = "${flakeRoot}/generated/modules/${hostname}";
|
||||
usersPath = "${flakeRoot}/generated/users";
|
||||
|
||||
hostModules = import-tree modulesPath;
|
||||
globalUsers = import-tree usersPath;
|
||||
|
||||
allModules = hostModules.imports ++ globalUsers.imports;
|
||||
|
||||
in
|
||||
{
|
||||
#################################
|
||||
# Core system config
|
||||
#################################
|
||||
|
||||
networking.hostName = hostname;
|
||||
system.stateVersion = "26.05";
|
||||
|
||||
#################################
|
||||
# Imports
|
||||
#################################
|
||||
|
||||
imports =
|
||||
[
|
||||
./boot.nix
|
||||
./hardware-configuration.nix
|
||||
|
||||
# REQUIRED for Home Manager
|
||||
home-manager.nixosModules.home-manager
|
||||
]
|
||||
++ allModules;
|
||||
|
||||
#################################
|
||||
# Home Manager integration
|
||||
#################################
|
||||
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
}
|
||||
@@ -1,52 +0,0 @@
|
||||
{ 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)
|
||||
);
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,55 +0,0 @@
|
||||
{ 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;
|
||||
}
|
||||
@@ -1,31 +0,0 @@
|
||||
{ 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; };
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,38 +0,0 @@
|
||||
{ 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";
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,61 +0,0 @@
|
||||
{ lib, config, pkgs, flakeRoot, ... }:
|
||||
|
||||
let
|
||||
# Determine the default username from host config
|
||||
username = config.defaultUser or "henrov";
|
||||
|
||||
moduleName = "stylix";
|
||||
assetPath = "${flakeRoot}/assets/traveldroid/conf/";
|
||||
|
||||
# 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-level packages
|
||||
############################
|
||||
environment.systemPackages = [
|
||||
pkgs.feh
|
||||
pkgs.st
|
||||
];
|
||||
|
||||
############################
|
||||
# Home Manager user config
|
||||
############################
|
||||
_module.args.hmUsers = {
|
||||
${username} = {
|
||||
|
||||
# Map all config files into ~/.config/stylix/
|
||||
xdg.configFile =
|
||||
lib.mapAttrs' (name: value: {
|
||||
name = "${moduleName}/${name}";
|
||||
value = { inherit (value) source; };
|
||||
}) files;
|
||||
|
||||
# Environment variables for the session
|
||||
home.sessionVariables = {
|
||||
STYLIX_CONF = "$HOME/.config/stylix/stylix.conf";
|
||||
|
||||
XCURSOR_THEME = cursorName;
|
||||
XCURSOR_SIZE = toString cursorSize;
|
||||
HYPRCURSOR_THEME = cursorName;
|
||||
HYPRCURSOR_SIZE = toString cursorSize;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
{ 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";
|
||||
};
|
||||
}
|
||||
@@ -1,43 +0,0 @@
|
||||
{ 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" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
{ lib, config, pkgs, flakeRoot, ... }:
|
||||
|
||||
let
|
||||
username = config.defaultUser or "henrov";
|
||||
hyprlandSession = "${pkgs.hyprland}/bin/Hyprland";
|
||||
in
|
||||
{
|
||||
environment.systemPackages = [ pkgs.tuigreet ];
|
||||
|
||||
services.greetd = {
|
||||
enable = true;
|
||||
|
||||
# Use tuigreet as the greeter
|
||||
settings.default_session = {
|
||||
# This is how greetd calls the greeter
|
||||
command = "${pkgs.tuigreet}/bin/tuigreet --remember --time --time-format '%I:%M %p | %a • %h | %F' --session ${hyprlandSession}";
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
{ lib, config, ... }:
|
||||
|
||||
{
|
||||
nix.settings = {
|
||||
experimental-features = [ "nix-command" "flakes" ];
|
||||
download-buffer-size = 536870912; # 512 MB
|
||||
cores = 2;
|
||||
max-jobs = 1;
|
||||
};
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
{ config, pkgs, lib, flakeRoot, ... }:
|
||||
|
||||
let
|
||||
username = config.users.users.defaultUser or "henrov";
|
||||
homeDir = "/home/${username}";
|
||||
assetPath = "${flakeRoot}/assets/copy_2_home";
|
||||
in
|
||||
{
|
||||
environment.systemPackages = [ pkgs.rsync ];
|
||||
|
||||
systemd.services.copyAssets = {
|
||||
description = "Copy assets to ${username}'s home directory";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
|
||||
# oneshot service runs once at boot
|
||||
serviceConfig.Type = "oneshot";
|
||||
|
||||
# Always use /bin/sh -c for multi-line commands
|
||||
serviceConfig.ExecStart = ''
|
||||
/bin/sh -c '
|
||||
echo "Copying assets from ${assetPath} to ${homeDir} ..."
|
||||
|
||||
if [ ! -d "${assetPath}" ]; then
|
||||
echo "ERROR: ${assetPath} does not exist"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
mkdir -p "${homeDir}"
|
||||
chown ${username}:${username} "${homeDir}"
|
||||
|
||||
${pkgs.rsync}/bin/rsync -a --no-owner --no-group "${assetPath}/" "${homeDir}/"
|
||||
|
||||
echo "Done copying assets."
|
||||
'
|
||||
'';
|
||||
};
|
||||
}
|
||||
@@ -1,38 +0,0 @@
|
||||
{ lib, config, pkgs, ... }:
|
||||
|
||||
let
|
||||
username = "henrov";
|
||||
in
|
||||
{
|
||||
#################################
|
||||
# NixOS system user
|
||||
#################################
|
||||
users.users.${username} = {
|
||||
isNormalUser = true;
|
||||
home = "/home/${username}";
|
||||
hashedPassword = "$6$S7iShgBxB.77CwmP$i0njK.2r3OL5UEvgZbmwZ0rnpZ4QyJcv8p9uCmJ4AiVPSMXkQkIwMLzyAOnJ0q8.tPLIp/7EquEIZeK8qbmgw/";
|
||||
extraGroups = [ "wheel" "networkmanager" ];
|
||||
};
|
||||
|
||||
#################################
|
||||
# Home Manager user definition
|
||||
#################################
|
||||
_module.args.hmUsers = {
|
||||
${username} = {
|
||||
# Minimal required
|
||||
home.username = username;
|
||||
home.homeDirectory = "/home/${username}";
|
||||
home.stateVersion = "26.05";
|
||||
|
||||
# Add user-specific packages here
|
||||
home.packages = [
|
||||
];
|
||||
|
||||
# Add user dotfiles, session variables, etc. here if needed
|
||||
home.file = {
|
||||
# Example:
|
||||
# ".bashrc" = { source = /path/to/bashrc; };
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user