Small refactor, try and mount the other drive on /boot for wheatley
This commit is contained in:
parent
bbb88012f4
commit
c9ac78a81a
35
nixos/board/package-configs/pi-hole/configuration.nix
Normal file
35
nixos/board/package-configs/pi-hole/configuration.nix
Normal file
|
@ -0,0 +1,35 @@
|
|||
{
|
||||
inputs,
|
||||
outputs,
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
services.pihole = {
|
||||
enable = true;
|
||||
hostConfig = {
|
||||
# define the service user for running the rootless Pi-hole container
|
||||
user = "pihole";
|
||||
enableLingeringForUser = true;
|
||||
|
||||
# we want to persist change to the Pi-hole configuration & logs across service restarts
|
||||
# check the option descriptions for more information
|
||||
persistVolumes = true;
|
||||
|
||||
# expose DNS & the web interface on unpriviledged ports on all IP addresses of the host
|
||||
# check the option descriptions for more information
|
||||
dnsPort = 5335;
|
||||
webProt = 8080;
|
||||
};
|
||||
piholeConfig.ftl = {
|
||||
# assuming that the host has this (fixed) IP and should resolve "pi.hole" to this address
|
||||
# check the option description & the FTLDNS documentation for more information
|
||||
LOCAL_IPV4 = "192.168.0.2";
|
||||
};
|
||||
piholeCOnfig.web = {
|
||||
virtualHost = "pi.hole";
|
||||
password = "password";
|
||||
};
|
||||
};
|
||||
}
|
|
@ -82,33 +82,6 @@
|
|||
};
|
||||
};
|
||||
|
||||
services.pihole = {
|
||||
enable = true;
|
||||
hostConfig = {
|
||||
# define the service user for running the rootless Pi-hole container
|
||||
user = "pihole";
|
||||
enableLingeringForUser = true;
|
||||
|
||||
# we want to persist change to the Pi-hole configuration & logs across service restarts
|
||||
# check the option descriptions for more information
|
||||
persistVolumes = true;
|
||||
|
||||
# expose DNS & the web interface on unpriviledged ports on all IP addresses of the host
|
||||
# check the option descriptions for more information
|
||||
dnsPort = 5335;
|
||||
webProt = 8080;
|
||||
};
|
||||
piholeConfig.ftl = {
|
||||
# assuming that the host has this (fixed) IP and should resolve "pi.hole" to this address
|
||||
# check the option description & the FTLDNS documentation for more information
|
||||
LOCAL_IPV4 = "192.168.0.2";
|
||||
};
|
||||
piholeCOnfig.web = {
|
||||
virtualHost = "pi.hole";
|
||||
password = "password";
|
||||
};
|
||||
};
|
||||
|
||||
networking.wireless.enable = true;
|
||||
networking.wireless.environmentFile = config.sops.secrets."wireless.env".path;
|
||||
networking.wireless.networks."KPNAA6306" = {
|
||||
|
@ -158,7 +131,7 @@
|
|||
|
||||
networking.hostName = "wheatley"; # Define your hostname
|
||||
|
||||
networking.wireless.interfaces = ["wlan0"];
|
||||
networking.wireless.interfaces = ["enu1u1"];
|
||||
|
||||
# powerManagement.cpuFreqGovernor = "powersave";
|
||||
powerManagement.cpufreq.max = 648000;
|
||||
|
|
|
@ -17,9 +17,20 @@
|
|||
boot.kernelModules = [];
|
||||
boot.extraModulePackages = [];
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/44444444-4444-4444-8888-888888888888";
|
||||
fsType = "ext4";
|
||||
fileSystems = {
|
||||
# Prior to 19.09, the boot partition was hosted on the smaller first partition
|
||||
# Starting with 19.09, the /boot folder is on the main bigger partition.
|
||||
# The following is to be used only with older images. Note such old images should not be considered supported anymore whatsoever, but if you installed back then, this might be needed
|
||||
|
||||
"/boot" = {
|
||||
device = "/dev/disk/by-label/FIRMWARE";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
"/" = {
|
||||
device = "/dev/disk/by-label/NIXOS_SD";
|
||||
fsType = "ext4";
|
||||
};
|
||||
};
|
||||
|
||||
swapDevices = [{device = "/dev/disk/by-uuid/4c9c8850-5e2e-4b4b-8ebb-4d7306012535";}];
|
||||
|
@ -35,4 +46,6 @@
|
|||
# networking.interfaces.wlan0.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "armv7l-linux";
|
||||
|
||||
powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand";
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue