Compare commits

...

7 Commits

11 changed files with 79 additions and 12 deletions

1
.envrc
View File

@@ -1,3 +1,4 @@
# -*- mode: sh; -*-
if ! has nix_direnv_version || ! nix_direnv_version 2.2.1; then if ! has nix_direnv_version || ! nix_direnv_version 2.2.1; then
source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/2.2.1/direnvrc" "sha256-zelF0vLbEl5uaqrfIzbgNzJWGmLzCmYAkInj/LNxvKs=" source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/2.2.1/direnvrc" "sha256-zelF0vLbEl5uaqrfIzbgNzJWGmLzCmYAkInj/LNxvKs="
fi fi

View File

@@ -76,6 +76,7 @@
enable = true; enable = true;
autostart = true; autostart = true;
}; };
languagetool.enable = true;
}; };
users = { users = {
root.disablePassword = true; root.disablePassword = true;

View File

@@ -10,6 +10,6 @@ in {
options.mySystem.desktop.waydroid.enable = mkEnableOption "Enables Waydroid"; options.mySystem.desktop.waydroid.enable = mkEnableOption "Enables Waydroid";
config = mkIf cfg.enable { config = mkIf cfg.enable {
virtualisation.waydroid.enable = cfg.enable; virtualisation.waydroid.enable = cfg.enable;
environment.systemPackages = [ pkgs.waydroid-helper ]; environment.systemPackages = [pkgs.waydroid-helper];
}; };
} }

View File

@@ -17,9 +17,10 @@ in {
config = { config = {
environment.systemPackages = mkIf cfg.podman.enable [ environment.systemPackages = mkIf cfg.podman.enable [
pkgs.podman-desktop pkgs.podman-desktop
pkgs.podman-compose
]; ];
virtualisation = { virtualisation = mkIf cfg.enable {
docker = mkIf (cfg.enable && !cfg.podman.enable) { docker = mkIf (!cfg.podman.enable) {
enable = true; enable = true;
enableNvidia = cfg.nvidia.enable; enableNvidia = cfg.nvidia.enable;
autoPrune.enable = cfg.autoprune.enable; autoPrune.enable = cfg.autoprune.enable;

View File

@@ -13,7 +13,7 @@ in {
qemu qemu
virt-manager virt-manager
]; ];
systemd.tmpfiles.rules = [ "L+ /var/lib/qemu/firmware - - - - ${pkgs.qemu}/share/qemu/firmware" ]; systemd.tmpfiles.rules = ["L+ /var/lib/qemu/firmware - - - - ${pkgs.qemu}/share/qemu/firmware"];
boot.binfmt.emulatedSystems = [ "aarch64-linux" ]; boot.binfmt.emulatedSystems = ["aarch64-linux"];
}; };
} }

View File

@@ -9,14 +9,54 @@ with lib; let
in { in {
options.mySystem.hardware.amdgpu.enable = mkEnableOption "Enables an AMD GPU configuration"; options.mySystem.hardware.amdgpu.enable = mkEnableOption "Enables an AMD GPU configuration";
config = mkIf cfg.enable { config = mkIf cfg.enable {
systemd.tmpfiles.rules = [ hardware = {
"L+ /opt/rocm/hip - - - - ${pkgs.rocmPackages.clr}" graphics = {
enable = true;
enable32Bit = true;
extraPackages = with pkgs; [
mesa # Mesa drivers for AMD GPUs
rocmPackages.clr # common language runtime for ROCm
rocmPackages.clr.icd # ROCm ICD for OpenCL
rocmPackages.rocblas # ROCm BLAS library
rocmPackages.hipblas #
rocmPackages.rpp # High-performance computer vision library
nvtopPackages.amd # GPU utilization monitoring
]; ];
hardware.graphics.extraPackages = with pkgs; [rocmPackages.clr.icd]; };
amdgpu = {
initrd.enable = true;
opencl.enable = true;
};
};
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
clinfo clinfo
amdgpu_top amdgpu_top
nvtopPackages.amd nvtopPackages.amd
]; ];
systemd = {
packages = with pkgs; [lact];
services.lactd.wantedBy = ["multi-user.target"];
tmpfiles.rules = let
rocmEnv = pkgs.symlinkJoin {
name = "rocm-combined";
paths = with pkgs.rocmPackages; [
clr
clr.icd
rocblas
hipblas
rpp
];
};
in [
"L+ /opt/rocm - - - - ${rocmEnv}"
];
};
environment.variables = {
ROCM_PATH = "/opt/rocm"; # Set ROCm path
HIP_VISIBLE_DEVICES = "1"; # Use only the eGPU (ID 1)
ROCM_VISIBLE_DEVICES = "1"; # Optional: ROCm equivalent for visibility
# LD_LIBRARY_PATH = "/opt/rocm/lib"; # Add ROCm libraries
HSA_OVERRIDE_GFX_VERSION = "10.3.0"; # Set GFX version override
};
}; };
} }

View File

@@ -4,6 +4,7 @@
./endlessh.nix ./endlessh.nix
./fwupd.nix ./fwupd.nix
./jellyfin.nix ./jellyfin.nix
./languagetool.nix
./plex.nix ./plex.nix
./printing.nix ./printing.nix
./ssh.nix ./ssh.nix

View File

@@ -0,0 +1,20 @@
{
config,
lib,
...
}:
with lib; let
cfg = config.mySystem.services.languagetool;
in {
options.mySystem.services.languagetool = {
enable = mkEnableOption "Enables languagetool";
port = mkOption {
type = types.port;
default = 8081;
example = 80;
};
};
config.services.languagetool = mkIf cfg.enable {
inherit (cfg) enable port;
};
}

View File

@@ -20,7 +20,6 @@ in {
emacsPkg = mkOption { emacsPkg = mkOption {
type = types.package; type = types.package;
default = config.home.dev.editors.emacs.package or pkgs.emacs; default = config.home.dev.editors.emacs.package or pkgs.emacs;
# default = pkgs.emacs;
example = pkgs.emacs; example = pkgs.emacs;
}; };
host = mkOption { host = mkOption {
@@ -63,6 +62,8 @@ in {
"marpa" = [ "marpa" = [
"DP-1, 3440x1440@144, 1080x550, 1" "DP-1, 3440x1440@144, 1080x550, 1"
"DP-2, 2560x1080@60, 0x0, 1, transform, 1" "DP-2, 2560x1080@60, 0x0, 1, transform, 1"
# "DP-2, 1366x768@60, 0x0, 1"
# "DP-2, 1829x1143@60, 0x0, 1"
]; ];
"gampo" = []; "gampo" = [];
}."${cfg.host}"; }."${cfg.host}";

View File

@@ -45,6 +45,9 @@ in {
default-command = "st"; default-command = "st";
pager = ":builtin"; pager = ":builtin";
show-cryptographic-signatures = true; show-cryptographic-signatures = true;
conflict-marker-style = "git"; # Support for vc-jj.el
diff-formatter = ":git"; # Support for vc-jj.el
diff-editor = ":builtin";
inherit (cfg) editor; inherit (cfg) editor;
}; };
signing = mkIf cfg.signing.enable { signing = mkIf cfg.signing.enable {

View File

@@ -65,8 +65,7 @@ with lib; {
# Graphics # Graphics
inkscape inkscape
gimp gimp
gimpPlugins.fourier gimpPlugins.gmic
gimpPlugins.farbfeld
# Dev # Dev
devenv devenv