orange/citrus.nix

57 lines
1.5 KiB
Nix
Raw Normal View History

2023-07-25 07:32:19 +00:00
{pkgs, ... }:
2023-05-07 02:04:36 +00:00
{
2023-07-25 07:32:19 +00:00
system.stateVersion = "23.05";
2023-08-03 20:00:12 +00:00
2023-08-03 20:26:44 +00:00
# Enables flakes and the updated `nix` command
2023-07-27 19:24:32 +00:00
nix.settings.experimental-features = [ "nix-command" "flakes" ];
2023-08-03 20:00:12 +00:00
2023-08-16 14:03:37 +00:00
environment.systemPackages = with pkgs; [
2023-08-20 02:21:15 +00:00
zellij tmux minicom tio lrzsz python3Packages.pyserial btop
2023-08-16 14:03:37 +00:00
];
programs.fish.enable = true;
2023-07-25 07:32:19 +00:00
2023-08-03 18:11:59 +00:00
users = {
2023-08-03 20:26:44 +00:00
# No need to edit users on a single-purpose system.
2023-08-03 18:11:59 +00:00
mutableUsers = false;
users = {
2023-08-16 14:03:37 +00:00
geekygay = {
shell = pkgs.fish;
2023-08-03 18:11:59 +00:00
isNormalUser = true;
2023-08-16 14:03:37 +00:00
extraGroups = [ "wheel" "dialout" ];
2023-08-03 18:11:59 +00:00
password = "";
2023-08-16 14:03:37 +00:00
openssh.authorizedKeys.keyFiles = [
./authorized_keys
2023-08-03 18:11:59 +00:00
];
};
};
};
2023-08-16 16:44:20 +00:00
security.sudo.wheelNeedsPassword = false; # Needed for colmena.
nix.settings.trusted-users = [ "root" "@wheel" ];
documentation.man.enable = false; # Takes way too long to build.
2023-08-03 20:26:44 +00:00
# Allow SSH with authorized keys only!
2023-08-03 18:11:59 +00:00
services.openssh = {
enable = true;
settings.PasswordAuthentication = false;
2023-05-07 02:04:36 +00:00
};
2023-08-20 02:21:15 +00:00
# Start tmux session for serial console on boot.
systemd.services.tmux-serial = {
description = "Tmux Serial Server Service";
wantedBy = [ "multi-user.target" ];
after = [ "network.target" ];
serviceConfig = {
Restart = "always";
User = "geekygay";
Type = "forking";
WorkingDirectory = "~";
GuessMainPID = true;
ExecStart = "${pkgs.tmux}/bin/tmux new -d ${pkgs.python3Packages.pyserial}/bin/pyserial-miniterm /dev/ttyS1 115200 --eol lf --raw";
};
};
2023-05-07 02:04:36 +00:00
}