X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=systems%2Fdilion%2Fvms%2Fbase_configuration.nix;h=7b678866673bc5dda8968ac786ec008322fcd5ab;hb=1a64deeb894dc95e2645a75771732c6cc53a79ad;hpb=fa25ffd4583cc362075cd5e1b4130f33306103f0;p=perso%2FImmae%2FConfig%2FNix.git 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 @@ +{ lib, config, environment, ... }@args: +{ + options.myEnv = (environment.nixosModule (args // { name = "dummy"; })).options.myEnv; + config = { + # This value determines the NixOS release with which your system is + # to be compatible, in order to avoid breaking some software such as + # database servers. You should change this only after NixOS release + # notes say you should. + # https://nixos.org/nixos/manual/release-notes.html + system.stateVersion = lib.mkDefault "23.05"; # Did you read the comment? + + fileSystems."/".device = "/dev/disk/by-label/nixos"; + boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" "virtio_balloon" "virtio_blk" "virtio_pci" "virtio_ring" ]; + boot.loader = { + grub = { + device = "/dev/vda"; + }; + timeout = 0; + }; + services.openssh.enable = true; + networking.firewall.allowedTCPPorts = [ 22 ]; + users = { + mutableUsers = false; + users.root.openssh.authorizedKeys.keys = [ config.myEnv.sshd.rootKeys.immae_dilion ]; + }; + }; +}