Files
Nixos/minimal/default.nix
T
Alexander Derevianko baf2f6438f Add zsh, add home-manager
2025-07-26 12:16:27 +02:00

93 lines
2.0 KiB
Nix

{ config, pkgs, extraHomeModules, inputs, ... }:
let
username = "susano";
in {
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
./disko-config.nix
];
# Bootloader.
boot.loader.grub.enable = true;
boot.loader.grub.useOSProber = true;
networking.hostName = username;
networking.networkmanager.enable = true;
# Set your time zone.
time.timeZone = "Europe/Warsaw";
# Select internationalisation properties.
i18n.defaultLocale = "en_US.UTF-8";
i18n.extraLocaleSettings = {
LC_ADDRESS = "en_GB.UTF-8";
LC_IDENTIFICATION = "en_GB.UTF-8";
LC_MEASUREMENT = "en_GB.UTF-8";
LC_MONETARY = "en_GB.UTF-8";
LC_NAME = "en_GB.UTF-8";
LC_NUMERIC = "en_GB.UTF-8";
LC_PAPER = "en_GB.UTF-8";
LC_TELEPHONE = "en_GB.UTF-8";
LC_TIME = "en_GB.UTF-8";
};
security.rtkit.enable = true;
users.users.${username} = {
isNormalUser = true;
description = "NixOS Proxmox Homelab";
initialPassword = "test";
extraGroups = [ "networkmanager" "wheel" ];
packages = with pkgs; [
];
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBcGhVpjmWEw1GEw0y/ysJPa2v3+u/Rt/iES/Se2huH2 alexander0derevianko@gmail.com"
];
shell = pkgs.zsh;
};
environment.systemPackages = with pkgs; [
vim
wget
ripgrep
];
services.openssh = {
enable = true;
settings = {
# Opinionated: forbid root login through SSH.
PermitRootLogin = "no";
# Opinionated: use keys only.
# Remove if you want to SSH using passwords
PasswordAuthentication = false;
};
};
programs = {
zsh.enable = true;
};
###
# Home Manger configuration
###
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
backupFileExtension = "backup";
extraSpecialArgs = { inherit inputs; };
users."${username}" = {
imports = [
./home.nix
] ++ extraHomeModules;
};
};
# DO NOT CHANGE AT ANY POINT!
system.stateVersion = "25.05";
}