mirror of
https://github.com/Swarsel/.dotfiles.git
synced 2026-04-14 21:29:12 +02:00
wip: continue migration
This commit is contained in:
parent
7ce27d5d2f
commit
fa9bd32b0b
129 changed files with 6252 additions and 106 deletions
21
hosds/nixos/x86_64-linux/pyramid/default.nix
Normal file
21
hosds/nixos/x86_64-linux/pyramid/default.nix
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
{ self, inputs, ... }:
|
||||
{
|
||||
|
||||
imports = [
|
||||
inputs.nixos-hardware.nixosModules.framework-16-7040-amd
|
||||
|
||||
./disk-config.nix
|
||||
./hardware-configuration.nix
|
||||
|
||||
# "${self}/modules-clone/nixos/optional/amdcpu.nix"
|
||||
# "${self}/modules-clone/nixos/optional/amdgpu.nix"
|
||||
# "${self}/modules-clone/nixos/optional/framework.nix"
|
||||
# "${self}/modules-clone/nixos/optional/gaming.nix"
|
||||
"${self}/modules-clone/nixos/optional/hibernation.nix"
|
||||
# "${self}/modules-clone/nixos/optional/nswitch-rcm.nix"
|
||||
# "${self}/modules-clone/nixos/optional/virtualbox.nix"
|
||||
# "${self}/modules/nixos/optional/work.nix"
|
||||
# "${self}/modules/nixos/optional/niri.nix"
|
||||
# "${self}/modules/nixos/optional/noctalia.nix"
|
||||
];
|
||||
}
|
||||
81
hosds/nixos/x86_64-linux/pyramid/disk-config.nix
Normal file
81
hosds/nixos/x86_64-linux/pyramid/disk-config.nix
Normal file
|
|
@ -0,0 +1,81 @@
|
|||
{
|
||||
disko.devices = {
|
||||
disk = {
|
||||
nvme0n1 = {
|
||||
type = "disk";
|
||||
device = "/dev/nvme0n1";
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
ESP = {
|
||||
label = "boot";
|
||||
name = "ESP";
|
||||
size = "512M";
|
||||
type = "EF00";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "vfat";
|
||||
mountpoint = "/boot";
|
||||
mountOptions = [
|
||||
"defaults"
|
||||
];
|
||||
};
|
||||
};
|
||||
luks = {
|
||||
size = "100%";
|
||||
label = "luks";
|
||||
content = {
|
||||
type = "luks";
|
||||
name = "cryptroot";
|
||||
extraOpenArgs = [
|
||||
"--allow-discards"
|
||||
"--perf-no_read_workqueue"
|
||||
"--perf-no_write_workqueue"
|
||||
];
|
||||
# https://0pointer.net/blog/unlocking-luks2-volumes-with-tpm2-fido2-pkcs11-security-hardware-on-systemd-248.html
|
||||
settings = { crypttabExtraOpts = [ "fido2-device=auto" "token-timeout=10" ]; };
|
||||
content = {
|
||||
type = "btrfs";
|
||||
extraArgs = [ "-L" "nixos" "-f" ];
|
||||
subvolumes = {
|
||||
"/root" = {
|
||||
mountpoint = "/";
|
||||
mountOptions = [ "subvol=root" "compress=zstd" "noatime" ];
|
||||
};
|
||||
"/home" = {
|
||||
mountpoint = "/home";
|
||||
mountOptions = [ "subvol=home" "compress=zstd" "noatime" ];
|
||||
};
|
||||
"/nix" = {
|
||||
mountpoint = "/nix";
|
||||
mountOptions = [ "subvol=nix" "compress=zstd" "noatime" ];
|
||||
};
|
||||
"/persist" = {
|
||||
mountpoint = "/persist";
|
||||
mountOptions = [ "subvol=persist" "compress=zstd" "noatime" ];
|
||||
};
|
||||
"/log" = {
|
||||
mountpoint = "/var/log";
|
||||
mountOptions = [ "subvol=log" "compress=zstd" "noatime" ];
|
||||
};
|
||||
"/swap" = {
|
||||
mountpoint = "/swap";
|
||||
swap.swapfile.size = "64G";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
fileSystems = {
|
||||
"/persist".neededForBoot = true;
|
||||
"/home".neededForBoot = true;
|
||||
"/".neededForBoot = true; # this is ok because this is not a impermanence host
|
||||
"/var/log".neededForBoot = true;
|
||||
};
|
||||
}
|
||||
86
hosds/nixos/x86_64-linux/pyramid/hardware-configuration.nix
Normal file
86
hosds/nixos/x86_64-linux/pyramid/hardware-configuration.nix
Normal file
|
|
@ -0,0 +1,86 @@
|
|||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
{
|
||||
imports =
|
||||
[
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
# Fix Wlan after suspend or Hibernate
|
||||
# environment.etc."systemd/system-sleep/fix-wifi.sh".source =
|
||||
# pkgs.writeShellScript "fix-wifi.sh" ''
|
||||
# case $1/$2 in
|
||||
# pre/*)
|
||||
# ${pkgs.kmod}/bin/modprobe -r mt7921e mt792x_lib mt76
|
||||
# echo 1 > /sys/bus/pci/devices/0000:04:00.0/remove
|
||||
# ;;
|
||||
|
||||
# post/*)
|
||||
# ${pkgs.kmod}/bin/modprobe mt7921e
|
||||
# echo 1 > /sys/bus/pci/rescan
|
||||
# ;;
|
||||
# esac
|
||||
# '';
|
||||
|
||||
boot = {
|
||||
# kernelPackages = lib.mkDefault pkgs.kernel.linuxPackages;
|
||||
# kernelPackages = lib.mkDefault pkgs.kernel.linuxPackages_latest;
|
||||
kernelPackages = lib.mkDefault pkgs.linuxPackages_latest;
|
||||
# kernelPackages = lib.mkDefault pkgs.linuxPackages_latest;
|
||||
binfmt.emulatedSystems = [ "aarch64-linux" ];
|
||||
initrd = {
|
||||
availableKernelModules = [
|
||||
"nvme"
|
||||
"xhci_pci"
|
||||
"thunderbolt"
|
||||
"usb_storage"
|
||||
"cryptd"
|
||||
"usbhid"
|
||||
"sd_mod"
|
||||
"r8152"
|
||||
"drm"
|
||||
"drm_kms_helper"
|
||||
"ttm"
|
||||
"gpu_sched"
|
||||
];
|
||||
# allow to remote build on arm (needed for moonside)
|
||||
kernelModules = [ "sg" ];
|
||||
luks.devices."cryptroot" = {
|
||||
# improve performance on ssds
|
||||
bypassWorkqueues = true;
|
||||
preLVM = true;
|
||||
# crypttabExtraOpts = ["fido2-device=auto"];
|
||||
};
|
||||
};
|
||||
|
||||
kernelModules = [ "amdgpu" "kvm-amd" ];
|
||||
kernelParams = [
|
||||
# deep sleep is discontinued by amd
|
||||
# "mem_sleep_default=deep"
|
||||
# supposedly, this helps save power on laptops
|
||||
# in reality (at least on this model), this just generate excessive heat on the CPUs
|
||||
# "amd_pstate=passive"
|
||||
|
||||
# Fix screen flickering issue at the cost of battery life (disable PSR and PSR-SU, keep PR enabled)
|
||||
# TODO: figure out if this is worth it
|
||||
# test PSR/PR state with 'sudo grep '' /sys/kernel/debug/dri/0000*/eDP-2/*_capability'
|
||||
# ref:
|
||||
# https://old.reddit.com/r/framework/comments/1goh7hc/anyone_else_get_this_screen_flickering_issue/
|
||||
# https://www.reddit.com/r/NixOS/comments/1hjruq1/graphics_corruption_on_kernel_6125_and_up/
|
||||
# https://gitlab.freedesktop.org/drm/amd/-/issues/3797
|
||||
"amdgpu.dcdebugmask=0x410"
|
||||
];
|
||||
|
||||
extraModulePackages = [ ];
|
||||
};
|
||||
|
||||
# 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
|
||||
# still possible to use this option, but it's recommended to use it in conjunction
|
||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.enp196s0f3u1c2.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.wlp4s0.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
22
hosds/nixos/x86_64-linux/pyramid/secrets/pii.nix.enc
Normal file
22
hosds/nixos/x86_64-linux/pyramid/secrets/pii.nix.enc
Normal file
File diff suppressed because one or more lines are too long
48
hosds/nixos/x86_64-linux/pyramid/secrets/secrets.yaml
Normal file
48
hosds/nixos/x86_64-linux/pyramid/secrets/secrets.yaml
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
home-wireguard-client-private-key: ENC[AES256_GCM,data:YL/nP4DGGjVc0wRrbJ0x+iyJfdqhE90Ws92QBl/lr3RnJzA+stcz0ey/Rk4=,iv:Ek/RVzDpcT7fqVh7OnNc9QXD3Tk/2bm6vSQDA38j+DI=,tag:G2dSpA3KZmbKAfIN+2d45w==,type:str]
|
||||
sops:
|
||||
age:
|
||||
- recipient: age15cx90pnp54xp5gxlt02yn9j2pz968wp3l5ukdkx55xuecp34e5pszjku4m
|
||||
enc: |
|
||||
-----BEGIN AGE ENCRYPTED FILE-----
|
||||
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBKcVdIU1MwTlQrVlRMbDkw
|
||||
WXZlclBlYmp4elMrTkFPZHRpMGlGZXBDNWc4CkliYkNuTnNuZzRieGlvSHV3SCs1
|
||||
S1Nmb0VJaVd4MFQzTU5XVVBuQldIVzQKLS0tIFpGUjNaSy93MDVQVEFvbXZzQnJp
|
||||
Z1AzcVZpVlQ0WU9pNDNoTXoyR1RGUEEK0dfAegOiBXCnLakgBtWCYb7+hDqWFYUK
|
||||
rXlXTBtICLgSzLWTtPbSVzrrZgT0SAM6vnLO/iNfAIXZlxjeOZrP8w==
|
||||
-----END AGE ENCRYPTED FILE-----
|
||||
lastmodified: "2025-07-05T10:37:12Z"
|
||||
mac: ENC[AES256_GCM,data:RcvRagYaFGwMwrV63tffmYcA/m1GRjXpefR8Ab65jaldcWjfERiCWLFha9aQ1QlWUgSvCWbgC9/zFJkBBca1qVIvLOK1+nkI/ZjQ5rdUOJaP7mukLC3tcm+5f0Fe+GjTCDHGIZd/dUgkF+xVhN2XnFW1ExzRRt6q4a4pKvL6Ml0=,iv:EISJGqa2hQfjpu0X5wMJNZXzv0Loejj0Eb6kosXjU64=,tag:S81dIphr1rqQSO8jAZCABQ==,type:str]
|
||||
pgp:
|
||||
- created_at: "2025-12-02T14:59:04Z"
|
||||
enc: |-
|
||||
-----BEGIN PGP MESSAGE-----
|
||||
|
||||
hQIMAwDh3VI7VctTARAAlcSjeRYoj2Hhff3PbKtUdIisAyRHtX84+m5BYeRmcx5k
|
||||
gwMmit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cX7ExWWdY7LZ+ap3uZ5/2R2VkT+FdplRz12DsobWMP9z
|
||||
mjveWhiZx1TPa1rf5pigcvtFSQLllrLhS79Per37EoGUArS9iM6Iyhd9avHAqNTp
|
||||
ywZnJ5JpQKVDeRsMZfpoKdN/C/wqSAl6O6NQX06aY3EIYvxKF8h6qK7u/4WdlVd5
|
||||
Ml4Yn18HyeTkbz616TlMLlGQMNuloDc+XVORVutVphvxI50faIwi4I4q06+7+yuX
|
||||
A87uJatXS8K20mDkzygP/j+T3eSzEMB69mPLo+cbhOfcmk29x7Sg5pf/JYAOuYMS
|
||||
XGlIpa/VmqHOVcbD32sm2/M3AOgZBz3D2Tr2tI2JyK4ZqW/7AIFYNhnv7siTXNJe
|
||||
AXNBE4bU/FRXGOH4vOqoVFvBwYOd7Jlr8QnMpFQuBDMz/408lkIojd5njvLsu/4n
|
||||
qE0HKP9Sq3XY8dP4012GbkN9U/m/ca2oqVUy7rrEhGc1gLddlISHMMjNa7GsBw==
|
||||
=fGF1
|
||||
-----END PGP MESSAGE-----
|
||||
fp: 4BE7925262289B476DBBC17B76FD3810215AE097
|
||||
unencrypted_suffix: _unencrypted
|
||||
version: 3.10.2
|
||||
Loading…
Add table
Add a link
Reference in a new issue