Uit Hack42
Regel 13: | Regel 13: | ||
the configuration.nix that was used for the install process. | the configuration.nix that was used for the install process. | ||
+ | <pre> | ||
# Edit this configuration file to define what should be installed on | # Edit this configuration file to define what should be installed on | ||
# your system. Help is available in the configuration.nix(5) man page, on | # your system. Help is available in the configuration.nix(5) man page, on | ||
Regel 90: | Regel 91: | ||
} | } | ||
+ | </pre> | ||
==Tips== | ==Tips== | ||
for no root password | for no root password | ||
nixos-install --no-root-passwd | nixos-install --no-root-passwd |
Versie van 26 mrt 2025 17:04
Project: nixos server | |
---|---|
Naam | nixos server |
Door | cat |
Status | inprogres |
Madskillz | nix |
Doel / Omschrijving | |
nixos op een vps | |
Alle Projecten - Project Toevoegen |
documentation for setuin up nixos on the server.
configuration
the configuration.nix that was used for the install process.
# Edit this configuration file to define what should be installed on # your system. Help is available in the configuration.nix(5) man page, on # https://search.nixos.org/options and in the NixOS manual (`nixos-help`). { config, lib, pkgs, ... }: { imports = [ # Include the results of the hardware scan. ./hardware-configuration.nix ]; # Use the GRUB 2 boot loader. boot.loader.grub.enable = true; boot.loader.grub.devices = ["/dev/vda"]; system.autoUpgrade.channel = "https://nixos.org/channels/nixos-24.11"; networking.hostName = "biggerlitterbox"; time.timeZone = "Europe/Amsterdam"; i18n.defaultLocale = "en_GB.UTF-8"; i18n.extraLocaleSettings = { LC_ADDRESS = "nl_NL.UTF-8"; LC_IDENTIFICATION = "nl_NL.UTF-8"; LC_MEASUREMENT = "nl_NL.UTF-8"; LC_MONETARY = "nl_NL.UTF-8"; LC_NAME = "nl_NL.UTF-8"; LC_NUMERIC = "nl_NL.UTF-8"; LC_PAPER = "nl_NL.UTF-8"; LC_TELEPHONE = "nl_NL.UTF-8"; LC_TIME = "nl_NL.UTF-8"; }; users.users.cat = { isNormalUser = true; description = "cittycat"; extraGroups = ["wheel" "networkmanager"]; packages = with pkgs; []; initialHashedPassword = "$y$j9T$ajoQKlNl5re.9T4c8tEGt/$u2.URW8/HJMakAIKRMcwU9FGh/K4uXPf2TidEvAdzZ8"; openssh.authorizedKeys.keys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIE8/L4jIdoTkNKuEMba7H55pADvJq0/dnWEoontbmnbQ cat@kitten" ]; }; environment.systemPackages = with pkgs; [ htop ]; programs.neovim = { enable = true; defaultEditor = true; }; programs.git.enable = true; services.openssh = { enable = true; openFirewall = true; settings = { PasswordAuthentication = false; PubkeyAuthentication = true; PermitRootLogin = "no"; }; }; # networking.firewall.allowedTCPPorts = [ ]; # networking.firewall.allowedUDPPorts = [ ]; networking.firewall.enable = true; system.stateVersion = "24.11"; # Did you read the comment? }
Tips
for no root password nixos-install --no-root-passwd