nixos_config/hosts/tesla-nixos/configuration.nix

133 lines
2.9 KiB
Nix
Raw Normal View History

2025-08-12 21:00:01 +02:00
{ config, pkgs, ... }:
{
imports =
[ ./hardware-configuration.nix ];
networking.hostName = "tesla-nixos";
boot.initrd.enable = true;
boot.loader = {
systemd-boot = {
enable = true;
}; # end loader.systemd-boot
}; # end boot
system.stateVersion = "24.05";
2025-08-12 21:41:55 +02:00
system.autoUpgrade = {
enable = true;
persistent = true;
2025-08-12 21:43:27 +02:00
flake = "/home/alisceon/nixos_config";
2025-08-12 21:41:55 +02:00
flags = [
"--update-input"
"nixpkgs"
"-L"
];
dates = "daily";
}; # end system.autoUpgrade
2025-08-12 21:00:01 +02:00
nix = {
settings = {
experimental-features = [ "nix-command" "flakes" ];
auto-optimise-store = true;
trusted-users = [ "root" "alisceon" ];
}; # end settings
gc = {
automatic = true;
persistent = true;
dates = "daily";
options = "--delete-older-than 7d";
}; # end gc
registry = {
templates.to = {
type = "git";
url = "git+ssh://git@git.malice.zone/alisceon/devenv_templates.git";
}; # 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
}; #end registry
}; #end nix
console.keyMap = "sv-latin1";
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";
};
security.sudo.wheelNeedsPassword = false;
services = {
2025-08-12 21:13:42 +02:00
openssh.enable = true;
2025-08-12 21:00:01 +02:00
}; # end services
services.fwupd.enable = true;
programs = {
dconf.enable = true;
fish.enable = true;
}; # end programs
environment = {
systemPackages = with pkgs; [
# CLI tools
git
wget
curl
btop # system monitor
ripgrep # grep replacement
bat # cat replacement
fd # find replacement
eza # ls replacement
nh # nix helper
jq # JSON processor
# Shells
bash
nushell
fish
powershell
devenv
direnv
# Virtualization
podman
]; # end systemPackages
shells = with pkgs; [
bash
nushell
fish
powershell
];
}; # end environment
virtualisation.podman = {
enable = true;
dockerCompat = true;
defaultNetwork.settings.dns_enabled = true;
}; # end virtualisation
users.users.alisceon = {
isNormalUser = true;
extraGroups = [ "wheel" "networkmanager" "podman" ];
shell = pkgs.nushell;
}; # end users
} # end file