1
0
Fork 0
dotfiles/system/hosts/weather-sdr.nix

131 lines
2.7 KiB
Nix
Raw Normal View History

2023-07-16 22:17:50 +00:00
{ pkgs, config, ... }:
2023-06-14 19:55:35 +00:00
let
ssh-keys = import ../shared/ssh-keys.nix;
in
{
imports = [
../../hardware/hosts/weather-sdr.nix
../../agenix/hosts/weather-sdr/config.nix
../shared/show-update-changelog.nix
../nixos/raspberry.nix
../nixos/ssh.nix
../nixos/git.nix
2023-06-25 17:16:26 +00:00
../nixos/attic.nix
2023-06-14 19:55:35 +00:00
../nixos/mosquitto.nix
../nixos/rtl_433.nix
];
system.stateVersion = "22.11";
nix = {
package = pkgs.nixVersions.stable;
settings = {
auto-optimise-store = true;
substituters = [
"https://attic.cache.daniel.sx/nifoc-systems"
2023-09-16 20:57:56 +00:00
"https://attic.cache.daniel.sx/nifoc-ci"
2023-06-14 19:55:35 +00:00
"https://nifoc.cachix.org"
"https://nix-community.cachix.org"
];
trusted-public-keys = [
"nifoc-systems:eDDqVP5BFR6/1KvXbF9oUL8JahDdmbrsYtxlQ57LOTU="
2023-09-16 20:57:56 +00:00
"nifoc-ci:JpD9zqVQi8JuS7B8htPDOQZh08rhInMnGFS9RVhiuwk="
2023-06-14 19:55:35 +00:00
"nifoc.cachix.org-1:ymuftq7RgN/lf/iWXFK8gpwDSAGFaGBeliWe9u6q8II="
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
];
};
gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 7d";
};
extraOptions = ''
experimental-features = nix-command flakes
keep-derivations = true
keep-outputs = true
'';
};
environment.etc."nix/netrc".source = ../../secret/shared/nix-netrc;
boot = {
loader = {
grub.enable = false;
generic-extlinux-compatible.enable = true;
};
tmp.cleanOnBoot = true;
};
networking = {
hostName = "weather-sdr";
useNetworkd = true;
};
systemd.network = {
enable = true;
networks = {
"10-iot" = {
matchConfig.Name = "enu1u1u1";
networkConfig = {
DHCP = "yes";
IPv6AcceptRA = false;
};
linkConfig.RequiredForOnline = "routable";
ntp = [
"ptbtime1.ptb.de"
"ptbtime2.ptb.de"
"ptbtime3.ptb.de"
];
};
};
wait-online.extraArgs = [
"--interface=enu1u1u1"
];
};
services.journald.extraConfig = ''
SystemMaxUse=512M
2023-10-11 12:41:14 +00:00
MaxRetentionSec=7day
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;
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 ];
};
};
}