Migrate syncthing to flakes

This commit is contained in:
Vili Sinervä 2025-06-05 00:03:53 +03:00
parent a4b95111ab
commit 61227d07df
Signed by: Vili Sinervä
SSH key fingerprint: SHA256:FladqYjaE4scJY3Hi+gnShZ6ygnTJgixy0I6BAoHyos
2 changed files with 45 additions and 5 deletions

View file

@ -1,16 +1,12 @@
{ lib, ... }:
{
networking.hostName = "syncthing";
imports = [
../../shared/base.nix
../../shared/hardware/vm.nix
../../shared/users/vili.nix
../../servers/syncthing.nix
];
users.users.vili.hashedPasswordFile = lib.mkForce null;
# HARDWARE SPECIFIC
services.qemuGuest.enable = true;
}

44
hosts/syncthing/state.nix Normal file
View file

@ -0,0 +1,44 @@
{ lib, modulesPath, ... }:
{
system.stateVersion = "22.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/895d2004-3bd2-4bc5-bb46-62f94a0a68e3";
fsType = "ext4";
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/38AD-EFDC";
fsType = "vfat";
options = [
"fmask=0022"
"dmask=0022"
];
};
fileSystems."/home/vili" = {
device = "/dev/disk/by-uuid/d08136ed-7950-412c-bcf6-7c6e9f015e47";
fsType = "ext4";
};
networking.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
}