1
0
Fork 0
dotfiles/system/hosts/neon.nix

175 lines
3.8 KiB
Nix
Raw Normal View History

args@{ pkgs, config, ... }:
2023-06-14 19:55:35 +00:00
let
secret = import ../../secret/hosts/neon.nix;
2023-06-14 19:55:35 +00:00
ssh-keys = import ../shared/ssh-keys.nix;
in
{
imports = [
../../hardware/hosts/neon.nix
../../agenix/hosts/neon/config.nix
2023-06-14 19:55:35 +00:00
../shared/show-update-changelog.nix
../nixos/raspberry.nix
../nixos/ssh.nix
../nixos/eternal-terminal.nix
2023-06-14 19:55:35 +00:00
../nixos/git.nix
2023-06-25 17:16:26 +00:00
../nixos/attic.nix
../nixos/chrony.nix
2024-07-27 10:53:55 +00:00
(import ../nixos/controld.nix (args // { podmanDNS = true; }))
(import ../nixos/forgejo-runner.nix (args // { inherit secret; name = "neon"; tag = "ubuntu-latest-arm64"; nixTag = "arm64"; }))
2023-06-14 19:55:35 +00:00
../nixos/mosquitto.nix
../nixos/rtl_433.nix
2024-03-21 20:23:04 +00:00
../nixos/tailscale-router.nix
2024-07-27 10:53:55 +00:00
../nixos/tailscale-nodns.nix
../nixos/unbound.nix
2024-03-21 20:23:04 +00:00
../nixos/container.nix
2024-07-15 11:45:36 +00:00
../../container/deye
2023-06-14 19:55:35 +00:00
];
system.stateVersion = "23.11";
2023-06-14 19:55:35 +00:00
nix = {
settings = {
2024-07-05 20:33:27 +00:00
experimental-features = [ "nix-command" "flakes" ];
2023-06-14 19:55:35 +00:00
2024-07-05 20:33:27 +00:00
log-lines = 25;
auto-optimise-store = true;
keep-derivations = true;
keep-outputs = true;
extra-substituters = [
"https://attic.cache.daniel.sx/nifoc-systems?priority=30"
"https://attic.cache.daniel.sx/nifoc-ci?priority=35"
"https://nix-community.cachix.org?priority=50"
"https://cache.garnix.io?priority=60"
2024-07-23 20:03:30 +00:00
"https://cache.lix.systems?priority=70"
2023-06-14 19:55:35 +00:00
];
2024-07-05 20:33:27 +00:00
extra-trusted-public-keys = [
2023-06-14 19:55:35 +00:00
"nifoc-systems:eDDqVP5BFR6/1KvXbF9oUL8JahDdmbrsYtxlQ57LOTU="
2023-09-16 20:57:56 +00:00
"nifoc-ci:JpD9zqVQi8JuS7B8htPDOQZh08rhInMnGFS9RVhiuwk="
2023-06-14 19:55:35 +00:00
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
2024-07-03 12:40:31 +00:00
"cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g="
2024-07-23 20:03:30 +00:00
"cache.lix.systems:aBnZUw8zA7H35Cz2RyKFVs3H4PlGTLawyY5KRbvJR8o="
2023-06-14 19:55:35 +00:00
];
2024-07-05 20:33:27 +00:00
connect-timeout = 5;
2023-06-14 19:55:35 +00:00
};
gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 14d";
2023-06-14 19:55:35 +00:00
};
};
environment.etc."nix/netrc".source = ../../secret/shared/nix-netrc;
boot = {
loader = {
grub.enable = false;
generic-extlinux-compatible.enable = true;
};
tmp.cleanOnBoot = true;
};
networking = {
hostName = "neon";
2023-06-14 19:55:35 +00:00
useNetworkd = true;
};
systemd.network = {
enable = true;
2024-03-25 20:54:24 +00:00
netdevs = {
"20-vlan10" = {
netdevConfig = {
Kind = "vlan";
Name = "vlan51";
};
vlanConfig.Id = 51;
};
};
2023-06-14 19:55:35 +00:00
networks = {
"10-lan" = {
matchConfig.Name = "end0";
vlan = [ "vlan51" ];
2023-06-14 19:55:35 +00:00
networkConfig = {
DHCP = "yes";
IPv6AcceptRA = true;
IPv6PrivacyExtensions = true;
2023-06-14 19:55:35 +00:00
};
linkConfig.RequiredForOnline = "routable";
ntp = [
"ptbtime1.ptb.de"
"ptbtime2.ptb.de"
"ptbtime3.ptb.de"
];
};
"20-iot" = {
matchConfig.Name = "vlan51";
networkConfig = {
DHCP = "no";
IPv6AcceptRA = false;
};
address = [ "10.0.51.7/24" ];
linkConfig.RequiredForOnline = "routable";
};
2023-06-14 19:55:35 +00:00
};
wait-online.extraArgs = [
"--interface=end0"
2023-06-14 19:55:35 +00:00
];
};
services.journald.extraConfig = ''
SystemMaxUse=512M
MaxRetentionSec=30day
2023-06-14 19:55:35 +00:00
'';
2023-11-12 21:40:40 +00:00
security.sudo.enable = true;
2023-06-14 19:55:35 +00:00
documentation = {
nixos.enable = false;
doc.enable = false;
};
services.hardware.argonone.enable = true;
programs = {
fish.enable = true;
zsh.enable = true;
htop.enable = true;
};
2023-06-14 19:55:35 +00:00
users.users = {
root = {
openssh.authorizedKeys.keys = [ ssh-keys.LAN ];
};
daniel = {
2023-09-16 11:08:38 +00:00
hashedPasswordFile = config.age.secrets.user-daniel-password.path;
2023-06-14 19:55:35 +00:00
isNormalUser = true;
home = "/home/daniel";
description = "Daniel";
extraGroups = [ "wheel" ];
shell = pkgs.fish;
openssh.authorizedKeys.keys = [ ssh-keys.LAN ];
};
};
}