Structural changes
This commit is contained in:
@@ -2,98 +2,7 @@
|
|||||||
# your system. Help is available in the configuration.nix(5) man page
|
# your system. Help is available in the configuration.nix(5) man page
|
||||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||||||
|
|
||||||
{ lib, config, pkgs, ... }: let
|
{ lib, config, pkgs, ... }: {
|
||||||
py3Opt = pkgs.python310.override {
|
|
||||||
# enableOptimizations = true;
|
|
||||||
# reproducibleBuild = false;
|
|
||||||
# self = py3Opt;
|
|
||||||
};
|
|
||||||
py3OptPkgs = py3Opt.pkgs;
|
|
||||||
# For 3D CNC machining
|
|
||||||
opencamlib = py3OptPkgs.toPythonModule (pkgs.stdenv.mkDerivation rec {
|
|
||||||
pname = "opencamlib";
|
|
||||||
version = "2019.07";
|
|
||||||
nativeBuildInputs = (with pkgs;[
|
|
||||||
cmake
|
|
||||||
git
|
|
||||||
doxygen
|
|
||||||
boost
|
|
||||||
texlive.combined.scheme-full
|
|
||||||
]);
|
|
||||||
propagatedNativeBuildInputs = (with pkgs; [
|
|
||||||
py3Opt
|
|
||||||
py3Opt.pkgs.boost
|
|
||||||
py3Opt.pkgs.vtk
|
|
||||||
]);
|
|
||||||
postPatch = ''
|
|
||||||
mkdir -p $out/${py3Opt.sitePackages}/{lib,ocl}
|
|
||||||
sed -e 's#LIBRARY DESTINATION ''${PYTHON_ARCH_PACKAGES}#LIBRARY DESTINATION '"$out"'/${py3Opt.sitePackages}#g' -i src/pythonlib/pythonlib.cmake
|
|
||||||
sed -e 's#DESTINATION ''${PYTHON_SITE_PACKAGES}#DESTINATION '"$out"'/${py3Opt.sitePackages}#g' -i src/pythonlib/pythonlib.cmake
|
|
||||||
'';
|
|
||||||
cmakeFlags = [
|
|
||||||
"-DVERSION_STRING=2019.07"
|
|
||||||
"-DBUILD_CXX_LIB=ON"
|
|
||||||
"-DBUILD_PY_LIB=ON"
|
|
||||||
"-DUSE_PY_3=ON"
|
|
||||||
"-DCMAKE_BUILD_TYPE=Release"
|
|
||||||
];
|
|
||||||
src = pkgs.fetchFromGitHub {
|
|
||||||
owner = "aewallin";
|
|
||||||
repo = "opencamlib";
|
|
||||||
rev = "2019.07";
|
|
||||||
sha256 = "1a8pxp1mh8x3bfsb0l97vgxrpk482p7q9jprkd4m9hv69vva2bdz";
|
|
||||||
};
|
|
||||||
});
|
|
||||||
equation = py3OptPkgs.buildPythonPackage {
|
|
||||||
pname = "Equation";
|
|
||||||
version = "1.2.01";
|
|
||||||
nativeBuildInputs = [
|
|
||||||
py3OptPkgs.setuptools
|
|
||||||
py3OptPkgs.numpy
|
|
||||||
];
|
|
||||||
src = pkgs.fetchzip {
|
|
||||||
url = "https://files.pythonhosted.org/packages/2e/cc/115fb1722051f99b9699864586e7f96ca0080645387698af922fade4f7b2/Equation-1.2.01.zip";
|
|
||||||
sha256 = "YFxZB3vaC5s49K1AQLFF4WGUr2RpomJTLQdZ24ITXr4=";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
morphio = py3Opt.pkgs.toPythonModule ( pkgs.stdenv.mkDerivation rec {
|
|
||||||
pname = "MorphIO";
|
|
||||||
version = "3.3.4";
|
|
||||||
nativeBuildInputs = (with pkgs; [
|
|
||||||
cmake
|
|
||||||
ninja
|
|
||||||
py3Opt
|
|
||||||
py3Opt.pkgs.numpy
|
|
||||||
hdf5
|
|
||||||
]);
|
|
||||||
cmakeFlags = [
|
|
||||||
"-DMorphIO_CXX_WARNINGS=OFF"
|
|
||||||
];
|
|
||||||
postInstall = ''
|
|
||||||
mkdir -p $out/${py3Opt.sitePackages}
|
|
||||||
mv ../morphio $out/${py3Opt.sitePackages}
|
|
||||||
cp binds/python/_morphio.* $out/${py3Opt.sitePackages}/morphio/
|
|
||||||
'';
|
|
||||||
src = pkgs.fetchFromGitHub {
|
|
||||||
owner = "BlueBrain";
|
|
||||||
repo = "MorphIO";
|
|
||||||
rev = "v${version}";
|
|
||||||
deepClone = true;
|
|
||||||
fetchSubmodules = true;
|
|
||||||
sha256 = "C3zDziG7LF7v22ZvplBrtOYq7iKGnAavfpiBCcShHaQ=";
|
|
||||||
};
|
|
||||||
});
|
|
||||||
py3 = py3Opt.withPackages (p: (with p; [
|
|
||||||
numpy
|
|
||||||
scipy
|
|
||||||
seaborn
|
|
||||||
pandas
|
|
||||||
matplotlib
|
|
||||||
python-lsp-server
|
|
||||||
opencamlib
|
|
||||||
]));
|
|
||||||
in
|
|
||||||
{
|
|
||||||
nix.settings.auto-optimise-store = true;
|
nix.settings.auto-optimise-store = true;
|
||||||
imports =
|
imports =
|
||||||
[ # Include the results of the hardware scan.
|
[ # Include the results of the hardware scan.
|
||||||
@@ -237,53 +146,12 @@ in
|
|||||||
environment.pathsToLink = [
|
environment.pathsToLink = [
|
||||||
"/share/nix-direnv"
|
"/share/nix-direnv"
|
||||||
];
|
];
|
||||||
|
|
||||||
# if you also want support for flakes
|
# if you also want support for flakes
|
||||||
nixpkgs.overlays = [(self: super: rec {
|
nixpkgs.overlays = [(self: super: rec {
|
||||||
nix-direnv = super.nix-direnv.override {
|
nix-direnv = super.nix-direnv.override {
|
||||||
enableFlakes = true;
|
enableFlakes = true;
|
||||||
};
|
};
|
||||||
# Discord fix
|
|
||||||
discord = super.discord.override {
|
|
||||||
nss = super.pkgs.nss_latest;
|
|
||||||
};
|
|
||||||
discord-canary = super.discord-canary.override {
|
|
||||||
nss = super.pkgs.nss_latest;
|
|
||||||
};
|
|
||||||
# Add CUDA Support to Blender
|
|
||||||
blender_cuda = super.blender.override {
|
|
||||||
cudaSupport = true;
|
|
||||||
};
|
|
||||||
# Add Opencamlib for BlenderCAM Support
|
|
||||||
blender = blender_cuda.overrideAttrs (old: {
|
|
||||||
pythonPath = old.pythonPath ++ (with py3OptPkgs; [
|
|
||||||
# OpenCAMLib support
|
|
||||||
shapely
|
|
||||||
equation
|
|
||||||
opencamlib
|
|
||||||
# NeuroMorphoVis support
|
|
||||||
matplotlib
|
|
||||||
seaborn
|
|
||||||
pandas
|
|
||||||
pillow
|
|
||||||
h5py
|
|
||||||
morphio
|
|
||||||
# TODO add BluePy support?
|
|
||||||
]);
|
|
||||||
});
|
|
||||||
# Update RX and Aseprite
|
|
||||||
rx = super.rx.overrideAttrs (old: {
|
|
||||||
version = "git";
|
|
||||||
src = super.fetchFromGitHub {
|
|
||||||
owner = "cloudhead";
|
|
||||||
repo = old.pname;
|
|
||||||
rev = "18625a68921873ebe21a7ea8096409a9f0314541";
|
|
||||||
sha256 = "sha256-LTpaV/fgYUgA2M6Wz5qLHnTNywh13900g+umhgLvciM=";
|
|
||||||
};
|
|
||||||
});
|
|
||||||
# Add to FreeCAD too, why not
|
|
||||||
freecad = super.freecad.override {
|
|
||||||
python = py3;
|
|
||||||
};
|
|
||||||
})];
|
})];
|
||||||
|
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
@@ -294,22 +162,6 @@ in
|
|||||||
hardware.opengl.driSupport = true;
|
hardware.opengl.driSupport = true;
|
||||||
|
|
||||||
services.fwupd.enable = true;
|
services.fwupd.enable = true;
|
||||||
# For steam
|
|
||||||
services.flatpak.enable = true;
|
|
||||||
# Game compat
|
|
||||||
programs.gamemode.enable = true;
|
|
||||||
|
|
||||||
virtualisation = {
|
|
||||||
podman = {
|
|
||||||
enable = true;
|
|
||||||
dockerCompat = true;
|
|
||||||
enableNvidia = true;
|
|
||||||
extraPackages = [
|
|
||||||
pkgs.zfs
|
|
||||||
pkgs.nvidia-podman
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.adb.enable = true;
|
programs.adb.enable = true;
|
||||||
|
|
||||||
@@ -326,100 +178,6 @@ in
|
|||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
direnv
|
direnv
|
||||||
nix-direnv
|
nix-direnv
|
||||||
|
|
||||||
cbqn-replxx
|
|
||||||
|
|
||||||
# GTK theme support (basic) for GTK apps e.g. inkscape
|
|
||||||
gnome.adwaita-icon-theme
|
|
||||||
|
|
||||||
firefox
|
|
||||||
chromium
|
|
||||||
|
|
||||||
bitwarden
|
|
||||||
bitwarden-cli
|
|
||||||
|
|
||||||
tidal-hifi
|
|
||||||
|
|
||||||
nextcloud-client
|
|
||||||
libsForQt5.kdeconnect-kde
|
|
||||||
|
|
||||||
# Fonts
|
|
||||||
julia-mono
|
|
||||||
|
|
||||||
discord-canary
|
|
||||||
discord
|
|
||||||
betterdiscordctl
|
|
||||||
slack
|
|
||||||
teams
|
|
||||||
signal-desktop
|
|
||||||
|
|
||||||
cudaPackages.cudatoolkit
|
|
||||||
cudaPackages.cudnn
|
|
||||||
|
|
||||||
openjdk17
|
|
||||||
|
|
||||||
prismlauncher
|
|
||||||
pcsx2
|
|
||||||
|
|
||||||
blender
|
|
||||||
|
|
||||||
musescore
|
|
||||||
|
|
||||||
rx
|
|
||||||
aseprite-unfree
|
|
||||||
gimp
|
|
||||||
|
|
||||||
synfigstudio
|
|
||||||
inkscape-with-extensions
|
|
||||||
|
|
||||||
vlc
|
|
||||||
ffmpeg_5-full
|
|
||||||
|
|
||||||
openscad
|
|
||||||
freecad
|
|
||||||
kicad
|
|
||||||
|
|
||||||
godot_4
|
|
||||||
|
|
||||||
kitty
|
|
||||||
emacs
|
|
||||||
rnix-lsp
|
|
||||||
texlive.combined.scheme-full
|
|
||||||
pandoc
|
|
||||||
libreoffice-qt
|
|
||||||
|
|
||||||
pandoc
|
|
||||||
ispell
|
|
||||||
wget
|
|
||||||
curl
|
|
||||||
git
|
|
||||||
|
|
||||||
qemu
|
|
||||||
|
|
||||||
podman-compose
|
|
||||||
buildah
|
|
||||||
x11docker
|
|
||||||
# needs python
|
|
||||||
py3
|
|
||||||
weston
|
|
||||||
|
|
||||||
turbovnc
|
|
||||||
awesome
|
|
||||||
xpra
|
|
||||||
|
|
||||||
easyeffects
|
|
||||||
helvum
|
|
||||||
|
|
||||||
zip
|
|
||||||
unzip
|
|
||||||
|
|
||||||
lsof
|
|
||||||
htop
|
|
||||||
btop
|
|
||||||
xclip
|
|
||||||
screen
|
|
||||||
man-pages
|
|
||||||
man-pages-posix
|
|
||||||
];
|
];
|
||||||
|
|
||||||
documentation.dev.enable = true;
|
documentation.dev.enable = true;
|
||||||
|
|||||||
@@ -1,450 +0,0 @@
|
|||||||
# Edit this configuration file to define what should be installed on
|
|
||||||
# your system. Help is available in the configuration.nix(5) man page
|
|
||||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
|
||||||
|
|
||||||
{ lib, config, pkgs, ... }: let
|
|
||||||
py3Opt = pkgs.python310.override {
|
|
||||||
# enableOptimizations = true;
|
|
||||||
# reproducibleBuild = false;
|
|
||||||
# self = py3Opt;
|
|
||||||
};
|
|
||||||
py3OptPkgs = py3Opt.pkgs;
|
|
||||||
# For 3D CNC machining
|
|
||||||
opencamlib = py3OptPkgs.toPythonModule (pkgs.stdenv.mkDerivation rec {
|
|
||||||
pname = "opencamlib";
|
|
||||||
version = "2019.07";
|
|
||||||
nativeBuildInputs = (with pkgs;[
|
|
||||||
cmake
|
|
||||||
git
|
|
||||||
doxygen
|
|
||||||
boost
|
|
||||||
texlive.combined.scheme-full
|
|
||||||
]);
|
|
||||||
propagatedNativeBuildInputs = (with pkgs; [
|
|
||||||
py3Opt
|
|
||||||
py3Opt.pkgs.boost
|
|
||||||
py3Opt.pkgs.vtk
|
|
||||||
]);
|
|
||||||
postPatch = ''
|
|
||||||
mkdir -p $out/${py3Opt.sitePackages}/{lib,ocl}
|
|
||||||
sed -e 's#LIBRARY DESTINATION ''${PYTHON_ARCH_PACKAGES}#LIBRARY DESTINATION '"$out"'/${py3Opt.sitePackages}#g' -i src/pythonlib/pythonlib.cmake
|
|
||||||
sed -e 's#DESTINATION ''${PYTHON_SITE_PACKAGES}#DESTINATION '"$out"'/${py3Opt.sitePackages}#g' -i src/pythonlib/pythonlib.cmake
|
|
||||||
'';
|
|
||||||
cmakeFlags = [
|
|
||||||
"-DVERSION_STRING=2019.07"
|
|
||||||
"-DBUILD_CXX_LIB=ON"
|
|
||||||
"-DBUILD_PY_LIB=ON"
|
|
||||||
"-DUSE_PY_3=ON"
|
|
||||||
"-DCMAKE_BUILD_TYPE=Release"
|
|
||||||
];
|
|
||||||
src = pkgs.fetchFromGitHub {
|
|
||||||
owner = "aewallin";
|
|
||||||
repo = "opencamlib";
|
|
||||||
rev = "2019.07";
|
|
||||||
sha256 = "1a8pxp1mh8x3bfsb0l97vgxrpk482p7q9jprkd4m9hv69vva2bdz";
|
|
||||||
};
|
|
||||||
});
|
|
||||||
equation = py3OptPkgs.buildPythonPackage {
|
|
||||||
pname = "Equation";
|
|
||||||
version = "1.2.01";
|
|
||||||
nativeBuildInputs = [
|
|
||||||
py3OptPkgs.setuptools
|
|
||||||
py3OptPkgs.numpy
|
|
||||||
];
|
|
||||||
src = pkgs.fetchzip {
|
|
||||||
url = "https://files.pythonhosted.org/packages/2e/cc/115fb1722051f99b9699864586e7f96ca0080645387698af922fade4f7b2/Equation-1.2.01.zip";
|
|
||||||
sha256 = "YFxZB3vaC5s49K1AQLFF4WGUr2RpomJTLQdZ24ITXr4=";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
morphio = py3Opt.pkgs.toPythonModule ( pkgs.stdenv.mkDerivation rec {
|
|
||||||
pname = "MorphIO";
|
|
||||||
version = "3.3.4";
|
|
||||||
nativeBuildInputs = (with pkgs; [
|
|
||||||
cmake
|
|
||||||
ninja
|
|
||||||
py3Opt
|
|
||||||
py3Opt.pkgs.numpy
|
|
||||||
hdf5
|
|
||||||
]);
|
|
||||||
postInstall = ''
|
|
||||||
mkdir -p $out/${py3Opt.sitePackages}
|
|
||||||
mv ../morphio $out/${py3Opt.sitePackages}
|
|
||||||
cp binds/python/_morphio.* $out/${py3Opt.sitePackages}/morphio/
|
|
||||||
'';
|
|
||||||
src = pkgs.fetchFromGitHub {
|
|
||||||
owner = "BlueBrain";
|
|
||||||
repo = "MorphIO";
|
|
||||||
rev = "v${version}";
|
|
||||||
deepClone = true;
|
|
||||||
fetchSubmodules = true;
|
|
||||||
sha256 = "";
|
|
||||||
};
|
|
||||||
});
|
|
||||||
py3 = py3Opt.withPackages (p: (with p; [
|
|
||||||
numpy
|
|
||||||
scipy
|
|
||||||
seaborn
|
|
||||||
pandas
|
|
||||||
matplotlib
|
|
||||||
python-lsp-server
|
|
||||||
opencamlib
|
|
||||||
]));
|
|
||||||
in
|
|
||||||
{
|
|
||||||
nix.settings.auto-optimise-store = true;
|
|
||||||
imports =
|
|
||||||
[ # Include the results of the hardware scan.
|
|
||||||
./hardware-configuration.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
fileSystems."/home/universe/tmp" = {
|
|
||||||
fsType = "tmpfs";
|
|
||||||
};
|
|
||||||
fileSystems."/home/universe/Downloads" = {
|
|
||||||
fsType = "tmpfs";
|
|
||||||
};
|
|
||||||
|
|
||||||
# Use the systemd-boot EFI boot loader.
|
|
||||||
boot.loader.systemd-boot.enable = true;
|
|
||||||
boot.loader.efi.canTouchEfiVariables = true;
|
|
||||||
|
|
||||||
## Bridged Network Config
|
|
||||||
|
|
||||||
networking.hostName = "universedesktop";
|
|
||||||
networking.useDHCP = false;
|
|
||||||
networking.bridges = {
|
|
||||||
"br0" = {
|
|
||||||
interfaces = [ "enp9s0" ];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
networking.interfaces.br0.ipv4.addresses = [
|
|
||||||
{
|
|
||||||
address = "192.168.1.21";
|
|
||||||
prefixLength = 24;
|
|
||||||
}
|
|
||||||
];
|
|
||||||
networking.defaultGateway = "192.168.1.1";
|
|
||||||
networking.nameservers = [ "8.8.8.8" "8.8.4.4" ];
|
|
||||||
networking.interfaces.tap0.virtual = true;
|
|
||||||
|
|
||||||
hardware.bluetooth.enable = true;
|
|
||||||
|
|
||||||
# Set your time zone.
|
|
||||||
time.timeZone = "America/Toronto";
|
|
||||||
# Configure network proxy if necessary
|
|
||||||
# networking.proxy.default = "http://user:password@proxy:port/";
|
|
||||||
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
|
||||||
|
|
||||||
# Select internationalisation properties.
|
|
||||||
i18n.defaultLocale = "en_US.UTF-8";
|
|
||||||
#console = {
|
|
||||||
# font = "Lat2-Terminus16";
|
|
||||||
# keyMap = "us";
|
|
||||||
# useXkbConfig = true; # use xkbOptions in tty.
|
|
||||||
#};
|
|
||||||
|
|
||||||
services.brltty = {
|
|
||||||
enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
users.users.brltty.isSystemUser = true;
|
|
||||||
|
|
||||||
# Enable the X11 windowing system.
|
|
||||||
services.xserver.enable = true;
|
|
||||||
|
|
||||||
# Enable the GNOME Desktop Environment.
|
|
||||||
services.xserver.displayManager.sddm.enable = true;
|
|
||||||
services.xserver.desktopManager.plasma5.enable = true;
|
|
||||||
programs.xwayland.enable = true;
|
|
||||||
|
|
||||||
# Configure keymap in X11
|
|
||||||
services.xserver.layout = "us,bqn";
|
|
||||||
services.xserver.xkbOptions = "grp:switch";
|
|
||||||
services.xserver.extraLayouts = {
|
|
||||||
bqn = {
|
|
||||||
description = "BQN Symbol Modifiers";
|
|
||||||
languages = ["eng"];
|
|
||||||
symbolsFile = pkgs.fetchurl {
|
|
||||||
url = "https://raw.githubusercontent.com/mlochbaum/BQN/master/editors/bqn";
|
|
||||||
sha256 = "F2fgLlWghcOrMu0BXGiyNHa0qh9YUyQE80GK0BWU2EY=";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
# services.xserver.xkbOptions = {
|
|
||||||
# };
|
|
||||||
|
|
||||||
# Enable CUPS to print documents.
|
|
||||||
services.printing.enable = true;
|
|
||||||
|
|
||||||
# Enable sound.
|
|
||||||
#sound.enable = true;
|
|
||||||
#hardware.pulseaudio.enable = true;
|
|
||||||
# rtkit is optional but recommended
|
|
||||||
security.rtkit.enable = true;
|
|
||||||
services.pipewire = {
|
|
||||||
enable = true;
|
|
||||||
alsa.enable = true;
|
|
||||||
alsa.support32Bit = true;
|
|
||||||
pulse.enable = true;
|
|
||||||
# If you want to use JACK applications, uncomment this
|
|
||||||
jack.enable = true;
|
|
||||||
};
|
|
||||||
# services.pipewire = {
|
|
||||||
# config.pipewire = {
|
|
||||||
# "context.properties" = {
|
|
||||||
# #"link.max-buffers" = 64;
|
|
||||||
# "link.max-buffers" = 16; # version < 3 clients can't handle more than this
|
|
||||||
# "log.level" = 2; # https://docs.pipewire.org/page_daemon.html
|
|
||||||
# #"default.clock.rate" = 48000;
|
|
||||||
# #"default.clock.quantum" = 1024;
|
|
||||||
# #"default.clock.min-quantum" = 32;
|
|
||||||
# #"default.clock.max-quantum" = 8192;
|
|
||||||
# };
|
|
||||||
# };
|
|
||||||
# };
|
|
||||||
# environment.etc = {
|
|
||||||
# "wireplumber/bluetooth.lua.d/52-bluez-config.lua".text = ''
|
|
||||||
# bluez_monitor.properties = {
|
|
||||||
# ["bluez5.enable-sbc-xq"] = true,
|
|
||||||
# ["bluez5.enable-msbc"] = true,
|
|
||||||
# ["bluez5.enable-hw-volume"] = true,
|
|
||||||
# ["bluez5.headset-roles"] = "[ hsp_hs hsp_ag hfp_hf hfp_ag ]"
|
|
||||||
# '';
|
|
||||||
# };
|
|
||||||
|
|
||||||
# Enable touchpad support (enabled default in most desktopManager).
|
|
||||||
# services.xserver.libinput.enable = true;
|
|
||||||
users.groups.net = {};
|
|
||||||
users.users.universe = {
|
|
||||||
isNormalUser = true;
|
|
||||||
extraGroups = [ "wheel" "adbusers" "net" "brltty" "brlapi" ];
|
|
||||||
packages = with pkgs; [
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
nix = {
|
|
||||||
package = pkgs.nixVersions.stable; # or versioned attributes like nixVersions.nix_2_8
|
|
||||||
extraOptions = ''
|
|
||||||
keep-outputs = true
|
|
||||||
keep-derivations = true
|
|
||||||
experimental-features = nix-command flakes
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
environment.pathsToLink = [
|
|
||||||
"/share/nix-direnv"
|
|
||||||
];
|
|
||||||
# if you also want support for flakes
|
|
||||||
nixpkgs.overlays = [(self: super: rec {
|
|
||||||
nix-direnv = super.nix-direnv.override {
|
|
||||||
enableFlakes = true;
|
|
||||||
};
|
|
||||||
# Discord fix
|
|
||||||
discord = super.discord.override {
|
|
||||||
nss = super.pkgs.nss_latest;
|
|
||||||
};
|
|
||||||
discord-canary = super.discord-canary.override {
|
|
||||||
nss = super.pkgs.nss_latest;
|
|
||||||
};
|
|
||||||
# Add CUDA Support to Blender
|
|
||||||
blender_cuda = super.blender.override {
|
|
||||||
cudaSupport = true;
|
|
||||||
};
|
|
||||||
# Add Opencamlib for BlenderCAM Support
|
|
||||||
blender = blender_cuda.overrideAttrs (old: {
|
|
||||||
pythonPath = old.pythonPath ++ (with py3OptPkgs; [
|
|
||||||
# OpenCAMLib support
|
|
||||||
shapely
|
|
||||||
equation
|
|
||||||
opencamlib
|
|
||||||
# NeuroMorphoVis support
|
|
||||||
matplotlib
|
|
||||||
seaborn
|
|
||||||
pandas
|
|
||||||
pillow
|
|
||||||
h5py
|
|
||||||
morphio
|
|
||||||
# TODO add BluePy support?
|
|
||||||
]);
|
|
||||||
});
|
|
||||||
# Update RX and Aseprite
|
|
||||||
rx = super.rx.overrideAttrs (old: {
|
|
||||||
version = "git";
|
|
||||||
src = super.fetchFromGitHub {
|
|
||||||
owner = "cloudhead";
|
|
||||||
repo = old.pname;
|
|
||||||
rev = "18625a68921873ebe21a7ea8096409a9f0314541";
|
|
||||||
sha256 = "sha256-LTpaV/fgYUgA2M6Wz5qLHnTNywh13900g+umhgLvciM=";
|
|
||||||
};
|
|
||||||
});
|
|
||||||
# Add to FreeCAD too, why not
|
|
||||||
freecad = super.freecad.override {
|
|
||||||
python = py3;
|
|
||||||
};
|
|
||||||
})];
|
|
||||||
|
|
||||||
nixpkgs.config.allowUnfree = true;
|
|
||||||
services.xserver.videoDrivers = [ "nvidia" ];
|
|
||||||
# Wayland support
|
|
||||||
boot.kernelParams = ["nvidia_drm.modeset=1"];
|
|
||||||
hardware.opengl.enable = true;
|
|
||||||
hardware.opengl.driSupport = true;
|
|
||||||
|
|
||||||
services.fwupd.enable = true;
|
|
||||||
# For steam
|
|
||||||
services.flatpak.enable = true;
|
|
||||||
# Game compat
|
|
||||||
programs.gamemode.enable = true;
|
|
||||||
|
|
||||||
virtualisation = {
|
|
||||||
podman = {
|
|
||||||
enable = true;
|
|
||||||
dockerCompat = true;
|
|
||||||
enableNvidia = true;
|
|
||||||
extraPackages = [
|
|
||||||
pkgs.zfs
|
|
||||||
pkgs.nvidia-podman
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.adb.enable = true;
|
|
||||||
|
|
||||||
# GTK Support
|
|
||||||
programs.dconf.enable = true;
|
|
||||||
|
|
||||||
# Legacy Python2 Support
|
|
||||||
nixpkgs.config.permittedInsecurePackages = [
|
|
||||||
"python-2.7.18.6"
|
|
||||||
];
|
|
||||||
|
|
||||||
# List packages installed in system profile. To search, run:
|
|
||||||
# $ nix search wget
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
direnv
|
|
||||||
nix-direnv
|
|
||||||
|
|
||||||
cbqn-replxx
|
|
||||||
|
|
||||||
# GTK theme support (basic) for GTK apps e.g. inkscape
|
|
||||||
gnome.adwaita-icon-theme
|
|
||||||
|
|
||||||
firefox
|
|
||||||
chromium
|
|
||||||
|
|
||||||
tidal-hifi
|
|
||||||
|
|
||||||
nextcloud-client
|
|
||||||
libsForQt5.kdeconnect-kde
|
|
||||||
|
|
||||||
# Fonts
|
|
||||||
julia-mono
|
|
||||||
|
|
||||||
discord-canary
|
|
||||||
discord
|
|
||||||
betterdiscordctl
|
|
||||||
slack
|
|
||||||
teams
|
|
||||||
signal-desktop
|
|
||||||
|
|
||||||
cudaPackages.cudatoolkit
|
|
||||||
cudaPackages.cudnn
|
|
||||||
|
|
||||||
openjdk17
|
|
||||||
|
|
||||||
prismlauncher
|
|
||||||
pcsx2
|
|
||||||
|
|
||||||
blender
|
|
||||||
|
|
||||||
rx
|
|
||||||
aseprite-unfree
|
|
||||||
gimp
|
|
||||||
|
|
||||||
synfigstudio
|
|
||||||
inkscape-with-extensions
|
|
||||||
|
|
||||||
vlc
|
|
||||||
ffmpeg_5-full
|
|
||||||
|
|
||||||
openscad
|
|
||||||
freecad
|
|
||||||
kicad
|
|
||||||
|
|
||||||
godot
|
|
||||||
|
|
||||||
kitty
|
|
||||||
emacs
|
|
||||||
texlive.combined.scheme-full
|
|
||||||
pandoc
|
|
||||||
libreoffice-qt
|
|
||||||
|
|
||||||
pandoc
|
|
||||||
ispell
|
|
||||||
wget
|
|
||||||
curl
|
|
||||||
git
|
|
||||||
|
|
||||||
qemu
|
|
||||||
|
|
||||||
podman-compose
|
|
||||||
buildah
|
|
||||||
x11docker
|
|
||||||
# needs python
|
|
||||||
py3
|
|
||||||
weston
|
|
||||||
|
|
||||||
turbovnc
|
|
||||||
awesome
|
|
||||||
xpra
|
|
||||||
|
|
||||||
easyeffects
|
|
||||||
|
|
||||||
zip
|
|
||||||
unzip
|
|
||||||
|
|
||||||
lsof
|
|
||||||
htop
|
|
||||||
btop
|
|
||||||
xclip
|
|
||||||
screen
|
|
||||||
man-pages
|
|
||||||
man-pages-posix
|
|
||||||
];
|
|
||||||
|
|
||||||
documentation.dev.enable = true;
|
|
||||||
documentation.man.generateCaches = true;
|
|
||||||
|
|
||||||
# Some programs need SUID wrappers, can be configured further or are
|
|
||||||
# started in user sessions.
|
|
||||||
# programs.mtr.enable = true;
|
|
||||||
# programs.gnupg.agent = {
|
|
||||||
# enable = true;
|
|
||||||
# enableSSHSupport = true;
|
|
||||||
# };
|
|
||||||
|
|
||||||
# List services that you want to enable:
|
|
||||||
|
|
||||||
# Enable the OpenSSH daemon.
|
|
||||||
services.openssh.enable = true;
|
|
||||||
services.openssh.ports = [7000];
|
|
||||||
|
|
||||||
# Open ports in the firewall.
|
|
||||||
# networking.firewall.allowedTCPPorts = [ ... ];
|
|
||||||
# networking.firewall.allowedUDPPorts = [ ... ];
|
|
||||||
# Or disable the firewall altogether.
|
|
||||||
networking.firewall.enable = false;
|
|
||||||
|
|
||||||
# Copy the NixOS configuration file and link it from the resulting system
|
|
||||||
# (/run/current-system/configuration.nix). This is useful in case you
|
|
||||||
# accidentally delete configuration.nix.
|
|
||||||
# system.copySystemConfiguration = true;
|
|
||||||
|
|
||||||
# This value determines the NixOS release from which the default
|
|
||||||
# settings for stateful data, like file locations and database versions
|
|
||||||
# on your system were taken. It‘s perfectly fine and recommended to leave
|
|
||||||
# this value at the release version of the first install of this system.
|
|
||||||
# Before changing this value read the documentation for this option
|
|
||||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
|
||||||
system.stateVersion = "22.05"; # Did you read the comment?
|
|
||||||
}
|
|
||||||
6
flake.lock
generated
6
flake.lock
generated
@@ -2,11 +2,11 @@
|
|||||||
"nodes": {
|
"nodes": {
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1682879489,
|
"lastModified": 1683408522,
|
||||||
"narHash": "sha256-sASwo8gBt7JDnOOstnps90K1wxmVfyhsTPPNTGBPjjg=",
|
"narHash": "sha256-9kcPh6Uxo17a3kK3XCHhcWiV1Yu1kYj22RHiymUhMkU=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "da45bf6ec7bbcc5d1e14d3795c025199f28e0de0",
|
"rev": "897876e4c484f1e8f92009fd11b7d988a121a4e7",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|||||||
@@ -36,6 +36,15 @@
|
|||||||
modules =
|
modules =
|
||||||
[
|
[
|
||||||
./configuration.nix
|
./configuration.nix
|
||||||
|
./programs/art.nix
|
||||||
|
./programs/audio.nix
|
||||||
|
./programs/cad.nix
|
||||||
|
./programs/desktop.nix
|
||||||
|
./programs/games.nix
|
||||||
|
./programs/office.nix
|
||||||
|
./programs/programming.nix
|
||||||
|
./programs/terminal.nix
|
||||||
|
./programs/video.nix
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
1
programs/.#terminal.nix
Symbolic link
1
programs/.#terminal.nix
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
universe@universedesktop.1343137805946690560
|
||||||
90
programs/art.nix
Normal file
90
programs/art.nix
Normal file
@@ -0,0 +1,90 @@
|
|||||||
|
{ lib, config, pkgs, ... }: let
|
||||||
|
py3 = pkgs.python3;
|
||||||
|
py3Pkgs = py3.pkgs;
|
||||||
|
equation = py3Pkgs.buildPythonPackage {
|
||||||
|
pname = "Equation";
|
||||||
|
version = "1.2.01";
|
||||||
|
nativeBuildInputs = [
|
||||||
|
py3Pkgs.setuptools
|
||||||
|
py3Pkgs.numpy
|
||||||
|
];
|
||||||
|
src = pkgs.fetchzip {
|
||||||
|
url = "https://files.pythonhosted.org/packages/2e/cc/115fb1722051f99b9699864586e7f96ca0080645387698af922fade4f7b2/Equation-1.2.01.zip";
|
||||||
|
sha256 = "YFxZB3vaC5s49K1AQLFF4WGUr2RpomJTLQdZ24ITXr4=";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
morphio = py3.pkgs.toPythonModule ( pkgs.stdenv.mkDerivation rec {
|
||||||
|
pname = "MorphIO";
|
||||||
|
version = "3.3.4";
|
||||||
|
nativeBuildInputs = (with pkgs; [
|
||||||
|
cmake
|
||||||
|
ninja
|
||||||
|
py3
|
||||||
|
py3.pkgs.numpy
|
||||||
|
hdf5
|
||||||
|
]);
|
||||||
|
cmakeFlags = [
|
||||||
|
"-DMorphIO_CXX_WARNINGS=OFF"
|
||||||
|
];
|
||||||
|
postInstall = ''
|
||||||
|
mkdir -p $out/${py3.sitePackages}
|
||||||
|
mv ../morphio $out/${py3.sitePackages}
|
||||||
|
cp binds/python/_morphio.* $out/${py3.sitePackages}/morphio/
|
||||||
|
'';
|
||||||
|
src = pkgs.fetchFromGitHub {
|
||||||
|
owner = "BlueBrain";
|
||||||
|
repo = "MorphIO";
|
||||||
|
rev = "v${version}";
|
||||||
|
deepClone = true;
|
||||||
|
fetchSubmodules = true;
|
||||||
|
sha256 = "C3zDziG7LF7v22ZvplBrtOYq7iKGnAavfpiBCcShHaQ=";
|
||||||
|
};
|
||||||
|
});
|
||||||
|
in {
|
||||||
|
nixpkgs.overlays = [(self: super: rec {
|
||||||
|
# Add CUDA Support to Blender
|
||||||
|
blender_cuda = super.blender.override {
|
||||||
|
cudaSupport = true;
|
||||||
|
};
|
||||||
|
# Add Opencamlib for BlenderCAM Support
|
||||||
|
blender = blender_cuda.overrideAttrs (old: {
|
||||||
|
pythonPath = old.pythonPath ++ (with py3Pkgs; [
|
||||||
|
# OpenCAMLib support
|
||||||
|
shapely
|
||||||
|
equation
|
||||||
|
opencamlib
|
||||||
|
# NeuroMorphoVis support
|
||||||
|
matplotlib
|
||||||
|
seaborn
|
||||||
|
pandas
|
||||||
|
pillow
|
||||||
|
h5py
|
||||||
|
morphio
|
||||||
|
# TODO add BluePy support?
|
||||||
|
]);
|
||||||
|
});
|
||||||
|
# Update RX and Aseprite
|
||||||
|
rx = super.rx.overrideAttrs (old: {
|
||||||
|
version = "git";
|
||||||
|
src = super.fetchFromGitHub {
|
||||||
|
owner = "cloudhead";
|
||||||
|
repo = old.pname;
|
||||||
|
rev = "18625a68921873ebe21a7ea8096409a9f0314541";
|
||||||
|
sha256 = "sha256-LTpaV/fgYUgA2M6Wz5qLHnTNywh13900g+umhgLvciM=";
|
||||||
|
};
|
||||||
|
});
|
||||||
|
})];
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
blender
|
||||||
|
# GTK theme support (basic) for GTK apps e.g. inkscape
|
||||||
|
gnome.adwaita-icon-theme
|
||||||
|
|
||||||
|
rx
|
||||||
|
aseprite-unfree
|
||||||
|
gimp
|
||||||
|
|
||||||
|
synfigstudio
|
||||||
|
inkscape-with-extensions
|
||||||
|
];
|
||||||
|
}
|
||||||
11
programs/audio.nix
Normal file
11
programs/audio.nix
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
{ lib, config, pkgs, ... }: {
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
easyeffects
|
||||||
|
helvum
|
||||||
|
|
||||||
|
musescore
|
||||||
|
audacity
|
||||||
|
|
||||||
|
tidal-hifi
|
||||||
|
];
|
||||||
|
}
|
||||||
63
programs/cad.nix
Normal file
63
programs/cad.nix
Normal file
@@ -0,0 +1,63 @@
|
|||||||
|
{ lib, config, pkgs, ... }: let
|
||||||
|
py3 = pkgs.python3;
|
||||||
|
py3Pkgs = py3.pkgs;
|
||||||
|
# For 3D CNC machining
|
||||||
|
opencamlib = py3Pkgs.toPythonModule (pkgs.stdenv.mkDerivation rec {
|
||||||
|
pname = "opencamlib";
|
||||||
|
version = "2019.07";
|
||||||
|
nativeBuildInputs = (with pkgs;[
|
||||||
|
cmake
|
||||||
|
git
|
||||||
|
doxygen
|
||||||
|
boost
|
||||||
|
texlive.combined.scheme-full
|
||||||
|
]);
|
||||||
|
propagatedNativeBuildInputs = (with pkgs; [
|
||||||
|
py3
|
||||||
|
py3.pkgs.boost
|
||||||
|
py3.pkgs.vtk
|
||||||
|
]);
|
||||||
|
postPatch = ''
|
||||||
|
mkdir -p $out/${py3.sitePackages}/{lib,ocl}
|
||||||
|
sed -e 's#LIBRARY DESTINATION ''${PYTHON_ARCH_PACKAGES}#LIBRARY DESTINATION '"$out"'/${py3.sitePackages}#g' -i src/pythonlib/pythonlib.cmake
|
||||||
|
sed -e 's#DESTINATION ''${PYTHON_SITE_PACKAGES}#DESTINATION '"$out"'/${py3.sitePackages}#g' -i src/pythonlib/pythonlib.cmake
|
||||||
|
'';
|
||||||
|
cmakeFlags = [
|
||||||
|
"-DVERSION_STRING=2019.07"
|
||||||
|
"-DBUILD_CXX_LIB=ON"
|
||||||
|
"-DBUILD_PY_LIB=ON"
|
||||||
|
"-DUSE_PY_3=ON"
|
||||||
|
"-DCMAKE_BUILD_TYPE=Release"
|
||||||
|
];
|
||||||
|
src = pkgs.fetchFromGitHub {
|
||||||
|
owner = "aewallin";
|
||||||
|
repo = "opencamlib";
|
||||||
|
rev = "2019.07";
|
||||||
|
sha256 = "1a8pxp1mh8x3bfsb0l97vgxrpk482p7q9jprkd4m9hv69vva2bdz";
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
||||||
|
py3Cad = pkgs.python3.withPackages (p: (with p; [
|
||||||
|
numpy
|
||||||
|
scipy
|
||||||
|
seaborn
|
||||||
|
pandas
|
||||||
|
matplotlib
|
||||||
|
ipython
|
||||||
|
python-lsp-server
|
||||||
|
opencamlib
|
||||||
|
]));
|
||||||
|
in
|
||||||
|
# if you also want support for flakes
|
||||||
|
nixpkgs.overlays = [(self: super: rec {
|
||||||
|
freecad = super.freecad.override {
|
||||||
|
python = py3Cad;
|
||||||
|
};
|
||||||
|
})];
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
openscad
|
||||||
|
freecad
|
||||||
|
kicad
|
||||||
|
];
|
||||||
|
}
|
||||||
29
programs/desktop.nix
Normal file
29
programs/desktop.nix
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
{ lib, config, pkgs, ... }: {
|
||||||
|
nixpkgs.overlays = [(self: super: rec {
|
||||||
|
# Discord fix
|
||||||
|
discord = super.discord.override {
|
||||||
|
nss = super.pkgs.nss_latest;
|
||||||
|
};
|
||||||
|
discord-canary = super.discord-canary.override {
|
||||||
|
nss = super.pkgs.nss_latest;
|
||||||
|
};
|
||||||
|
})];
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
firefox
|
||||||
|
chromium
|
||||||
|
|
||||||
|
bitwarden
|
||||||
|
bitwarden-cli
|
||||||
|
|
||||||
|
nextcloud-client
|
||||||
|
libsForQt5.kdeconnect-kde
|
||||||
|
|
||||||
|
discord-canary
|
||||||
|
discord
|
||||||
|
betterdiscordctl
|
||||||
|
slack
|
||||||
|
teams
|
||||||
|
signal-desktop
|
||||||
|
];
|
||||||
|
}
|
||||||
15
programs/games.nix
Normal file
15
programs/games.nix
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
{ lib, config, pkgs, ... }: {
|
||||||
|
# For steam
|
||||||
|
services.flatpak.enable = true;
|
||||||
|
# Game compat
|
||||||
|
programs.gamemode.enable = true;
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
# Minecraft
|
||||||
|
openjdk17
|
||||||
|
prismlauncher
|
||||||
|
|
||||||
|
# PS2 Games
|
||||||
|
pcsx2
|
||||||
|
];
|
||||||
|
}
|
||||||
14
programs/office.nix
Normal file
14
programs/office.nix
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
{ lib, config, pkgs, ... }: {
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
kitty
|
||||||
|
emacs
|
||||||
|
rnix-lsp
|
||||||
|
texlive.combined.scheme-full
|
||||||
|
pandoc
|
||||||
|
libreoffice-qt
|
||||||
|
pandoc
|
||||||
|
ispell
|
||||||
|
# Fonts
|
||||||
|
julia-mono
|
||||||
|
];
|
||||||
|
}
|
||||||
9
programs/programming.nix
Normal file
9
programs/programming.nix
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
{ lib, config, pkgs, ... }: {
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
godot_4
|
||||||
|
cbqn-replxx
|
||||||
|
|
||||||
|
cudaPackages.cudatoolkit
|
||||||
|
cudaPackages.cudnn
|
||||||
|
];
|
||||||
|
}
|
||||||
16
programs/terminal.nix
Normal file
16
programs/terminal.nix
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
{ lib, config, pkgs, ... }: {
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
wget
|
||||||
|
curl
|
||||||
|
git
|
||||||
|
zip
|
||||||
|
unzip
|
||||||
|
lsof
|
||||||
|
htop
|
||||||
|
btop
|
||||||
|
xclip
|
||||||
|
screen
|
||||||
|
man-pages
|
||||||
|
man-pages-posix
|
||||||
|
];
|
||||||
|
}
|
||||||
6
programs/video.nix
Normal file
6
programs/video.nix
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
{ lib, config, pkgs, ... }: {
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
vlc
|
||||||
|
ffmpeg_5-full
|
||||||
|
];
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user