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:
parent
3135b92257
commit
2e9eb51893
|
@ -7,6 +7,7 @@
|
||||||
sops.secrets.colin-passwd.neededForUsers = true;
|
sops.secrets.colin-passwd.neededForUsers = true;
|
||||||
|
|
||||||
sane.roles.build-machine.enable = true;
|
sane.roles.build-machine.enable = true;
|
||||||
|
sane.roles.ac = true;
|
||||||
sane.roles.client = true;
|
sane.roles.client = true;
|
||||||
sane.roles.dev-machine = true;
|
sane.roles.dev-machine = true;
|
||||||
sane.services.wg-home.enable = true;
|
sane.services.wg-home.enable = true;
|
||||||
|
|
|
@ -4,8 +4,6 @@
|
||||||
./fs.nix
|
./fs.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
sane.yggdrasil.enable = true;
|
|
||||||
|
|
||||||
sane.roles.client = true;
|
sane.roles.client = true;
|
||||||
sane.roles.dev-machine = true;
|
sane.roles.dev-machine = true;
|
||||||
sane.services.wg-home.enable = true;
|
sane.services.wg-home.enable = true;
|
||||||
|
|
|
@ -14,6 +14,7 @@
|
||||||
signaldctl.enableFor.user.colin = true;
|
signaldctl.enableFor.user.colin = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
sane.roles.ac = true;
|
||||||
sane.roles.build-machine.enable = true;
|
sane.roles.build-machine.enable = true;
|
||||||
sane.roles.build-machine.emulation = false;
|
sane.roles.build-machine.emulation = false;
|
||||||
sane.zsh.showDeadlines = false; # ~/knowledge doesn't always exist
|
sane.zsh.showDeadlines = false; # ~/knowledge doesn't always exist
|
||||||
|
|
|
@ -6,7 +6,6 @@
|
||||||
./fs.nix
|
./fs.nix
|
||||||
./hardware.nix
|
./hardware.nix
|
||||||
./home
|
./home
|
||||||
./i2p.nix
|
|
||||||
./ids.nix
|
./ids.nix
|
||||||
./machine-id.nix
|
./machine-id.nix
|
||||||
./net.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 = [
|
imports = [
|
||||||
|
./ac.nix
|
||||||
./build-machine.nix
|
./build-machine.nix
|
||||||
./client
|
./client
|
||||||
./dev-machine.nix
|
./dev-machine.nix
|
||||||
|
|
Loading…
Reference in New Issue
Block a user