nixos_config/hosts/common/base.nix

168 lines
4.4 KiB
Nix
Raw Normal View History

2025-09-04 09:30:33 +02:00
{ config, pkgs, pkgs-unstable, ... }:
2025-07-23 19:46:19 +02:00
{
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-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
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-09-08 13:30:20 +02:00
fzf # fuzzy finder
cowsay # important
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-09-04 15:05:45 +02:00
2025-08-25 10:39:22 +02:00
# Languages
python3
2025-09-08 13:30:20 +02:00
python3Packages.python-lsp-server
2025-09-04 15:05:45 +02:00
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-09-03 23:26:51 +02:00
xonsh
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
2025-09-24 18:23:45 +02:00
virtualisation = {
containers.enable = true;
podman = {
enable = true;
dockerCompat = true;
defaultNetwork.settings.dns_enabled = true;
}; # end podman
oci-containers.backend = "podman";
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-09-03 23:26:51 +02:00
shell = pkgs.xonsh;
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
2025-09-03 23:26:51 +02:00
programs = {
command-not-found.enable = true;
2025-09-04 15:13:04 +02:00
fzf.fuzzyCompletion = true;
2025-09-03 23:26:51 +02:00
xonsh = {
enable = true;
2025-09-04 15:05:45 +02:00
extraPackages = ps: with ps; [
pyperclip
2025-09-04 09:30:33 +02:00
xonsh.xontribs.xonsh-direnv
2025-09-04 15:05:45 +02:00
pkgs.nur.repos.xonsh-xontribs.xontrib-fish-completer
pkgs.nur.repos.xonsh-xontribs.xontrib-abbrevs
pkgs.nur.repos.xonsh-xontribs.xontrib-clp
pkgs.nur.repos.xonsh-xontribs.xontrib-bashisms
(
ps.buildPythonPackage
rec {
name = "xontrib-fzf-completions";
version = "v0.0.2";
format = "pyproject";
nativeBuildInputs = [ ps.setuptools ps.setuptools-scm ps.wheel ];
propagatedBuildInputs = [ ps.xonsh ];
src = pkgs.fetchFromGitHub {
owner = "doronz88";
repo = "${name}";
rev = "${version}";
sha256 = "sha256-1z5xHX4Psevn8686QkwIzv/LOJ5IMJc2nQ5Hg/2svTc=";
};
meta = {
homepage = "https://github.com/doronz88/xontrib-fzf-completions";
description = "fuzzy completions for xonsh";
license = pkgs.lib.licenses.mit;
maintainers = [ ];
2025-09-24 18:23:45 +02:00
}; # end meta
} # end buildPythonPackage
)
2025-09-04 15:05:45 +02:00
]; # end extraPackages
2025-09-08 13:30:20 +02:00
config = (builtins.readFile ../../home/conf/xonsh/xonshrc);
2025-09-04 15:05:45 +02:00
}; # end xonsh
}; # end programs
2025-07-29 11:25:40 +02:00
} #end file