treewide: fmt

This commit is contained in:
Felix Buehler 2024-07-28 21:08:02 +02:00
parent 330abe53d2
commit ea37c7b836
95 changed files with 1162 additions and 779 deletions

View file

@ -1,9 +1,11 @@
# based on: https://github.com/Mic92/dotfiles/blob/main/nixos/images/base-config.nix
{ lib
, pkgs
, config
, ...
}: {
{
lib,
pkgs,
config,
...
}:
{
system.stateVersion = config.system.nixos.version;
networking = {
@ -23,7 +25,8 @@
network.enable = true;
network.networks =
lib.mapAttrs'
(num: _:
(
num: _:
lib.nameValuePair "eth${num}" {
matchConfig.Name = "eth${num}";
networkConfig = {
@ -40,7 +43,8 @@
RouteMetric = 512;
};
ipv6AcceptRAConfig.Token = "::521a:c5ff:fefe:65d9";
})
}
)
{
"0" = { };
"1" = { };

View file

@ -2,25 +2,19 @@
let
inherit (self.inputs) nixos-generators;
defaultModule = {
imports = [
./base-config.nix
];
imports = [ ./base-config.nix ];
_module.args.inputs = self.inputs;
};
in
{
perSystem =
{ pkgs
, ...
}:
{ pkgs, ... }:
{
packages = {
install-iso = nixos-generators.nixosGenerate {
system = "x86_64-linux";
inherit pkgs;
modules = [
defaultModule
];
modules = [ defaultModule ];
format = "install-iso";
};

View file

@ -1,6 +1,7 @@
# nix build .#install-sd-aarch64 --system aarch64-linux
# zstd -vdcfT6 /nix/store/...-aarch64-linux.img/sd-image/...-aarch64-linux.img.zst | dd of=/dev/sdX status=progress bs=64K
{ ... }: {
{ ... }:
{
nixpkgs.localSystem.system = "aarch64-linux";
imports = [
<nixpkgs/nixos/modules/installer/sd-card/sd-image-aarch64.nix>

View file

@ -2,7 +2,13 @@
# nix build -f yubikey-installer.nix nixos-yubikey
# sudo cp -v installer/iso/*.iso /dev/sdb; sync
let
configuration = { config, lib, pkgs, ... }:
configuration =
{
config,
lib,
pkgs,
...
}:
with pkgs;
let
src = fetchGit "https://github.com/drduh/YubiKey-Guide";
@ -54,12 +60,17 @@ let
yubikey-guide = symlinkJoin {
name = "yubikey-guide";
paths = [ view-yubikey-guide shortcut ];
paths = [
view-yubikey-guide
shortcut
];
};
in
{
nixpkgs.config = { allowBroken = true; };
nixpkgs.config = {
allowBroken = true;
};
isoImage.isoBaseName = lib.mkForce "nixos-yubikey";
# Uncomment this to disable compression and speed up image creation time
@ -72,7 +83,9 @@ let
kernelParams = [ "copytoram" ];
# Secure defaults
tmp.cleanOnBoot = true;
kernel.sysctl = { "kernel.unprivileged_bpf_disabled" = 1; };
kernel.sysctl = {
"kernel.unprivileged_bpf_disabled" = 1;
};
};
services.pcscd.enable = true;