[treewide] reformat all files with nixfmt-rfc-style

This commit is contained in:
Trolli Schmittlauch 2024-03-16 17:18:20 +01:00
parent 3a31c21ae2
commit 2bdff39416
17 changed files with 653 additions and 531 deletions

View file

@ -1,4 +1,10 @@
{ config, lib, pkgs, system, ...}:
{
config,
lib,
pkgs,
system,
...
}:
let
unstable = config.inputInjection.flake-inputs.nixos-unstable.legacyPackages.${system};
in
@ -22,7 +28,7 @@ in
# try newer kernels
boot.kernelPackages = pkgs.linuxPackages_latest;
boot.kernelParams = [
boot.kernelParams = [
# temporary workaround for white flickering graphics artefacts
"amdgpu.sg_display=0"
# powersave
@ -65,4 +71,3 @@ in
pkgs.framework-tool
];
}

View file

@ -1,18 +1,27 @@
# 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")
];
config,
lib,
pkgs,
modulesPath,
...
}:
{
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "thunderbolt" "usb_storage" "sd_mod" ];
boot.initrd.availableKernelModules = [
"nvme"
"xhci_pci"
"thunderbolt"
"usb_storage"
"sd_mod"
];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
# 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

View file

@ -1,17 +1,25 @@
{ config, lib, pkgs, ... }:
{
config,
lib,
pkgs,
...
}:
let
fsOptions = [ "noatime" "ssd" "compress=zstd" ];
fsOptions = [
"noatime"
"ssd"
"compress=zstd"
];
in
{
boot.initrd.luks = {
devices =
# allow discards on all devices
builtins.mapAttrs (name: val: val // {allowDiscards = true;})
{
builtins.mapAttrs (name: val: val // { allowDiscards = true; }) {
"system".device = "/dev/disk/by-uuid/1838cdc5-9b0b-4c46-9f23-9465549eeb92";
"cryptswap".device = "/dev/disk/by-uuid/ded7d649-ab3a-42ee-ae4a-f8c4ba029e9c";
"cryptswap".device = "/dev/disk/by-uuid/ded7d649-ab3a-42ee-ae4a-f8c4ba029e9c";
};
reusePassphrases = true;
reusePassphrases = true;
};
fileSystems = {
@ -37,7 +45,10 @@ in
services.fstrim.enable = true;
services.btrfs.autoScrub = {
enable = true;
fileSystems = [ "/" "/home" ];
fileSystems = [
"/"
"/home"
];
};
boot.tmp.useTmpfs = true;

View file

@ -1,7 +1,5 @@
{
swapDevices =
[ { device = "/dev/disk/by-uuid/24c47f3d-0d3e-4575-92a2-174b5a6b6086"; }
];
swapDevices = [ { device = "/dev/disk/by-uuid/24c47f3d-0d3e-4575-92a2-174b5a6b6086"; } ];
zramSwap = {
enable = true;

View file

@ -1,4 +1,9 @@
{ config, lib, pkgs, ...}:
{
config,
lib,
pkgs,
...
}:
{
imports = [
../../common
@ -10,7 +15,6 @@
./secureboot.nix
];
hardware.trackpoint = {
enable = true;
sensitivity = 180;
@ -19,7 +23,6 @@
networking.hostName = "thinknix";
# This value determines the NixOS release with which your system is to be
# compatible, in order to avoid breaking some software such as database
# servers. You should change this only after NixOS release notes say you

View file

@ -1,20 +1,28 @@
{ config, lib, pkgs, modulesPath, ... }:
{
config,
lib,
pkgs,
modulesPath,
...
}:
{
imports =
[
(modulesPath + "/installer/scan/not-detected.nix")
];
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
boot.initrd.availableKernelModules = [
"xhci_pci"
"ehci_pci"
"ahci"
"usb_storage"
"sd_mod"
"rtsx_pci_sdmmc"
];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [];
boot.extraModulePackages = [ ];
nix.settings.max-jobs = lib.mkDefault 4;
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
# modesetting is always better than intel (legacy)
services.xserver.videoDrivers = [ "modesetting" ];
}

View file

@ -1,11 +1,14 @@
{ config, lib, pkgs, ...}:
{
{
config,
lib,
pkgs,
...
}:
{
boot.loader.efi.canTouchEfiVariables = true;
# UEFI secure boot
environment.systemPackages = [
pkgs.sbctl
];
environment.systemPackages = [ pkgs.sbctl ];
# Lanzaboote currently replaces the systemd-boot module.
# This setting is usually set to true in configuration.nix
# generated at installation time. So we force it to false
@ -16,5 +19,4 @@
enable = true;
pkiBundle = "/etc/secureboot";
};
}

View file

@ -1,19 +1,28 @@
{ config, lib, pkgs, ...}:
{
config,
lib,
pkgs,
...
}:
let
fsOptions = [ "noatime" "ssd" "space_cache" "compress=zstd" ];
fsOptions = [
"noatime"
"ssd"
"space_cache"
"compress=zstd"
];
in
{
# encrypted partitions
boot.initrd.luks = {
devices =
# allow discards on all devices
builtins.mapAttrs (name: val: val // {allowDiscards = true;})
{
builtins.mapAttrs (name: val: val // { allowDiscards = true; }) {
"system".device = "/dev/disk/by-uuid/85154131-b2a8-4ef5-9d74-47429cb267ef";
"cryptswap".device = "/dev/disk/by-uuid/ac586df6-6332-4809-beb1-f51906a2adaa";
"ssd2".device = "/dev/disk/by-uuid/cadd4e1f-3642-4faa-8d4e-37dd85465df1";
};
reusePassphrases = true;
reusePassphrases = true;
};
fileSystems = {
@ -57,16 +66,20 @@ in
services.fstrim.enable = true;
services.btrfs.autoScrub = {
enable = true;
fileSystems = [ "/" "/home" ];
fileSystems = [
"/"
"/home"
];
};
boot.tmp.useTmpfs = true;
fileSystems."/tmp".fsType = "tmpfs";
services.smartd =
{
enable = true;
devices = [{ device = "/dev/sda"; } { device = "/dev/sdb"; }];
};
services.smartd = {
enable = true;
devices = [
{ device = "/dev/sda"; }
{ device = "/dev/sdb"; }
];
};
}

View file

@ -1,7 +1,5 @@
{
swapDevices = [
{ device = "/dev/disk/by-uuid/bf928178-4e92-4e7e-8df2-18fbd658eecf"; }
];
swapDevices = [ { device = "/dev/disk/by-uuid/bf928178-4e92-4e7e-8df2-18fbd658eecf"; } ];
zramSwap = {
enable = true;