Migrate nextcloud to flakes

This commit is contained in:
Vili Sinervä 2025-06-05 00:21:11 +03:00
parent 0a557eadcb
commit c6add0f9f8
Signed by: Vili Sinervä
SSH key fingerprint: SHA256:FladqYjaE4scJY3Hi+gnShZ6ygnTJgixy0I6BAoHyos
3 changed files with 44 additions and 5 deletions

View file

@ -1,13 +1,10 @@
{ ... }:
{
networking.hostName = "nextcloud";
custom.nextcloud_domain = "nextcloud.vsinerva.fi";
imports = [
../../shared/base.nix
../../shared/hardware/vm.nix
../../servers/nextcloud.nix
];
# HARDWARE SPECIFIC
services.qemuGuest.enable = true;
}

39
hosts/nextcloud/state.nix Normal file
View file

@ -0,0 +1,39 @@
{ lib, modulesPath, ... }:
{
system.stateVersion = "23.05";
imports = [
(modulesPath + "/profiles/qemu-guest.nix")
];
boot.initrd.availableKernelModules = [
"uhci_hcd"
"ehci_pci"
"ahci"
"virtio_pci"
"virtio_scsi"
"sd_mod"
"sr_mod"
];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
fileSystems."/" = {
device = "/dev/disk/by-uuid/428cdba7-04a8-4e69-992a-96aa197cd6c7";
fsType = "ext4";
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/08B5-BFD8";
fsType = "vfat";
options = [
"fmask=0022"
"dmask=0022"
];
};
networking.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
}

View file

@ -5,7 +5,10 @@
...
}:
{
imports = [ ./cert-store-client.nix ];
imports = [
./utils/nginx-https-server.nix
./utils/cert-store-client.nix
];
options.custom = {
nextcloud_domain = lib.mkOption {