mirror of
https://github.com/Stunkymonkey/nixos.git
synced 2025-05-24 01:44:40 +02:00
treewide: fmt
This commit is contained in:
parent
330abe53d2
commit
ea37c7b836
95 changed files with 1162 additions and 779 deletions
|
@ -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" = { };
|
||||
|
|
|
@ -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";
|
||||
};
|
||||
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue