refactor some things, might have broken everything

This commit is contained in:
2026-06-15 02:21:03 +02:00
parent 73e25a00b6
commit 08a5db8508
61 changed files with 1013 additions and 1103 deletions

View File

@ -6,23 +6,13 @@
# By: tomoron <tomoron@student.42angouleme.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2025/09/05 23:37:58 by tomoron #+# #+# #
# Updated: 2026/05/07 17:41:52 by tomoron ### ########.fr #
# Updated: 2026/06/14 17:50:09 by tomoron ### ########.fr #
# #
# **************************************************************************** #
{lib, pkgs, ... } :
{pkgs, ... } :
{
boot.kernelPackages = lib.mkDefault pkgs.linuxPackages_latest;
boot.loader = {
systemd-boot.enable = true;
systemd-boot.memtest86.enable = true;
efi.canTouchEfiVariables = true;
timeout = 1;
};
boot.tmp.cleanOnBoot = true;
boot.consoleLogLevel = 3;
boot.initrd.verbose = false;
boot.kernelParams = [
@ -36,16 +26,6 @@
boot.plymouth = {
enable = true;
theme = "nixos-bgrt";
themePackages = with pkgs; [ #(adi1090x-plymouth-themes.override {
# selected_themes = [ "black_hud" "circle_hud" "square_hud" "spinner_alt" ];
# })
# catppuccin-plymouth
nixos-bgrt-plymouth
];
themePackages = with pkgs; [ nixos-bgrt-plymouth ];
};
services.journald.extraConfig = ''
SystemMaxUse=100M
SystemMaxFileSize=50M
'';
}

View File

@ -0,0 +1,13 @@
{ ... }:
{
services.displayManager.enable = true;
services.displayManager.ly.enable = true;
services.displayManager.ly.settings = {
animation = "gameoflife";
min_refresh_delta = 50;
bigclock = "en";
sleep_cmd = "systemctl sleep";
asterisk = "A";
auth_fails= 3;
};
}

View File

@ -0,0 +1,6 @@
{ ... }:
{
programs.steam.enable = true;
programs.steam.protontricks.enable = true;
programs.gamescope.enable = true;
}

View File

@ -0,0 +1,31 @@
# **************************************************************************** #
# #
# ::: :::::::: #
# boot.nix :+: :+: :+: #
# +:+ +:+ +:+ #
# By: tomoron <tomoron@student.42angouleme.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2026/06/14 17:49:47 by tomoron #+# #+# #
# Updated: 2026/06/14 17:50:06 by tomoron ### ########.fr #
# #
# **************************************************************************** #
{ lib, pkgs, ... }:
{
boot.kernelPackages = lib.mkDefault pkgs.linuxPackages_latest;
boot.loader = {
systemd-boot.enable = true;
systemd-boot.memtest86.enable = true;
efi.canTouchEfiVariables = true;
timeout = 1;
};
boot.tmp.cleanOnBoot = true;
services.journald.extraConfig = ''
SystemMaxUse=100M
SystemMaxFileSize=50M
'';
}

View File

@ -0,0 +1,23 @@
# **************************************************************************** #
# #
# ::: :::::::: #
# other.nix :+: :+: :+: #
# +:+ +:+ +:+ #
# By: tomoron <tomoron@student.42angouleme.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2026/06/14 18:02:15 by tomoron #+# #+# #
# Updated: 2026/06/15 02:06:17 by tomoron ### ########.fr #
# #
# **************************************************************************** #
{ lib, ... }:
{
networking.hostName = lib.mkDefault "unnamed-nixos";
networking.networkmanager.enable = lib.mkDefault true;
time.timeZone = "Europe/Paris";
services.fstrim.enable = true; # trims all the ssds on the machine every week
catppuccin.enable = lib.mkDefault false;
catppuccin.autoEnable = false;
}

View File

@ -0,0 +1,20 @@
# **************************************************************************** #
# #
# ::: :::::::: #
# packages.nix :+: :+: :+: #
# +:+ +:+ +:+ #
# By: tomoron <tomoron@student.42angouleme.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2026/06/14 18:03:28 by tomoron #+# #+# #
# Updated: 2026/06/14 18:06:25 by tomoron ### ########.fr #
# #
# **************************************************************************** #
{ pkgs, ... }:
{
environment.systemPackages = with pkgs; [
neovim
pciutils
];
}

View File

@ -1,8 +1,8 @@
{lib, ...}:
{ ... }:
{
sops = {
defaultSopsFile = ../../secrets/secrets.yaml;
defaultSopsFile = ../../../secrets/secrets.yaml;
age.keyFile = "/home/tom/.config/sops/age/keys.txt";
};
}

View File

@ -1,27 +1,25 @@
# **************************************************************************** #
# #
# ::: :::::::: #
# game.nix :+: :+: :+: #
# user.nix :+: :+: :+: #
# +:+ +:+ +:+ #
# By: tomoron <tomoron@student.42angouleme.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2025/09/05 23:47:09 by tomoron #+# #+# #
# Updated: 2025/10/27 00:50:29 by tomoron ### ########.fr #
# Created: 2025/09/05 23:42:18 by tomoron #+# #+# #
# Updated: 2026/06/14 18:07:45 by tomoron ### ########.fr #
# #
# **************************************************************************** #
{config, lib, ... }:
{ ... }:
{
options.mods.gayming.enable = lib.mkOption {
type = lib.types.bool;
default = false;
description = "enable steam and other";
};
users.users.tom = {
isNormalUser = true;
extraGroups = [
"wheel" # can sudo
"docker" # can use docker
];
config = lib.mkIf config.mods.gayming.enable {
programs.steam.enable = true;
programs.steam.protontricks.enable = true;
programs.gamescope.enable = true;
};
initialPassword = "password";
};
}

View File

@ -6,20 +6,15 @@
# By: tomoron <tomoron@student.42angouleme.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2025/02/09 01:43:46 by tomoron #+# #+# #
# Updated: 2026/04/03 22:08:01 by tomoron ### ########.fr #
# Updated: 2026/06/15 02:06:30 by tomoron ### ########.fr #
# #
# **************************************************************************** #
{ lib, ... }:
{
networking.hostName = lib.mkDefault "unnamed-nixos";
networking.networkmanager.enable = lib.mkDefault true;
programs.fuse.enable = true;
time.timeZone = "Europe/Paris";
services.xserver.enable = lib.mkDefault true;
services.xserver.displayManager.startx.enable = true;
@ -33,5 +28,8 @@
hardware.logitech.wireless.enable = true;
hardware.logitech.wireless.enableGraphical = true;
services.fstrim.enable = true; # trims all the ssds on the machine every week
programs.noisetorch.enable = true;
programs.droidcam.enable = true;
catppuccin.enable = true;
}

View File

@ -6,7 +6,7 @@
# By: tomoron <tomoron@student.42angouleme.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2025/09/06 00:57:21 by tomoron #+# #+# #
# Updated: 2025/12/30 18:12:05 by tomoron ### ########.fr #
# Updated: 2026/06/15 01:57:44 by tomoron ### ########.fr #
# #
# **************************************************************************** #
@ -15,13 +15,13 @@
{
environment.systemPackages = with pkgs; [
home-manager
vim
pciutils
cryptsetup
usbutils
ntfs3g
cryptsetup
acpi
nss
unison
# nss //is this supposed to be here ?
];
}

View File

@ -6,7 +6,7 @@
# By: tomoron <tomoron@student.42angouleme.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2025/09/05 23:42:18 by tomoron #+# #+# #
# Updated: 2026/01/13 16:32:42 by tomoron ### ########.fr #
# Updated: 2026/06/14 18:07:55 by tomoron ### ########.fr #
# #
# **************************************************************************** #
@ -14,15 +14,10 @@
{
users.users.tom = {
isNormalUser = true;
extraGroups = [
"wheel" # can sudo
"docker" # can use docker
"libvirtd" # can use libvirtd
"dialout" # can use serial devices
"wireshark" # can use wireshask
];
initialPassword = "password";
};
}

View File

@ -6,49 +6,31 @@
# By: tomoron <tomoron@student.42angouleme.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2025/09/06 00:57:04 by tomoron #+# #+# #
# Updated: 2026/05/21 00:20:51 by tomoron ### ########.fr #
# Updated: 2026/06/15 02:03:18 by tomoron ### ########.fr #
# #
# **************************************************************************** #
{ config, lib, inputs, pkgs, ... }:
{ pkgs, ... }:
{
boot.kernelParams = [ "nvidia-drm-modset=1" ];
environment.systemPackages = with pkgs; [
lm_sensors # can be user (and global)
];
networking.hostName = "nixos-fixe";
hardware.cpu.intel.updateMicrocode = true;
mods.yubikey.pam.enable = true;
mods.nvidia.enable = true;
boot.kernelModules = [ "kvm-intel" "nvidia" ];
mods.displayManager.enable = true;
mods.nvidia.enable = true;
mods.gayming.enable = true;
programs.noisetorch.enable = true;
# hardware.nvidia = {
# open = true;
#
# prime.nvidiaBusId = "PCI:1:0:0";
# prime.intelBusId = "PCI:0:2:0";
# prime.sync.enable = true;
#
# modesetting.enable = true;
# };
services.openssh.enable = true;
programs.droidcam.enable = true;
boot.kernelPackages = pkgs.linuxPackages;
boot.supportedFilesystems = [ "zfs" ];
networking.hostId = "98e475dd";
mods.zfs.enable = true;
mods.docker = {
enable = true;
boot = false;

View File

@ -6,17 +6,13 @@
# By: tomoron <tomoron@student.42angouleme.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2025/09/06 00:57:02 by tomoron #+# #+# #
# Updated: 2025/09/06 00:57:03 by tomoron ### ########.fr #
# Updated: 2026/06/14 18:25:39 by tomoron ### ########.fr #
# #
# **************************************************************************** #
{lib, ... }:
{
imports = [
../global/packages.nix
];
users.users.tom = {
isNormalUser = true;
extraGroups = [ "wheel" "networkmanager" "video" ];

View File

@ -6,7 +6,7 @@
# By: tomoron <tomoron@student.42angouleme.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2025/09/06 00:56:57 by tomoron #+# #+# #
# Updated: 2026/06/13 23:20:55 by tomoron ### ########.fr #
# Updated: 2026/06/15 02:11:29 by tomoron ### ########.fr #
# #
# **************************************************************************** #
@ -35,22 +35,23 @@
};
boot.blacklistedKernelModules = [ "nvidia" "nvidia_drm" "nvidia_uvm" ]; #speeds up startup
programs.droidcam.enable = true;
boot.blacklistedKernelModules = [ "nvidia" "nvidia_drm" "nvidia_uvm" ]; #speeds up startup, loaded automatically when gpu is started
mods.displayManager.enable = true;
mods.yubikey.pam.enable = true;
networking.firewall.enable = false;
networking.hostName = "patate-douce";
# networking.wireless.enable = true;
networking.networkmanager.wifi.backend = "iwd";
networking.wireless.iwd.enable = true;
networking.wireless.allowAuxiliaryImperativeNetworks = true;
networking.networkmanager.enable = false;
networking.dhcpcd.enable = false;
systemd.network.enable = true;
networking.useNetworkd = true;
specialisation.vfio_ready.configuration = {
#vfio ready configuration sets up kvmfr0 kernel module, disables xbox controller on host os, enables libvirtd and installs looking-glass
mods.virtualHost.enable = true;
boot.extraModulePackages = with config.boot.kernelPackages; [ kvmfr ];
@ -73,30 +74,13 @@
environment.systemPackages = with pkgs; [ looking-glass-client ];
};
services.udev.extraRules = ''
SUBSYSTEM=="usb", ATTRS{idVendor}=="2e3c", ATTRS{idProduct}=="df11", TAG+="uaccess"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="df11", TAG+="uaccess"
'';
networking.dhcpcd.enable = false;
systemd.network.enable = true;
networking.useNetworkd = true;
programs.noisetorch.enable = true;
services.postgresql.enable = true;
hardware.bluetooth.enable = true;
environment.systemPackages = with pkgs; [
acpi # can be user (global)
impala
openvr
];
# programs.alvr.enable = true;
mods.touchpad.enable = true;
mods.powerSave = {
@ -113,10 +97,8 @@
};
services.asusd = {
enable = true;
# enableUserService = true;
};
services.supergfxd.enable = true;
@ -133,14 +115,13 @@
programs.wireshark.enable = true;
programs.wireshark.usbmon.enable = true;
mods.yubikey.pam.enable = true;
mods.docker.enable = true;
mods.gayming.enable = true;
mods.nvidia.enable = true;
mods.nvidia.prime = true;
services.usbmuxd.enable = true; #sometimes hangs when shutting down
services.usbmuxd.enable = true; #iphone usb service sometimes hangs when shutting down
services.avahi.enable = true;
services.pipewire = {
@ -160,6 +141,8 @@
"bluez5.enable-hw-volume" = true;
};
};
hardware.bluetooth.enable = true;
hardware.bluetooth.settings = {
General = {
Enable = "Source,Sink,Media,Socket";
@ -167,5 +150,4 @@
};
programs.corectrl.enable = true;
}

View File

@ -6,7 +6,7 @@
# By: tomoron <tomoron@student.42angouleme.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2025/09/06 00:57:09 by tomoron #+# #+# #
# Updated: 2026/06/13 23:40:36 by tomoron ### ########.fr #
# Updated: 2026/06/15 02:04:54 by tomoron ### ########.fr #
# #
# **************************************************************************** #
@ -27,7 +27,6 @@ let
];
in
{
boot.kernelPackages = pkgs.linuxPackages;
boot.extraModulePackages = [
config.boot.kernelPackages.gasket #driver for google coral edge tpu
];
@ -65,7 +64,7 @@ in
# create dummy display to be able to start x11
'';
boot.supportedFilesystems = [ "zfs" ];
mods.zfs.enable = true;
boot.zfs.forceImportRoot = false;
boot.zfs.extraPools = [ "raid_vol" ];
@ -107,12 +106,6 @@ in
autoprune = true;
};
environment.systemPackages = with pkgs; [
zfs
screen #can be user (and global)
(inputs.dockermcmgr.packages.${pkgs.stdenv.hostPlatform.system}.default)
];
networking = {
hostName = "server";
@ -124,7 +117,7 @@ in
defaultGateway.address = "192.168.1.254";
defaultGateway.interface = "eth0";
nameservers = ["8.8.8.8" "8.8.4.4" "1.1.1.1"];
hostId = "68290da7";
hostId = "68290da7";
firewall.allowedTCPPorts = ports;
firewall.allowedUDPPorts = ports;
@ -144,6 +137,18 @@ in
boot = true;
};
systemd.services.dockermcmgr-server = {
enable = true;
wantedBy = ["multi-user.target"];
restartIfChanged = true;
serviceConfig = {
ExecStart = "${inputs.dockermcmgr.packages.${pkgs.stdenv.hostPlatform.system}.default}/bin/dmm serverMode";
User = "tom";
Group= "users";
};
};
nix.settings.trusted-users = [ "root" "builder" "tom" ];
users.users.builder = {
@ -157,18 +162,4 @@ in
users.groups.builder = {};
mods.remote-build.enable = false;
systemd.services.dockermcmgr-server = {
enable = true;
wantedBy = ["multi-user.target"];
restartIfChanged = true;
serviceConfig = {
ExecStart = "${inputs.dockermcmgr.packages.${pkgs.stdenv.hostPlatform.system}.default}/bin/dmm serverMode";
User = "tom";
Group= "users";
};
};
}

View File

@ -1,36 +0,0 @@
# **************************************************************************** #
# #
# ::: :::::::: #
# displayManager.nix :+: :+: :+: #
# +:+ +:+ +:+ #
# By: tomoron <tomoron@student.42angouleme.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2025/09/05 23:47:16 by tomoron #+# #+# #
# Updated: 2025/11/17 14:32:13 by tomoron ### ########.fr #
# #
# **************************************************************************** #
{config, lib, ... }:
{
options.mods.displayManager.enable = lib.mkOption {
type = lib.types.bool;
default = false;
description = "enable the ly display manager";
};
config = lib.mkIf config.mods.displayManager.enable {
services.displayManager.enable = true;
services.displayManager.ly.enable = true;
services.displayManager.ly.settings =
{
animation = "gameoflife";
min_refresh_delta = 50;
bigclock = "en";
sleep_cmd = "systemctl sleep";
asterisk = "A";
auth_fails= 3;
};
};
}

View File

@ -6,7 +6,7 @@
# By: tomoron <tomoron@student.42angouleme.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2025/09/05 23:47:19 by tomoron #+# #+# #
# Updated: 2025/09/06 01:03:07 by tomoron ### ########.fr #
# Updated: 2026/06/15 02:01:25 by tomoron ### ########.fr #
# #
# **************************************************************************** #
@ -20,10 +20,10 @@
};
config = lib.mkIf config.mods.virtualHost.enable {
programs.virt-manager.enable = true;
virtualisation.libvirtd.enable = true;
virtualisation.libvirtd.qemu.runAsRoot = true;
virtualisation.libvirtd.qemu.vhostUserPackages = [ pkgs.virtiofsd ];
programs.virt-manager.enable = true;
virtualisation.libvirtd.enable = true;
virtualisation.libvirtd.qemu.runAsRoot = true;
virtualisation.libvirtd.qemu.vhostUserPackages = [ pkgs.virtiofsd ];
virtualisation.spiceUSBRedirection.enable = true;
environment.systemPackages = with pkgs; [ spice-gtk ];

13
osConfigs/modules/zfs.nix Normal file
View File

@ -0,0 +1,13 @@
{ pkgs, config, lib, ... }:
{
options.mods.zfs.enable = lib.mkOption {
type = lib.types.bool;
default = false;
description = "does this system support zfs filesystems";
};
config = lib.mkIf config.mods.zfs.enable {
boot.kernelPackages = pkgs.linuxPackages;
boot.supportedFilesystems = [ "zfs" ];
};
}

View File

@ -6,21 +6,22 @@
# By: tomoron <tomoron@student.42angouleme.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2025/09/06 00:56:36 by tomoron #+# #+# #
# Updated: 2026/05/31 15:39:42 by tomoron ### ########.fr #
# Updated: 2026/06/14 18:56:12 by tomoron ### ########.fr #
# #
# **************************************************************************** #
{ lib, flakeName, ... }:
{ lib, flakeName, minimal, ... }:
{
imports = lib.concatLists [
imports = (lib.concatLists [
[ ./hardware-configuration.nix ]
(lib.fileset.toList ./global)
(lib.fileset.toList ./modules)
];
])
++ (lib.lists.optionals minimal (lib.fileset.toList ./global/minimal))
++ (lib.lists.optionals (!minimal) (lib.fileset.toList ./global));
system.stateVersion = "25.05";
system.stateVersion ="25.05";
environment.etc.nixosFlakeName.text = "${flakeName}";
catppuccin.autoEnable = false;
}