mb?
This commit is contained in:
@@ -1,40 +1,22 @@
|
|||||||
{
|
{
|
||||||
|
config,
|
||||||
modulesPath,
|
modulesPath,
|
||||||
machine,
|
machine,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
system.stateVersion = "25.11";
|
system.stateVersion = "25.11";
|
||||||
nix.settings.experimental-features = ["flakes" "nix-command"];
|
nix.settings.experimental-features = ["flakes" "nix-command"];
|
||||||
|
|
||||||
imports = [(modulesPath + "/profiles/qemu-guest.nix")];
|
imports = [(modulesPath + "/profiles/qemu-guest.nix")];
|
||||||
fileSystems = {
|
fileSystems."/" = {
|
||||||
"/" = {
|
|
||||||
device = "none";
|
|
||||||
fsType = "tmpfs";
|
|
||||||
options = ["defaults" "size=30%" "mode=755"];
|
|
||||||
};
|
|
||||||
"/mnt" = {
|
|
||||||
device = "/dev/sda1";
|
device = "/dev/sda1";
|
||||||
fsType = "ext4";
|
fsType = "ext4";
|
||||||
};
|
};
|
||||||
"/boot" = {
|
|
||||||
device = "/mnt/boot";
|
|
||||||
fsType = "none";
|
|
||||||
options = ["bind"];
|
|
||||||
};
|
|
||||||
"/nix" = {
|
|
||||||
device = "/mnt/nix";
|
|
||||||
fsType = "none";
|
|
||||||
options = ["bind"];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
boot.loader.grub.device = "/dev/sda";
|
boot.loader.grub.device = "/dev/sda";
|
||||||
boot.loader.timeout = 30;
|
boot.loader.timeout = 30;
|
||||||
boot.initrd.availableKernelModules = ["ata_piix" "uhci_hcd" "virtio_pci" "virtio_scsi" "sd_mod" "sr_mod"];
|
boot.initrd.availableKernelModules = ["ata_piix" "uhci_hcd" "xen_blkfront"];
|
||||||
boot.initrd.kernelModules = ["nvme"];
|
boot.initrd.kernelModules = ["nvme"];
|
||||||
boot.tmp.cleanOnBoot = true;
|
boot.tmp.cleanOnBoot = true;
|
||||||
zramSwap.enable = true;
|
zramSwap.enable = true;
|
||||||
|
|
||||||
networking = {
|
networking = {
|
||||||
useNetworkd = true;
|
useNetworkd = true;
|
||||||
usePredictableInterfaceNames = true;
|
usePredictableInterfaceNames = true;
|
||||||
@@ -56,29 +38,8 @@
|
|||||||
dns = ["2620:fe::fe" "9.9.9.9"];
|
dns = ["2620:fe::fe" "9.9.9.9"];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
services.openssh.enable = true;
|
||||||
services.openssh = {
|
users.mutableUsers = false;
|
||||||
enable = true;
|
users.users.root.openssh.authorizedKeys.keys = [config.pub-keys.ssh.andromeda];
|
||||||
allowSFTP = false;
|
|
||||||
ports = [22 5522];
|
|
||||||
settings = {
|
|
||||||
PermitRootLogin = "no";
|
|
||||||
PasswordAuthentication = false;
|
|
||||||
KbdInteractiveAuthentication = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
environment.persistence."/nix/persist" = {
|
|
||||||
enable = true;
|
|
||||||
hideMounts = true;
|
|
||||||
directories = [
|
|
||||||
"/var/log"
|
|
||||||
"/var/lib/nixos"
|
|
||||||
"/var/lib/systemd/coredump"
|
|
||||||
"/etc/NetworkManager/system-connections"
|
|
||||||
];
|
|
||||||
files = [
|
|
||||||
"/etc/machine-id"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
programs.noshell.enable = true;
|
programs.noshell.enable = true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user