Regenerated
This commit is contained in:
@@ -0,0 +1,91 @@
|
||||
{ config, pkgs, lib, flakeRoot, ... }:
|
||||
|
||||
let
|
||||
# Path to store GRUB theme
|
||||
grubThemeDir = "/boot/grub/themes/catppuccin-mocha";
|
||||
|
||||
# Catppuccin Mocha colors
|
||||
catppuccin = {
|
||||
base = "#1e1e2e"; # background
|
||||
mantle = "#181825";
|
||||
crust = "#11111b";
|
||||
text = "#cdd6f4";
|
||||
rosewater = "#f5e0dc";
|
||||
flamingo = "#f2cdcd";
|
||||
pink = "#f5c2e7";
|
||||
mauve = "#cba6f7";
|
||||
red = "#f38ba8";
|
||||
maroon = "#eba0ac";
|
||||
peach = "#fab387";
|
||||
yellow = "#f9e2af";
|
||||
green = "#a6e3a1";
|
||||
teal = "#94e2d5";
|
||||
sky = "#89dceb";
|
||||
sapphire = "#74c7ec";
|
||||
blue = "#89b4fa";
|
||||
lavender = "#b4befe";
|
||||
};
|
||||
|
||||
# Helper to recursively write theme files
|
||||
grubThemeFile = "${grubThemeDir}/theme.txt";
|
||||
|
||||
in
|
||||
{
|
||||
boot = {
|
||||
initrd = {
|
||||
verbose = false;
|
||||
kernelModules = [];
|
||||
};
|
||||
|
||||
extraModulePackages = [];
|
||||
kernelPackages = pkgs.linuxPackages_latest;
|
||||
kernelParams = [ "quiet" ];
|
||||
consoleLogLevel = 0;
|
||||
|
||||
plymouth.enable = true;
|
||||
plymouth.theme = "spinner"; # default theme; we can override with custom image
|
||||
|
||||
supportedFilesystems = [ "ntfs" ];
|
||||
|
||||
loader = {
|
||||
systemd-boot.enable = true;
|
||||
systemd-boot.configurationLimit = 10;
|
||||
efi.canTouchEfiVariables = true;
|
||||
timeout = 5;
|
||||
};
|
||||
};
|
||||
|
||||
# GRUB theme setup using activation script
|
||||
system.activationScripts.grubTheme = {
|
||||
text = ''
|
||||
mkdir -p ${grubThemeDir}
|
||||
|
||||
# Write GRUB theme using Catppuccin colors
|
||||
cat > ${grubThemeFile} <<EOF
|
||||
# Catppuccin Mocha GRUB theme
|
||||
desktop-color = ${catppuccin.base}
|
||||
normal-color = ${catppuccin.text}
|
||||
selected-item-color = ${catppuccin.rosewater}
|
||||
selected-item-highlight-color = ${catppuccin.pink}
|
||||
EOF
|
||||
|
||||
# Optional: copy a matching PNG for background if exists in flake assets
|
||||
if [ -f "${flakeRoot}/assets/grub-bg.png" ]; then
|
||||
cp "${flakeRoot}/assets/grub-bg.png" "${grubThemeDir}/background.png"
|
||||
fi
|
||||
|
||||
echo "GRUB Catppuccin Mocha theme installed."
|
||||
'';
|
||||
};
|
||||
|
||||
# Configure Plymouth to use Catppuccin splash image
|
||||
system.activationScripts.plymouthTheme = {
|
||||
text = ''
|
||||
if [ -f "${flakeRoot}/assets/plymouth-catppuccin.png" ]; then
|
||||
mkdir -p /usr/share/plymouth/themes/catppuccin
|
||||
cp "${flakeRoot}/assets/plymouth-catppuccin.png" /usr/share/plymouth/themes/catppuccin/splash.png
|
||||
update-alternatives --install /usr/share/plymouth/themes/default.plymouth default.plymouth /usr/share/plymouth/themes/catppuccin/splash.png 100
|
||||
fi
|
||||
'';
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
{
|
||||
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;
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
{ lib, config, pkgs, inputs, ... }:
|
||||
|
||||
let
|
||||
username = config.defaultUser or "henrov";
|
||||
modulesPath = ./generated/modules;
|
||||
|
||||
# Import all modules recursively
|
||||
importedModules = inputs.import-tree modulesPath;
|
||||
|
||||
# Evaluate all modules
|
||||
evaluatedModules =
|
||||
map (m:
|
||||
if builtins.isFunction m then m { inherit lib config pkgs; } else m
|
||||
) importedModules.imports;
|
||||
|
||||
# Attach names
|
||||
modulesWithNames =
|
||||
map (m: {
|
||||
name = if m ? _file then lib.removeSuffix ".nix" (builtins.baseNameOf m._file) else "unknown";
|
||||
value = m;
|
||||
}) evaluatedModules;
|
||||
|
||||
# Filter enabled modules from config file (optional)
|
||||
moduleSwitches = import ../../../assets/system/conf/modules.conf;
|
||||
enabledModules =
|
||||
builtins.filter (m: moduleSwitches.${m.name} or false) modulesWithNames;
|
||||
|
||||
# Collect Home Manager user attrsets
|
||||
hmUsersList = map (m: m.value._module.args.hmUsers or {}) enabledModules;
|
||||
|
||||
in {
|
||||
networking.hostName = "traveldroid";
|
||||
system.stateVersion = "26.05";
|
||||
|
||||
imports = [
|
||||
./boot.nix
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
|
||||
# Merge Home Manager user configurations
|
||||
home-manager.users = lib.mkMerge hmUsersList;
|
||||
}
|
||||
Reference in New Issue
Block a user