workstation | remove dup code, update version to 23.11
This commit is contained in:
parent
807aaec0b7
commit
08a01ad229
1 changed files with 1 additions and 44 deletions
|
|
@ -4,8 +4,6 @@ let
|
||||||
my-python-packages = python-packages: with python-packages; [
|
my-python-packages = python-packages: with python-packages; [
|
||||||
pip
|
pip
|
||||||
pipx
|
pipx
|
||||||
#recipe-scrapers
|
|
||||||
#tldextract
|
|
||||||
#setuptools
|
#setuptools
|
||||||
];
|
];
|
||||||
python-with-my-packages = pkgs.python311Full.withPackages my-python-packages;
|
python-with-my-packages = pkgs.python311Full.withPackages my-python-packages;
|
||||||
|
|
@ -291,47 +289,6 @@ in
|
||||||
(final: super:{ khal = super.khal.overridePythonAttrs (_: { doCheck = false; }); })
|
(final: super:{ khal = super.khal.overridePythonAttrs (_: { doCheck = false; }); })
|
||||||
];
|
];
|
||||||
|
|
||||||
systemd.services = {
|
|
||||||
tailscale-autoconnect = {
|
|
||||||
description = "Automatic connection to Tailscale";
|
|
||||||
|
|
||||||
# make sure tailscale is running before trying to connect to tailscale
|
|
||||||
after = [ "network-pre.target" "tailscale.service" ];
|
|
||||||
wants = [ "network-pre.target" "tailscale.service" ];
|
|
||||||
wantedBy = [ "multi-user.target" ];
|
|
||||||
|
|
||||||
# set this service as a oneshot job
|
|
||||||
serviceConfig.Type = "oneshot";
|
|
||||||
|
|
||||||
# have the job run this shell script
|
|
||||||
script = with pkgs; ''
|
|
||||||
# wait for tailscaled to settle
|
|
||||||
sleep 2
|
|
||||||
|
|
||||||
# check if we are already authenticated to tailscale
|
|
||||||
status="$(${tailscale}/bin/tailscale status -json | ${jq}/bin/jq -r .BackendState)"
|
|
||||||
if [ $status = "Running" ]; then # if so, then do nothing
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
# otherwise authenticate with tailscale
|
|
||||||
${tailscale}/bin/tailscale up --operator=don --authkey tskey-api-kDQcva6CNTRL-kvcJzSix6yLb2dgjr1Pi
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
clean-keychain = {
|
|
||||||
description = "Clean up .keychain on boot";
|
|
||||||
wantedBy = [ "multi-user.target" ];
|
|
||||||
serviceConfig = {
|
|
||||||
Type = "oneshot";
|
|
||||||
ExecStart = "${pkgs.coreutils-full}/bin/rm -rf /home/don/.keychain";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Open ports in the firewall.
|
# Open ports in the firewall.
|
||||||
networking.firewall = {
|
networking.firewall = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
@ -355,7 +312,7 @@ in
|
||||||
# this value at the release version of the first install of this system.
|
# this value at the release version of the first install of this system.
|
||||||
# Before changing this value read the documentation for this option
|
# Before changing this value read the documentation for this option
|
||||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||||
system.stateVersion = "22.11"; # Did you read the comment?
|
system.stateVersion = "23.11"; # Did you read the comment?
|
||||||
programs.msmtp = {
|
programs.msmtp = {
|
||||||
enable = true;
|
enable = true;
|
||||||
accounts = {
|
accounts = {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue