From 3d26dce8d6195b6d496958b504bb4098132a29be Mon Sep 17 00:00:00 2001 From: LavaDesu Date: Tue, 26 Sep 2023 20:42:01 +0700 Subject: [PATCH] hosts/hyacinth: split into modules --- hosts/hyacinth/default.nix | 26 +++++--------------------- modules/default.nix | 4 ++++ modules/system/corectrl.nix | 9 +++++++++ modules/system/flatpak.nix | 7 +++++++ modules/system/printing.nix | 9 +++++++++ modules/system/virtualisation.nix | 9 +++++++++ 6 files changed, 43 insertions(+), 21 deletions(-) create mode 100644 modules/system/corectrl.nix create mode 100644 modules/system/flatpak.nix create mode 100644 modules/system/printing.nix create mode 100644 modules/system/virtualisation.nix diff --git a/hosts/hyacinth/default.nix b/hosts/hyacinth/default.nix index 768f5c1..6a7b3dc 100644 --- a/hosts/hyacinth/default.nix +++ b/hosts/hyacinth/default.nix @@ -17,14 +17,18 @@ audio base ccache + corectrl + flatpak greetd gui input kernel nix packages + printing security snapper + virtualisation wireguard modules.services.postgres @@ -35,34 +39,14 @@ ../../users/rin ]; - programs.corectrl = { - enable = true; - gpuOverclock = { - enable = true; - ppfeaturemask = "0xffffffff"; - }; - }; services.murmur = { enable = true; openFirewall = true; }; - virtualisation = { - spiceUSBRedirection.enable = true; - libvirtd = { - enable = true; - qemu.package = pkgs.qemu_kvm.override { smbdSupport = true; }; - }; - }; - services.flatpak.enable = true; - xdg.portal.enable = true; - xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-gtk ]; - services.printing.enable = true; - services.printing.drivers = [ pkgs.epson-escpr pkgs.me.epson-201112j ]; services.postgresql.ensureDatabases = [ "barista" "barista-dev" ]; + # For steam fhs-env nixpkgs.config.permittedInsecurePackages = [ "openssl-1.1.1v" - "python-2.7.18.6-env" - "python-2.7.18.6" ]; } diff --git a/modules/default.nix b/modules/default.nix index d37d1c1..4c4da77 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -28,6 +28,8 @@ in { ./system/audio.nix ./system/base.nix ./system/ccache.nix + ./system/corectrl.nix + ./system/flatpak.nix ./system/greetd.nix ./system/gui.nix ./system/home-manager.nix @@ -36,9 +38,11 @@ in { ./system/nix.nix ./system/nix-stable.nix ./system/packages.nix + ./system/printing.nix ./system/security.nix ./system/snapper.nix ./system/transmission.nix + ./system/virtualisation.nix ./system/wireguard.nix ]; user = mkAttrsFromPaths [ diff --git a/modules/system/corectrl.nix b/modules/system/corectrl.nix new file mode 100644 index 0000000..c2ec98d --- /dev/null +++ b/modules/system/corectrl.nix @@ -0,0 +1,9 @@ +{ ... }: { + programs.corectrl = { + enable = true; + gpuOverclock = { + enable = true; + ppfeaturemask = "0xffffffff"; + }; + }; +} diff --git a/modules/system/flatpak.nix b/modules/system/flatpak.nix new file mode 100644 index 0000000..579ef53 --- /dev/null +++ b/modules/system/flatpak.nix @@ -0,0 +1,7 @@ +{ pkgs, ... }: { + services.flatpak.enable = true; + xdg.portal = { + enable = true; + extraPortals = [ pkgs.xdg-desktop-portal-gtk ]; + }; +} diff --git a/modules/system/printing.nix b/modules/system/printing.nix new file mode 100644 index 0000000..9cb254b --- /dev/null +++ b/modules/system/printing.nix @@ -0,0 +1,9 @@ +{ pkgs, ... }: { + services.printing = { + enable = true; + drivers = with pkgs; [ + epson-escpr + me.epson-201112j + ]; + }; +} diff --git a/modules/system/virtualisation.nix b/modules/system/virtualisation.nix new file mode 100644 index 0000000..b575f05 --- /dev/null +++ b/modules/system/virtualisation.nix @@ -0,0 +1,9 @@ +{ pkgs, ... }: { + virtualisation = { + spiceUSBRedirection.enable = true; + libvirtd = { + enable = true; + qemu.package = pkgs.qemu_kvm.override { smbdSupport = true; }; + }; + }; +}