Uit Hack42
Ga naar: navigatie, zoeken
(project status in stasis gezet)
 
(3 tussenliggende versies door dezelfde gebruiker niet weergegeven)
Regel 2: Regel 2:
 
|Naam=nixos server
 
|Naam=nixos server
 
|Eigenaar=cat
 
|Eigenaar=cat
|Status=inprogres
+
|Status=stasis
 
|Skills=nix
 
|Skills=nix
 
|Samenvatting=nixos op een vps
 
|Samenvatting=nixos op een vps
 
}}
 
}}
 +
 +
momenteel kijk ik niet meer nar nixos voor de server maar naar alpine linux of freebsd.
  
 
documentation for setuin up nixos on the server.
 
documentation for setuin up nixos on the server.
Regel 95: Regel 97:
 
==Tips==
 
==Tips==
 
for no root password
 
for no root password
nixos-install --no-root-passwd
+
<pre>nixos-install --no-root-passwd</pre>

Huidige versie van 10 jun 2025 om 17:59

Project: nixos server
Schroefje24.png
Schroefje24.png
Schroefje24.png
Schroefje24.png
Nixos server Picture.jpg

nixos server

Naam nixos server
Door cat
Status stasis
Madskillz nix
Doel / Omschrijving
nixos op een vps
Alle Projecten - Project Toevoegen
File:Nixos server_Picture.jpg noez


momenteel kijk ik niet meer nar nixos voor de server maar naar alpine linux of freebsd.

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