feat: use nixfmt

This commit is contained in:
2024-03-26 17:44:14 +01:00
parent 59e6ed992a
commit 3ad3491970
29 changed files with 444 additions and 558 deletions

View File

@@ -1,19 +1,11 @@
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help).
{
config,
pkgs,
username,
...
}: {
imports = [
./nvidia.nix
./hardware-configuration.nix
];
{ config, pkgs, username, ... }: {
imports = [ ./nvidia.nix ./hardware-configuration.nix ];
nix = {
settings.experimental-features = ["nix-command" "flakes"];
settings.experimental-features = [ "nix-command" "flakes" ];
gc = {
automatic = true;
randomizedDelaySec = "14m";
@@ -35,7 +27,7 @@
};
efi.canTouchEfiVariables = true;
};
supportedFilesystems = ["ntfs"];
supportedFilesystems = [ "ntfs" ];
# Silent Boot
kernelParams = [
@@ -52,8 +44,8 @@
initrd.verbose = false;
# Virtual Camera/Mic
kernelModules = ["v4l2loopback" "snd-aloop" "sg"];
extraModulePackages = with config.boot.kernelPackages; [v4l2loopback.out];
kernelModules = [ "v4l2loopback" "snd-aloop" "sg" ];
extraModulePackages = with config.boot.kernelPackages; [ v4l2loopback.out ];
extraModprobeConfig = ''
options v4l2loopback exclusive_caps=1 card_label="Virtual Camera"
blacklist i2c_nvidia_gpu
@@ -79,7 +71,7 @@
hardware.sane = {
enable = true;
extraBackends = [pkgs.sane-airscan];
extraBackends = [ pkgs.sane-airscan ];
};
services.printing.enable = true;
services.avahi = {
@@ -91,17 +83,14 @@
services.dbus.enable = true;
xdg.portal = {
enable = true;
extraPortals = [
pkgs.xdg-desktop-portal-gtk
pkgs.xdg-desktop-portal-kde
];
extraPortals = [ pkgs.xdg-desktop-portal-gtk pkgs.xdg-desktop-portal-kde ];
};
time.timeZone = "Europe/Berlin";
i18n = {
inputMethod = {
enabled = "ibus";
ibus.engines = with pkgs.ibus-engines; [anthy];
ibus.engines = with pkgs.ibus-engines; [ anthy ];
};
defaultLocale = "en_GB.UTF-8";
extraLocaleSettings = {
@@ -123,7 +112,7 @@
layout = "cc1-thea";
extraLayouts.cc1-thea = {
description = "A CC1 optimized layout";
languages = ["eng" "ger"];
languages = [ "eng" "ger" ];
symbolsFile = ../../modules/cc1-thea;
};
};
@@ -133,14 +122,11 @@
# nautilus on non-gnome
services.gvfs.enable = true;
# fix pinentry on non-gnome
services.dbus.packages = with pkgs; [gcr];
services.dbus.packages = with pkgs; [ gcr ];
services.gnome.gnome-online-accounts.enable = true;
services.gnome.evolution-data-server.enable = true;
services.udev.packages = with pkgs; [
oversteer
android-udev-rules
];
services.udev.packages = with pkgs; [ oversteer android-udev-rules ];
virtualisation.docker.rootless = {
enable = true;
@@ -149,7 +135,7 @@
# Define a user account. Don't forget to set a password with passwd.
services.getty.autologinUser = "${username}";
services.getty.extraArgs = ["--noclear" "--noissue" "--nonewline"];
services.getty.extraArgs = [ "--noclear" "--noissue" "--nonewline" ];
services.getty.loginOptions = "-p -f -- \\u"; # preserve environment
programs.hyprland.enable = true;
programs.fish.enable = true;
@@ -160,7 +146,19 @@
users.defaultUserShell = pkgs.fish;
users.users.${username} = {
isNormalUser = true;
extraGroups = ["networkmanager" "wheel" "audio" "video" "dialout" "plugdev" "scanner" "lp" "input" "adbusers" "cdrom"];
extraGroups = [
"networkmanager"
"wheel"
"audio"
"video"
"dialout"
"plugdev"
"scanner"
"lp"
"input"
"adbusers"
"cdrom"
];
};
# List packages installed in system profile. To search, run:
@@ -199,18 +197,18 @@
noto-fonts-cjk
noto-fonts-emoji
fira-code
(nerdfonts.override {fonts = ["FiraCode" "JetBrainsMono" "Noto" "NerdFontsSymbolsOnly"];})
(nerdfonts.override {
fonts = [ "FiraCode" "JetBrainsMono" "Noto" "NerdFontsSymbolsOnly" ];
})
];
fontconfig = {
defaultFonts = {
monospace = ["FiraCode Nerd Font"];
sansSerif = ["Noto Sans Nerd Font"];
monospace = [ "FiraCode Nerd Font" ];
sansSerif = [ "Noto Sans Nerd Font" ];
};
localConf =
/*
xml
*/
# xml
''
<match target="font">
<test name="family" compare="contains">
@@ -237,27 +235,25 @@
networking = {
firewall = {
allowedTCPPorts = [8100 5037 5173];
allowedUDPPorts = [50765];
allowedTCPPorts = [ 8100 5037 5173 ];
allowedUDPPorts = [ 50765 ];
};
networkmanager = {
enable = true;
plugins = with pkgs; [
networkmanager-openconnect
];
plugins = with pkgs; [ networkmanager-openconnect ];
};
hosts = {
"192.168.0.219" = ["kookaborrow"];
"192.168.0.1" = ["router"];
"192.168.0.219" = [ "kookaborrow" ];
"192.168.0.1" = [ "router" ];
};
};
fileSystems."/mnt/media" = {
device = "kookaborrow:/media";
fsType = "nfs";
options = ["x-systemd-automount" "noauto"];
options = [ "x-systemd-automount" "noauto" ];
};
fileSystems."/run/media/theaninova/heart-drive" = {

View File

@@ -1,21 +1,14 @@
# 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" "ahci" "usb_storage" "usbhid" "sd_mod"];
boot.initrd.kernelModules = [];
boot.kernelModules = ["kvm-amd"];
boot.extraModulePackages = [];
boot.initrd.availableKernelModules =
[ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
fileSystems."/" = {
device = "/dev/disk/by-uuid/637f852b-e5bc-4bdb-a75e-886680bd52d2";
@@ -27,9 +20,8 @@
fsType = "vfat";
};
swapDevices = [
{device = "/dev/disk/by-uuid/b09fbba2-c97a-41bc-a3cd-8204e30204f8";}
];
swapDevices =
[{ device = "/dev/disk/by-uuid/b09fbba2-c97a-41bc-a3cd-8204e30204f8"; }];
# 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
@@ -39,5 +31,6 @@
# networking.interfaces.eno1.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,23 +1,16 @@
{
config,
lib,
pkgs,
...
}: {
{ config, lib, pkgs, ... }: {
hardware.opengl = {
enable = true;
driSupport = true;
driSupport32Bit = true;
extraPackages = with pkgs; [
libvdpau-va-gl
nvidia-vaapi-driver
];
extraPackages = with pkgs; [ libvdpau-va-gl nvidia-vaapi-driver ];
};
services.xserver.videoDrivers = ["nvidia"];
services.xserver.videoDrivers = [ "nvidia" ];
boot.kernelModules = ["nvidia" "nvidia_modeset" "nvidia_uvm" "nvidia_drm"];
boot.initrd.kernelModules = ["nvidia" "nvidia_modeset" "nvidia_uvm" "nvidia_drm"];
boot.kernelModules = [ "nvidia" "nvidia_modeset" "nvidia_uvm" "nvidia_drm" ];
boot.initrd.kernelModules =
[ "nvidia" "nvidia_modeset" "nvidia_uvm" "nvidia_drm" ];
hardware.nvidia = {
modesetting.enable = true;