Add host modules and home options; update README

This commit is contained in:
2025-11-24 01:38:45 +01:00
parent 196db56791
commit d951277cec
48 changed files with 982 additions and 404 deletions

View File

@@ -3,6 +3,7 @@
./packages
./auto-cpufreq.nix
./boot.nix
./docker.nix
./flatpak.nix
./fonts.nix
./hardware.nix
@@ -19,7 +20,6 @@
./system.nix
./thunar.nix
./user.nix
./virtualisation.nix
./xdg.nix
./xserver.nix
inputs.stylix.nixosModules.stylix

14
modules/core/docker.nix Normal file
View File

@@ -0,0 +1,14 @@
{
pkgs,
lib,
config,
...
}: {
options.docker.enable = lib.mkEnableOption "Docker";
config.virtualisation.docker = lib.mkIf config.docker.enable {
enable = true;
package = pkgs.docker;
daemon.settings.dns = ["9.9.9.11" "149.112.112.11"];
};
}

View File

@@ -1,13 +1,17 @@
_: {
services = {
flatpak = {
enable = true;
packages = [
# "org.vinegarhq.Sober"
"io.github.flattool.Warehouse"
"com.github.tchx84.Flatseal"
];
update.onActivation = true;
};
{
lib,
config,
...
}: {
options.flatpak.enable = lib.mkEnableOption "Flatpak";
config.services.flatpak = lib.mkIf config.flatpak.enable {
enable = true;
update.onActivation = true;
packages = [
# "org.vinegarhq.Sober"
"io.github.flattool.Warehouse"
"com.github.tchx84.Flatseal"
];
};
}

View File

@@ -1,17 +0,0 @@
{pkgs, ...}: {
environment.systemPackages = with pkgs; [
# Communication
slack
mattermost-desktop
# Productivity & Office
# bitwarden-desktop
tutanota-desktop
iotas
# logseq
# Utilities
galculator
gedit
eddie
gnome-text-editor
];
}

View File

@@ -1,13 +1,8 @@
_: {
nixpkgs.config.allowUnfree = true;
imports = [
./essentials.nix
./packages.nix
./programs.nix
./clients.nix
./development.nix
./gaming.nix
./multimedia.nix
./terminal.nix
./tools.nix
./virtualization.nix
];
}

View File

@@ -1,8 +0,0 @@
{pkgs, ...}: {
environment.systemPackages = with pkgs; [
# Learning & practice
exercism
# AI coding
opencode
];
}

View File

@@ -1,5 +1,12 @@
{pkgs, ...}: {
environment.systemPackages = with pkgs; [
mpv
pavucontrol
playerctl
cmatrix
cowsay
sl
fortune
# File management
trash-cli
file-roller

View File

@@ -1,12 +0,0 @@
{
pkgs,
# inputs,
# system,
...
}: {
environment.systemPackages = with pkgs; [
# inputs.prismlauncher-cracked.packages.${system}.default
space-cadet-pinball
tty-solitaire
];
}

View File

@@ -1,26 +0,0 @@
{
pkgs,
# inputs,
# system,
...
}: {
environment.systemPackages = with pkgs; [
# Video & image processing
ffmpeg
ffmpegthumbnailer
mpv
# gimp3
# inputs.affinity-nix.packages.${system}.v3
eog
# kdePackages.kdenlive
# Audio
rhythmbox
plexamp
picard
pavucontrol
playerctl
# Media downloaders & clients
# freetube
# ytmdl
];
}

View File

@@ -0,0 +1,47 @@
{
pkgs,
lib,
config,
inputs,
system,
...
}: let
mkPackage = name: pkgsOrList: {
options.${name}.enable = lib.mkEnableOption name;
config.environment.systemPackages =
lib.mkIf config.${name}.enable
(lib.toList pkgsOrList);
};
packages = with pkgs; {
bitwarden = bitwarden-desktop;
eddieAirVPN = eddie;
galculator = galculator;
gedit = gedit;
iotas = iotas;
logseq = logseq;
mattermost = mattermost-desktop;
slack = slack;
tutanota = tutanota-desktop;
exercism = exercism;
opencode = opencode;
lazygit = lazygit;
prismlauncher = inputs.prismlauncher-cracked.packages.${system}.default;
spaceCadetPinball = space-cadet-pinball;
ttySolitaire = tty-solitaire;
gimp = gimp;
affinity = inputs.affinity-nix.packages.${system}.v3;
eyeOfGnome = eog;
kdenlive = kdePackages.kdenlive;
plex = [
(plex-desktop.override {extraEnv = {QT_QPA_PLATFORM = "xcb";};})
plexamp
];
freetube = freetube;
lazydocker = lazydocker;
distrobox = [distrobox pkgs.boxbuddy];
winboat = [winboat freerdp];
};
in {
imports = builtins.attrValues (builtins.mapAttrs mkPackage packages);
}

View File

@@ -1,10 +0,0 @@
{pkgs, ...}: {
environment.systemPackages = with pkgs; [
cmatrix
cowsay
sl
fortune
lolcat
eza
];
}

View File

@@ -1,11 +0,0 @@
{pkgs, ...}: {
environment.systemPackages = with pkgs; [
virt-viewer
# lazydocker
docker-client
# distrobox
# boxbuddy
# freerdp
# winboat
];
}

View File

@@ -1,20 +1,43 @@
{pkgs, ...}: {
programs = {
steam = {
{
pkgs,
lib,
config,
...
}: {
options = {
steam.enable = lib.mkEnableOption "Steam";
gamescope.enable = lib.mkEnableOption "Gamescope";
gamemode.enable = lib.mkEnableOption "Gamemode";
};
config.programs = {
steam = lib.mkIf config.steam.enable {
enable = true;
package = pkgs.steam;
remotePlay.openFirewall = true;
dedicatedServer.openFirewall = true;
gamescopeSession.enable = true;
gamescopeSession = lib.mkIf config.gamescope.enable {
enable = true;
args = [
"--rt"
"--expose-wayland"
];
};
extraCompatPackages = [pkgs.proton-ge-bin];
};
# gamescope = {
# enable = true;
# capSysNice = true;
# args = [
# "--rt"
# "--expose-wayland"
# ];
# };
gamemode.enable = true;
gamescope = lib.mkIf config.gamescope.enable {
enable = true;
capSysNice = true;
args = [
"--rt"
"--expose-wayland"
];
};
gamemode = lib.mkIf config.gamemode.enable {
enable = true;
enableRenice = true;
};
};
}

View File

@@ -1,11 +1,9 @@
{pkgs, ...}: {
programs = {
thunar = {
enable = true;
plugins = with pkgs.xfce; [
thunar-archive-plugin
thunar-volman
];
};
programs.thunar = {
enable = true;
plugins = with pkgs.xfce; [
thunar-archive-plugin
thunar-volman
];
};
}

View File

@@ -24,7 +24,7 @@ in {
;
};
users.${username} = {
imports = [./../home];
imports = [./../home ../../hosts/${host}/home-modules.nix];
home = {
username = "${username}";
homeDirectory = "/home/${username}";
@@ -32,23 +32,26 @@ in {
};
};
};
users.mutableUsers = true;
users.users.${username} = {
isNormalUser = true;
description = "${gitUsername}";
extraGroups = [
"adbusers"
"docker" # access to docker as non-root
"libvirtd" # Virt manager/QEMU access
"lp"
"networkmanager"
"scanner"
"wheel" # sudo access
"vboxusers" # Virtual Box
"gamemode"
];
shell = pkgs.bash;
ignoreShellProgramCheck = true;
users = {
mutableUsers = true;
users.${username} = {
isNormalUser = true;
description = "${gitUsername}";
extraGroups = [
"adbusers"
"docker" # access to docker as non-root
"libvirtd" # Virt manager/QEMU access
"lp"
"networkmanager"
"scanner"
"wheel" # sudo access
"vboxusers" # Virtual Box
"gamemode"
];
shell = pkgs.bash;
ignoreShellProgramCheck = true;
linger = true;
};
};
nix.settings.allowed-users = ["${username}"];
}

View File

@@ -1,15 +0,0 @@
_: {
# Only enable either docker or podman -- Not both
virtualisation = {
docker.enable = true;
podman.enable = false;
libvirtd.enable = true;
virtualbox.host = {
enable = false;
enableExtensionPack = true;
};
};
programs.virt-manager.enable = false;
}

View File

@@ -7,5 +7,6 @@
xdg-desktop-portal-gtk
];
configPackages = [pkgs.hyprland];
xdgOpenUsePortal = true;
};
}