add enable function

This commit is contained in:
Daylin Morgan 2024-03-19 07:24:30 -05:00
parent 13b42e2511
commit 5e49f286e6
Signed by: daylin
GPG key ID: 950D13E9719334AD
4 changed files with 81 additions and 63 deletions

View file

@ -1,18 +1,17 @@
{
pkgs,
self,
lib,
...
}: {
}: let
inherit (lib) enabled;
in {
imports = with self.nixosModules; [
nix-ld
restic
docker
];
oizys = {
vbox.enable = true;
desktop.enable = true;
vpn.enable = true;
languages = [
"misc"
"python"
@ -20,7 +19,11 @@
"tex"
"node"
];
chrome.enable = true;
nix-ld = enabled;
vbox = enabled;
desktop = enabled;
vpn = enabled;
chrome = enabled;
};
environment.systemPackages = with pkgs; [

View file

@ -2,6 +2,8 @@ final: prev: let
inherit (final) hasSuffix;
runes = import ../modules/runes;
in {
enabled = {enable = true;};
disabled = {enable = false;};
isNixFile = path: hasSuffix ".nix" path;
mkIfIn = name: list: prev.mkIf (builtins.elem name list);
mkRune = {

View file

@ -28,6 +28,8 @@
# programs
chrome
vscode
nix-ld
];
options.oizys.desktop.enable = lib.mkEnableOption "is desktop";

View file

@ -1,59 +1,70 @@
{pkgs, ...}: {
programs.nix-ld.enable = true;
{
pkgs,
lib,
config,
...
}: let
inherit (lib) mkEnableOption mkIf;
cfg = config.oizys.nix-ld;
in {
options.oizys.nix-ld.enable = mkEnableOption "enable nix-ld support";
config = mkIf cfg.enable {
programs.nix-ld.enable = true;
# Packages that need at least something in this list:
# Geneious Prime
# https://github.com/Mic92/dotfiles/blob/cb180bdd3805b373e556a93ccb275b7f0f902a3b/nixos/modules/nix-ld.nix#L9C3-L60C5
programs.nix-ld.libraries = with pkgs; [
alsa-lib
at-spi2-atk
at-spi2-core
atk
cairo
cups
curl
dbus
expat
fontconfig
freetype
fuse3
gdk-pixbuf
glib
gtk3
icu
libGL
libappindicator-gtk3
libdrm
libglvnd
libnotify
libpulseaudio
libunwind
libusb1
libuuid
libxkbcommon
mesa
nspr
nss
openssl
pango
pipewire
stdenv.cc.cc
systemd
vulkan-loader
xorg.libX11
xorg.libXScrnSaver
xorg.libXcomposite
xorg.libXcursor
xorg.libXdamage
xorg.libXext
xorg.libXfixes
xorg.libXi
xorg.libXrandr
xorg.libXrender
xorg.libXtst
xorg.libxcb
xorg.libxkbfile
xorg.libxshmfence
zlib
];
# Packages that need at least something in this list:
# Geneious Prime
# https://github.com/Mic92/dotfiles/blob/cb180bdd3805b373e556a93ccb275b7f0f902a3b/nixos/modules/nix-ld.nix#L9C3-L60C5
programs.nix-ld.libraries = with pkgs; [
alsa-lib
at-spi2-atk
at-spi2-core
atk
cairo
cups
curl
dbus
expat
fontconfig
freetype
fuse3
gdk-pixbuf
glib
gtk3
icu
libGL
libappindicator-gtk3
libdrm
libglvnd
libnotify
libpulseaudio
libunwind
libusb1
libuuid
libxkbcommon
mesa
nspr
nss
openssl
pango
pipewire
stdenv.cc.cc
systemd
vulkan-loader
xorg.libX11
xorg.libXScrnSaver
xorg.libXcomposite
xorg.libXcursor
xorg.libXdamage
xorg.libXext
xorg.libXfixes
xorg.libXi
xorg.libXrandr
xorg.libXrender
xorg.libXtst
xorg.libxcb
xorg.libxkbfile
xorg.libxshmfence
zlib
];
};
}