diff --git a/hosts/lapserv/hardware-configuration.nix b/hosts/lapserv/hardware-configuration.nix index 5d3b114..282444c 100644 --- a/hosts/lapserv/hardware-configuration.nix +++ b/hosts/lapserv/hardware-configuration.nix @@ -1,39 +1,44 @@ # Do not modify this file! It was generated by ‘nixos-generate-config’ # and may be overwritten by future invocations. Please make changes # to /etc/nixos/configuration.nix instead. +{ config, lib, pkgs, modulesPath, ... }: + { - config, - lib, - pkgs, - modulesPath, - ... -}: { - imports = [ - (modulesPath + "/installer/scan/not-detected.nix") - ]; + imports = + [ (modulesPath + "/installer/scan/not-detected.nix") + ]; - boot = { - initrd.availableKernelModules = ["xhci_pci" "ahci" "sd_mod"]; - initrd.kernelModules = []; - kernelModules = ["kvm-intel"]; - extraModulePackages = []; - }; + boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "sd_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; - fileSystems = { - "/" = { - device = "/dev/disk/by-uuid/33b7e681-d92a-40db-a172-b797591a1e2e"; + # fileSystems."/" = + # { device = "/dev/disk/by-uuid/33b7e681-d92a-40db-a172-b797591a1e2e"; + # fsType = "ext4"; + # }; + # + # fileSystems."/boot" = + # { device = "/dev/disk/by-uuid/0BEA-7525"; + # fsType = "vfat"; + # options = [ "fmask=0022" "dmask=0022" ]; + # }; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/2ce4b2b1-0083-43b2-bd8d-0e8cd21b1ef6"; fsType = "ext4"; }; - "/boot" = { - device = "/dev/disk/by-uuid/0BEA-7525"; + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/AE71-FD70"; fsType = "vfat"; - options = ["fmask=0022" "dmask=0022"]; + options = [ "fmask=0022" "dmask=0022" ]; }; - }; - swapDevices = []; - networking.useDHCP = lib.mkDefault true; + swapDevices = + [ { device = "/dev/disk/by-uuid/f5af06e8-e285-4565-abc3-fdd0ddde4736"; } + ]; + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; } diff --git a/secrets/jsw-bot.age b/secrets/jsw-bot.age index 3e8c6a9..425482d 100644 Binary files a/secrets/jsw-bot.age and b/secrets/jsw-bot.age differ diff --git a/system/server/jsw-bot.nix b/system/server/jsw-bot.nix index 3e6f25c..3ca37a4 100644 --- a/system/server/jsw-bot.nix +++ b/system/server/jsw-bot.nix @@ -13,7 +13,7 @@ bash = getExe pkgs.bash; - mainDir = "/var/lib/dcbot/"; + mainDir = "/var/lib/${name}/"; programDir = mainDir + "program"; dataDir = mainDir + "data"; denoDir = mainDir + "deno"; @@ -71,12 +71,12 @@ in { }; }; - users.groups."dcbot" = { + users.groups.${name} = { members = optional nextcloud.enable "nextcloud"; #TODO: if config.niksos.server.nextcloud #NOTE: for nextcloud mounted folder }; - users.users."dcbot" = { - group = "dcbot"; + users.users.${name} = { + group = name; isSystemUser = true; }; }; diff --git a/system/server/lib/extractWebOptions.nix b/system/server/lib/extractWebOptions.nix index 3d2245c..805fea1 100644 --- a/system/server/lib/extractWebOptions.nix +++ b/system/server/lib/extractWebOptions.nix @@ -11,8 +11,8 @@ then "" else "${cfg.subDomain}."; in + cfg // { - domain = "${subDomain}.${baseDomain}"; - inherit baseDomain; + domain = "${subDomain}${baseDomain}"; + inherit baseDomain subDomain; } - // cfg