Normalized configs to follow changes from the past couple commits
This commit is contained in:
parent
d861feae5c
commit
04b3dc4172
14 changed files with 147 additions and 122 deletions
|
@ -1,11 +1,5 @@
|
|||
{ modulesPath, config, pkgs, ... }:
|
||||
|
||||
let
|
||||
|
||||
hostname = "caenus";
|
||||
|
||||
in {
|
||||
|
||||
{ modulesPath, config, pkgs, hostName ... }:
|
||||
{
|
||||
## MODULES & IMPORTS ##
|
||||
|
||||
imports =
|
||||
|
@ -24,27 +18,9 @@ in {
|
|||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
## NETWORKING ##
|
||||
networking = {
|
||||
firewall = {
|
||||
allowedTCPPorts = [ 22 80 443 4040 ];
|
||||
allowedUDPPorts = [ 25565 4040 ];
|
||||
};
|
||||
dhcpcd.enable = false;
|
||||
hostName = hostname;
|
||||
networkmanager.enable = true;
|
||||
useHostResolvConf = false;
|
||||
};
|
||||
|
||||
systemd.network = {
|
||||
enable = true;
|
||||
networks."50-enp0s6" = {
|
||||
matchConfig.Name = "enp0s6";
|
||||
networkConfig = {
|
||||
DHCP = "yes";
|
||||
IPv6AcceptRA = true;
|
||||
};
|
||||
linkConfig.RequiredForOnline = "routable";
|
||||
};
|
||||
networking.firewall = {
|
||||
allowedTCPPorts = [ 22 80 443 4040 ];
|
||||
allowedUDPPorts = [ 25565 4040 ];
|
||||
};
|
||||
|
||||
## ENVIORMENT & PACKAGES ##
|
||||
|
|
|
@ -1,11 +1,5 @@
|
|||
{ modulesPath, config, pkgs, ... }:
|
||||
|
||||
let
|
||||
|
||||
hostname = "cloud";
|
||||
|
||||
in {
|
||||
|
||||
{ modulesPath, config, pkgs, hostName ... }:
|
||||
{
|
||||
## MODULES & IMPORTS ##
|
||||
imports = [
|
||||
# Common Modules
|
||||
|
@ -31,28 +25,9 @@ in {
|
|||
];
|
||||
|
||||
## NETWORKING ##
|
||||
networking = {
|
||||
firewall = {
|
||||
allowedTCPPorts = [ 22 80 443 ];
|
||||
allowedUDPPorts = [ ];
|
||||
};
|
||||
dhcpcd.enable = false;
|
||||
hostName = hostname;
|
||||
networkmanager.enable = true;
|
||||
useDHCP = false;
|
||||
useHostResolvConf = false;
|
||||
};
|
||||
|
||||
systemd.network = {
|
||||
enable = true;
|
||||
networks."50-eth0" = {
|
||||
matchConfig.Name = "eth0";
|
||||
networkConfig = {
|
||||
DHCP = "ipv4";
|
||||
IPv6AcceptRA = true;
|
||||
};
|
||||
linkConfig.RequiredForOnline = "routable";
|
||||
};
|
||||
networking.firewall = {
|
||||
allowedTCPPorts = [ 22 80 443 ];
|
||||
allowedUDPPorts = [ ];
|
||||
};
|
||||
|
||||
## ENVIORMENT & PACKAGES ##
|
||||
|
|
|
@ -9,6 +9,12 @@
|
|||
options = ["direct_io" "defaults" "allow_other" "minfreespace=50G" "fsname=mergerfs" "category.create=mfs" "nonempty"];
|
||||
};
|
||||
|
||||
"/home/toph/git" = {
|
||||
fsType = "none";
|
||||
device = "/pool/git";
|
||||
options = ["bind" "nofail"];
|
||||
};
|
||||
|
||||
"/var/lib/nextcloud" = {
|
||||
fsType = "none";
|
||||
device = "/pool/NextCloud";
|
||||
|
|
36
host/komodo/default.nix
Normal file
36
host/komodo/default.nix
Normal file
|
@ -0,0 +1,36 @@
|
|||
{ modulesPath, config, pkgs, hostName ... }:
|
||||
{
|
||||
## MODULES & IMPORTS ##
|
||||
imports = [
|
||||
# Common Modules
|
||||
../../common/lxc
|
||||
../../common/ssh
|
||||
|
||||
# Import hardware configuration.
|
||||
./hardware.nix
|
||||
|
||||
# Local Modules
|
||||
./modules/frp
|
||||
./modules/komodo
|
||||
];
|
||||
|
||||
## NETWORKING ##
|
||||
networking.firewall = {
|
||||
allowedTCPPorts = [ 22 80 443 ];
|
||||
allowedUDPPorts = [ ];
|
||||
};
|
||||
|
||||
## ENVIORMENT & PACKAGES ##
|
||||
environment.systemPackages = with pkgs; [
|
||||
git
|
||||
micro
|
||||
openssh
|
||||
ranger
|
||||
sshfs
|
||||
wget
|
||||
];
|
||||
|
||||
environment.variables = {
|
||||
HOSTNAME = hostName;
|
||||
};
|
||||
}
|
23
host/komodo/hardware.nix
Normal file
23
host/komodo/hardware.nix
Normal file
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
programs.fuse.userAllowOther = true;
|
||||
|
||||
fileSystems = {
|
||||
"/pool" = {
|
||||
device = "toph@104.40.4.24:/pool";
|
||||
fsType = "sshfs";
|
||||
options = [
|
||||
"defaults"
|
||||
"reconnect"
|
||||
"_netdev"
|
||||
"allow_other"
|
||||
"identityfile=/home/toph/.ssh/pve"
|
||||
];
|
||||
};
|
||||
|
||||
"/home/toph/git" = {
|
||||
fsType = "none";
|
||||
device = "/pool/git";
|
||||
options = ["bind" "nofail"];
|
||||
};
|
||||
};
|
||||
}
|
17
host/komodo/home/default.nix
Normal file
17
host/komodo/home/default.nix
Normal file
|
@ -0,0 +1,17 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
# Module imports
|
||||
imports = [
|
||||
# Common Modules
|
||||
../../../common/home
|
||||
];
|
||||
|
||||
home.packages = with pkgs; [
|
||||
fastfetch
|
||||
fish
|
||||
fishPlugins.grc
|
||||
fishPlugins.tide
|
||||
grc
|
||||
lazydocker
|
||||
];
|
||||
}
|
13
host/komodo/modules/frp/default.nix
Normal file
13
host/komodo/modules/frp/default.nix
Normal file
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
# services.frp = {
|
||||
# enable = true;
|
||||
# role = "server";
|
||||
# settings = {
|
||||
# bindPort = 4040;
|
||||
# auth = {
|
||||
# method = "token";
|
||||
# token = builtins.readFile ./frp.token;
|
||||
# };
|
||||
# };
|
||||
# };
|
||||
}
|
1
host/komodo/modules/frp/frp.token
Normal file
1
host/komodo/modules/frp/frp.token
Normal file
|
@ -0,0 +1 @@
|
|||
$2b$05$3hq3mA559Yxy679kKbzou..ao9d7annFWAo4MRo0tO04bYJsteWTu
|
1
host/komodo/modules/frp/frp.token.example
Normal file
1
host/komodo/modules/frp/frp.token.example
Normal file
|
@ -0,0 +1 @@
|
|||
<SHA token>
|
3
host/komodo/modules/komodo/default.nix
Normal file
3
host/komodo/modules/komodo/default.nix
Normal file
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
|
||||
}
|
|
@ -1,10 +1,5 @@
|
|||
{ modulesPath, config, pkgs, ... }:
|
||||
let
|
||||
|
||||
hostname = "nix";
|
||||
|
||||
in {
|
||||
|
||||
{ modulesPath, config, pkgs, hostName ... }:
|
||||
{
|
||||
## MODULES & IMPORTS ##
|
||||
imports = [
|
||||
# Common Modules
|
||||
|
@ -15,28 +10,11 @@ in {
|
|||
./hardware.nix
|
||||
];
|
||||
|
||||
|
||||
## NETWORKING ##
|
||||
networking = {
|
||||
firewall = {
|
||||
allowedTCPPorts = [ 80 443 ];
|
||||
};
|
||||
dhcpcd.enable = false;
|
||||
hostName = hostname;
|
||||
networkmanager.enable = true;
|
||||
useDHCP = false;
|
||||
useHostResolvConf = false;
|
||||
};
|
||||
|
||||
systemd.network = {
|
||||
enable = true;
|
||||
networks."50-eth0" = {
|
||||
matchConfig.Name = "eth0";
|
||||
networkConfig = {
|
||||
DHCP = "ipv4";
|
||||
IPv6AcceptRA = true;
|
||||
};
|
||||
linkConfig.RequiredForOnline = "routable";
|
||||
};
|
||||
networking.firewall = {
|
||||
allowedTCPPorts = [ 22 80 443 ];
|
||||
allowedUDPPorts = [ ];
|
||||
};
|
||||
|
||||
## ENVIORMENT & PACKAGES ##
|
||||
|
@ -50,7 +28,7 @@ in {
|
|||
wget
|
||||
x2goserver
|
||||
];
|
||||
|
||||
|
||||
programs.java = {
|
||||
enable = true;
|
||||
package = pkgs.jdk; };
|
||||
|
|
|
@ -1,11 +1,5 @@
|
|||
{ modulesPath, config, pkgs, ... }:
|
||||
|
||||
let
|
||||
|
||||
hostname = "proxy";
|
||||
|
||||
in {
|
||||
|
||||
{ modulesPath, config, pkgs, hostName ... }:
|
||||
{
|
||||
## MODULES & IMPORTS ##
|
||||
imports = [
|
||||
# Common Modules
|
||||
|
@ -23,27 +17,9 @@ in {
|
|||
];
|
||||
|
||||
## NETWORKING ##
|
||||
networking = {
|
||||
firewall = {
|
||||
allowedTCPPorts = [ 22 80 443 ];
|
||||
allowedUDPPorts = [ ];
|
||||
};
|
||||
dhcpcd.enable = false;
|
||||
hostName = hostname;
|
||||
networkmanager.enable = true;
|
||||
useHostResolvConf = false;
|
||||
};
|
||||
|
||||
systemd.network = {
|
||||
enable = true;
|
||||
networks."50-net0" = {
|
||||
matchConfig.Name = "net0";
|
||||
networkConfig = {
|
||||
DHCP = "yes";
|
||||
IPv6AcceptRA = true;
|
||||
};
|
||||
linkConfig.RequiredForOnline = "routable";
|
||||
};
|
||||
networking.firewall = {
|
||||
allowedTCPPorts = [ 22 80 443 ];
|
||||
allowedUDPPorts = [ ];
|
||||
};
|
||||
|
||||
## ENVIORMENT & PACKAGES ##
|
||||
|
|
|
@ -1,6 +1,23 @@
|
|||
{
|
||||
# fileSystems."/" = {
|
||||
# device = "/dev/sda1";
|
||||
# fsType = "ext4";
|
||||
# };
|
||||
}
|
||||
programs.fuse.userAllowOther = true;
|
||||
|
||||
fileSystems = {
|
||||
"/pool" = {
|
||||
device = "toph@104.40.4.24:/pool";
|
||||
fsType = "sshfs";
|
||||
options = [
|
||||
"defaults"
|
||||
"reconnect"
|
||||
"_netdev"
|
||||
"allow_other"
|
||||
"identityfile=/home/toph/.ssh/pve"
|
||||
];
|
||||
};
|
||||
|
||||
"/home/toph/git" = {
|
||||
fsType = "none";
|
||||
device = "/pool/git";
|
||||
options = ["bind" "nofail"];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -52,6 +52,9 @@ in {
|
|||
};
|
||||
|
||||
## NIXOS ##
|
||||
systemd.tmpfiles.rules = [
|
||||
"d /home/toph/git 0750 toph users -"
|
||||
];
|
||||
# forces interfaces to be named predictably
|
||||
# This value determines the NixOS release with which your system is to be
|
||||
system.stateVersion = "24.11";
|
||||
|
|
Loading…
Add table
Reference in a new issue