adding modularity

This commit is contained in:
2024-08-28 00:18:47 +02:00
parent 166bed403e
commit 230144c3b9
15 changed files with 417 additions and 131 deletions

View File

@@ -0,0 +1,49 @@
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page, on
# https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
{ config, lib, pkgs, ... }:
{
# imports =
# [ # Include the results of the hardware scan.
# ./hardware-configuration.nix
# ];
# Use the "experimental" flakes for cleaner config
nix.settings.experimental-features = [ "nix-command" "flakes" ];
nixpkgs.config.allowUnfree = true;
# Use the systemd-boot EFI boot loader.
# In this setup it is chain-loaded by REFInd (managed by Arch linux)
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = false;
# require the bcachefs modules to be loaded
boot.supportedFilesystems = [ "bcachefs" ];
boot.kernelPackages = pkgs.linuxPackages_latest;
networking.hostName = "ArchNix"; # Define your hostname.
# Pick only one of the below networking options.
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
# networking.networkmanager.enable = true; # Easiest to use and most distros use this by default.
# Set your time zone.
time.timeZone = "Europe/Berlin";
# Select internationalisation properties.
i18n.defaultLocale = "en_US.UTF-8";
# Define a user account. Don't forget to set a password with passwd.
users.users.remy = {
isNormalUser = true;
extraGroups = [ "wheel" ]; # Enable sudo for the user.
};
# For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion .
system.stateVersion = "24.05"; # Did you read the comment?
}

View File

@@ -0,0 +1,13 @@
{lib, config, options, pkgs, ...}:
{
# Merge the configuration and hardware configuration
imports = [
./configuration.nix
./hardware-configuration.nix
../../modules/nixos/gdm.nix
../../modules/nixos/pipewire.nix
../../utils/binary-cache.nix
../../utils/garbage-collection.nix
];
}

View File

@@ -0,0 +1,39 @@
# 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" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "UUID=5c920fe4-f3a6-4a64-a95f-1a2edaf1e0b6";
fsType = "bcachefs";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/8F72-E888";
fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ];
};
swapDevices = [ ];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.enp0s20f0u2.useDHCP = lib.mkDefault true;
# networking.interfaces.wlp0s20f3.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}