Reorganize modules

This commit is contained in:
Armel van Ravels
2026-07-23 17:55:54 +02:00
parent bb3115f637
commit bc16b994a0
76 changed files with 107 additions and 145 deletions

73
hosts/gandalf/default.nix Normal file
View File

@@ -0,0 +1,73 @@
{ config, pkgs, ... }:
{
imports = [
./hardware-configuration.nix
../../modules/home-manager.nix
../../modules/common.nix
../../modules/users.nix
../../modules/locales.nix
../../modules/services.nix
../../modules/programs.nix
../../modules/gaming.nix
../../modules/obs-studio.nix
../../modules/garbage-collection.nix
../../modules/printing.nix
../../modules/docker.nix
../../modules/matrix.nix
../../modules/kdenlive.nix
../../modules/audacity.nix
../../modules/ollama.nix
../../modules/wireguard.nix
../../modules/qbittorrent.nix
../../modules/gimp.nix
../../modules/openscad.nix
../../modules/bambu-studio-flatpak.nix
../../modules/arduino-ide.nix
../../modules/bitwarden.nix
../../modules/vlc.nix
../../modules/devenv.nix
../../modules/btop.nix
../../modules/discord.nix
../../modules/lazygit.nix
../../modules/yazi.nix
./mtp-fix.nix
];
boot.kernelPackages = pkgs.linuxPackages_latest;
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
networking.hostName = "gandalf";
networking.networkmanager.enable = true;
networking.nameservers = [
"192.168.68.56"
"1.1.1.1"
"8.8.8.8"
];
networking.firewall.enable = false;
networking.interfaces.enp130s0.wakeOnLan.enable = true;
networking.firewall.allowedUDPPorts = [ 9 ];
services.xserver.videoDrivers = [ "nvidia" ];
services.openssh.settings.X11Forwarding = true;
hardware = {
graphics.enable = true;
nvidia.modesetting.enable = true;
nvidia.open = true;
nvidia.nvidiaSettings = true;
};
systemd.targets.sleep.enable = false;
systemd.targets.suspend.enable = false;
systemd.targets.hibernate.enable = false;
systemd.targets.hybrid-sleep.enable = false;
virtualisation.libvirtd.enable = true;
system.stateVersion = "25.11"; # Did you read the comment?
}

View File

@@ -0,0 +1,46 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config
, lib
, pkgs
, modulesPath
, ...
}:
{
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [
"xhci_pci"
"ahci"
"nvme"
"usbhid"
"usb_storage"
"sd_mod"
];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" = {
device = "/dev/disk/by-uuid/fbdcecb5-3a2b-4bd5-9586-4de834200363";
fsType = "ext4";
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/01E4-5DD7";
fsType = "vfat";
options = [
"fmask=0077"
"dmask=0077"
];
};
swapDevices = [ ];
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

30
hosts/gandalf/mtp-fix.nix Normal file
View File

@@ -0,0 +1,30 @@
{ pkgs, ... }:
{
nixpkgs.overlays = [
(
final: prev:
let
targetVersion = "1.1.23";
in
{
libmtp =
if builtins.compareVersions prev.libmtp.version targetVersion >= 0 then
prev.libmtp
else
prev.libmtp.overrideAttrs (_: {
version = targetVersion;
src = final.fetchFromGitHub {
owner = "libmtp";
repo = "libmtp";
rev = "v${targetVersion}";
hash = "sha256-FlPj9PEeOAWabU11dFTzDgY9TBbgmJclbeL0iULYw6A=";
};
patches = [ ];
});
}
)
];
}