[roles] No config change unless enabled
This commit is contained in:
@@ -10,7 +10,7 @@ in
|
|||||||
enable = mkEnableOption "Enable the audio role";
|
enable = mkEnableOption "Enable the audio role";
|
||||||
};
|
};
|
||||||
|
|
||||||
config =
|
config = mkIf cfg.enable
|
||||||
{
|
{
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
paprefs
|
paprefs
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ in
|
|||||||
enable = mkEnableOption "Enable the bluetooth role";
|
enable = mkEnableOption "Enable the bluetooth role";
|
||||||
};
|
};
|
||||||
|
|
||||||
config =
|
config = mkIf cfg.enable
|
||||||
{
|
{
|
||||||
hardware.bluetooth.enable = true;
|
hardware.bluetooth.enable = true;
|
||||||
hardware.bluetooth.powerOnBoot = true;
|
hardware.bluetooth.powerOnBoot = true;
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ in
|
|||||||
steam-library
|
steam-library
|
||||||
youtube
|
youtube
|
||||||
]);
|
]);
|
||||||
in {
|
in mkIf cfg.enable {
|
||||||
users.extraUsers.kodi.isNormalUser = true;
|
users.extraUsers.kodi.isNormalUser = true;
|
||||||
|
|
||||||
networking.firewall = {
|
networking.firewall = {
|
||||||
|
|||||||
@@ -16,7 +16,8 @@ in
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = {
|
config = mkIf cfg.enable
|
||||||
|
{
|
||||||
fileSystems."/media" = {
|
fileSystems."/media" = {
|
||||||
device = "10.0.0.43:/media";
|
device = "10.0.0.43:/media";
|
||||||
fsType = "nfs";
|
fsType = "nfs";
|
||||||
|
|||||||
@@ -2,12 +2,16 @@
|
|||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
|
|
||||||
|
let
|
||||||
|
cfg = config.roles.printing;
|
||||||
|
in
|
||||||
{
|
{
|
||||||
options.roles.printing = {
|
options.roles.printing = {
|
||||||
enable = mkEnableOption "Enable default printing setup";
|
enable = mkEnableOption "Enable default printing setup";
|
||||||
};
|
};
|
||||||
|
|
||||||
config = {
|
config = mkIf cfg.enable
|
||||||
|
{
|
||||||
services.printing.enable = true;
|
services.printing.enable = true;
|
||||||
|
|
||||||
services.avahi = {
|
services.avahi = {
|
||||||
|
|||||||
@@ -10,7 +10,8 @@ in
|
|||||||
enable = mkEnableOption "Enable the spotifyd role";
|
enable = mkEnableOption "Enable the spotifyd role";
|
||||||
};
|
};
|
||||||
|
|
||||||
config = {
|
config = mkIf cfg.enable
|
||||||
|
{
|
||||||
roles.audio.enable = true;
|
roles.audio.enable = true;
|
||||||
|
|
||||||
services.spotifyd = {
|
services.spotifyd = {
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ in
|
|||||||
kidsPackages = with pkgs; [
|
kidsPackages = with pkgs; [
|
||||||
firefox
|
firefox
|
||||||
];
|
];
|
||||||
in {
|
in mkIf cfg.enable {
|
||||||
users.users.johno = {
|
users.users.johno = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
description = "John Ogle";
|
description = "John Ogle";
|
||||||
|
|||||||
@@ -2,12 +2,16 @@
|
|||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
|
|
||||||
|
let
|
||||||
|
cfg = config.roles.virtualisation;
|
||||||
|
in
|
||||||
{
|
{
|
||||||
options.roles.virtualisation = {
|
options.roles.virtualisation = {
|
||||||
enable = mkEnableOption "Enable virtualisation";
|
enable = mkEnableOption "Enable virtualisation";
|
||||||
};
|
};
|
||||||
|
|
||||||
config = {
|
config = mkIf cfg.enable
|
||||||
|
{
|
||||||
virtualisation.libvirtd.enable = true;
|
virtualisation.libvirtd.enable = true;
|
||||||
programs.virt-manager.enable = true;
|
programs.virt-manager.enable = true;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user