reformat
This commit is contained in:
@@ -1,13 +1,14 @@
|
||||
# Module: Bluetooth Configuration
|
||||
# Description: Enables Bluetooth with dual controller mode and experimental features
|
||||
# Services: bluetooth, blueman (GUI manager)
|
||||
|
||||
{ config, lib, ... }:
|
||||
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
options.custom.bluetooth = {
|
||||
enable = lib.mkEnableOption "Bluetooth support with blueman GUI";
|
||||
|
||||
|
||||
powerOnBoot = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = true;
|
||||
@@ -30,4 +31,4 @@
|
||||
};
|
||||
services.blueman.enable = true;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,16 +3,12 @@
|
||||
# Services: sops-nix
|
||||
# Dependencies: sops-nix for secrets management
|
||||
# Note: Other laptop features (gaming, virtualization, etc.) are in separate modules
|
||||
|
||||
{ customConfig, ... }:
|
||||
|
||||
let
|
||||
{customConfig, ...}: let
|
||||
userHome = "/home/${customConfig.username}";
|
||||
in
|
||||
{
|
||||
in {
|
||||
sops.validateSopsFiles = false;
|
||||
sops.age.keyFile = "${userHome}/.config/sops/age/keys.txt";
|
||||
|
||||
|
||||
# WiFi networks configuration - entire network list encrypted
|
||||
sops.secrets.wifi-networks = {
|
||||
path = "/run/secrets/wifi-networks.conf";
|
||||
@@ -33,4 +29,4 @@ in
|
||||
};
|
||||
|
||||
services.xserver.xkb.layout = "fr";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
{pkgs, ...}: {
|
||||
services.fprintd.enable = true;
|
||||
services.fprintd.tod.enable = true;
|
||||
services.fprintd.tod.driver = pkgs.libfprint-2-tod1-goodix-550a;
|
||||
|
||||
@@ -1,13 +1,15 @@
|
||||
# Module: Gaming Support
|
||||
# Description: Enables Steam and gamepad drivers (xpadneo for Xbox controllers)
|
||||
# Services: Steam, steam-hardware
|
||||
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
options.custom.gaming = {
|
||||
enable = lib.mkEnableOption "gaming support (Steam, gamepad drivers)";
|
||||
|
||||
|
||||
enableXpadneo = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = true;
|
||||
@@ -17,11 +19,11 @@
|
||||
|
||||
config = lib.mkIf config.custom.gaming.enable {
|
||||
hardware.steam-hardware.enable = true;
|
||||
|
||||
|
||||
programs.steam = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
|
||||
boot.extraModulePackages = lib.mkIf config.custom.gaming.enableXpadneo [
|
||||
pkgs.linuxPackages.xpadneo
|
||||
];
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
{ lib, customConfig, ... }:
|
||||
|
||||
let
|
||||
{
|
||||
lib,
|
||||
customConfig,
|
||||
...
|
||||
}: let
|
||||
username = customConfig.username;
|
||||
dotconfigPath = ../../dotconfig;
|
||||
dotconfigEntries = lib.filterAttrs (name: _: !(lib.hasPrefix "." name)) (builtins.readDir dotconfigPath);
|
||||
@@ -15,8 +17,7 @@ let
|
||||
recursive = true;
|
||||
}
|
||||
);
|
||||
in
|
||||
{
|
||||
in {
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.backupFileExtension = "hm-backup";
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
# Module: Power Management
|
||||
# Description: CPU frequency governor and power management settings
|
||||
# Services: powerManagement
|
||||
|
||||
{ config, lib, ... }:
|
||||
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
options.custom.power = {
|
||||
enable = lib.mkEnableOption "power management configuration";
|
||||
|
||||
|
||||
cpuGovernor = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "powersave";
|
||||
|
||||
@@ -1,19 +1,20 @@
|
||||
# Module: Printing Configuration
|
||||
# Description: CUPS printing service with configured printers
|
||||
# Services: printing (CUPS)
|
||||
|
||||
{ config, lib, ... }:
|
||||
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
options.custom.printing = {
|
||||
enable = lib.mkEnableOption "printing support (CUPS)";
|
||||
|
||||
|
||||
printers = lib.mkOption {
|
||||
type = lib.types.listOf lib.types.attrs;
|
||||
default = [];
|
||||
description = "List of printers to configure";
|
||||
};
|
||||
|
||||
|
||||
defaultPrinter = lib.mkOption {
|
||||
type = lib.types.nullOr lib.types.str;
|
||||
default = null;
|
||||
@@ -23,10 +24,11 @@
|
||||
|
||||
config = lib.mkIf config.custom.printing.enable {
|
||||
services.printing.enable = true;
|
||||
|
||||
|
||||
hardware.printers = lib.mkIf (config.custom.printing.printers != []) {
|
||||
ensurePrinters = config.custom.printing.printers;
|
||||
ensureDefaultPrinter = lib.mkIf (config.custom.printing.defaultPrinter != null)
|
||||
ensureDefaultPrinter =
|
||||
lib.mkIf (config.custom.printing.defaultPrinter != null)
|
||||
config.custom.printing.defaultPrinter;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -2,15 +2,16 @@
|
||||
# Description: Defines the main user 'alice' with groups, permissions, and user packages
|
||||
# Packages: Browsers (Firefox), Office (LibreOffice), Development (VSCode, Git),
|
||||
# Media (VLC, Spotify), Communication (Slack, Thunderbird), and more
|
||||
|
||||
{ pkgs, customConfig, ... }:
|
||||
|
||||
{
|
||||
pkgs,
|
||||
customConfig,
|
||||
...
|
||||
}: {
|
||||
users.users."${customConfig.username}" = {
|
||||
isNormalUser = true;
|
||||
home = "/home/${customConfig.username}";
|
||||
# Base groups - docker/vboxusers are added by virtualization.nix if enabled
|
||||
extraGroups = [ "wheel" "audio" "dialout" "plugdev" ];
|
||||
extraGroups = ["wheel" "audio" "dialout" "plugdev"];
|
||||
packages = with pkgs; [
|
||||
# Browsers & Web
|
||||
firefox
|
||||
@@ -30,6 +31,8 @@
|
||||
tcpdump
|
||||
pandoc
|
||||
libsecret
|
||||
nixd
|
||||
alejandra
|
||||
|
||||
# Communication
|
||||
slack
|
||||
@@ -43,10 +46,10 @@
|
||||
pympress
|
||||
|
||||
# Gaming & Entertainment
|
||||
prismlauncher # Minecraft launcher
|
||||
widelands # Strategy game
|
||||
wasistlos # Game
|
||||
moonlight-qt # Game streaming
|
||||
prismlauncher # Minecraft launcher
|
||||
# widelands # Strategy game
|
||||
wasistlos # Game
|
||||
moonlight-qt # Game streaming
|
||||
|
||||
# System & Cloud
|
||||
rclone
|
||||
@@ -57,7 +60,7 @@
|
||||
age
|
||||
];
|
||||
|
||||
openssh.authorizedKeys.keys = [
|
||||
openssh.authorizedKeys.keys = [
|
||||
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCMzLza+1iFSUgZaPzEwpRNW/CvcsbXh8vJ9RevwFntNZdZIVc/j5OLRy+GOojlZdar070PkKDO+Pmtqu1uQ4XE+onqmsxom5JGyYaSScB3l33CLL2jBT7mBqBOVDuTBj3ACLT8fS1eUolI7erShvIH9VUvrg83bZ2CvgA/DjJLHfVCpvx9EsG0Q00k27LNU7yXga8sjK1YikA+o1bKTWavCGOWkZMFXOVeEDR+arOQ440s6f6eg7C+30V02ijRLA6pWFAkj2/fMaD+44IPMVjOj96vvPUJrlL1N7BDPxBlj1rrB35+pUkpVIN4B0etqnkrJIV+IxtmSpkNHr52Y7nkTu3mOWn1P0DcOdR5OA8JZRbSkbL/QW4GzFWs3eN7CMOMwKQdO+1J/wL4U7qrmKEYwcNaprqlDF0SIPp0+l/VWNMe6uK0r5iZwp355PUSR+Zc5skf74wMsZ1LokUlihdI+E6TNGvmDgjqKx6OrI3dyP/eW7xtR7KvbdoaUjy8AE8= alice@nixos"
|
||||
];
|
||||
};
|
||||
|
||||
@@ -1,21 +1,24 @@
|
||||
# Module: Virtualization
|
||||
# Description: Docker and VirtualBox virtualization support
|
||||
# Services: Docker daemon, VirtualBox
|
||||
|
||||
{ config, lib, pkgs, customConfig, ... }:
|
||||
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
customConfig,
|
||||
...
|
||||
}: {
|
||||
options.custom.virtualization = {
|
||||
docker = {
|
||||
enable = lib.mkEnableOption "Docker container runtime";
|
||||
|
||||
|
||||
dnsServers = lib.mkOption {
|
||||
type = lib.types.listOf lib.types.str;
|
||||
default = [ "172.17.0.1" ];
|
||||
default = ["172.17.0.1"];
|
||||
description = "DNS servers for Docker containers (points to dnscrypt-proxy)";
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
virtualbox = {
|
||||
enable = lib.mkEnableOption "VirtualBox virtualization";
|
||||
};
|
||||
@@ -30,13 +33,13 @@
|
||||
dns = config.custom.virtualization.docker.dnsServers;
|
||||
};
|
||||
};
|
||||
|
||||
users.users."${customConfig.username}".extraGroups = [ "docker" ];
|
||||
|
||||
users.users."${customConfig.username}".extraGroups = ["docker"];
|
||||
})
|
||||
|
||||
|
||||
(lib.mkIf config.custom.virtualization.virtualbox.enable {
|
||||
virtualisation.virtualbox.host.enable = true;
|
||||
users.users."${customConfig.username}".extraGroups = [ "vboxusers" ];
|
||||
users.users."${customConfig.username}".extraGroups = ["vboxusers"];
|
||||
})
|
||||
];
|
||||
}
|
||||
|
||||
@@ -2,10 +2,13 @@
|
||||
# Description: Configures Zwift cycling simulator via Docker with proper networking
|
||||
# Services: Zwift Docker container
|
||||
# Ports: UDP 3022, 3024 / TCP 21587, 21588
|
||||
|
||||
{ config, lib, pkgs, customConfig, ... }:
|
||||
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
customConfig,
|
||||
...
|
||||
}: {
|
||||
options.custom.zwift = {
|
||||
enable = lib.mkEnableOption "Zwift cycling simulator";
|
||||
};
|
||||
@@ -14,7 +17,7 @@
|
||||
programs.zwift = {
|
||||
enable = true;
|
||||
image = "docker.io/netbrain/zwift";
|
||||
version = "latest"; # FIXME: Pin to specific version for reproducibility
|
||||
version = "latest"; # FIXME: Pin to specific version for reproducibility
|
||||
containerTool = "docker";
|
||||
zwiftWorkoutDir = "/var/lib/zwift/workouts";
|
||||
zwiftActivityDir = "/var/lib/zwift/activities";
|
||||
@@ -28,8 +31,8 @@
|
||||
};
|
||||
|
||||
networking.firewall = {
|
||||
allowedUDPPorts = [ 3022 3024 ];
|
||||
allowedTCPPorts = [ 21587 21588 ];
|
||||
allowedUDPPorts = [3022 3024];
|
||||
allowedTCPPorts = [21587 21588];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user