config/hosts/vm/configuration.nix

68 lines
1.5 KiB
Nix
Raw Normal View History

2024-08-16 12:55:43 +03:00
{
2024-12-02 20:10:55 +02:00
lib,
2024-08-16 12:55:43 +03:00
modulesPath,
2024-12-02 20:04:38 +02:00
pkgs,
2024-12-02 20:23:43 +02:00
config,
2024-08-16 12:55:43 +03:00
...
}:
{
2024-02-04 16:18:47 +02:00
imports = [
"${modulesPath}/profiles/all-hardware.nix"
"${modulesPath}/installer/cd-dvd/iso-image.nix"
2024-12-02 19:47:05 +02:00
../../modules
../../modules/profiles/btrfs
../../modules/profiles/desktop
2024-02-04 16:18:47 +02:00
];
mj = {
2024-12-02 19:47:05 +02:00
stateVersion = "24.11";
timeZone = "UTC";
2024-03-04 14:53:50 +02:00
username = "nixos";
base.users = {
enable = true;
user.initialHashedPassword = "";
root.initialHashedPassword = "";
};
};
2024-12-02 20:04:38 +02:00
boot.kernelPackages = pkgs.linuxPackages_latest;
2024-03-06 12:16:11 +02:00
2024-12-02 20:23:43 +02:00
isoImage =
let
vsn = "${config.system.nixos.release}${lib.trivial.versionSuffix}";
in
{
isoName = "toolshed-${vsn}.iso";
2024-12-02 21:47:48 +02:00
2024-12-02 21:40:10 +02:00
# as of writing zstd -19 reduces toolshed from 9.1G to 8.6G, but takes
2024-12-02 21:47:48 +02:00
# ~30min on fwminex, as opposed to ~10m with default settings. xz also
# yields 8.6G.
2024-12-02 21:40:10 +02:00
#squashfsCompression = "zstd -Xcompression-level 19";
2024-12-02 20:23:43 +02:00
squashfsCompression = "zstd";
appendToMenuLabel = " Toolshed ${vsn}";
makeEfiBootable = true; # EFI booting
makeUsbBootable = true; # USB booting
};
2024-07-29 15:39:54 +03:00
swapDevices = [ ];
2024-02-04 16:18:47 +02:00
services = {
2024-02-04 16:18:47 +02:00
getty.autologinUser = "nixos";
2024-08-16 12:55:43 +03:00
autorandr.enable = true;
2024-12-07 22:03:44 +02:00
xserver.autorun = false;
displayManager.defaultSession = lib.mkForce "xfce";
2024-02-04 16:18:47 +02:00
};
security.pam.services.lightdm.text = ''
auth sufficient pam_succeed_if.so user ingroup wheel
'';
2024-02-04 16:18:47 +02:00
networking = {
hostName = "vm";
2024-02-04 22:28:36 +02:00
domain = "jakstys.lt";
2024-07-29 15:39:54 +03:00
firewall.allowedTCPPorts = [ 22 ];
2024-03-13 22:03:43 +02:00
hostId = "abefef01";
};
}