refactor: group build-machine-related config into one "role" file
This commit is contained in:
parent
79b6c119ee
commit
d725dfb7f1
|
@ -4,11 +4,11 @@
|
|||
./fs.nix
|
||||
];
|
||||
|
||||
sane.roles.build-machine = true;
|
||||
sane.roles.client = true;
|
||||
sane.services.wg-home.enable = true;
|
||||
sane.services.wg-home.ip = config.sane.hosts.by-name."desko".wg-home.ip;
|
||||
sane.services.duplicity.enable = true;
|
||||
sane.services.nixserve.enable = true;
|
||||
sane.services.nixserve.sopsFile = ../../../secrets/desko.yaml;
|
||||
sane.persist.enable = true;
|
||||
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
signaldctl.enableFor.user.colin = true;
|
||||
};
|
||||
|
||||
sane.roles.build-machine = true;
|
||||
sane.persist.enable = true;
|
||||
sane.services.dyn-dns.enable = true;
|
||||
sane.services.wg-home.enable = true;
|
||||
|
|
|
@ -9,11 +9,6 @@
|
|||
# efi_pstore evivars
|
||||
];
|
||||
|
||||
# enable cross compilation
|
||||
boot.binfmt.emulatedSystems = [ "aarch64-linux" ];
|
||||
# nixpkgs.config.allowUnsupportedSystem = true;
|
||||
# nixpkgs.crossSystem.system = "aarch64-linux";
|
||||
|
||||
powerManagement.cpuFreqGovernor = "powersave";
|
||||
hardware.cpu.amd.updateMicrocode = true; # desktop
|
||||
hardware.cpu.intel.updateMicrocode = true; # laptop
|
||||
|
|
20
hosts/modules/roles/build-machine.nix
Normal file
20
hosts/modules/roles/build-machine.nix
Normal file
|
@ -0,0 +1,20 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
let
|
||||
inherit (lib) mkIf mkOption types;
|
||||
in
|
||||
{
|
||||
options.sane.roles.build-machine = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
};
|
||||
|
||||
config = mkIf config.sane.roles.build-machine {
|
||||
# serve packages to other machines that ask for them
|
||||
sane.services.nixserve.enable = true;
|
||||
|
||||
# enable cross compilation
|
||||
boot.binfmt.emulatedSystems = [ "aarch64-linux" ];
|
||||
# nixpkgs.config.allowUnsupportedSystem = true;
|
||||
};
|
||||
}
|
|
@ -1,6 +1,7 @@
|
|||
{ ... }:
|
||||
{
|
||||
imports = [
|
||||
./build-machine.nix
|
||||
./client
|
||||
];
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user