a
This commit is contained in:
parent
34e24a829d
commit
3af6375a8c
@ -75,11 +75,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1660460606,
|
||||
"narHash": "sha256-Ii+2BV7wRKbK+92vTcdJB9rGdNYqbIOrl22oFBZZGJ8=",
|
||||
"lastModified": 1660463078,
|
||||
"narHash": "sha256-0Fnkx0nBt/OSzAFtOvoZVsuvWUyKOdNWLqC1WbxX42o=",
|
||||
"ref": "refs/heads/master",
|
||||
"rev": "04fbe0aab92fbcea4ea766b99ddafa0f5535875b",
|
||||
"revCount": 60,
|
||||
"rev": "9de392f81cf3e88fe125e1f952276e4ffd59d82f",
|
||||
"revCount": 61,
|
||||
"type": "git",
|
||||
"url": "https://git.gaze.systems/dusk/website.git"
|
||||
},
|
||||
|
@ -1,12 +1,11 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
tlib,
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}: let
|
||||
byLabel = label: "/dev/disk/by-label/${label}";
|
||||
in {
|
||||
}: {
|
||||
imports = with inputs;
|
||||
with nixos-hardware.nixosModules; [
|
||||
nixpkgs.nixosModules.notDetected
|
||||
@ -21,60 +20,11 @@ in {
|
||||
../../modules/network/iwd.nix
|
||||
../../users/root
|
||||
../../users/patriot
|
||||
];
|
||||
]
|
||||
++ (tlib.importFolder (toString ./modules));
|
||||
|
||||
system.persistDir = "/persist";
|
||||
|
||||
boot = {
|
||||
tmpOnTmpfs = true;
|
||||
loader = {
|
||||
efi.canTouchEfiVariables = true;
|
||||
systemd-boot.enable = true;
|
||||
systemd-boot.configurationLimit = 10;
|
||||
};
|
||||
kernelPackages = pkgs.linuxPackages_latest;
|
||||
supportedFilesystems = ["f2fs"];
|
||||
initrd = {
|
||||
availableKernelModules = [
|
||||
"nvme"
|
||||
"xhci_pci"
|
||||
"ahci"
|
||||
"usb_storage"
|
||||
"usbhid"
|
||||
"sd_mod"
|
||||
];
|
||||
kernelModules = ["amdgpu"];
|
||||
};
|
||||
kernelModules = ["kvm-amd"];
|
||||
extraModulePackages = [];
|
||||
kernel.sysctl = {"fs.inotify.max_user_watches" = 524288;};
|
||||
};
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "none";
|
||||
fsType = "tmpfs";
|
||||
options = ["defaults" "size=2G" "mode=755"];
|
||||
};
|
||||
fileSystems."/nix" = {
|
||||
device = byLabel "NIX";
|
||||
fsType = "f2fs";
|
||||
};
|
||||
fileSystems."${config.system.persistDir}" = {
|
||||
device = byLabel "PERSIST";
|
||||
fsType = "f2fs";
|
||||
neededForBoot = true;
|
||||
};
|
||||
fileSystems."/boot" = {
|
||||
device = byLabel "BOOT";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
swapDevices = [];
|
||||
zramSwap = {
|
||||
enable = true;
|
||||
algorithm = "zstd";
|
||||
};
|
||||
|
||||
nix.settings.max-jobs = lib.mkForce 16;
|
||||
security = {
|
||||
pam.loginLimits = [
|
||||
|
26
hosts/tkaronto/modules/boot.nix
Normal file
26
hosts/tkaronto/modules/boot.nix
Normal file
@ -0,0 +1,26 @@
|
||||
{pkgs, ...}: {
|
||||
boot = {
|
||||
tmpOnTmpfs = true;
|
||||
loader = {
|
||||
efi.canTouchEfiVariables = true;
|
||||
systemd-boot.enable = true;
|
||||
systemd-boot.configurationLimit = 10;
|
||||
};
|
||||
kernelPackages = pkgs.linuxPackages_latest;
|
||||
supportedFilesystems = ["f2fs"];
|
||||
initrd = {
|
||||
availableKernelModules = [
|
||||
"nvme"
|
||||
"xhci_pci"
|
||||
"ahci"
|
||||
"usb_storage"
|
||||
"usbhid"
|
||||
"sd_mod"
|
||||
];
|
||||
kernelModules = ["amdgpu"];
|
||||
};
|
||||
kernelModules = ["kvm-amd"];
|
||||
extraModulePackages = [];
|
||||
kernel.sysctl = {"fs.inotify.max_user_watches" = 524288;};
|
||||
};
|
||||
}
|
30
hosts/tkaronto/modules/fs.nix
Normal file
30
hosts/tkaronto/modules/fs.nix
Normal file
@ -0,0 +1,30 @@
|
||||
{config, ...}:
|
||||
let
|
||||
byLabel = label: "/dev/disk/by-label/${label}";
|
||||
in
|
||||
{
|
||||
fileSystems."/" = {
|
||||
device = "none";
|
||||
fsType = "tmpfs";
|
||||
options = ["defaults" "size=2G" "mode=755"];
|
||||
};
|
||||
fileSystems."/nix" = {
|
||||
device = byLabel "NIX";
|
||||
fsType = "f2fs";
|
||||
};
|
||||
fileSystems."${config.system.persistDir}" = {
|
||||
device = byLabel "PERSIST";
|
||||
fsType = "f2fs";
|
||||
neededForBoot = true;
|
||||
};
|
||||
fileSystems."/boot" = {
|
||||
device = byLabel "BOOT";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
swapDevices = [];
|
||||
zramSwap = {
|
||||
enable = true;
|
||||
algorithm = "zstd";
|
||||
};
|
||||
}
|
@ -3,16 +3,10 @@
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
tlib,
|
||||
...
|
||||
}: {
|
||||
imports = let
|
||||
b = builtins;
|
||||
modules = toString ./modules;
|
||||
files = b.readDir modules;
|
||||
filesToImport =
|
||||
b.map (name: "${modules}/${name}") (b.attrNames files);
|
||||
in
|
||||
filesToImport;
|
||||
imports = tlib.importFolder (toString ./modules);
|
||||
|
||||
boot.cleanTmpDir = true;
|
||||
zramSwap.enable = true;
|
||||
|
@ -10,4 +10,13 @@ lib.makeExtensible (self: {
|
||||
|
||||
prefixStrings = prefix: strings:
|
||||
lib.forEach strings (string: "${prefix}${string}");
|
||||
|
||||
importFolder = modules:
|
||||
let
|
||||
b = builtins;
|
||||
files = b.readDir modules;
|
||||
filesToImport =
|
||||
b.map (name: "${modules}/${name}") (b.attrNames files);
|
||||
in
|
||||
filesToImport;
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user