nixos_config/hosts/common/base.nix

250 lines
6.8 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-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
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-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;
xonsh = {
enable = true;
extraPackages = ps: [
(
ps.buildPythonPackage
rec {
name = "xonsh-direnv";
version = "1.6.5";
src = pkgs.fetchFromGitHub {
owner = "74th";
repo = "${name}";
rev = "${version}";
sha256 = "sha256-huBJ7WknVCk+WgZaXHlL+Y1sqsn6TYqMP29/fsUPSyU=";
};
meta = {
homepage = "https://github.com/74th/xonsh-direnv";
description = "direnv for xonsh";
license = pkgs.lib.licenses.mit;
maintainers = [ ];
};
}
)
(
ps.buildPythonPackage
rec {
name = "xontrib-fish-completer";
version = "0.0.1";
src = pkgs.fetchFromGitHub {
owner = "xonsh";
repo = "${name}";
rev = "${version}";
sha256 = "sha256-PhhdZ3iLPDEIG9uDeR5ctJ9zz2+YORHBhbsiLrJckyA=";
};
meta = {
homepage = "https://github.com/xonsh/xontrib-fish-completer";
description = "fish completions for xonsh";
license = pkgs.lib.licenses.mit;
maintainers = [ ];
};
}
)
(
ps.buildPythonPackage
rec {
name = "xontrib-fzf-completions";
version = "v0.0.2";
format = "pyproject";
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 = [ ];
};
}
)
(
ps.buildPythonPackage
rec {
name = "xontrib-clp";
version = "0.1.7";
src = pkgs.fetchFromGitHub {
owner = "anki-code";
repo = "${name}";
rev = "${version}";
sha256 = "sha256-1ewWlwG8KY9s6qydErurvP2x+4DIPTFcjSGP1c5y83M=";
};
meta = {
homepage = "https://github.com/anki-code/xontrib-clp";
description = "clipboard completions for xonsh";
license = pkgs.lib.licenses.mit;
maintainers = [ ];
};
}
)
(
ps.buildPythonPackage
rec {
name = "xontrib-abbrevs";
version = "v0.1.0";
format = "pyproject";
src = pkgs.fetchFromGitHub {
owner = "xonsh";
repo = "${name}";
rev = "${version}";
sha256 = "sha256-JxH5b2ey99tvHXSUreU5r6fS8nko4RrS/1c8psNbJNc=";
};
meta = {
homepage = "https://github.com/xonsh/xontrib-abbrevs";
description = "abbreviation completions for xonsh";
license = pkgs.lib.licenses.mit;
maintainers = [ ];
};
}
)
(
ps.buildPythonPackage
rec {
name = "xontrib-bashisms";
version = "0.0.5";
format = "pyproject";
src = pkgs.fetchFromGitHub {
owner = "xonsh";
repo = "${name}";
rev = "${version}";
sha256 = "sha256-R1DCGMrRCJLnz/QMk6QB8ai4nx88vvyPdaCKg3od5/I=";
};
meta = {
homepage = "https://github.com/xonsh/xontrib-bashisms";
description = "bashisms for xonsh";
license = pkgs.lib.licenses.mit;
maintainers = [ ];
};
}
)
];
};
};
2025-07-29 11:25:40 +02:00
} #end file