read: Remove comin, move rust-motd to module

This commit is contained in:
Erwin Boskma 2024-11-11 08:47:51 +01:00
parent b6785cff54
commit 863ae3b400
Signed by: erwin
SSH key fingerprint: SHA256:/Wk1WZdLg+vQHs3in9qq7PsIp8SMzwGSk/RLZ5zPuZk
2 changed files with 41 additions and 35 deletions

View file

@ -1,6 +1,5 @@
{
self,
comin,
caddy-with-plugins,
...
}:
@ -14,8 +13,6 @@
imports = [
(modulesPath + "/virtualisation/lxc-container.nix")
comin.nixosModules.comin
../../users/root
../../users/erwin
@ -42,6 +39,7 @@
}
];
};
rust-motd.enable = true;
tailscale.enable = true;
};
@ -68,16 +66,6 @@
firewall.trustedInterfaces = [ "tailscale0" ];
};
services.comin = {
enable = true;
remotes = [
{
name = "origin";
url = "https://git.datarift.nl/erwin/nixos-config";
}
];
};
systemd = {
services.logrotate-checkconf.enable = false;
@ -112,28 +100,6 @@
sudo.enable = false;
};
programs.rust-motd = {
enable = true;
settings = {
banner = {
color = "red";
command = "${pkgs.figlet}/bin/figlet -f slant ${config.networking.hostName}";
};
weather = {
loc = "De%20Westereen,%20Netherlands";
};
uptime = {
prefix = "up: ";
};
filesystems = {
root = "/";
};
memory = {
swap_pos = "none";
};
};
};
sops.defaultSopsFile = ./secrets.yaml;
sops.secrets = {
caddy-env = { };

View file

@ -0,0 +1,40 @@
{
pkgs,
config,
lib,
...
}:
with lib;
let
cfg = config.eboskma.rust-motd;
in
{
options.eboskma.rust-motd = {
enable = mkEnableOption "rust-motd";
};
config = mkIf cfg.enable {
programs.rust-motd = {
enable = true;
settings = {
banner = {
color = "red";
command = "${pkgs.figlet}/bin/figlet -f slant ${config.networking.hostName}";
};
weather = {
loc = "De%20Westereen,%20Netherlands";
};
uptime = {
prefix = "up: ";
};
filesystems = {
root = "/";
};
memory = {
swap_pos = "none";
};
};
};
};
}