blob: b4dc7da5b6a42773668d6288e0c9236c2cc38b6f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
|
{ config, pkgs, ... }:
{
imports = [
./dyndns.nix
./hardware-configuration.nix
./home-assistant.nix
./oidc.nix
./privacy-frontends.nix
./syncthing.nix
./system.nix
];
nix.settings.experimental-features = [ "nix-command" "flakes" ];
security.acme.acceptTerms = true;
security.acme.defaults.email = "hostmaster@mou.fo";
# TODO switch to production certs
security.acme.defaults.server = "https://acme-staging-v02.api.letsencrypt.org/directory";
security.sudo.wheelNeedsPassword = false;
users.users.joe = {
isNormalUser = true;
description = "Joe Mou";
extraGroups = [ "networkmanager" "wheel" "syncthing" ];
packages = with pkgs; [
jq
sqlite-interactive
];
openssh.authorizedKeys.keys = [
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDHcqQDnH0LcUWFV+cd9aABfM55+72UAn1ZY5x5bHwPL4IEgT1nagbi1X3FwCJkh2rEcDsHl4FflcNfh+IyU2VyuQfRIXl7CKP040ovXmPVzgU8JiEDrrRebpZ7aHCKk+4Q6cJ8dzAI1sRogVyYrV0hLB4yeMnVexkIcsQMt5pXQ1zodlzHfW1W7OWQDbKjIyh4pv1KJ/IIjiBIt7l+OCqi7wZK4ubmxyMhmZx1xpRC5mz2/29Mpt+1VgCmxC7Hv1SG7yu+U0s4eJ3kbzFKNcZ/bCYqFxK48dT66qhS3qZFg09omumG8IbEUcx+WqM1V7WhiJYig9x5ovmMToQXTJ5uxLtcovnxO/53IgwV7INvmr8+NhD+LlkQfSjjUAW09bhVj9sKIW2bbrIxlOT8z6CQY9zGXNXi8u1oxPt3Q7d3rMxoWhWnr2l3Ok7OIkWooOK3e0NdhgIAxZKlYJAmIYaX391sGTyiuwUy96mg5JcYsLYMfkEg/Sv+2vQp8kkvB0E= joe@sparky"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPsci2NPhPgg7T77vtcnkcv5Z9sbHAsmp9XC11WPePvL joe@Joes-Mac-mini.local"
];
};
nixpkgs.config.allowUnfree = true;
environment.systemPackages = with pkgs; [
dig
file
gitFull
tmux
tree
];
programs.vim.defaultEditor = true;
programs.nano.enable = false;
services.fstrim.enable = true;
services.openssh.enable = true;
services.nginx = {
enable = true;
recommendedGzipSettings = true;
recommendedOptimisation = true;
recommendedProxySettings = true;
recommendedTlsSettings = true;
};
# TODO remove upon switching to production certs
services.oauth2_proxy.extraConfig = {
"ssl-insecure-skip-verify" = true;
"ssl-upstream-insecure-skip-verify" = true;
};
networking.firewall.allowedTCPPorts = [ 80 443 ];
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. It's perfectly fine and recommended to leave
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "23.11"; # Did you read the comment?
}
|