diff --git a/bootloader.nix b/bootloader.nix index 203740f..c06fa30 100644 --- a/bootloader.nix +++ b/bootloader.nix @@ -1,4 +1,9 @@ -{ config, lib, pkgs, ... }: +{ + config, + lib, + pkgs, + ... +}: { boot = { @@ -10,7 +15,7 @@ enableCryptodisk = true; device = "nodev"; extraConfig = '' - source (crypto0)/os/arch/boot/grub/grub.cfg + source (crypto0)/os/arch/boot/grub/grub.cfg ''; }; efi.efiSysMountPoint = "/boot/efi"; @@ -24,13 +29,33 @@ }; }; systemd = { - initrdBin = with pkgs; [ - cryptsetup - ]; + initrdBin = with pkgs; [ + cryptsetup + ]; }; - kernelModules = [ "cryptd" "uas" "usbcore" "usb_storage" "vfat" "nls_cp437" "nls_iso8859_1" ]; - availableKernelModules = [ "xhci_pci" "nvme" "usbhid" "usb_storage" "rtsx_pci_sdmmc" "dm_crypt" "crypto_user" ]; - supportedFilesystems = [ "btrfs" "vfat" "luks" ]; + kernelModules = [ + "cryptd" + "uas" + "usbcore" + "usb_storage" + "vfat" + "nls_cp437" + "nls_iso8859_1" + ]; + availableKernelModules = [ + "xhci_pci" + "nvme" + "usbhid" + "usb_storage" + "rtsx_pci_sdmmc" + "dm_crypt" + "crypto_user" + ]; + supportedFilesystems = [ + "btrfs" + "vfat" + "luks" + ]; }; kernel.sysctl."kernel.sysrq" = 1; }; diff --git a/configuration.nix b/configuration.nix index 149a65d..ebc6ac1 100644 --- a/configuration.nix +++ b/configuration.nix @@ -2,28 +2,39 @@ # 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, ... }: +{ + config, + lib, + pkgs, + ... +}: { - imports = - [ # Include the results of the hardware scan. - ./security.nix - ./hardware-configuration.nix - ./hardware.nix - ./bootloader.nix - - ]; + imports = [ + # Include the results of the hardware scan. + ./security.nix + ./hardware-configuration.nix + ./hardware.nix + ./bootloader.nix + + ]; nixpkgs.config.allowUnfree = true; - + networking.hostName = "niczos"; # Define your hostname. networking.networkmanager.enable = true; time.timeZone = "Europe/Paris"; i18n.defaultLocale = "en_US.UTF-8"; - virtualisation.waydroid = { - enable = true; - package = pkgs.waydroid-nftables; + virtualisation = { + waydroid = { + enable = true; + package = pkgs.waydroid-nftables; + }; + docker = { + enable = true; + storageDriver = "btrfs"; + }; }; programs.steam.enable = true; @@ -55,13 +66,22 @@ defaultUnit = "graphical.target"; services."getty@tty1" = { overrideStrategy = "asDropin"; - serviceConfig.ExecStart = ["" "@${pkgs.util-linux}/sbin/agetty agetty --login-program ${config.services.getty.loginProgram} --autologin zo --noclear --keep-baud %I 115200,38400,9600 $TERM"]; + serviceConfig.ExecStart = [ + "" + "@${pkgs.util-linux}/sbin/agetty agetty --login-program ${config.services.getty.loginProgram} --autologin zo --noclear --keep-baud %I 115200,38400,9600 $TERM" + ]; }; }; users.users.zo = { isNormalUser = true; - extraGroups = [ "wheel" "audio" "video" "network" ]; + extraGroups = [ + "wheel" + "audio" + "video" + "network" + "docker" + ]; packages = [ pkgs.home-manager ]; shell = pkgs.bash; }; @@ -84,6 +104,7 @@ mplus-outline-fonts.githubRelease dina-font proggyfonts + font-awesome ]; # Copy the NixOS configuration file and link it from the resulting system @@ -111,4 +132,3 @@ system.stateVersion = "26.05"; # Did you read the comment? } - diff --git a/hardware-configuration.nix b/hardware-configuration.nix index 0a57cdc..1b58f56 100644 --- a/hardware-configuration.nix +++ b/hardware-configuration.nix @@ -1,12 +1,18 @@ # 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, ... }: +{ + config, + lib, + pkgs, + modulesPath, + ... +}: { - imports = - [ (modulesPath + "/installer/scan/not-detected.nix") - ]; + imports = [ + (modulesPath + "/installer/scan/not-detected.nix") + ]; boot.kernelParams = [ "i915.modeset=1" ]; boot.kernelModules = [ "kvm-intel" ]; @@ -23,14 +29,17 @@ fileSystems."/mnt/games" = { device = "/dev/mapper/safe"; fsType = "btrfs"; - options = [ "ssd" "lazytime" "subvol=game" ]; + options = [ + "ssd" + "lazytime" + "subvol=game" + ]; }; - fileSystems."/boot/efi" = - { - device = "/dev/disk/by-uuid/4FD7-458E"; - fsType = "vfat"; - }; + fileSystems."/boot/efi" = { + device = "/dev/disk/by-uuid/4FD7-458E"; + fsType = "vfat"; + }; swapDevices = [ ]; diff --git a/hardware.nix b/hardware.nix index 715402a..f3bb742 100644 --- a/hardware.nix +++ b/hardware.nix @@ -1,14 +1,22 @@ -{ config, lib, pkgs, ... }: +{ + config, + lib, + pkgs, + ... +}: { services.xserver.videoDrivers = [ "nvidia" ]; services.printing.enable = true; - services.printing.drivers = [ pkgs.epson-escpr pkgs.epsonscan2 ]; + services.printing.drivers = [ + pkgs.epson-escpr + pkgs.epsonscan2 + ]; - boot.kernelParams = [ + boot.kernelParams = [ "nvidia.NVreg_PreserveVideoMemoryAllocations=1" - "nvidia.NVreg_TemporaryFilePath=/var/tmp" + "nvidia.NVreg_TemporaryFilePath=/var/tmp" ]; hardware = { diff --git a/security.nix b/security.nix index d917436..c5e148e 100644 --- a/security.nix +++ b/security.nix @@ -1,4 +1,9 @@ -{ config, lib, pkgs, ... }: +{ + config, + lib, + pkgs, + ... +}: { networking.nftables.enable = true;