Add ipfs
This commit is contained in:
parent
30c36dd6d5
commit
ae9a7fae1d
|
@ -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;
|
||||
|
|
|
@ -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 = {
|
||||
|
|
|
@ -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" ];
|
||||
})
|
||||
];
|
||||
}
|
|
@ -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 [ ];
|
||||
|
|
Loading…
Reference in New Issue