Normalized configs to follow changes from the past couple commits

This commit is contained in:
Chris Toph 2024-09-27 19:00:34 -04:00
parent d861feae5c
commit 04b3dc4172
14 changed files with 147 additions and 122 deletions

View file

@ -1,11 +1,5 @@
{ modulesPath, config, pkgs, ... }: { modulesPath, config, pkgs, hostName ... }:
{
let
hostname = "caenus";
in {
## MODULES & IMPORTS ## ## MODULES & IMPORTS ##
imports = imports =
@ -24,28 +18,10 @@ in {
boot.loader.efi.canTouchEfiVariables = true; boot.loader.efi.canTouchEfiVariables = true;
## NETWORKING ## ## NETWORKING ##
networking = { networking.firewall = {
firewall = {
allowedTCPPorts = [ 22 80 443 4040 ]; allowedTCPPorts = [ 22 80 443 4040 ];
allowedUDPPorts = [ 25565 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";
};
};
## ENVIORMENT & PACKAGES ## ## ENVIORMENT & PACKAGES ##
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [

View file

@ -1,11 +1,5 @@
{ modulesPath, config, pkgs, ... }: { modulesPath, config, pkgs, hostName ... }:
{
let
hostname = "cloud";
in {
## MODULES & IMPORTS ## ## MODULES & IMPORTS ##
imports = [ imports = [
# Common Modules # Common Modules
@ -31,29 +25,10 @@ in {
]; ];
## NETWORKING ## ## NETWORKING ##
networking = { networking.firewall = {
firewall = {
allowedTCPPorts = [ 22 80 443 ]; allowedTCPPorts = [ 22 80 443 ];
allowedUDPPorts = [ ]; 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";
};
};
## ENVIORMENT & PACKAGES ## ## ENVIORMENT & PACKAGES ##
nixpkgs.overlays = [ (import ./overlays) ]; nixpkgs.overlays = [ (import ./overlays) ];

View file

@ -9,6 +9,12 @@
options = ["direct_io" "defaults" "allow_other" "minfreespace=50G" "fsname=mergerfs" "category.create=mfs" "nonempty"]; 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" = { "/var/lib/nextcloud" = {
fsType = "none"; fsType = "none";
device = "/pool/NextCloud"; device = "/pool/NextCloud";

36
host/komodo/default.nix Normal file
View 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
View 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"];
};
};
}

View 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
];
}

View file

@ -0,0 +1,13 @@
{
# services.frp = {
# enable = true;
# role = "server";
# settings = {
# bindPort = 4040;
# auth = {
# method = "token";
# token = builtins.readFile ./frp.token;
# };
# };
# };
}

View file

@ -0,0 +1 @@
$2b$05$3hq3mA559Yxy679kKbzou..ao9d7annFWAo4MRo0tO04bYJsteWTu

View file

@ -0,0 +1 @@
<SHA token>

View file

@ -0,0 +1,3 @@
{
}

View file

@ -1,10 +1,5 @@
{ modulesPath, config, pkgs, ... }: { modulesPath, config, pkgs, hostName ... }:
let {
hostname = "nix";
in {
## MODULES & IMPORTS ## ## MODULES & IMPORTS ##
imports = [ imports = [
# Common Modules # Common Modules
@ -15,28 +10,11 @@ in {
./hardware.nix ./hardware.nix
]; ];
## NETWORKING ##
networking = {
firewall = {
allowedTCPPorts = [ 80 443 ];
};
dhcpcd.enable = false;
hostName = hostname;
networkmanager.enable = true;
useDHCP = false;
useHostResolvConf = false;
};
systemd.network = { ## NETWORKING ##
enable = true; networking.firewall = {
networks."50-eth0" = { allowedTCPPorts = [ 22 80 443 ];
matchConfig.Name = "eth0"; allowedUDPPorts = [ ];
networkConfig = {
DHCP = "ipv4";
IPv6AcceptRA = true;
};
linkConfig.RequiredForOnline = "routable";
};
}; };
## ENVIORMENT & PACKAGES ## ## ENVIORMENT & PACKAGES ##

View file

@ -1,11 +1,5 @@
{ modulesPath, config, pkgs, ... }: { modulesPath, config, pkgs, hostName ... }:
{
let
hostname = "proxy";
in {
## MODULES & IMPORTS ## ## MODULES & IMPORTS ##
imports = [ imports = [
# Common Modules # Common Modules
@ -23,28 +17,10 @@ in {
]; ];
## NETWORKING ## ## NETWORKING ##
networking = { networking.firewall = {
firewall = {
allowedTCPPorts = [ 22 80 443 ]; allowedTCPPorts = [ 22 80 443 ];
allowedUDPPorts = [ ]; 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";
};
};
## ENVIORMENT & PACKAGES ## ## ENVIORMENT & PACKAGES ##
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [

View file

@ -1,6 +1,23 @@
{ {
# fileSystems."/" = { programs.fuse.userAllowOther = true;
# device = "/dev/sda1";
# fsType = "ext4"; 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"];
};
};
} }

View file

@ -52,6 +52,9 @@ in {
}; };
## NIXOS ## ## NIXOS ##
systemd.tmpfiles.rules = [
"d /home/toph/git 0750 toph users -"
];
# forces interfaces to be named predictably # forces interfaces to be named predictably
# This value determines the NixOS release with which your system is to be # This value determines the NixOS release with which your system is to be
system.stateVersion = "24.11"; system.stateVersion = "24.11";