nixos_config/hosts/common/base.nix

125 lines
2.9 KiB
Nix
Raw Normal View History

2025-07-23 19:46:19 +02:00
{ config, pkgs, ... }:
{
2025-08-02 10:49:11 +02:00
boot.kernel.sysctl = {
"net.ipv4.ip_unprivileged_port_start" = 0;
};
2025-07-23 19:46:26 +02:00
system.stateVersion = "24.05";
2025-07-29 11:25:40 +02:00
system.autoUpgrade = {
enable = true;
persistent = true;
flake = "/home/alisceon/.nixos_config";
flags = [
"--update-input"
"nixpkgs"
"-L"
];
dates = "daily";
}; # end system.autoUpgrade
nix = {
settings = {
experimental-features = [ "nix-command" "flakes" ];
auto-optimise-store = true;
trusted-users = [ "root" "alisceon" ];
}; # end settings
gc = {
automatic = true;
persistent = true;
dates = "daily";
2025-08-08 14:43:40 +02:00
options = "--delete-older-than 7d";
2025-07-29 11:25:40 +02:00
}; # end gc
registry = {
templates.to = {
type = "git";
url = "git+ssh://git@git.malice.zone/alisceon/devenv_templates.git";
2025-08-08 21:43:53 +02:00
}; # end templates.to
nixpkgs.to = {
type = "github";
owner = "NixOS";
repo = "nixpkgs";
ref = "nixos-unstable";
}; # end nixpkgs.to
nixpkgs-stable.to = {
type = "github";
owner = "NixOS";
repo = "nixpkgs";
ref = "nixos-25.05";
}; # end nixpkgs.to
2025-07-29 11:25:40 +02:00
}; #end registry
}; #end nix
2025-07-23 19:46:19 +02:00
2025-07-23 19:46:26 +02:00
console.keyMap = "sv-latin1";
2025-07-23 19:46:19 +02:00
networking.networkmanager.enable = true;
time.timeZone = "Europe/Stockholm";
i18n.defaultLocale = "en_US.UTF-8";
i18n.extraLocaleSettings = {
LC_ADDRESS = "sv_SE.UTF-8";
LC_IDENTIFICATION = "sv_SE.UTF-8";
LC_MEASUREMENT = "sv_SE.UTF-8";
LC_MONETARY = "sv_SE.UTF-8";
LC_NAME = "sv_SE.UTF-8";
LC_NUMERIC = "sv_SE.UTF-8";
LC_PAPER = "sv_SE.UTF-8";
LC_TELEPHONE = "sv_SE.UTF-8";
LC_TIME = "sv_SE.UTF-8";
};
2025-07-23 19:46:26 +02:00
security.sudo.wheelNeedsPassword = false;
2025-07-23 19:46:19 +02:00
2025-07-29 11:25:40 +02:00
environment = {
systemPackages = with pkgs; [
# CLI tools
git
wget
curl
2025-08-08 21:43:53 +02:00
btop # system monitor
ripgrep # grep replacement
bat # cat replacement
fd # find replacement
eza # ls replacement
nh # nix helper
jq # JSON processor
2025-08-25 10:01:53 +02:00
ncdu
pciutils
usbutils
tree
2025-08-08 21:43:53 +02:00
# Shells
2025-07-29 11:25:40 +02:00
bash
2025-08-08 21:43:53 +02:00
nushell
fish
powershell
2025-08-25 10:39:22 +02:00
# Languages
python3
2025-07-29 11:25:40 +02:00
# Virtualization
2025-08-14 12:27:04 +02:00
podman
2025-07-29 11:25:40 +02:00
]; # end systemPackages
2025-08-08 21:43:53 +02:00
shells = with pkgs; [
bash
nushell
fish
powershell
2025-08-14 12:27:04 +02:00
];
2025-07-29 11:25:40 +02:00
}; # end environment
2025-07-23 19:46:19 +02:00
virtualisation.podman = {
enable = true;
dockerCompat = true;
defaultNetwork.settings.dns_enabled = true;
2025-07-29 11:25:40 +02:00
}; # end virtualisation
2025-07-23 19:46:19 +02:00
users.users.alisceon = {
isNormalUser = true;
extraGroups = [ "wheel" "networkmanager" "podman" ];
2025-08-08 21:43:53 +02:00
shell = pkgs.nushell;
2025-08-26 14:00:14 +02:00
openssh.authorizedKeys.keys = [
"ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBPN1Cd2UlHo03Jqgi5Yb4io/3gh/X4wCb8LcmKlpAovQa271CKDBtYOUKn+Fts03g6dBMfaWMty6VGPMGDMONmc= alisceon@electra"
];
2025-07-29 11:25:40 +02:00
}; # end users
2025-08-25 10:01:53 +02:00
programs.command-not-found.enable = true;
2025-07-29 11:25:40 +02:00
} #end file