aboutsummaryrefslogtreecommitdiff
path: root/systems/dilion/vms/base_configuration.nix
diff options
context:
space:
mode:
Diffstat (limited to 'systems/dilion/vms/base_configuration.nix')
-rw-r--r--systems/dilion/vms/base_configuration.nix27
1 files changed, 27 insertions, 0 deletions
diff --git a/systems/dilion/vms/base_configuration.nix b/systems/dilion/vms/base_configuration.nix
new file mode 100644
index 0000000..7b67886
--- /dev/null
+++ b/systems/dilion/vms/base_configuration.nix
@@ -0,0 +1,27 @@
1{ lib, config, environment, ... }@args:
2{
3 options.myEnv = (environment.nixosModule (args // { name = "dummy"; })).options.myEnv;
4 config = {
5 # This value determines the NixOS release with which your system is
6 # to be compatible, in order to avoid breaking some software such as
7 # database servers. You should change this only after NixOS release
8 # notes say you should.
9 # https://nixos.org/nixos/manual/release-notes.html
10 system.stateVersion = lib.mkDefault "23.05"; # Did you read the comment?
11
12 fileSystems."/".device = "/dev/disk/by-label/nixos";
13 boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" "virtio_balloon" "virtio_blk" "virtio_pci" "virtio_ring" ];
14 boot.loader = {
15 grub = {
16 device = "/dev/vda";
17 };
18 timeout = 0;
19 };
20 services.openssh.enable = true;
21 networking.firewall.allowedTCPPorts = [ 22 ];
22 users = {
23 mutableUsers = false;
24 users.root.openssh.authorizedKeys.keys = [ config.myEnv.sshd.rootKeys.immae_dilion ];
25 };
26 };
27}