-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
63d9a62
commit a8ea766
Showing
3 changed files
with
89 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
{...}: { | ||
imports = [ | ||
./hardware-config.nix | ||
]; | ||
|
||
zramSwap.enable = true; | ||
networking = { | ||
hostName = "ashokan"; | ||
domain = "unicycl.ing"; | ||
}; | ||
|
||
boot.loader.grub = { | ||
efiSupport = true; | ||
efiInstallAsRemovable = true; | ||
device = "nodev"; | ||
}; | ||
|
||
services.fail2ban = { | ||
enable = true; | ||
ignoreIP = [ | ||
# Whitelist RFC1918 addresses | ||
"10.0.0.0/8" | ||
"172.16.0.0/12" | ||
"192.168.0.0/16" | ||
# CGNAT (ie Tailscale) | ||
"100.64.0.0/10" | ||
# UVM | ||
"132.198.0.0/16" | ||
]; | ||
}; | ||
services.openssh = { | ||
# Use nonstandard SSH port for public server | ||
listenAddresses = [ | ||
{ | ||
addr = "0.0.0.0"; | ||
port = 69; | ||
} | ||
{ | ||
addr = "0.0.0.0"; | ||
port = 22; | ||
} | ||
]; | ||
}; | ||
|
||
# ======================== DO NOT CHANGE THIS ======================== | ||
system.stateVersion = "23.11"; | ||
# ======================== DO NOT CHANGE THIS ======================== | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ modulesPath, ... }: | ||
{ | ||
imports = [ (modulesPath + "/profiles/qemu-guest.nix") ]; | ||
fileSystems."/boot" = { device = "/dev/disk/by-uuid/FF29-457C"; fsType = "vfat"; }; | ||
boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "xen_blkfront" ]; | ||
boot.initrd.kernelModules = [ "nvme" ]; | ||
fileSystems."/" = { device = "/dev/sda1"; fsType = "ext4"; }; | ||
|
||
} |