summaryrefslogtreecommitdiff
path: root/modules/root/software
diff options
context:
space:
mode:
Diffstat (limited to 'modules/root/software')
-rw-r--r--modules/root/software/awesome.nix20
-rw-r--r--modules/root/software/ddcutil.nix6
-rw-r--r--modules/root/software/default.nix34
l---------modules/root/software/derivations1
-rw-r--r--modules/root/software/desktop.nix76
-rw-r--r--modules/root/software/development.nix18
-rw-r--r--modules/root/software/docker.nix21
-rw-r--r--modules/root/software/system.nix11
-rw-r--r--modules/root/software/utilities.nix32
-rw-r--r--modules/root/software/virtualisation.nix10
10 files changed, 229 insertions, 0 deletions
diff --git a/modules/root/software/awesome.nix b/modules/root/software/awesome.nix
new file mode 100644
index 0000000..fdc86e8
--- /dev/null
+++ b/modules/root/software/awesome.nix
@@ -0,0 +1,20 @@
+{ pkgs, lib, config, ... }: {
+ options = {
+ xserver.awesome.enable = lib.mkEnableOption "enables awesomewm";
+ };
+
+ config = lib.mkIf (config.xserver.enable && config.xserver.awesome.enable ) {
+ services.xserver.windowManager.awesome = {
+ enable = true;
+ noArgb = true; # disables transparency. why not?
+ luaModules = with pkgs.luajitPackages; [
+ lgi
+ ];
+ package = with pkgs; awesome.override {
+ gtk3Support = true;
+ gtk3 = gtk3;
+ lua = luajit;
+ };
+ };
+ };
+}
diff --git a/modules/root/software/ddcutil.nix b/modules/root/software/ddcutil.nix
new file mode 100644
index 0000000..93e0af5
--- /dev/null
+++ b/modules/root/software/ddcutil.nix
@@ -0,0 +1,6 @@
+{ pkgs, ... }: {
+ hardware.i2c.enable = true;
+ environment.systemPackages = with pkgs; [
+ ddcutil
+ ];
+}
diff --git a/modules/root/software/default.nix b/modules/root/software/default.nix
new file mode 100644
index 0000000..8d1e987
--- /dev/null
+++ b/modules/root/software/default.nix
@@ -0,0 +1,34 @@
+{ lib, config, ... }: {
+ imports = [
+ ./awesome.nix
+ ./ddcutil.nix
+ ./desktop.nix
+ ./development.nix
+ ./docker.nix
+ ./system.nix
+ ./utilities.nix
+ ./virtualisation.nix
+ ];
+
+ software.desktop = {
+ enable = lib.mkDefault config.xserver.enable;
+ chromium.enable = lib.mkDefault false;
+ cad.enable = lib.mkDefault false;
+ crypto.enable = lib.mkDefault false;
+ firefox.enable = lib.mkDefault true;
+ graphics.enable = lib.mkDefault false;
+ office.enable = lib.mkDefault false;
+ utilities.enable = lib.mkDefault false;
+ };
+
+ software.development = {
+ enable = lib.mkDefault true;
+ docker = {
+ enable = lib.mkDefault false;
+ btrfsSupport = lib.mkDefault true;
+ };
+ };
+
+ virtualisation.enable = lib.mkDefault false;
+ xserver.awesome.enable = lib.mkDefault true;
+}
diff --git a/modules/root/software/derivations b/modules/root/software/derivations
new file mode 120000
index 0000000..a075779
--- /dev/null
+++ b/modules/root/software/derivations
@@ -0,0 +1 @@
+../../../derivations \ No newline at end of file
diff --git a/modules/root/software/desktop.nix b/modules/root/software/desktop.nix
new file mode 100644
index 0000000..eb0a5ff
--- /dev/null
+++ b/modules/root/software/desktop.nix
@@ -0,0 +1,76 @@
+{ pkgs, lib, config, ... }: {
+ options = {
+ software.desktop = {
+ enable = lib.mkEnableOption "enables desktop apps";
+ chromium = {
+ enable = lib.mkEnableOption "enables selected chromium browser package";
+ package = lib.mkOption {
+ type = lib.types.package;
+ default = pkgs.ungoogled-chromium;
+ description = "chromium package to install";
+ };
+ };
+ cad.enable = lib.mkEnableOption "enables cad and 3d printing apps";
+ crypto.enable = lib.mkEnableOption "enables crypto wallet apps";
+ firefox.enable = lib.mkEnableOption "enables firefox";
+ graphics.enable = lib.mkEnableOption "enables graphic design apps";
+ office.enable = lib.mkEnableOption "enables office apps";
+ utilities.enable = lib.mkEnableOption "enables miscellaneous utility apps";
+ };
+ };
+
+ config = lib.mkIf config.software.desktop.enable {
+ environment.systemPackages = with pkgs; [
+ # Default
+ alacritty
+ arandr
+ dmenu
+ jellyfin-mpv-shim
+ libnotify
+ mpv
+ pavucontrol
+ pcmanfm
+ redshift
+ sxiv
+ wpa_supplicant_gui
+ zathura
+ ] ++ pkgs.lib.optionals config.software.desktop.chromium.enable [
+ # Chrome
+ config.software.desktop.chromium.package
+ ] ++ pkgs.lib.optionals config.software.desktop.cad.enable [
+ # CAD
+ blender
+ freecad
+ prusa-slicer
+ ] ++ pkgs.lib.optionals config.software.desktop.crypto.enable [
+ # Crypto Wallets
+ bisq2
+ electrum
+ monero-gui
+ ] ++ pkgs.lib.optionals config.software.desktop.graphics.enable [
+ # Graphics
+ blender
+ geeqie
+ gimp
+ inkscape
+ ] ++ pkgs.lib.optionals config.software.desktop.office.enable [
+ # Office
+ thunderbird
+ ] ++ pkgs.lib.optionals config.software.desktop.utilities.enable [
+ # Misc Utilities
+ qbittorrent
+ qdirstat
+ remmina
+ ];
+
+ programs.localsend.enable = config.software.desktop.utilities.enable; # Installs & opens firewall
+ programs.firefox.enable = config.software.desktop.firefox.enable;
+
+ # GVfs allows for mounting drives in a graphical file manager
+ services.gvfs.enable = true;
+
+ # For home-manager to configure gtk
+ # TODO this should be there instead
+ programs.dconf.enable = config.software.desktop.enable;
+ };
+}
diff --git a/modules/root/software/development.nix b/modules/root/software/development.nix
new file mode 100644
index 0000000..2a4dfba
--- /dev/null
+++ b/modules/root/software/development.nix
@@ -0,0 +1,18 @@
+{ pkgs, lib, config, ... }: {
+ options = {
+ software.development.enable = lib.mkEnableOption "enables development tools";
+ };
+
+ config = lib.mkIf config.software.development.enable {
+ environment.systemPackages = with pkgs; [
+ adb-sync
+ android-tools
+ gcc
+ git
+ gnumake
+ hugo
+ lua
+ pkg-config
+ ];
+ };
+}
diff --git a/modules/root/software/docker.nix b/modules/root/software/docker.nix
new file mode 100644
index 0000000..bf1898c
--- /dev/null
+++ b/modules/root/software/docker.nix
@@ -0,0 +1,21 @@
+{ pkgs, lib, config, userDetails, ... }: {
+ options = {
+ software.development.docker = {
+ enable = lib.mkEnableOption "enables docker";
+ btrfsSupport = lib.mkEnableOption "changes docker storageDriver to btrfs";
+ };
+ };
+
+ config = lib.mkIf config.software.development.docker.enable {
+ virtualisation.docker = {
+ enable = true;
+ storageDriver = lib.mkIf config.software.development.docker.btrfsSupport "btrfs";
+ };
+
+ environment.systemPackages = with pkgs; [
+ docker-compose
+ ];
+
+ users.groups.docker.members = [ userDetails.username ];
+ };
+}
diff --git a/modules/root/software/system.nix b/modules/root/software/system.nix
new file mode 100644
index 0000000..18cc8dd
--- /dev/null
+++ b/modules/root/software/system.nix
@@ -0,0 +1,11 @@
+{ pkgs, ... }: {
+ environment.systemPackages = with pkgs; [
+ age # Secrets
+ cryptsetup
+ dash # TODO should be default /bin/sh
+ exfat
+ git # Needed for home-manager
+ python3
+ sops # Secrets
+ ];
+}
diff --git a/modules/root/software/utilities.nix b/modules/root/software/utilities.nix
new file mode 100644
index 0000000..dabf163
--- /dev/null
+++ b/modules/root/software/utilities.nix
@@ -0,0 +1,32 @@
+{ pkgs, ... }: {
+ environment.systemPackages = with pkgs; [
+ entr
+ fastfetch
+ ffmpeg
+ htop
+ jq
+ light
+ lm_sensors
+ mediainfo
+ neovim
+ nmap
+ openssl
+ p7zip
+ powertop
+ pv
+ rsync
+ screen
+ smartmontools
+ sslscan
+ stress
+ testdisk
+ tmux
+ uhubctl
+ wget
+ wireguard-tools
+ xxHash
+ yt-dlp
+ (callPackage ./derivations/lowbat {})
+ (callPackage ./derivations/pavolctld {})
+ ];
+}
diff --git a/modules/root/software/virtualisation.nix b/modules/root/software/virtualisation.nix
new file mode 100644
index 0000000..4ae15f5
--- /dev/null
+++ b/modules/root/software/virtualisation.nix
@@ -0,0 +1,10 @@
+{ lib, config, ... }: {
+ options = {
+ virtualisation.enable = lib.mkEnableOption "enables virtualisation and virt-manager";
+ };
+
+ config = lib.mkIf config.virtualisation.enable {
+ virtualisation.libvirtd.enable = true;
+ programs.virt-manager.enable = config.software.desktop.enable;
+ };
+}