Modify like, basically everything idk, probably a lot of secrets and url names and colmena and whatnot
This commit is contained in:
parent
0ab856b18e
commit
b3ba7481d8
107 changed files with 437 additions and 696 deletions
|
@ -1,19 +1,16 @@
|
|||
{ lib, pkgs, ... }:
|
||||
{
|
||||
imports = [
|
||||
./grub
|
||||
./lanzaboote
|
||||
./limine
|
||||
./plymouth
|
||||
./services
|
||||
./systemd
|
||||
];
|
||||
|
||||
boot = {
|
||||
kernelPackages = lib.mkDefault pkgs.linuxPackages_latest;
|
||||
blacklistedKernelModules = [ "pcspkr" ];
|
||||
kernel.sysctl = {
|
||||
"vm.max_map_count" = 2147483642;
|
||||
"kernel.sysrq" = 1;
|
||||
};
|
||||
kernel.sysctl."vm.max_map_count" = 2147483642;
|
||||
kernelPackages = lib.mkDefault pkgs.linuxPackages_latest;
|
||||
loader.systemd-boot.editor = false;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,8 +0,0 @@
|
|||
{ lib, ... }:
|
||||
{
|
||||
boot.loader.grub = {
|
||||
enable = lib.mkDefault false;
|
||||
efiSupport = true;
|
||||
efiInstallAsRemovable = true;
|
||||
};
|
||||
}
|
|
@ -1,7 +1,5 @@
|
|||
{ config, pkgs, lanzaboote, ... }:
|
||||
{ config, pkgs, ... }:
|
||||
{
|
||||
imports = [ lanzaboote.nixosModules.lanzaboote ];
|
||||
|
||||
boot.lanzaboote.pkiBundle = "/etc/secureboot";
|
||||
|
||||
environment = {
|
||||
|
|
8
modules/system/devices/boot/limine/default.nix
Normal file
8
modules/system/devices/boot/limine/default.nix
Normal file
|
@ -0,0 +1,8 @@
|
|||
{ config, pkgs, name, ... }:
|
||||
{
|
||||
boot.loader.limine = {
|
||||
biosSupport = !pkgs.stdenv.hostPlatform.isAarch64;
|
||||
efiInstallAsRemovable = true;
|
||||
efiSupport = true;
|
||||
};
|
||||
}
|
|
@ -2,7 +2,6 @@
|
|||
{
|
||||
config.boot = lib.mkIf config.boot.plymouth.enable {
|
||||
consoleLogLevel = 0;
|
||||
loader.timeout = 0;
|
||||
initrd.verbose = false;
|
||||
kernelParams = [
|
||||
"loglevel=3"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ config, ... }:
|
||||
{ config, name, ... }:
|
||||
{
|
||||
boot.initrd.systemd.services.root-reset = {
|
||||
enable = config.environment.persistence."/persist".enable;
|
||||
|
@ -10,7 +10,7 @@
|
|||
serviceConfig.Type = "oneshot";
|
||||
script = ''
|
||||
mkdir -p /mnt
|
||||
mount -t btrfs /dev/${config.networking.hostName}/root /mnt
|
||||
mount -t btrfs /dev/${name}/root /mnt
|
||||
|
||||
if [[ -e /mnt/prev ]]; then
|
||||
btrfs subvolume delete /mnt/prev
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
{ ... }:
|
||||
{
|
||||
boot.loader.systemd-boot = {
|
||||
editor = false;
|
||||
graceful = true;
|
||||
};
|
||||
}
|
|
@ -11,9 +11,9 @@
|
|||
};
|
||||
};
|
||||
|
||||
services = lib.mkIf config.environment.persistence."/persist".enable {
|
||||
services = {
|
||||
btrfs.autoScrub = {
|
||||
enable = true;
|
||||
enable = (config.fileSystems."/".fsType == "btrfs");
|
||||
interval = "weekly";
|
||||
};
|
||||
fstrim.enable = true;
|
||||
|
|
|
@ -1,12 +1,17 @@
|
|||
{ impermanence, ... }:
|
||||
{ ... }:
|
||||
{
|
||||
imports = [ impermanence.nixosModules.impermanence ];
|
||||
|
||||
environment.persistence."/persist" = {
|
||||
hideMounts = true;
|
||||
directories = [
|
||||
"/storage"
|
||||
"/var/lib/nixos"
|
||||
{
|
||||
directory = "/var/lib/nixos";
|
||||
mode = "0700";
|
||||
}
|
||||
{
|
||||
directory = "/var/lib/nixos-containers";
|
||||
mode = "0700";
|
||||
}
|
||||
];
|
||||
files = [ "/etc/machine-id" ];
|
||||
};
|
||||
|
|
|
@ -12,7 +12,6 @@
|
|||
"${midas.config.deployment.targetHost}" = [ "midas" ];
|
||||
"${kitty.config.deployment.targetHost}" = [ "kitty" ];
|
||||
"${detritus.config.deployment.targetHost}" = [ "detritus" ];
|
||||
"${elder.config.deployment.targetHost}" = [ "elder" ];
|
||||
"${prophet.config.deployment.targetHost}" = [ "prophet" ];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -2,8 +2,9 @@
|
|||
{
|
||||
fileSystems = let
|
||||
common = {
|
||||
fsType = "nfs4";
|
||||
fsType = "nfs";
|
||||
options = [
|
||||
"noatime"
|
||||
"noauto"
|
||||
"soft"
|
||||
"x-systemd.automount"
|
||||
|
@ -22,10 +23,6 @@
|
|||
device = "detritus:/storage";
|
||||
mountPoint = "/network/Detritus";
|
||||
};
|
||||
"elder" = common // {
|
||||
device = "elder:/storage";
|
||||
mountPoint = "/network/Elder";
|
||||
};
|
||||
"prophet" = common // {
|
||||
device = "prophet:/storage";
|
||||
mountPoint = "/network/Prophet";
|
||||
|
|
6
modules/system/devices/video/amd/default.nix
Normal file
6
modules/system/devices/video/amd/default.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
{ ... }:
|
||||
{
|
||||
boot.kernelParams = [ "amd_pstate=active" ];
|
||||
|
||||
hardware.amdgpu.legacySupport.enable = true;
|
||||
}
|
|
@ -1,6 +1,9 @@
|
|||
{ config, pkgs, ... }:
|
||||
{
|
||||
imports = [ ./nvidia ];
|
||||
imports = [
|
||||
./amd
|
||||
./nvidia
|
||||
];
|
||||
|
||||
hardware.graphics = {
|
||||
enable = builtins.elem "pc" config.system.nixos.tags;
|
||||
|
|
|
@ -8,10 +8,14 @@
|
|||
hardware.nvidia = {
|
||||
modesetting.enable = true;
|
||||
nvidiaSettings = false;
|
||||
open = true;
|
||||
open = if lib.versionOlder config.hardware.nvidia.package.version "560" then false else true;
|
||||
powerManagement.enable = config.hardware.nvidia.open;
|
||||
};
|
||||
|
||||
nixpkgs.allowUnfreePackages = [ "nvidia-x11" ];
|
||||
nixpkgs = {
|
||||
allowUnfreePackages = [ "nvidia-x11" ];
|
||||
config.nvidia.acceptLicense = true;
|
||||
};
|
||||
|
||||
specialisation = lib.mkIf (lib.elem "nvidia" config.services.xserver.videoDrivers) {
|
||||
nouveau.configuration.config.services.xserver.videoDrivers = lib.mkForce [ "nouveau" ];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue