clean up services module folder

This commit is contained in:
Tyler Starr 2024-10-26 19:05:14 -07:00
parent 6dd15d6c7c
commit 663b5cad56
10 changed files with 32 additions and 43 deletions

View File

@ -36,6 +36,7 @@
desktop = { desktop = {
enable = true; enable = true;
gnome.enable = true; gnome.enable = true;
peripherals.enable = true;
}; };
devel = { devel = {
engineering.enable = true; engineering.enable = true;
@ -50,6 +51,7 @@
beancount.enable = true; beancount.enable = true;
chezmoi.apply = true; chezmoi.apply = true;
kitty.enable = true; kitty.enable = true;
virt-manager.enable = true;
syncthing = { syncthing = {
enable = true; enable = true;
keyPath = ../../secrets/syncthing/kestrel/key.pem.age; keyPath = ../../secrets/syncthing/kestrel/key.pem.age;
@ -60,9 +62,7 @@
}; };
}; };
services = { services = {
peripherals.enable = true;
samba-client.enable = true; samba-client.enable = true;
virt-manager.enable = true;
}; };
system = { system = {
backup.enable = true; backup.enable = true;

View File

@ -33,15 +33,15 @@
desktop = { desktop = {
enable = true; enable = true;
gnome.enable = true; gnome.enable = true;
peripherals.enable = true;
}; };
programs = { programs = {
chezmoi.apply = true; chezmoi.apply = true;
kitty.enable = true; kitty.enable = true;
virt-manager.enable = true;
}; };
services = { services = {
peripherals.enable = true;
samba-client.enable = true; samba-client.enable = true;
virt-manager.enable = true;
}; };
system = { system = {
ssh.enable = true; ssh.enable = true;

View File

@ -23,6 +23,7 @@
desktop = { desktop = {
enable = true; enable = true;
gnome.enable = true; gnome.enable = true;
peripherals.enable = true;
}; };
devel = { devel = {
engineering.enable = true; engineering.enable = true;
@ -31,11 +32,10 @@
programs = { programs = {
kitty.enable = true; kitty.enable = true;
chezmoi.apply = true; chezmoi.apply = true;
virt-manager.enable = false;
}; };
services = { services = {
peripherals.enable = true;
samba-client.enable = true; samba-client.enable = true;
virt-manager.enable = false;
}; };
system = { system = {
ssh.enable = true; ssh.enable = true;

View File

@ -6,6 +6,7 @@ in {
./kde-connect.nix ./kde-connect.nix
./keyd.nix ./keyd.nix
./gnome.nix ./gnome.nix
./peripherals.nix
]; ];
options.modules.desktop.enable = lib.mkEnableOption "desktop"; options.modules.desktop.enable = lib.mkEnableOption "desktop";

View File

@ -0,0 +1,14 @@
{ config, lib, pkgs, user, ... }:
let cfg = config.modules.desktop.peripherals;
in {
options.modules.desktop.peripherals.enable = lib.mkEnableOption "peripherals";
config = lib.mkIf cfg.enable {
services.usbmuxd.enable = true; # for iOS mounting as storage
environment.systemPackages = with pkgs; [
libimobiledevice # Library to support iPhone, iPod Touch and iPad devices on Linux
ifuse # fuse filesystem implementation to access the contents of iOS devices
pySVS # control SVS subwoofers from the command-line
];
};
}

View File

@ -9,6 +9,7 @@
./kitty.nix ./kitty.nix
./nvim.nix ./nvim.nix
./syncthing.nix ./syncthing.nix
./virt-manager.nix
./yt-dlp.nix ./yt-dlp.nix
]; ];
} }

View File

@ -1,13 +1,13 @@
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }:
let cfg = config.modules.services.virt-manager; let cfg = config.modules.programs.virt-manager;
in { in {
options.modules.services.virt-manager.enable = lib.mkEnableOption "virt-manager"; options.modules.programs.virt-manager.enable = lib.mkEnableOption "virt-manager";
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
virtualisation.libvirtd.enable = true;
programs.dconf.enable = true;
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
virt-manager # Desktop application for managing virtual machines through libvirt. virt-manager # Desktop application for managing virtual machines through libvirt.
]; ];
virtualisation.libvirtd.enable = true;
programs.dconf.enable = true;
}; };
} }

View File

@ -1,4 +1,6 @@
{ ... }: { ... }:
{ {
imports = [ ./peripherals.nix ./samba-client.nix ./virt-manager.nix ]; imports = [
./samba-client.nix
];
} }

View File

@ -1,26 +0,0 @@
{ config, lib, pkgs, user, ... }:
let cfg = config.modules.services.peripherals;
in {
options.modules.services.peripherals.enable = lib.mkEnableOption "peripherals";
config = lib.mkIf cfg.enable {
services.usbmuxd.enable = true; # for iOS mounting as storage
environment.systemPackages = with pkgs; [
pulseaudio # Sound server for Linux and other Unix-like operating systems.
pavucontrol # Simple GTK based mixer for the PulseAudio sound server
libimobiledevice # Library to support iPhone, iPod Touch and iPad devices on Linux
ifuse # fuse filesystem implementation to access the contents of iOS devices
usbtop
pySVS # control SVS subwoofers from the command-line
];
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
};
};
}

View File

@ -4,14 +4,11 @@ let cfg = config.modules.services.samba-client;
in { in {
options.modules.services.samba-client.enable = lib.mkEnableOption "samba-client"; options.modules.services.samba-client.enable = lib.mkEnableOption "samba-client";
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
# the needed ports in the firewall.
networking.firewall.allowedTCPPorts = [ 445 139 ];
networking.firewall.allowedUDPPorts = [ 137 138 ];
# To make SMB mounting easier on the command line
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
cifs-utils # Utilities for mounting and managing CIFS (Common Internet File System) shares. cifs-utils # Utilities for mounting and managing CIFS (Common Internet File System) shares.
]; ];
networking.firewall.allowedTCPPorts = [ 445 139 ];
networking.firewall.allowedUDPPorts = [ 137 138 ];
}; };
} }