diff --git a/flake.nix b/flake.nix index 6cc5b16..5d7bf45 100644 --- a/flake.nix +++ b/flake.nix @@ -89,6 +89,13 @@ (mkHomeManagerConfig {}) ]; }; + bootstrap = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + specialArgs = { inherit inputs; }; + modules = [ + ./hosts/bootstrap/configuration.nix + ]; + }; # other hosts... }; }; diff --git a/hosts/bootstrap/configuration.nix b/hosts/bootstrap/configuration.nix new file mode 100644 index 0000000..bba8645 --- /dev/null +++ b/hosts/bootstrap/configuration.nix @@ -0,0 +1,93 @@ +{ config, modulesPath, pkgs, inputs, ... }: + +{ + imports = [ + (modulesPath + "/virtualisation/proxmox-lxc.nix") + ]; + + nix.settings = { + sandbox = false; + experimental-features = [ "nix-command" "flakes" ]; + auto-optimise-store = true; + trusted-users = [ "root" "alex" ]; + }; + + nix.gc = { + automatic = true; + dates = "weekly"; + options = "--delete-older-than 30d"; + }; + + proxmoxLXC = { + manageNetwork = false; + privileged = false; + }; + + networking.hostName = "bootstrap"; + + time.timeZone = "Australia/Brisbane"; + + i18n.defaultLocale = "en_GB.UTF-8"; + i18n.extraLocaleSettings = { + LC_ADDRESS = "en_AU.UTF-8"; + LC_IDENTIFICATION = "en_AU.UTF-8"; + LC_MEASUREMENT = "en_AU.UTF-8"; + LC_MONETARY = "en_AU.UTF-8"; + LC_NAME = "en_AU.UTF-8"; + LC_NUMERIC = "en_AU.UTF-8"; + LC_PAPER = "en_AU.UTF-8"; + LC_TELEPHONE = "en_AU.UTF-8"; + LC_TIME = "en_AU.UTF-8"; + }; + + console.keyMap = "dvorak"; + + nixpkgs.config.allowUnfree = true; + + documentation.man.generateCaches = false; + + programs.fish.enable = true; + + services.openssh = { + enable = true; + settings.PermitRootLogin = "prohibit-password"; + }; + + services.avahi = { + enable = true; + nssmdns4 = true; + nssmdns6 = true; + publish = { + enable = true; + addresses = true; + }; + openFirewall = true; + }; + + users.users.alex = { + isNormalUser = true; + description = "Alexander Wainwright"; + extraGroups = [ "wheel" ]; + shell = pkgs.fish; + openssh.authorizedKeys.keys = [ + # TODO: add your SSH public key here + ]; + }; + + users.users.root.openssh.authorizedKeys.keys = [ + # TODO: add your SSH public key here + ]; + + environment.variables.EDITOR = "nvim"; + + environment.systemPackages = with pkgs; [ + curl + git + htop + neovim + rsync + wget + ]; + + system.stateVersion = "25.11"; +}