Compare commits
No commits in common. "6b1174d0dc9510bee4d6e7ef472e2a4dee4c4e57" and "6b832e17698652365a46a20bfbb0efc930b5ed27" have entirely different histories.
6b1174d0dc
...
6b832e1769
|
@ -1,4 +0,0 @@
|
||||||
{
|
|
||||||
"$schema": "https://raw.githubusercontent.com/sumneko/vscode-lua/master/setting/schema.json",
|
|
||||||
"Lua.workspace.checkThirdParty": false
|
|
||||||
}
|
|
15
ssh/config
15
ssh/config
|
@ -26,7 +26,13 @@ Host nioma
|
||||||
IdentityFile ~/.ssh/free-aws.pem
|
IdentityFile ~/.ssh/free-aws.pem
|
||||||
Port 22
|
Port 22
|
||||||
|
|
||||||
# NixOS Pegasust-gh@Linode
|
# Ubuntu 22.04 LTS Pegasust@Linode
|
||||||
|
Host ocolo-lab
|
||||||
|
HostName ocolo.pegasust.com
|
||||||
|
User root
|
||||||
|
Port 22
|
||||||
|
|
||||||
|
# NixOS Pegasust@Linode
|
||||||
Host nyx
|
Host nyx
|
||||||
HostName nyx.pegasust.com
|
HostName nyx.pegasust.com
|
||||||
User hungtr
|
User hungtr
|
||||||
|
@ -37,9 +43,14 @@ Host lizzi
|
||||||
User hungtr
|
User hungtr
|
||||||
Port 22
|
Port 22
|
||||||
|
|
||||||
# Ubuntu 4G Pegasust-gh@Linode
|
|
||||||
Host ash
|
Host ash
|
||||||
HostName 192.155.95.41
|
HostName 192.155.95.41
|
||||||
User hungtr
|
User hungtr
|
||||||
Port 22
|
Port 22
|
||||||
|
|
||||||
|
Host lester
|
||||||
|
HostName 139.144.185.207
|
||||||
|
User hungtr
|
||||||
|
Port 22
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -2,9 +2,9 @@
|
||||||
let
|
let
|
||||||
hostname = specialArgs.hostname;
|
hostname = specialArgs.hostname;
|
||||||
enableSSH = specialArgs.enableSSH or true;
|
enableSSH = specialArgs.enableSSH or true;
|
||||||
_networking = { hostName = hostname; } // (specialArgs._networking or { });
|
networking = { hostName = hostname; } // (specialArgs.networking or { });
|
||||||
_boot = specialArgs._boot or { };
|
boot = specialArgs.boot or { };
|
||||||
_services = specialArgs._services or { };
|
services = specialArgs.services or { };
|
||||||
includeHardware = specialArgs.includeHardware or true;
|
includeHardware = specialArgs.includeHardware or true;
|
||||||
in
|
in
|
||||||
with lib;
|
with lib;
|
||||||
|
@ -14,7 +14,7 @@ with lib;
|
||||||
] else [ ]) ++ [
|
] else [ ]) ++ [
|
||||||
"${modulesPath}/profiles/minimal.nix"
|
"${modulesPath}/profiles/minimal.nix"
|
||||||
];
|
];
|
||||||
boot = _boot;
|
inherit boot;
|
||||||
|
|
||||||
system.stateVersion = "22.05";
|
system.stateVersion = "22.05";
|
||||||
# users.users.<defaultUser>.uid = 1000;
|
# users.users.<defaultUser>.uid = 1000;
|
||||||
|
@ -56,7 +56,7 @@ with lib;
|
||||||
];
|
];
|
||||||
# tailscale is mandatory : ^)
|
# tailscale is mandatory : ^)
|
||||||
# inherit services;
|
# inherit services;
|
||||||
services = _services // {
|
services = services // {
|
||||||
tailscale.enable = true;
|
tailscale.enable = true;
|
||||||
};
|
};
|
||||||
# create a oneshot job to authenticate to Tailscale
|
# create a oneshot job to authenticate to Tailscale
|
||||||
|
@ -89,25 +89,23 @@ with lib;
|
||||||
};
|
};
|
||||||
# Don't touch networking.firewall.enable, just configure everything else.
|
# Don't touch networking.firewall.enable, just configure everything else.
|
||||||
# inherit networking;
|
# inherit networking;
|
||||||
# inherit _networking;
|
networking = networking // {
|
||||||
networking = _networking // {
|
firewall = (networking.firewall.enable and {
|
||||||
firewall =
|
trustedInterfaces = networking.firewall.trustedInterfaces or [ ] ++ [
|
||||||
if _networking.firewall.enable ? false then {
|
|
||||||
trustedInterfaces = _networking.firewall.trustedInterfaces or [ ] ++ [
|
|
||||||
"tailscale0"
|
"tailscale0"
|
||||||
];
|
];
|
||||||
allowedUDPPorts = _networking.firewall.allowedUDPPorts or [ ] ++ [
|
allowedUDPPorts = networking.firewall.allowedUDPPorts or [ ] ++ [
|
||||||
config.services.tailscale.port
|
config.services.tailscale.port
|
||||||
];
|
];
|
||||||
allowedTCPPorts = _networking.firewall.allowedTCPPorts or [ ] ++ [
|
allowedTCPPorts = networking.firewall.allowedTCPPorts or [ ] ++ [
|
||||||
22
|
22
|
||||||
];
|
];
|
||||||
allowedUDPPortRanges = _networking.firewall.allowedUDPPortRanges or [ ] ++ [
|
allowedUDPPortRanges = networking.firewall.allowedUDPPortRanges or [ ] ++ [
|
||||||
{ from = 60000; to = 61000; } # mosh
|
{ from = 60000; to = 61000; } # mosh
|
||||||
|
|
||||||
];
|
];
|
||||||
checkReversePath = "loose";
|
checkReversePath = "loose";
|
||||||
} else { enable = false; };
|
}) or {};
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
specialArgs = {
|
specialArgs = {
|
||||||
# includeHardware = false;
|
# includeHardware = false;
|
||||||
hostname = "Felia";
|
hostname = "Felia";
|
||||||
_services.openssh = {
|
services.openssh = {
|
||||||
permitRootLogin = "no";
|
permitRootLogin = "no";
|
||||||
enable = true;
|
enable = true;
|
||||||
};
|
};
|
||||||
|
@ -31,25 +31,36 @@
|
||||||
];
|
];
|
||||||
specialArgs = {
|
specialArgs = {
|
||||||
hostname = "lizzi";
|
hostname = "lizzi";
|
||||||
_networking = {
|
networking = {
|
||||||
interfaces.eth1.ipv4.addresses = [{
|
interfaces.eth1.ipv4.addresses = [{
|
||||||
address = "71.0.0.1";
|
address = "71.0.0.1";
|
||||||
prefixLength = 24;
|
prefixLength = 24;
|
||||||
}];
|
}];
|
||||||
firewall = {
|
firewall = {
|
||||||
enable = false;
|
enable = false;
|
||||||
|
# Also wishing for nix-lsp to be a bit better here
|
||||||
|
# A man can only pray and cry
|
||||||
|
# How would we add such functionality to nix-lsp if nix is
|
||||||
|
# inherently lazy?
|
||||||
|
#
|
||||||
|
# Can use the schema, maybe?
|
||||||
|
#
|
||||||
|
# Also wishing on the ability for services to declare their
|
||||||
|
# own ports now
|
||||||
|
#
|
||||||
|
# Maybe write a mkService?
|
||||||
allowedTCPPorts = [80 443];
|
allowedTCPPorts = [80 443];
|
||||||
};
|
};
|
||||||
useDHCP = false;
|
useDHCP = false;
|
||||||
interfaces.eth0.useDHCP = true;
|
interfaces.eth0.useDHCP = true;
|
||||||
};
|
};
|
||||||
_boot.loader.grub.enable = true;
|
boot.loader.grub.enable = true;
|
||||||
_boot.loader.grub.version = 2;
|
boot.loader.grub.version = 2;
|
||||||
_services.openssh = {
|
services.openssh = {
|
||||||
permitRootLogin = "no";
|
permitRootLogin = "no";
|
||||||
enable = true;
|
enable = true;
|
||||||
};
|
};
|
||||||
_services.gitea = {
|
services.gitea = {
|
||||||
enable = true;
|
enable = true;
|
||||||
stateDir = "/gitea";
|
stateDir = "/gitea";
|
||||||
rootUrl = "https://git.pegasust.com";
|
rootUrl = "https://git.pegasust.com";
|
||||||
|
@ -60,7 +71,7 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
_services.nginx = {
|
services.nginx = {
|
||||||
enable = true;
|
enable = true;
|
||||||
clientMaxBodySize = "100m"; # Allow big file transfers over git :^)
|
clientMaxBodySize = "100m"; # Allow big file transfers over git :^)
|
||||||
recommendedGzipSettings = true;
|
recommendedGzipSettings = true;
|
||||||
|
@ -84,14 +95,14 @@
|
||||||
];
|
];
|
||||||
specialArgs = {
|
specialArgs = {
|
||||||
hostname = "lester";
|
hostname = "lester";
|
||||||
_networking = {
|
networking = {
|
||||||
firewall.enable = true;
|
firewall.enable = true;
|
||||||
useDHCP = false;
|
useDHCP = false;
|
||||||
interfaces.eth0.useDHCP = true;
|
interfaces.eth0.useDHCP = true;
|
||||||
};
|
};
|
||||||
_boot.loader.grub.enable = true;
|
boot.loader.grub.enable = true;
|
||||||
_boot.loader.grub.version = 2;
|
boot.loader.grub.version = 2;
|
||||||
_services.openssh = {
|
services.openssh = {
|
||||||
permitRootLogin = "no";
|
permitRootLogin = "no";
|
||||||
enable = true;
|
enable = true;
|
||||||
};
|
};
|
||||||
|
@ -104,7 +115,7 @@
|
||||||
];
|
];
|
||||||
specialArgs = {
|
specialArgs = {
|
||||||
hostname = "nyx";
|
hostname = "nyx";
|
||||||
_networking = {
|
networking = {
|
||||||
interfaces.eth1.ipv4.addresses = [{
|
interfaces.eth1.ipv4.addresses = [{
|
||||||
address = "71.0.0.2";
|
address = "71.0.0.2";
|
||||||
prefixLength = 24;
|
prefixLength = 24;
|
||||||
|
@ -113,9 +124,9 @@
|
||||||
useDHCP = false;
|
useDHCP = false;
|
||||||
interfaces.eth0.useDHCP = true;
|
interfaces.eth0.useDHCP = true;
|
||||||
};
|
};
|
||||||
_boot.loader.grub.enable = true;
|
boot.loader.grub.enable = true;
|
||||||
_boot.loader.grub.version = 2;
|
boot.loader.grub.version = 2;
|
||||||
_services.openssh = {
|
services.openssh = {
|
||||||
permitRootLogin = "no";
|
permitRootLogin = "no";
|
||||||
enable = true;
|
enable = true;
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,47 +0,0 @@
|
||||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
|
||||||
# and may be overwritten by future invocations. Please make changes
|
|
||||||
# to /etc/nixos/configuration.nix instead.
|
|
||||||
{ config, lib, pkgs, modulesPath, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
imports =
|
|
||||||
[ (modulesPath + "/profiles/qemu-guest.nix")
|
|
||||||
];
|
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = [ "virtio_pci" "virtio_scsi" "ahci" "sd_mod" ];
|
|
||||||
boot.initrd.kernelModules = [ ];
|
|
||||||
boot.kernelParams = [ "console=ttyS0,19200n8" ];
|
|
||||||
boot.loader.grub.extraConfig = ''
|
|
||||||
serial --speed=19200 --unit=0 --word=8 --parity=no --stop=1
|
|
||||||
terminal_input serial;
|
|
||||||
terminal_output serial
|
|
||||||
'';
|
|
||||||
boot.loader.grub.forceInstall = true;
|
|
||||||
boot.loader.grub.device = "nodev";
|
|
||||||
boot.loader.timeout = 10;
|
|
||||||
boot.kernelModules = [ ];
|
|
||||||
boot.extraModulePackages = [ ];
|
|
||||||
|
|
||||||
fileSystems = {
|
|
||||||
"/" = { device = "/dev/sda";
|
|
||||||
fsType = "ext4";
|
|
||||||
};
|
|
||||||
"/gitea" = {
|
|
||||||
device = "/dev/disk/by-id/scsi-0Linode_Volume_gitea";
|
|
||||||
fsType = "ext4";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
swapDevices =
|
|
||||||
[ { device = "/dev/sdb"; }
|
|
||||||
];
|
|
||||||
|
|
||||||
# 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
|
|
||||||
# still possible to use this option, but it's recommended to use it in conjunction
|
|
||||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
|
||||||
networking.useDHCP = lib.mkDefault true;
|
|
||||||
# networking.interfaces.enp0s5.useDHCP = lib.mkDefault true;
|
|
||||||
|
|
||||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
|
||||||
}
|
|
Loading…
Reference in New Issue