chore: nixfmt *

This commit is contained in:
steveej 2022-10-31 11:04:38 +01:00
parent dc761a5271
commit d039179898
161 changed files with 2688 additions and 3024 deletions

View file

@ -1,6 +1,4 @@
{ pkgs
, ...
}:
{ pkgs, ... }:
{
boot.kernelPackages = pkgs.linuxPackages;
@ -16,9 +14,6 @@
boot.tmpOnTmpfs = true;
# Workaround for nm-pptp to enforce module load
boot.kernelModules = [
"nf_conntrack_proto_gre"
"nf_conntrack_pptp"
];
boot.kernelModules = [ "nf_conntrack_proto_gre" "nf_conntrack_pptp" ];
}

View file

@ -3,11 +3,5 @@
{
nixpkgs.overlays = builtins.attrValues (import ../../../overlays);
imports = [
./boot.nix
./pkg.nix
./user.nix
./system.nix
./hw.nix
];
imports = [ ./boot.nix ./pkg.nix ./user.nix ./system.nix ./hw.nix ];
}

View file

@ -3,12 +3,6 @@
{
hardware.trackpoint.emulateWheel = true;
boot.initrd.availableKernelModules = [
"xhci_pci"
"ahci"
"usb_storage"
"sd_mod"
"rtsx_pci_sdmmc"
"cryptd"
];
boot.initrd.availableKernelModules =
[ "xhci_pci" "ahci" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" "cryptd" ];
}

View file

@ -1,19 +1,17 @@
{ config
, pkgs
, ... }:
{ config, pkgs, ... }:
{
imports = [
"${<home-manager-module>}/nixos"
];
home-manager.users.root = import ../../../home-manager/configuration/text-minimal.nix { inherit pkgs; };
imports = [ "${<home-manager-module>}/nixos" ];
home-manager.users.root =
import ../../../home-manager/configuration/text-minimal.nix {
inherit pkgs;
};
nixpkgs.config = {
allowBroken = false;
allowUnfree = true;
packageOverrides = pkgs: with pkgs; {
};
packageOverrides = pkgs: with pkgs; { };
};
environment.systemPackages = with pkgs; [

View file

@ -1,8 +1,4 @@
{ config
, pkgs
, lib
, ...
}:
{ config, pkgs, lib, ... }:
{
nix.binaryCachePublicKeys = [
@ -30,20 +26,14 @@
}
'';
environment.variables = {
NIX_PATH = lib.mkForce pkgs.nixPath;
};
environment.variables = { NIX_PATH = lib.mkForce pkgs.nixPath; };
# Fonts, I18N, Date ...
fonts.fonts = [
pkgs.corefonts
];
fonts.fonts = [ pkgs.corefonts ];
console.font = "lat9w-16";
i18n = {
defaultLocale = "en_US.UTF-8";
};
i18n = { defaultLocale = "en_US.UTF-8"; };
time.timeZone = "Europe/Berlin";
services.gpm.enable = true;

View file

@ -1,6 +1,4 @@
{ config
, pkgs
, ... }:
{ config, pkgs, ... }:
let
passwords = import ../../../variables/passwords.crypt.nix;
@ -9,9 +7,7 @@ in {
users.mutableUsers = false;
users.extraUsers.root = mkRoot { };
users.extraUsers.steveej = mkUser {
uid = 1000;
};
users.extraUsers.steveej = mkUser { uid = 1000; };
security.pam.u2f.enable = true;
security.pam.services.steveej.u2fAuth = true;

View file

@ -4,11 +4,7 @@
nixpkgs.overlays = builtins.attrValues (import ../../../overlays);
networking.useHostResolvConf = false;
services.resolved = {
enable = true;
};
services.resolved = { enable = true; };
imports = [
../../modules/ddclient-ovh.nix
];
imports = [ ../../modules/ddclient-ovh.nix ];
}

View file

@ -1,7 +1,3 @@
{ lib, ... }:
{ lib
, ...
}:
{
}
{ }

View file

@ -1,11 +1,5 @@
{ pkgs
, ...
}:
{ pkgs, ... }:
{
imports = [
./boot.nix
./system.nix
./hw.nix
];
imports = [ ./boot.nix ./system.nix ./hw.nix ];
}

View file

@ -1,6 +1,4 @@
{
...
}:
{ ... }:
{
hardware.enableAllFirmware = true;

View file

@ -1,6 +1,4 @@
{ pkgs
, ...
}:
{ pkgs, ... }:
{
networking.networkmanager = {
@ -30,9 +28,7 @@
};
};
# required for running blueman-applet in user sessions
services.dbus.packages = with pkgs; [
blueman
];
services.dbus.packages = with pkgs; [ blueman ];
services.blueman.enable = true;
services.xserver = {
@ -40,7 +36,16 @@
libinput.enable = true;
libinput.touchpad.naturalScrolling = true;
videoDrivers = [ "qxl" "modesetting" "ati" "cirrus" "intel" "vesa" "vmware" "modesetting" ];
videoDrivers = [
"qxl"
"modesetting"
"ati"
"cirrus"
"intel"
"vesa"
"vmware"
"modesetting"
];
layout = "us";
xkbVariant = "altgr-intl";
xkbOptions = "nodeadkeys";
@ -63,11 +68,11 @@
lightdm = {
enable = true;
background = "${pkgs.nixos-artwork.wallpapers.simple-blue}/share/artwork/gnome/nix-wallpaper-simple-blue.png";
background =
"${pkgs.nixos-artwork.wallpapers.simple-blue}/share/artwork/gnome/nix-wallpaper-simple-blue.png";
};
sessionCommands = ''
'';
sessionCommands = "";
};
};
@ -97,11 +102,8 @@
};
# More Services
services.udev.packages = [
pkgs.libu2f-host
pkgs.yubikey-personalization
pkgs.android-udev-rules
];
services.udev.packages =
[ pkgs.libu2f-host pkgs.yubikey-personalization pkgs.android-udev-rules ];
services.udev.extraRules = ''
# OnePlusOne
ATTR{idVendor}=="05c6", ATTR{idProduct}=="6764", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1", TAG+="uaccess"
@ -116,7 +118,6 @@
SUBSYSTEM=="usb", ATTR{idVendor}=="1050", ATTR{idProduct}=="0406", ENV{ID_SECURITY_TOKEN}="1", GROUP="wheel"
'';
services.samba.enable = true;
services.samba.extraConfig = ''
client max protocol = SMB3

View file

@ -1,52 +1,63 @@
# This module defines a small NixOS installation CD. It does not
# contain any graphical stuff.
{config, pkgs, lib, ...}:
{ config, pkgs, lib, ... }:
let nixos-init-script = ''
#!${pkgs.stdenv.shell}
let
nixos-init-script = ''
#!${pkgs.stdenv.shell}
export HOME=/root
export PATH=${pkgs.lib.makeBinPath [
config.nix.package pkgs.systemd pkgs.gnugrep pkgs.gnused config.system.build.nixos-rebuild
config.system.build.nixos-install pkgs.utillinux pkgs.e2fsprogs pkgs.coreutils pkgs.hdparm
]}:$PATH
export NIX_PATH=/nix/var/nix/profiles/per-user/root/channels/nixos:nixos-config=/etc/nixos/configuration.nix:/nix/var/nix/profiles/per-user/root/channels
export HOME=/root
export PATH=${
pkgs.lib.makeBinPath [
config.nix.package
pkgs.systemd
pkgs.gnugrep
pkgs.gnused
config.system.build.nixos-rebuild
config.system.build.nixos-install
pkgs.utillinux
pkgs.e2fsprogs
pkgs.coreutils
pkgs.hdparm
]
}:$PATH
export NIX_PATH=/nix/var/nix/profiles/per-user/root/channels/nixos:nixos-config=/etc/nixos/configuration.nix:/nix/var/nix/profiles/per-user/root/channels
set -xe
set -xe
fdisk -w always -W always /dev/vda <<EOF
g
n
1
fdisk -w always -W always /dev/vda <<EOF
g
n
1
+8M
n
2
+8M
n
2
+1G
n
3
+1G
n
3
t
1
4
w
EOF
lsblk
t
1
4
w
EOF
lsblk
mkfs.ext4 -m0 -L nixos /dev/vda3
mount -L nixos /mnt
mkswap -L swap /dev/vda2
swapon -L swap
mkfs.ext4 -m0 -L nixos /dev/vda3
mount -L nixos /mnt
mkswap -L swap /dev/vda2
swapon -L swap
mkdir /mnt/etc/nixos -p
cp /dev/vdb /mnt/etc/nixos/configuration.nix
mkdir /mnt/etc/nixos -p
cp /dev/vdb /mnt/etc/nixos/configuration.nix
nix-channel --update
nixos-install
reboot
'';
nix-channel --update
nixos-install
reboot
'';
in {
imports = [
<nixpkgs/nixos/modules/installer/cd-dvd/installation-cd-minimal-new-kernel.nix>
@ -56,15 +67,17 @@ in {
# <nixpkgs/nixos/modules/installer/cd-dvd/channel.nix>
];
isoImage.isoName = lib.mkForce "${config.isoImage.isoBaseName}-${pkgs.stdenv.hostPlatform.system}.iso";
isoImage.isoName = lib.mkForce
"${config.isoImage.isoBaseName}-${pkgs.stdenv.hostPlatform.system}.iso";
boot.loader.timeout = lib.mkForce 0;
boot.postBootCommands = ''
'';
boot.postBootCommands = "";
environment.systemPackages = [];
environment.systemPackages = [ ];
users.users.root = {
openssh.authorizedKeys.keys = [ "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC4RFtHz0sE5y0AyZZm/tH7bBBgsx55gLPt5tGsl9yZlOzih6n4qbJE/9OOdwnOY2AHRe2lrlTekbW5ewWSBBCbiBE3Vux86sLgy7LM9zoKaNC+E3hmxaoS9SExn0BTkb3kNlOcj2k6UyJhkZWEsqVMV5C21R8EWmMlLY/qm3AxptNjOyzKDwNX2zlHZ5IyjgzO4ZjIxjawmJlUrVEn7/m+M7qK3I1Tyg/ZvDSfmxVJS97sVzseYE0rVwLEWJQOnHh0wnfl27smr2McAB7Cy6sxKyPKvEGyXbNqqb8fqk4okZlRRxhq/XkKlC7IZr+uqYxlL4HN8vjkTRNlgenDUSVT cardno:000604870382" ];
openssh.authorizedKeys.keys = [
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC4RFtHz0sE5y0AyZZm/tH7bBBgsx55gLPt5tGsl9yZlOzih6n4qbJE/9OOdwnOY2AHRe2lrlTekbW5ewWSBBCbiBE3Vux86sLgy7LM9zoKaNC+E3hmxaoS9SExn0BTkb3kNlOcj2k6UyJhkZWEsqVMV5C21R8EWmMlLY/qm3AxptNjOyzKDwNX2zlHZ5IyjgzO4ZjIxjawmJlUrVEn7/m+M7qK3I1Tyg/ZvDSfmxVJS97sVzseYE0rVwLEWJQOnHh0wnfl27smr2McAB7Cy6sxKyPKvEGyXbNqqb8fqk4okZlRRxhq/XkKlC7IZr+uqYxlL4HN8vjkTRNlgenDUSVT cardno:000604870382"
];
};
services.gpm.enable = true;
@ -74,13 +87,14 @@ in {
script = nixos-init-script;
path = with pkgs; [ ];
description = "Initialize /dev/vda from configuration.nix found at /dev/vdb";
description =
"Initialize /dev/vda from configuration.nix found at /dev/vdb";
enable = true;
wantedBy = [ "multi-user.target" ];
after = [ "multi-user.target" ];
requires = [ "network-online.target" ];
restartIfChanged = false;
unitConfig.X-StopOnRemoval = false;

View file

@ -47,10 +47,10 @@
'';
environment.etc."cni/net.d/00-loopback.conf".text = ''
{
"cniVersion": "0.3.0",
"type": "loopback"
}
{
"cniVersion": "0.3.0",
"type": "loopback"
}
'';
environment.etc."cni/net.d/87-podman-bridge.conflist".text = ''
@ -176,5 +176,5 @@
runc = [
"${pkgs.runc}/bin/runc"
]
'';
'';
}

View file

@ -1,9 +1,7 @@
{ lib
, ...
}:
{ lib, ... }:
{
boot.loader.grub.efiInstallAsRemovable = lib.mkForce true;
boot.loader.efi.canTouchEfiVariables = lib.mkForce false;
boot.loader.efi.canTouchEfiVariables = lib.mkForce false;
boot.extraModulePackages = [ ];
}

View file

@ -1,7 +1,7 @@
{ ... }:
{
imports = [
imports = [
../../modules/opinionatedDisk.nix
./pkg.nix

View file

@ -1,7 +1,8 @@
{ pkgs
, ...
}:
{ pkgs, ... }:
{
home-manager.users.steveej = import ../../../home-manager/configuration/graphical-removable.nix { inherit pkgs; };
home-manager.users.steveej =
import ../../../home-manager/configuration/graphical-removable.nix {
inherit pkgs;
};
}

View file

@ -1,12 +1,9 @@
{ config, lib, pkgs, ... }:
let
in {
services.printing = {
enable = false;
};
services.printing = { enable = false; };
services.spice-vdagentd.enable = true;
services.qemuGuest.enable = true;