From 78907aa98c1af8624a62ca123d088c6c16424f41 Mon Sep 17 00:00:00 2001 From: polwex Date: Sun, 21 Jul 2024 01:09:48 +0700 Subject: init --- hosts/cloud/sing/init.nix | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 hosts/cloud/sing/init.nix (limited to 'hosts/cloud/sing/init.nix') diff --git a/hosts/cloud/sing/init.nix b/hosts/cloud/sing/init.nix new file mode 100644 index 0000000..361fac8 --- /dev/null +++ b/hosts/cloud/sing/init.nix @@ -0,0 +1,42 @@ +{ modulesPath, config, lib, pkgs, ... }: { + imports = [ + (modulesPath + "/installer/scan/not-detected.nix") + (modulesPath + "/profiles/qemu-guest.nix") + ./disk-config.nix + ]; + + # boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "virtio_pci" "virtio_scsi" "sd_mod" "sr_mod" ]; + boot.loader.grub = { + # no need to set devices, disko will add all devices that have a EF02 partition to the list already + # devices = [ ]; + efiSupport = true; + efiInstallAsRemovable = true; + }; + services.openssh = { + enable = true; + }; + + users.users.root.initialHashedPassword = "$y$j9T$pCnKvY2ASrwPgAlZhqK9A/$Ro7mKqBTHjKhn5GN82fEUBNnUrdP.SxN9bBIl7QxY./"; + users.users.root.openssh.authorizedKeys.keys = [ + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIM+qXhCHNrSZmy4HEXaFn6xAp1w2GzQBMOfVdbR3E81Q" + ]; + users.users.y = { + group = "users"; + isNormalUser = true; + extraGroups = [ + "systemd-journal" + "wheel" + "networkmanager" + "input" + "uinput" + "docker" + ]; + createHome = true; + home = "/home/y"; + openssh.authorizedKeys.keys = [ + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIM+qXhCHNrSZmy4HEXaFn6xAp1w2GzQBMOfVdbR3E81Q cloudboxes" + ]; + }; + + system.stateVersion = "23.11"; +} -- cgit v1.2.3