This commit is contained in:
= 2025-11-22 20:57:22 +00:00
parent 5546b4cbe9
commit 03130d29d1
13 changed files with 572 additions and 0 deletions

14
modules/apps.nix Normal file
View file

@ -0,0 +1,14 @@
{ pkgs, ... }:
{
environment.systemPackages = with pkgs; [
# General tool suite
libreoffice-qt6-fresh
gimp
tor-browser
kaidan
thunderbird
# Optional VPN
protonvpn-gui
];
}

26
modules/base.nix Normal file
View file

@ -0,0 +1,26 @@
{
networking.hostName = "aberrant";
# Necessary for flake support
nix.settings.experimental-features = ["nix-command" "flakes"];
# General / Perf
zramSwap.enable = true;
boot.tmp.cleanOnBoot = true;
time.timeZone = "UTC";
users.users = {
# Disables root login by setting an invalid password
root.hashedPassword = "!";
anon = {
isNormalUser = true;
extraGroups = ["wheel"];
initialPassword = "anon";
};
};
# Redundant but good practice
security.sudo.wheelNeedsPassword = true;
system.stateVersion = "25.05";
}

38
modules/branding.nix Normal file
View file

@ -0,0 +1,38 @@
{ lib, config, pkgs,... }:
let
customGrubTheme = pkgs.minimal-grub-theme.overrideAttrs (oldAttrs: rec {
# srcs = oldAttrs.srcs or [ ] ++ [ ../var/icon.png ];
installPhase = let
originalInstall = oldAttrs.installPhase or ''
mkdir -p $out
'';
in ''
${originalInstall}
# Copy the custom icon to $out (e.g., next to other theme files)
cp ${../var/icon.png} $out/icons/installer.png
'';
});
in
{
stylix = {
enable = true;
autoEnable = true;
polarity = "dark";
image = ../var/wallpaper.png;
targets.console.enable = false;
};
system.nixos = {
distroName = lib.mkForce "Aberrant Linux";
};
isoImage = {
appendToMenuLabel = " LiveCD";
grubTheme = customGrubTheme;
};
image.baseName = lib.mkForce "aberrant${
lib.optionalString (config.isoImage.edition != "") "-${config.isoImage.edition}"
}-${config.system.nixos.label}-${pkgs.stdenv.hostPlatform.system}";
}

12
modules/default.nix Normal file
View file

@ -0,0 +1,12 @@
{
imports = [
./base.nix
./tor.nix
./kde.nix
./apps.nix
./branding.nix
./user.nix
];
}

14
modules/kde.nix Normal file
View file

@ -0,0 +1,14 @@
{
services = {
desktopManager.plasma6.enable = true;
displayManager.sddm = {
enable = true;
settings = {
Autologin = {
Session = "plasma.desktop";
User = "anon";
};
};
};
};
}

18
modules/tor.nix Normal file
View file

@ -0,0 +1,18 @@
{
#services.tor = {
# enable = true;
# settings = {
# VirtualAddrNetwork = "10.192.0.0/10";
# AutomapHostsOnResolve = true;
# TransPort = 9040;
# DNSPort = 5353;
# };
#};
#networking.firewall.extraCommands = ''
# # Redirect DNS UDP to Tor DNSPort
# iptables -t nat -A PREROUTING -p udp --dport 53 -j REDIRECT --to-ports 5353
# # Redirect TCP connections to Tor TransPort
# iptables -t nat -A PREROUTING -p tcp --syn -j REDIRECT --to-ports 9040
#'';
}

8
modules/user.nix Normal file
View file

@ -0,0 +1,8 @@
{
home-manager.users."anon" = {
home.stateVersion = "25.05";
home.file."~/Desktop/README.md" = {
source = ../var/README.md;
};
};
}