This commit is contained in:
Nathan McCarty 2022-11-22 22:16:10 -05:00
parent 30c36dd6d5
commit ae9a7fae1d
Signed by: thatonelutenist
GPG Key ID: D70DA3DD4D1E9F96
4 changed files with 19 additions and 1 deletions

View File

@ -30,6 +30,7 @@
passwordFile = config.sops.secrets."borg-password".path;
sshKey = config.sops.secrets."borg-ssh-key".path;
};
kubo = { enable = true; };
};
hardware = {
amdPassthrough = true;

View File

@ -23,6 +23,7 @@ in {
./services/borg.nix
./services/nginx.nix
./services/matrix.nix
./services/ipfs.nix
./linux/base.nix
];
@ -89,6 +90,8 @@ in {
mkDefaultOption "element" config.nathan.services.matrix.enable;
enableRegistration = mkEnableOption "synapse registration";
};
# Kubo
kubo = { enable = mkEnableOption "kubo"; };
};
# Linux (desktop/server, not android) specific programs
programs = {

View File

@ -0,0 +1,13 @@
{ config, lib, pkgs, ... }:
with lib; {
config = mkMerge [
(mkIf config.nathan.services.kubo.enable {
services.kubo = { enable = true; };
})
(mkIf
(config.nathan.services.kubo.enable && config.nathan.config.installUser) {
users.users."${config.nathan.config.user}".extraGroups = [ "ipfs" ];
})
];
}

View File

@ -48,7 +48,8 @@ in with lib; {
# If we install the user, enable sudo
security.sudo.enable = mkDefault nc.installUser;
# If we isntall the user, make them trusted
nix.settings.trusted-users = if nc.installUser then [ "nathan" ] else [ ];
nix.settings.trusted-users =
if nc.installUser then [ "${nc.user}" ] else [ ];
# If we setup the user, install the shell as well
environment.systemPackages =
if nc.installUser then [ pkgs.fish ] else [ ];