chore: pretty up with alejandra

This commit is contained in:
Peritia 2025-09-22 16:16:02 +02:00
parent 7bbda6140f
commit 37b85877bb
75 changed files with 584 additions and 452 deletions

View file

@ -1,6 +1,9 @@
{ config, lib, pkgs, ... }:
{
config,
lib,
pkgs,
...
}: {
imports = [
./docker.nix
./openssh.nix

View file

@ -15,13 +15,14 @@
# Notes:
# - Rootless mode is disabled by default
# - Uses cgroup v2 for better resource management on modern kernels
{ config, lib, pkgs, ... }:
let
cfg = config.nyx-module.system.docker;
in
{
config,
lib,
pkgs,
...
}: let
cfg = config.nyx-module.system.docker;
in {
options.nyx-module.system.docker = {
enable = lib.mkEnableOption "Enable Docker (system module)";
@ -47,7 +48,7 @@ in
rootless.enable = cfg.rootless;
};
users.users.${cfg.username}.extraGroups = [ "docker" ];
users.users.${cfg.username}.extraGroups = ["docker"];
environment.systemPackages = with pkgs; [
docker
@ -55,8 +56,7 @@ in
];
# Optional: Docker cgroup v2 (usually enabled by default in modern NixOS)
boot.kernelParams = [ "cgroup_enable=memory" "cgroup_memory=1" ];
boot.kernelParams = ["cgroup_enable=memory" "cgroup_memory=1"];
assertions = [
{

View file

@ -11,13 +11,14 @@
# Notes:
# - By default, password authentication is disabled for better security
# - Root login is disabled unless explicitly enabled
{ config, lib, pkgs, ... }:
let
cfg = config.nyx-module.system.openssh;
in
{
config,
lib,
pkgs,
...
}: let
cfg = config.nyx-module.system.openssh;
in {
options.nyx-module.system.openssh = {
enable = lib.mkEnableOption "Enable OpenSSH (system module)";

View file

@ -13,13 +13,14 @@
# - Adds podman + podman-compose to system packages
# - Enables D-Bus socket activation for Podman
#
{ config, lib, pkgs, ... }:
let
cfg = config.nyx-module.system.podman;
in
{
config,
lib,
pkgs,
...
}: let
cfg = config.nyx-module.system.podman;
in {
options.nyx-module.system.podman = {
enable = lib.mkEnableOption "Enable Podman (system module)";
@ -33,7 +34,7 @@ in
config = lib.mkIf cfg.enable {
virtualisation.podman.enable = true;
users.users.${cfg.username}.extraGroups = [ "podman" ];
users.users.${cfg.username}.extraGroups = ["podman"];
environment.systemPackages = with pkgs; [
podman
@ -41,8 +42,8 @@ in
];
# Optional: enable Podman socket activation
services.dbus.packages = [ pkgs.podman ];
services.dbus.packages = [pkgs.podman];
assertions = [
{
assertion = cfg.username != "";

View file

@ -15,13 +15,14 @@
# - virt-manager GUI is enabled automatically
# - Only generic "kvm" kernel module is forced (host picks intel/amd)
#
{ config, lib, pkgs, ... }:
let
cfg = config.nyx-module.system.vm;
in
{
config,
lib,
pkgs,
...
}: let
cfg = config.nyx-module.system.vm;
in {
options.nyx-module.system.vm = {
enable = lib.mkEnableOption "Enable VM (system module)";
@ -49,10 +50,10 @@ in
};
# Add user to groups
users.users.${cfg.username}.extraGroups = [ "libvirtd" "kvm" ];
users.users.${cfg.username}.extraGroups = ["libvirtd" "kvm"];
# Enable kernel modules for virtualization
boot.kernelModules = [ "kvm" ];
boot.kernelModules = ["kvm"];
# Enable GUI management tool
programs.virt-manager.enable = true;

View file

@ -11,13 +11,14 @@
# - theme → oh-my-zsh theme (default: "xiong-chiamiov-plus")
# - plugins → List of oh-my-zsh plugins (default: [ "git" ])
#
{ config, lib, pkgs, ... }:
let
cfg = config.nyx-module.system.zsh;
in
{
config,
lib,
pkgs,
...
}: let
cfg = config.nyx-module.system.zsh;
in {
options.nyx-module.system.zsh = {
enable = lib.mkEnableOption "Enable Zsh (system module)";
@ -31,7 +32,7 @@ in
plugins = lib.mkOption {
type = lib.types.listOf lib.types.str;
default = [ "git" ];
default = ["git"];
description = "List of oh-my-zsh plugins to enable.";
};
};
@ -47,6 +48,6 @@ in
};
# Add zsh to available shells
environment.shells = with pkgs; [ zsh ];
environment.shells = with pkgs; [zsh];
};
}