fully modularised 'services' and 'networking' subsections of 'configuration.nix'
This commit is contained in:
parent
6d8cfb8738
commit
cbc37a7226
10 changed files with 88 additions and 275 deletions
|
|
@ -6,6 +6,7 @@
|
|||
"${builtins.fetchTarball "https://github.com/nix-community/disko/archive/master.tar.gz"}/module.nix"
|
||||
./disko-config.nix
|
||||
./hardware-configuration.nix
|
||||
./network-configuration.nix
|
||||
../../modules
|
||||
];
|
||||
|
||||
|
|
@ -69,34 +70,4 @@
|
|||
};
|
||||
};
|
||||
|
||||
networking = {
|
||||
hostName = "proserpina"; # Define your hostname
|
||||
};
|
||||
|
||||
services = {
|
||||
|
||||
syncthing = {
|
||||
enable = false;
|
||||
dataDir = "/home/serenity/";
|
||||
configDir = "/home/serenity/.config/syncthing";
|
||||
user = "serenity";
|
||||
settings = {
|
||||
|
||||
devices = {
|
||||
# hades.id = "$DEVICE_ID";
|
||||
# hecate.id = "$DEVICE_ID";
|
||||
# proserpina.id = "$DEVICE_ID";
|
||||
};
|
||||
|
||||
folders = {
|
||||
# "$FOLDER_ID" = {
|
||||
# path = "/home/serenity/Documents/Notes";
|
||||
# devices = [ "hecate" "hades" ];
|
||||
# };
|
||||
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,8 @@
|
|||
imports =
|
||||
[
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
./disko-config.sh
|
||||
# ./disko-config.sh
|
||||
./disko-config.nix
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usb_storage" "sd_mod" ];
|
||||
|
|
|
|||
69
hosts/proserpina/network-configuration.nix
Normal file
69
hosts/proserpina/network-configuration.nix
Normal file
|
|
@ -0,0 +1,69 @@
|
|||
{ pkgs, lib, config, ... }:
|
||||
|
||||
{
|
||||
|
||||
imports = [
|
||||
# ./file.nix
|
||||
];
|
||||
|
||||
networking = {
|
||||
hostname = "proserpina";
|
||||
wireless.enable = false;
|
||||
networkmanager = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
# networking.proxy = {
|
||||
# default = "https://user:password@proxy:port/";
|
||||
# noProxy = "127.0.0.1, localhost, internal.comain";
|
||||
# };
|
||||
|
||||
networking.firewall = {
|
||||
enable = false;
|
||||
# checkReversePath = "loose";
|
||||
# allowedTCPPorts = [ 22000 21027 25565 ];
|
||||
# allowedUDPPorts = [ 22000 21027 41641 51820 ];
|
||||
# allowedTCPPortRanges = [
|
||||
# { from = 9999; to = 9999; } # KDE COnnect
|
||||
# { from = 9999; to = 9999; } # Nicotine+
|
||||
# ];
|
||||
# allowedUDPPortRanges = [
|
||||
# { from = 9999; to = 9999; } # KDE COnnect
|
||||
# ];
|
||||
# interfaces."DEVICENAME".allowedTCPPorts = [ 22999 ]
|
||||
};
|
||||
|
||||
services.syncthing = {
|
||||
enable = false;
|
||||
dataDir = "/home/serenity/";
|
||||
configDir = "/home/serenity/.config/syncthing";
|
||||
user = "serenity";
|
||||
settings.devices = {
|
||||
|
||||
# hades.id = "DEVICE_ID";
|
||||
# proserpina.id = "DEVICE_ID";
|
||||
# hecate.id = "DEVICE_ID";
|
||||
|
||||
};
|
||||
settings.folders = {
|
||||
|
||||
# "FOLDER_ID" = {
|
||||
# path = "/home/serenity/Documents/Notes";
|
||||
# devices = [ "hecate" "hades" "proserpina" ];
|
||||
# };
|
||||
|
||||
# "FOLDER_ID" = {
|
||||
# path = "/home/serenity/Documents/Notes";
|
||||
# devices = [ "hecate" "hades" "proserpina" ];
|
||||
# };
|
||||
|
||||
# "FOLDER_ID" = {
|
||||
# path = "/home/serenity/Documents/Notes";
|
||||
# devices = [ "hecate" "hades" "proserpina" ];
|
||||
# };
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue