add: hosts folder

This commit is contained in:
Aaron Honeycutt 2024-01-31 08:00:36 -07:00
parent 641e11f49f
commit 172d68ebde
31 changed files with 2008 additions and 0 deletions

View file

View file

@ -0,0 +1,123 @@
{ config, pkgs, ... }:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
# ./unstable.nix
./stoners-space.nix
];
boot.kernelPackages = pkgs.linuxPackages_latest;
boot.kernelParams = [ "console=ttyS0,19200n8" ];
boot.binfmt.emulatedSystems = [ "aarch64-linux" ];
nix.settings.extra-platforms = [ "aarch64-linux" ];
nix.settings.auto-optimise-store = true;
nix.settings.experimental-features = [ "nix-command" "flakes" ];
nix.buildMachines = [{
hostName = "localhost";
systems = ["x86_64-linux"
"aarch64-linux"
"x86_64-darwin"
"aarch64-darwin"];
supportedFeatures = ["kvm" "nixos-test" "big-parallel" "benchmark"];
maxJobs = 8;
}];
nix.gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 30d";
};
# Use the GRUB 2 boot loader.
boot.loader.grub.enable = true;
boot.loader.grub.extraConfig = ''
serial --speed=19200 --unit=0 --word=8 --parity=no --stop=1;
terminal_input serial;
terminal_output serial
'';
boot.loader.grub.device = "nodev"; # or "nodev" for efi only
boot.loader.timeout = 10;
networking.firewall = {
enable = true;
allowedTCPPorts = [ 80 443 ];
};
networking.extraHosts =
''
23.32.241.51 r3.o.lencr.org
'';
# fileSystems."/mnt/swapfile" =
# { device = "/dev/disk/by-uuid/82672991-fe8a-485a-8dcf-7c8ae1282b6c";
# fsType = "ext4";
# };
# services.hydra = {
# enable = true;
# hydraURL = "localhost:3000";
# notificationSender = "hydra@localhost";
# useSubstitutes = true;
# };
security.acme.acceptTerms = true;
security.acme.defaults.email = "aaronhoneycutt@proton.me";
networking.hostName = "sovereign";
# Set your time zone.
# time.timeZone = "Europe/Amsterdam";
# Configure network proxy if necessary
# networking.proxy.default = "http://user:password@proxy:port/";
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
# Define a user account. Don't forget to set a password with passwd.
users.users.aaronh = {
isNormalUser = true;
extraGroups = [ "wheel" "networkmanager" ]; # Enable sudo for the user.
packages = with pkgs; [
cargo
git
git-lfs
];
};
users.users.builder = {
isNormalUser = true;
extraGroups = [ "wheel" ];
packages = with pkgs; [
neofetch
];
};
environment.systemPackages = with pkgs; [
acme-sh
git
inetutils
mtr
neofetch
sysstat
tree
wget
];
# Enable the OpenSSH daemon.
services.openssh = {
enable = true;
permitRootLogin = "no";
};
networking.usePredictableInterfaceNames = false;
networking.useDHCP = false;
networking.interfaces.eth0.useDHCP = true;
system.stateVersion = "22.11"; # Did you read the comment?
system.autoUpgrade.enable = true;
}

View file

@ -0,0 +1,111 @@
{
description = "Sovereign";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/release-23.05";
};
outputs = { self, nixpkgs, ... }@inputs: {
nixosConfigurations = {
"sovereign" = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
# Import the configuration.nix we used before, so that the old configuration file can still take effect.
# Note: /etc/nixos/configuration.nix itself is also a Nix Module, so you can import it directly here
# ./configuration.nix
./hardware-configuration.nix
./stoners-space.nix
({config, pkgs, ...}: {
nix = {
settings.auto-optimise-store = true;
settings.experimental-features = [ "nix-command" "flakes" ];
settings.extra-platforms = [ "aarch64-linux" ];
gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 30d";
};
buildMachines = [{
hostName = "localhost";
systems = [ "x86_64-linux"
"aarch64-linux"
"x86_64-darwin"
"aarch64-darwin" ];
supportedFeatures = [ "kvm" "nixos-test" "big-parallel" "benchmark" ];
maxJobs = 8;
}];
};
boot = {
kernelPackages = pkgs.linuxPackages_latest;
kernelParams = [ "console=ttyS0,1920n8" ];
binfmt.emulatedSystems = [ "aarch64-linux" ];
loader.grub.enable = true;
loader.grub.extraConfig = ''
serial --speed=19200 --unit=0 --word=8 --parity=no --stop=1;
terminal_input serial;
terminal_output serial
'';
loader.grub.device = "nodev"; # or "nodev" for efi only
loader.timeout = 10;
};
networking = {
hostName = "sovereign";
firewall = {
enable = true;
allowedTCPPorts = [ 80 443 ];
};
usePredictableInterfaceNames = false;
useDHCP = false;
interfaces.eth0.useDHCP = true;
};
users.users.aaronh = {
isNormalUser = true;
extraGroups = [ "wheel" "networkmanager" ]; # Enable sudo for the user.
packages = with pkgs; [
cargo
git
git-lfs
];
};
environment.systemPackages = with pkgs; [
acme-sh
git
git-lfs
mtr
neofetch
sysstat
tree
wget
];
security.acme.acceptTerms = true;
security.acme.defaults.email = "aaronhoneycutt@proton.me";
services.openssh = {
enable = true;
settings.PermitRootLogin = "no";
};
system = {
stateVersion = "23.05";
autoUpgrade.enable = true;
};
})
];
};
};
};
}