Migrate forgejo to flakes

This commit is contained in:
Vili Sinervä 2025-06-05 00:29:40 +03:00
parent 948ab97bc3
commit 451b9e65f5
Signed by: Vili Sinervä
SSH key fingerprint: SHA256:FladqYjaE4scJY3Hi+gnShZ6ygnTJgixy0I6BAoHyos
3 changed files with 46 additions and 8 deletions

View file

@ -1,12 +1,8 @@
{ ... }:
{
networking.hostName = "forgejo";
imports = [
../shared/base.nix
../servers/forgejo.nix
../../shared/base.nix
../../shared/hardware/vm.nix
../../servers/forgejo.nix
];
# HARDWARE SPECIFIC
services.qemuGuest.enable = true;
}

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

@ -0,0 +1,39 @@
{ lib, modulesPath, ... }:
{
system.stateVersion = "24.11";
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/6de79a95-d101-4734-8482-1e0869498ce8";
fsType = "ext4";
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/78B9-CA51";
fsType = "vfat";
options = [
"fmask=0077"
"dmask=0077"
];
};
networking.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
}

View file

@ -1,6 +1,9 @@
{ config, ... }:
{
imports = [ ./utils/acme-http-client.nix ];
imports = [
./utils/nginx-https-server.nix
./utils/acme-http-client.nix
];
services = {
forgejo = {