i2p/yggdrasil: factor out and only enable for desko/servo
especially this means i no longer run them on moby, improving battery life & such
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
sops.secrets.colin-passwd.neededForUsers = true;
|
||||
|
||||
sane.roles.build-machine.enable = true;
|
||||
sane.roles.ac = true;
|
||||
sane.roles.client = true;
|
||||
sane.roles.dev-machine = true;
|
||||
sane.services.wg-home.enable = true;
|
||||
|
@@ -4,8 +4,6 @@
|
||||
./fs.nix
|
||||
];
|
||||
|
||||
sane.yggdrasil.enable = true;
|
||||
|
||||
sane.roles.client = true;
|
||||
sane.roles.dev-machine = true;
|
||||
sane.services.wg-home.enable = true;
|
||||
|
@@ -14,6 +14,7 @@
|
||||
signaldctl.enableFor.user.colin = true;
|
||||
};
|
||||
|
||||
sane.roles.ac = true;
|
||||
sane.roles.build-machine.enable = true;
|
||||
sane.roles.build-machine.emulation = false;
|
||||
sane.zsh.showDeadlines = false; # ~/knowledge doesn't always exist
|
||||
|
@@ -6,7 +6,6 @@
|
||||
./fs.nix
|
||||
./hardware.nix
|
||||
./home
|
||||
./i2p.nix
|
||||
./ids.nix
|
||||
./machine-id.nix
|
||||
./net.nix
|
||||
|
@@ -1,4 +0,0 @@
|
||||
{ ... }:
|
||||
{
|
||||
services.i2p.enable = true;
|
||||
}
|
16
hosts/modules/roles/ac.nix
Normal file
16
hosts/modules/roles/ac.nix
Normal file
@@ -0,0 +1,16 @@
|
||||
{ config, lib, ... }:
|
||||
{
|
||||
options.sane.roles.ac = with lib; mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
services which you probably only want to use with AC power.
|
||||
specifically because they drain resources like power or bandwidth.
|
||||
'';
|
||||
};
|
||||
|
||||
config = lib.mkIf config.sane.roles.ac {
|
||||
sane.yggdrasil.enable = true;
|
||||
services.i2p.enable = true;
|
||||
};
|
||||
}
|
@@ -1,6 +1,7 @@
|
||||
{ ... }:
|
||||
{
|
||||
imports = [
|
||||
./ac.nix
|
||||
./build-machine.nix
|
||||
./client
|
||||
./dev-machine.nix
|
||||
|
Reference in New Issue
Block a user