update NixOS-VM config
This commit is contained in:
parent
14f8a90749
commit
201a3a94d1
@ -3,7 +3,7 @@
|
|||||||
mainuser = "ataraxia";
|
mainuser = "ataraxia";
|
||||||
flakesPath = "/home/nixos/nixos-config";
|
flakesPath = "/home/nixos/nixos-config";
|
||||||
partitioning.useEntireDisk = true;
|
partitioning.useEntireDisk = true;
|
||||||
partitioning.disk = "/dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_drive-scsi0-0-0-1";
|
partitioning.disk = "/dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_drive-scsi0-0-0-2";
|
||||||
partitioning.nullifyDisk = true;
|
partitioning.nullifyDisk = true;
|
||||||
swapPartition.enable = true;
|
swapPartition.enable = true;
|
||||||
swapPartition.size = "4GiB";
|
swapPartition.size = "4GiB";
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
# nixosRoles.base
|
# nixosRoles.base
|
||||||
|
|
||||||
customModules.devices
|
customModules.devices
|
||||||
|
nixosProfiles.attic
|
||||||
];
|
];
|
||||||
|
|
||||||
options = {
|
options = {
|
||||||
@ -14,28 +15,45 @@
|
|||||||
config = {
|
config = {
|
||||||
networking.hostName = config.device;
|
networking.hostName = config.device;
|
||||||
|
|
||||||
boot = {
|
boot = let
|
||||||
loader.efi.canTouchEfiVariables = false;
|
zfs_arc_max = toString (2 * 1024 * 1024 * 1024);
|
||||||
loader.efi.efiSysMountPoint = "/boot/efi";
|
in {
|
||||||
loader.generationsDir.copyKernels = true;
|
initrd.supportedFilesystems = [ "zfs" ];
|
||||||
loader.grub = {
|
loader = {
|
||||||
enable = true;
|
grub = {
|
||||||
device = "nodev";
|
enable = true;
|
||||||
efiSupport = true;
|
device = "nodev";
|
||||||
zfsSupport = true;
|
copyKernels = true;
|
||||||
efiInstallAsRemovable = true;
|
efiSupport = true;
|
||||||
copyKernels = true;
|
enableCryptodisk = true;
|
||||||
|
useOSProber = false;
|
||||||
|
zfsSupport = true;
|
||||||
|
gfxmodeEfi = "2560x1440";
|
||||||
|
# efiInstallAsRemovable = true;
|
||||||
|
# theme = pkgs.;
|
||||||
|
};
|
||||||
|
systemd-boot.enable = lib.mkForce false;
|
||||||
|
efi.canTouchEfiVariables = true;
|
||||||
|
efi.efiSysMountPoint = "/efi";
|
||||||
|
generationsDir.copyKernels = true;
|
||||||
};
|
};
|
||||||
kernelParams = [ "zswap.enabled=0" "quiet" "scsi_mod.use_blk_mq=1" "modeset" "nofb" ];
|
|
||||||
|
binfmt.emulatedSystems = [ "aarch64-linux" ];
|
||||||
kernelPackages = pkgs.linuxPackages_hardened;
|
kernelPackages = pkgs.linuxPackages_hardened;
|
||||||
cleanTmpDir = true;
|
kernelParams = [
|
||||||
|
"zfs.metaslab_lba_weighting_enabled=0"
|
||||||
|
"zfs.zfs_arc_max=${zfs_arc_max}"
|
||||||
|
];
|
||||||
|
tmp.useTmpfs = true;
|
||||||
|
tmp.tmpfsSize = "8G";
|
||||||
|
|
||||||
zfs.forceImportAll = false;
|
zfs.forceImportAll = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
zramSwap = {
|
zramSwap = {
|
||||||
enable = true;
|
enable = true;
|
||||||
algorithm = "zstd";
|
algorithm = "zstd";
|
||||||
memoryPercent = 80;
|
memoryPercent = 100;
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.systemPackages = [ pkgs.git pkgs.kitty ];
|
environment.systemPackages = [ pkgs.git pkgs.kitty ];
|
||||||
@ -47,6 +65,25 @@
|
|||||||
experimental-features = nix-command flakes
|
experimental-features = nix-command flakes
|
||||||
flake-registry = ${inputs.flake-registry}/flake-registry.json
|
flake-registry = ${inputs.flake-registry}/flake-registry.json
|
||||||
'';
|
'';
|
||||||
|
settings = {
|
||||||
|
substituters = [
|
||||||
|
"https://cache.nixos.org"
|
||||||
|
"https://nix-community.cachix.org"
|
||||||
|
"https://nixpkgs-wayland.cachix.org"
|
||||||
|
"https://hyprland.cachix.org"
|
||||||
|
"https://ataraxiadev-foss.cachix.org"
|
||||||
|
"https://cache.ataraxiadev.com/ataraxiadev"
|
||||||
|
];
|
||||||
|
trusted-public-keys = [
|
||||||
|
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
|
||||||
|
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||||
|
"nixpkgs-wayland.cachix.org-1:3lwxaILxMRkVhehr5StQprHdEo4IrE8sRho9R9HOLYA="
|
||||||
|
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
|
||||||
|
"ataraxiadev-foss.cachix.org-1:ws/jmPRUF5R8TkirnV1b525lP9F/uTBsz2KraV61058="
|
||||||
|
"ataraxiadev:V/fCdvz1bMsQzYZcLltcAULST+MoChv53EfedmyJ8Uw="
|
||||||
|
];
|
||||||
|
trusted-users = [ "root" config.mainuser "@wheel" ];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
environment.etc.nixpkgs.source = inputs.nixpkgs;
|
environment.etc.nixpkgs.source = inputs.nixpkgs;
|
||||||
environment.etc.self.source = inputs.self;
|
environment.etc.self.source = inputs.self;
|
||||||
@ -75,6 +112,6 @@
|
|||||||
users.users.root.openssh.authorizedKeys.keys =
|
users.users.root.openssh.authorizedKeys.keys =
|
||||||
config.users.users.ataraxia.openssh.authorizedKeys.keys;
|
config.users.users.ataraxia.openssh.authorizedKeys.keys;
|
||||||
|
|
||||||
system.stateVersion = "22.11";
|
system.stateVersion = "23.05";
|
||||||
};
|
};
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user