Nix-Config/system/shared/shared-configuration.nix

87 lines
1.8 KiB
Nix

{ config, pkgs, inputs, ... }:
{
boot.supportedFilesystems = [ "ntfs" ];
i18n.defaultLocale = "en_GB.UTF-8";
i18n.extraLocaleSettings = {
LC_ADDRESS = "en_GB.UTF-8";
LC_IDENTIFICATION = "en_GB.UTF-8";
LC_MEASUREMENT = "en_GB.UTF-8";
LC_MONETARY = "en_GB.UTF-8";
LC_NAME = "en_GB.UTF-8";
LC_NUMERIC = "en_GB.UTF-8";
LC_PAPER = "en_GB.UTF-8";
LC_TELEPHONE = "en_GB.UTF-8";
LC_TIME = "en_GB.UTF-8";
};
environment.variables.LC_ALL = "en_GB.UTF-8";
time.timeZone = "Europe/London";
users.groups = {
tmux.gid = 1000; # Used for tmux pairing
nixremote = {};
};
systemd.tmpfiles.rules = [
"d /var/tmux_share 2770 tsv tmux"
];
users.users.tsv = {
isNormalUser = true;
extraGroups = [
"wheel"
"docker"
"tmux"
];
initialPassword = "password";
openssh.authorizedKeys.keyFiles = [
../../users/tsv/authorized_keys
];
};
users.users.nixremote = {
createHome = true;
uid = null;
isNormalUser = true;
description = "For remote Nix builds";
openssh.authorizedKeys.keyFiles = [
../../users/nixremote/authorized_keys
];
homeMode = "500";
group = "nixremote";
};
nix = {
extraOptions = "experimental-features = nix-command flakes";
package = pkgs.nixFlakes;
settings = {
auto-optimise-store = true;
trusted-users = [ "root" "tsv" "nixremote" ];
};
gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 7d";
};
};
hardware.bluetooth.enable = true;
nixpkgs.config.allowUnfree = true;
programs.ssh = {
startAgent = true;
};
services.openssh = {
enable = true;
ports = [ 2222 2223 ];
settings.PasswordAuthentication = false;
};
system.stateVersion = "22.11"; # Don't change this
}