nix/nixos/small.nix
2024-03-14 14:10:27 +09:00

64 lines
1.6 KiB
Nix

{ pkgs, hostname, stateVersion, username, inputs, system, ... }: {
imports = [
# Modules
inputs.disko.nixosModules.disko
# Services
./common/services/openssh.nix
./common/services/fail2ban.nix
./common/services/tailscale.nix
./common/services/promtail.nix
./common/services/telegraf.nix
./common/services/gnupg-agent.nix
# NixOS Modules
./common/modules/networking.nix # Initial Networking configs
./common/modules/nixos.nix # Common NixOS Configurations
./common/modules/remote-builders.nix # Add remote builders
./users/${username}
./hosts/${hostname}
];
# List packages installed in system profile
environment.systemPackages = with pkgs; [
tmux
rbw
dconf
ripgrep
git
bat
eza
duf
gnupg
screen
btop
sshpass
cryptsetup
fd
];
# Select internationalisation properties.
i18n.defaultLocale = "en_US.UTF-8";
i18n.extraLocaleSettings = {
LC_ADDRESS = "en_US.UTF-8";
LC_IDENTIFICATION = "en_US.UTF-8";
LC_MEASUREMENT = "en_US.UTF-8";
LC_MONETARY = "en_US.UTF-8";
LC_NAME = "en_US.UTF-8";
LC_NUMERIC = "en_US.UTF-8";
LC_PAPER = "en_US.UTF-8";
LC_TELEPHONE = "en_US.UTF-8";
LC_TIME = "en_US.UTF-8";
};
# https://github.com/NixOS/nixpkgs/issues/180175#issuecomment-1658731959
systemd.services.NetworkManager-wait-online = {
serviceConfig = {
ExecStart = [ "" "${pkgs.networkmanager}/bin/nm-online -q" ];
};
};
system.stateVersion = stateVersion;
nixpkgs.hostPlatform = system;
}