tvl-depot/users/tazjin/nixos/modules/physical.nix
Vincent Ambo 0022285600 feat(tazjin/nixos): set up yggdrasil on all physical machines
Change-Id: I1d722c6d2e6192c445e77cb9b186a5320c2a60ec
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12485
Reviewed-by: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
2024-09-14 23:47:29 +00:00

118 lines
2.4 KiB
Nix

# Default configuration settings for physical machines that I use.
{ lib, pkgs, config, depot, ... }:
let
pass-otp = pkgs.pass.withExtensions (e: [ e.pass-otp ]);
in
{
options = with lib; {
tazjin.emacs = mkOption {
type = types.package;
default = depot.users.tazjin.emacs;
description = ''
Derivation with my Emacs package, with configuration included.
'';
};
};
config = {
# Install all the default software.
environment.systemPackages =
# programs from the depot
(with depot; [
config.tazjin.emacs
third_party.agenix.cli
tools.when
users.tazjin.chase-geese
users.tazjin.eaglemode
users.tazjin.screenLock
]) ++
# programs from nixpkgs
(with pkgs; [
(aspellWithDicts (d: [ d.ru ]))
amber
bat
curl
ddcutil
direnv
dnsutils
electrum
firefox
config.tazjin.emacs.emacs # emacsclient
expect
fd
file
gdb
git
gnupg
go
gopls
gotools
gtk3 # for gtk-launch
htop
hyperfine
iftop
imagemagick
josh
jq
lieer
maim
man-pages
moreutils
mosh
msmtp
networkmanagerapplet
nix-prefetch-github
nmap
notmuch
openssh
openssl
pass-otp
pavucontrol
pinentry
pinentry-emacs
pulseaudio # for pactl
pwgen
quasselClient
radicle-node
rink
ripgrep
rustup
screen
tig
tokei
tree
unzip
vlc
volumeicon
whois
xclip
xsecurelock
zoxide
]);
# Run services & configure programs for all machines.
services.fwupd.enable = true;
# Disable the broken NetworkManager-wait-online.service
systemd.services.NetworkManager-wait-online.enable = lib.mkForce false;
# Disable the thing that prints annoying warnings when trying to
# run manually patchelfed binaries
environment.stub-ld.enable = false;
# Enable yggdrasil network.
services.yggdrasil = {
enable = true;
persistentKeys = true;
settings.IfName = "ygg0";
};
programs = {
fish.enable = true;
mosh.enable = true;
ssh.startAgent = true;
};
};
}