2024-07-14 06:13:04 +00:00
|
|
|
|
# Edit this configuration file to define what should be installed on
|
|
|
|
|
# your system. Help is available in the configuration.nix(5) man page
|
|
|
|
|
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
|
|
|
|
|
|
|
|
|
{ config, pkgs, lib, flake-inputs, ... }:
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
networking.networkmanager.enable = false;
|
|
|
|
|
|
|
|
|
|
virtualisation = {
|
|
|
|
|
kvmgt.enable = true;
|
|
|
|
|
libvirtd = {
|
|
|
|
|
enable = true;
|
|
|
|
|
qemu = {
|
|
|
|
|
runAsRoot = true;
|
|
|
|
|
verbatimConfig = ''
|
|
|
|
|
cgroup_device_acl = ["/dev/kvmfr0", "/dev/kvm"]
|
|
|
|
|
'';
|
2024-07-17 04:40:44 +00:00
|
|
|
|
swtpm = {
|
|
|
|
|
enable = true;
|
|
|
|
|
};
|
2024-07-14 06:13:04 +00:00
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
containers = {
|
|
|
|
|
enable = true;
|
|
|
|
|
policy = {
|
|
|
|
|
default = [ { type = "insecureAcceptAnything"; } ];
|
|
|
|
|
transports = {
|
|
|
|
|
docker-daemon = {
|
|
|
|
|
"" = [ { type = "insecureAcceptAnything"; } ];
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
2024-07-17 04:40:44 +00:00
|
|
|
|
hardware.nvidia-container-toolkit.enable = true;
|
|
|
|
|
|
2024-07-14 06:13:04 +00:00
|
|
|
|
services.openssh.enable = true;
|
|
|
|
|
networking.firewall.enable = true;
|
|
|
|
|
|
|
|
|
|
environment.systemPackages = [ pkgs.nfs-utils ];
|
|
|
|
|
services.openiscsi = {
|
|
|
|
|
enable = true;
|
|
|
|
|
name = "${config.networking.hostName}-initiatorhost";
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
systemd.network.wait-online.enable = lib.mkDefault false;
|
|
|
|
|
networking.useDHCP = false;
|
2024-07-17 04:40:44 +00:00
|
|
|
|
#services.tcsd.enable = true;
|
|
|
|
|
|
|
|
|
|
security.sudo = {
|
|
|
|
|
enable = true;
|
|
|
|
|
extraRules = [
|
|
|
|
|
{ users = [ "%wheel" ];
|
|
|
|
|
commands = [ { command = "ALL"; options = [ "NOPASSWD" ]; } ];
|
|
|
|
|
}
|
|
|
|
|
];
|
|
|
|
|
};
|
2024-07-14 06:13:04 +00:00
|
|
|
|
}
|