feat: introduce treefmt and fmt all

This commit is contained in:
steveej 2024-11-15 10:17:56 +01:00
parent 80250b0179
commit 5d5282a914
213 changed files with 4967 additions and 4423 deletions

View file

@ -1,4 +1,5 @@
{lib, ...}: {
{ lib, ... }:
{
boot.loader.grub.efiSupport = lib.mkForce false;
boot.extraModulePackages = [];
boot.extraModulePackages = [ ];
}

View file

@ -1,5 +1,6 @@
{...}: {
disabledModules = [];
{ ... }:
{
disabledModules = [ ];
imports = [
../../profiles/common/configuration.nix
../../modules/opinionatedDisk.nix

View file

@ -1,17 +1,17 @@
{repoFlake, ...}: let
{ repoFlake, ... }:
let
nodeName = "vmd102066.contaboserver.net";
system = "x86_64-linux";
nodeFlake = repoFlake.inputs.get-flake ./.;
in {
in
{
meta.nodeSpecialArgs.${nodeName} = {
inherit nodeName nodeFlake;
packages' = repoFlake.packages.${system};
};
meta.nodeNixpkgs.${nodeName} = import nodeFlake.inputs.nixpkgs.outPath {
inherit system;
};
meta.nodeNixpkgs.${nodeName} = import nodeFlake.inputs.nixpkgs.outPath { inherit system; };
${nodeName} = {
deployment.targetHost = nodeName;

View file

@ -8,5 +8,5 @@
inputs.nixpkgs.follows = "nixpkgs";
};
outputs = _: {};
outputs = _: { };
}

View file

@ -1,4 +1,5 @@
{...}: let
{ ... }:
let
stage1Modules = [
"aesni_intel"
"kvm-intel"
@ -11,7 +12,8 @@
"virtio"
"scsi_mod"
];
in {
in
{
# TASK: new device
hardware.opinionatedDisk = {
enable = true;

View file

@ -3,7 +3,8 @@
pkgs,
lib,
...
}: {
}:
{
home-manager.users.steveej = import ../../../home-manager/configuration/text-minimal.nix {
inherit pkgs;
};
@ -12,7 +13,12 @@
{
hostName = "localhost";
system = "x86_64-linux";
supportedFeatures = ["kvm" "nixos-test" "big-parallel" "benchmark"];
supportedFeatures = [
"kvm"
"nixos-test"
"big-parallel"
"benchmark"
];
maxJobs = 4;
}
];
@ -22,7 +28,7 @@
hydraURL = "http://localhost:3000"; # externally visible URL
notificationSender = "hydra@${config.networking.hostName}.stefanjunker.de"; # e-mail of hydra service
# a standalone hydra will require you to unset the buildMachinesFiles list to avoid using a nonexistant /etc/nix/machines
buildMachinesFiles = [];
buildMachinesFiles = [ ];
# you will probably also want, otherwise *everything* will be built from scratch
useSubstitutes = true;
};
@ -30,7 +36,13 @@
services.gitlab-runner = {
enable = false;
extraPackages = with pkgs; [bash gitlab-runner nix gitFull git-crypt];
extraPackages = with pkgs; [
bash
gitlab-runner
nix
gitFull
git-crypt
];
concurrent = 2;
checkInterval = 0;
@ -39,7 +51,7 @@
executor = "shell";
runUntagged = true;
registrationConfigFile = "/etc/secrets/gitlab-runner/nix-runner.registration";
tagList = ["nix"];
tagList = [ "nix" ];
};
};
};

View file

@ -4,10 +4,12 @@
config,
nodeName,
...
}: let
}:
let
keys = import ../../../variables/keys.nix;
passwords = import ../../../variables/passwords.crypt.nix;
in {
in
{
networking.firewall.enable = true;
networking.firewall.allowedTCPPorts = [
# iperf3
@ -37,7 +39,7 @@ in {
networking.nat = {
enable = true;
internalInterfaces = ["ve-+"];
internalInterfaces = [ "ve-+" ];
externalInterface = "eth0";
};
@ -45,7 +47,9 @@ in {
# services.kubernetes.roles = ["master" "node"];
# virtualization
virtualisation = {docker.enable = true;};
virtualisation = {
docker.enable = true;
};
services.spice-vdagentd.enable = true;
services.qemuGuest.enable = true;
@ -53,7 +57,7 @@ in {
systemd.services."sshd-status" = {
enable = true;
description = "sshd-status service";
path = [pkgs.systemd];
path = [ pkgs.systemd ];
script = ''
systemctl status sshd | grep -i tasks
'';
@ -73,11 +77,13 @@ in {
# };
# };
nix.gc = {automatic = true;};
nix.gc = {
automatic = true;
};
boot.initrd.network = {
enable = true;
udhcpc.extraArgs = ["-x hostname:${config.networking.hostName}"];
udhcpc.extraArgs = [ "-x hostname:${config.networking.hostName}" ];
ssh = {
enable = true;
@ -104,7 +110,12 @@ in {
inherit config;
hostAddress = "192.168.100.16";
localAddress = "192.168.100.17";
subvolumes = ["mailserver" "webserver" "backup" "syncthing"];
subvolumes = [
"mailserver"
"webserver"
"backup"
"syncthing"
];
};
bkpTarget = import ../../containers/backup-target.nix {