A complete reformatting to match nixpkgs-fmt
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
{ pkgs, config, ...}:
|
||||
{ pkgs, config, ... }:
|
||||
|
||||
{
|
||||
# Bootloader.
|
||||
boot = {
|
||||
loader.grub = {
|
||||
enable = true;
|
||||
device = "/dev/sda";
|
||||
};
|
||||
};
|
||||
# Bootloader.
|
||||
boot = {
|
||||
loader.grub = {
|
||||
enable = true;
|
||||
device = "/dev/sda";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
+16
-15
@@ -5,20 +5,21 @@
|
||||
{ config, pkgs, agenix, ... }:
|
||||
|
||||
{
|
||||
imports = [ # Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
./boot.nix
|
||||
./filesystem.nix
|
||||
./location.nix
|
||||
./networking.nix
|
||||
./wiki.nix
|
||||
];
|
||||
imports = [
|
||||
# Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
./boot.nix
|
||||
./filesystem.nix
|
||||
./location.nix
|
||||
./networking.nix
|
||||
./wiki.nix
|
||||
];
|
||||
|
||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||
users.users.greg = {
|
||||
isNormalUser = true;
|
||||
description = "Gregory Hellings";
|
||||
extraGroups = [ "networkmanager" "wheel" ];
|
||||
packages = with pkgs; [];
|
||||
};
|
||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||
users.users.greg = {
|
||||
isNormalUser = true;
|
||||
description = "Gregory Hellings";
|
||||
extraGroups = [ "networkmanager" "wheel" ];
|
||||
packages = with pkgs; [ ];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
|
||||
let
|
||||
in {
|
||||
fileSystems."serve" = {
|
||||
#device = "10.42.1.4:/volume1/icdm-mysql/";
|
||||
#fsType = "nfs";
|
||||
device = "/dev/sdb1";
|
||||
fsType = "auto";
|
||||
mountPoint = "/srv";
|
||||
};
|
||||
fileSystems."serve" = {
|
||||
#device = "10.42.1.4:/volume1/icdm-mysql/";
|
||||
#fsType = "nfs";
|
||||
device = "/dev/sdb1";
|
||||
fsType = "auto";
|
||||
mountPoint = "/srv";
|
||||
};
|
||||
}
|
||||
|
||||
@@ -5,7 +5,8 @@
|
||||
|
||||
{
|
||||
imports =
|
||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||
[
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
|
||||
@@ -14,24 +15,26 @@
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/dab0d455-e25e-4445-8fa4-5320047d7e7b";
|
||||
{
|
||||
device = "/dev/disk/by-uuid/dab0d455-e25e-4445-8fa4-5320047d7e7b";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=@" ];
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/5aedbb07-5761-423b-909d-2560405eae32";
|
||||
{
|
||||
device = "/dev/disk/by-uuid/5aedbb07-5761-423b-909d-2560405eae32";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/var" =
|
||||
{ device = "/dev/disk/by-uuid/57968536-c29d-417d-997e-85223d1d1f65";
|
||||
{
|
||||
device = "/dev/disk/by-uuid/57968536-c29d-417d-997e-85223d1d1f65";
|
||||
fsType = "btrfs";
|
||||
};
|
||||
|
||||
swapDevices =
|
||||
[ { device = "/dev/disk/by-uuid/09691dce-375a-43c6-8d40-4498d20a6d9a"; }
|
||||
];
|
||||
[{ device = "/dev/disk/by-uuid/09691dce-375a-43c6-8d40-4498d20a6d9a"; }];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{...}:
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
# Set your time zone.
|
||||
|
||||
@@ -1,58 +1,59 @@
|
||||
{...}:
|
||||
{ ... }:
|
||||
let
|
||||
dnsHosts = builtins.concatStringsSep "\n" [
|
||||
"wiki.icdm.lan 10.42.101.1"
|
||||
];
|
||||
dnsHosts = builtins.concatStringsSep "\n" [
|
||||
"wiki.icdm.lan 10.42.101.1"
|
||||
];
|
||||
in
|
||||
{
|
||||
# If we have to do proxying in Bayonnais, we can start to work on that here
|
||||
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
||||
networking = {
|
||||
hostName = "icdm-root";
|
||||
useDHCP = false;
|
||||
defaultGateway = "10.42.1.1";
|
||||
nameservers = [ "100.100.100.100" "10.42.1.2" ];
|
||||
enableIPv6 = false;
|
||||
# If we have to do proxying in Bayonnais, we can start to work on that here
|
||||
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
||||
networking = {
|
||||
hostName = "icdm-root";
|
||||
useDHCP = false;
|
||||
defaultGateway = "10.42.1.1";
|
||||
nameservers = [ "100.100.100.100" "10.42.1.2" ];
|
||||
enableIPv6 = false;
|
||||
|
||||
interfaces = {
|
||||
eno1.ipv4.addresses = [ {
|
||||
address = "10.42.101.1";
|
||||
prefixLength = 16;
|
||||
} {
|
||||
address = "10.77.1.2";
|
||||
prefixLength = 16;
|
||||
} ];
|
||||
};
|
||||
# Allow traffic through
|
||||
firewall = {
|
||||
enable = true;
|
||||
allowedTCPPorts = [ 53 ];
|
||||
allowedUDPPorts = [ 53 67 ];
|
||||
};
|
||||
interfaces = {
|
||||
eno1.ipv4.addresses = [{
|
||||
address = "10.42.101.1";
|
||||
prefixLength = 16;
|
||||
}
|
||||
{
|
||||
address = "10.77.1.2";
|
||||
prefixLength = 16;
|
||||
}];
|
||||
};
|
||||
# Allow traffic through
|
||||
firewall = {
|
||||
enable = true;
|
||||
allowedTCPPorts = [ 53 ];
|
||||
allowedUDPPorts = [ 53 67 ];
|
||||
};
|
||||
|
||||
extraHosts = "${dnsHosts}";
|
||||
};
|
||||
extraHosts = "${dnsHosts}";
|
||||
};
|
||||
|
||||
services.dnsmasq = {
|
||||
enable = true;
|
||||
settings = {
|
||||
domain = "icdm.lan";
|
||||
dhcp-range = [
|
||||
"eno1,10.77.1.10,10.77.1.255,255.255.0.0,12h"
|
||||
];
|
||||
dhcp-option = [
|
||||
"eno1,option:router,10.77.1.1"
|
||||
"eno1,option:dns-server,10.77.1.2,1.1.1.1"
|
||||
"eno1,option:domain-search,icdm.lan"
|
||||
];
|
||||
expand-hosts = true;
|
||||
log-dhcp = true;
|
||||
log-queries = true;
|
||||
# Upstream servers
|
||||
server = [
|
||||
"1.1.1.1"
|
||||
"8.8.4.4"
|
||||
];
|
||||
};
|
||||
};
|
||||
services.dnsmasq = {
|
||||
enable = true;
|
||||
settings = {
|
||||
domain = "icdm.lan";
|
||||
dhcp-range = [
|
||||
"eno1,10.77.1.10,10.77.1.255,255.255.0.0,12h"
|
||||
];
|
||||
dhcp-option = [
|
||||
"eno1,option:router,10.77.1.1"
|
||||
"eno1,option:dns-server,10.77.1.2,1.1.1.1"
|
||||
"eno1,option:domain-search,icdm.lan"
|
||||
];
|
||||
expand-hosts = true;
|
||||
log-dhcp = true;
|
||||
log-queries = true;
|
||||
# Upstream servers
|
||||
server = [
|
||||
"1.1.1.1"
|
||||
"8.8.4.4"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
+24
-24
@@ -1,32 +1,32 @@
|
||||
{ pkgs, ... }:
|
||||
let
|
||||
wikiPasswordFile = "/var/mediawiki/passwordFile";
|
||||
wikiHost = "wiki.icdm.lan";
|
||||
kiwixport = 8080;
|
||||
dependents = with pkgs; [
|
||||
enwiki-dump
|
||||
transmission
|
||||
];
|
||||
wikiPasswordFile = "/var/mediawiki/passwordFile";
|
||||
wikiHost = "wiki.icdm.lan";
|
||||
kiwixport = 8080;
|
||||
dependents = with pkgs; [
|
||||
enwiki-dump
|
||||
transmission
|
||||
];
|
||||
in
|
||||
{
|
||||
services.kiwix-serve = {
|
||||
enable = true;
|
||||
port = kiwixport;
|
||||
path = "/srv/zims/*.zim";
|
||||
};
|
||||
services.kiwix-serve = {
|
||||
enable = true;
|
||||
port = kiwixport;
|
||||
path = "/srv/zims/*.zim";
|
||||
};
|
||||
|
||||
services.transmission = {
|
||||
enable = true;
|
||||
settings = {
|
||||
download-dir = "/srv";
|
||||
incomplete-dir = "/srv/incomplete";
|
||||
rpc-bind-address = "0.0.0.0";
|
||||
rpc-whitelist = "10.42.*,127.*,localhost";
|
||||
};
|
||||
};
|
||||
services.transmission = {
|
||||
enable = true;
|
||||
settings = {
|
||||
download-dir = "/srv";
|
||||
incomplete-dir = "/srv/incomplete";
|
||||
rpc-bind-address = "0.0.0.0";
|
||||
rpc-whitelist = "10.42.*,127.*,localhost";
|
||||
};
|
||||
};
|
||||
|
||||
greg.proxies."${wikiHost}".target = "http://localhost:${toString kiwixport}";
|
||||
networking.firewall.allowedTCPPorts = [ 80 ];
|
||||
greg.proxies."${wikiHost}".target = "http://localhost:${toString kiwixport}";
|
||||
networking.firewall.allowedTCPPorts = [ 80 ];
|
||||
|
||||
environment.systemPackages = dependents;
|
||||
environment.systemPackages = dependents;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user