treewide: format with nixfmt

This commit is contained in:
insects 2024-09-22 10:56:40 +02:00
parent 303e982a8e
commit 26ad72592a
47 changed files with 380 additions and 725 deletions

View file

@ -1,5 +1,4 @@
{ pkgs, ... }:
{
{ pkgs, ... }: {
security.rtkit.enable = true;
services.pipewire = {
enable = true;
@ -8,7 +7,5 @@
pulse.enable = true;
wireplumber.enable = true;
};
environment.systemPackages = with pkgs; [
pavucontrol
];
environment.systemPackages = with pkgs; [ pavucontrol ];
}

View file

@ -1,6 +1 @@
{ ... }:
{
hardware.bluetooth = {
enable = true;
};
}
{ ... }: { hardware.bluetooth = { enable = true; }; }

View file

@ -1,11 +1,5 @@
{ lib, pkgs, ... }:
{
imports = [
./audio.nix
./tailscale.nix
./bluetooth.nix
./printing.nix
];
{ lib, pkgs, ... }: {
imports = [ ./audio.nix ./tailscale.nix ./bluetooth.nix ./printing.nix ];
# use nix version 2.22
nix = {
@ -13,11 +7,7 @@
settings = {
auto-optimise-store = lib.mkDefault true;
experimental-features = [
"nix-command"
"flakes"
"ca-derivations"
];
experimental-features = [ "nix-command" "flakes" "ca-derivations" ];
};
};
@ -33,9 +23,7 @@
# use a tmpfs
boot.tmp.useTmpfs = true;
systemd.services.nix-daemon = {
environment.TMPDIR = "/var/tmp";
};
systemd.services.nix-daemon = { environment.TMPDIR = "/var/tmp"; };
# use fstrim for ssds
services.fstrim.enable = true;

View file

@ -1,5 +1,4 @@
{ ... }:
{
{ ... }: {
services.printing.enable = true;
services.avahi = {

View file

@ -1,6 +1 @@
{ ... }:
{
services.tailscale = {
enable = true;
};
}
{ ... }: { services.tailscale = { enable = true; }; }

View file

@ -1,7 +1 @@
{ ... }:
{
imports = [
./steam.nix
./flatpak.nix
];
}
{ ... }: { imports = [ ./steam.nix ./flatpak.nix ]; }

View file

@ -1,4 +1 @@
{ ... }:
{
services.flatpak.enable = true;
}
{ ... }: { services.flatpak.enable = true; }

View file

@ -1,5 +1,4 @@
{ ... }:
{
{ ... }: {
security.pam.services.swaylock = { };
services.blueman.enable = true;
}

View file

@ -1,5 +1,4 @@
{ pkgs, ... }:
{
{ pkgs, ... }: {
services.displayManager.sddm.enable = true;
services.displayManager.sddm.wayland.enable = true;
services.desktopManager.plasma6.enable = true;

View file

@ -1,5 +1,4 @@
{ ... }:
{
{ ... }: {
programs.steam = {
enable = true;
remotePlay.openFirewall = true;

View file

@ -1,10 +1,4 @@
{ inputs
, lib
, config
, pkgs
, ...
}:
{
{ inputs, lib, config, pkgs, ... }: {
imports = [
../common
./hardware-configuration.nix
@ -12,27 +6,20 @@
../desktop/plasma.nix
];
nixpkgs = {
config = {
allowUnfree = true;
nixpkgs = { config = { allowUnfree = true; }; };
nix = let flakeInputs = lib.filterAttrs (_: lib.isType "flake") inputs;
in {
settings = {
flake-registry = "";
nix-path = config.nix.nixPath;
};
channel.enable = false;
registry = lib.mapAttrs (_: flake: { inherit flake; }) flakeInputs;
nixPath = lib.mapAttrsToList (n: _: "${n}=flake:${n}") flakeInputs;
};
nix =
let
flakeInputs = lib.filterAttrs (_: lib.isType "flake") inputs;
in
{
settings = {
flake-registry = "";
nix-path = config.nix.nixPath;
};
channel.enable = false;
registry = lib.mapAttrs (_: flake: { inherit flake; }) flakeInputs;
nixPath = lib.mapAttrsToList (n: _: "${n}=flake:${n}") flakeInputs;
};
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
@ -64,17 +51,12 @@
lu = {
shell = pkgs.fish;
isNormalUser = true;
extraGroups = [
"wheel"
"storage"
];
extraGroups = [ "wheel" "storage" ];
};
};
# network stuff
networking.networkmanager = {
enable = true;
};
networking.networkmanager = { enable = true; };
# fish shell
programs.fish = {
@ -89,9 +71,9 @@
# enable ppd specifically for the framework
services.power-profiles-daemon.enable = true;
boot.kernelParams =
lib.optionals (lib.versionOlder config.boot.kernelPackages.kernel.version "6.8")
[ "rtc_cmos.use_acpi_alarm=1" ];
boot.kernelParams = lib.optionals
(lib.versionOlder config.boot.kernelPackages.kernel.version "6.8")
[ "rtc_cmos.use_acpi_alarm=1" ];
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
system.stateVersion = "24.05";

View file

@ -1,25 +1,13 @@
# 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,
modulesPath,
...
}:
{ config, lib, modulesPath, ... }:
{
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
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 = [ ];
@ -32,10 +20,7 @@
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/6157-ADC8";
fsType = "vfat";
options = [
"fmask=0022"
"dmask=0022"
];
options = [ "fmask=0022" "dmask=0022" ];
};
swapDevices = [ ];
@ -48,5 +33,6 @@
# networking.interfaces.wlp1s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
hardware.cpu.amd.updateMicrocode =
lib.mkDefault config.hardware.enableRedistributableFirmware;
}

View file

@ -1,15 +1,10 @@
{ ... }:
{
{ ... }: {
services.postgresql = {
enable = true;
ensureUsers = [
{
name = "lu";
ensureClauses = {
superuser = true;
};
}
];
ensureUsers = [{
name = "lu";
ensureClauses = { superuser = true; };
}];
};
}

View file

@ -1,27 +1,13 @@
# 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.initrd.availableKernelModules = [
"xhci_pci"
"ahci"
"nvme"
"usb_storage"
"usbhid"
"sd_mod"
];
boot.initrd.availableKernelModules =
[ "xhci_pci" "ahci" "nvme" "usb_storage" "usbhid" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
@ -34,15 +20,11 @@
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/5704-1642";
fsType = "vfat";
options = [
"fmask=0077"
"dmask=0077"
];
options = [ "fmask=0077" "dmask=0077" ];
};
swapDevices = [
{ device = "/dev/disk/by-uuid/d52209e9-f625-46a9-800a-88598ed6fcd5"; }
];
swapDevices =
[{ device = "/dev/disk/by-uuid/d52209e9-f625-46a9-800a-88598ed6fcd5"; }];
# 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
@ -53,5 +35,6 @@
# networking.interfaces.wlp6s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
hardware.cpu.intel.updateMicrocode =
lib.mkDefault config.hardware.enableRedistributableFirmware;
}