modified: home.nix

modified:   hosts/blackstar/nixos/configuration.nix
modified:   hosts/shared/nixos/shared_config.nix
modified:   modules/default.nix
deleted:    modules/desktop/apps/art.nix
deleted:    modules/desktop/apps/cad.nix
deleted:    modules/desktop/apps/cam.nix
deleted:    modules/desktop/apps/chat.nix
deleted:    modules/desktop/apps/code.nix
modified:   modules/desktop/apps/godot.nix
modified:   modules/desktop/apps/minecraft.nix
modified:   modules/desktop/apps/xiv.nix
new file:   modules/desktop/art.nix
new file:   modules/desktop/cad.nix
new file:   modules/desktop/cam.nix
new file:   modules/desktop/chat.nix
new file:   modules/desktop/code.nix
new file:   modules/desktop/daw.nix
new file:   modules/desktop/games.nix
new file:   modules/system/bluetooth.nix
deleted:    modules/system/boot/.grub.nix.swp
new file:   pkgs/wallpaper-engine.nix
This commit is contained in:
Mrrp 2024-08-25 19:08:37 -07:00
parent cd0d3f8bf2
commit 168f87a62a
22 changed files with 312 additions and 231 deletions

View file

@ -30,15 +30,19 @@
]; ];
modules = { modules = {
desktop.apps = { desktop = {
godot.enable = true; chat.enable = true;
daw.enable = true;
cad.enable = true; cad.enable = true;
cam.enable = true; cam.enable = true;
code.enable = true; code.enable = true;
art.enable = true; art.enable = true;
games.enable = true;
apps = {
xiv.enable = true; xiv.enable = true;
godot.enable = true;
minecraft.enable = true; minecraft.enable = true;
chat.enable = true; };
}; };
# system.boot.grub.enable = true; # system.boot.grub.enable = true;
system.audio.enable = true; system.audio.enable = true;
@ -118,7 +122,6 @@
# TODO: Configure your system-wide user settings (groups, etc), add more users as needed. # TODO: Configure your system-wide user settings (groups, etc), add more users as needed.
users.users = { users.users = {
# FIXME: Replace with your username # FIXME: Replace with your username
aces = { aces = {
# TODO: You can set an initial password for your user. # TODO: You can set an initial password for your user.
@ -134,57 +137,10 @@
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion # https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
system.stateVersion = "24.05"; system.stateVersion = "24.05";
# Programs installed for all users
/*environment.systemPackages = with pkgs; [
# art
aseprite
krita
# code
# game
steam
alvr
xivlauncher
modrinth-app
# cad
prusa-slicer
freecad
(blender.override {
cudaSupport = true;
})
openscad
# other
discord
onlyoffice-bin
google-chrome
# sys utils
gnupg ffmpeg unzip
mpv
hyfetch
dbeaver-bin
openssl
pkg-config
element-desktop
python311
python311Packages.pip
webkitgtk
libxkbcommon
];*/
#environment.variables = {
# PKG_CONFIG_PATH="${pkgs.openssl.dev}/lib/pkgconfig";
# LD_LIBRARY_PATH="${pkgs.wayland}/lib:$LD_LIBRARY_PATH";
#};
services.xserver.videoDrivers = ["nvidia"]; services.xserver.videoDrivers = ["nvidia"];
hardware.opengl = { hardware.opengl = {
enable = true; enable = true;
## radv: an open-source Vulkan driver from freedesktop ## radv: an open-source Vulkan driver from freedesktop
driSupport = true; driSupport = true;
driSupport32Bit = true; driSupport32Bit = true;
@ -193,7 +149,6 @@
# Enable CUPS to print documents. # Enable CUPS to print documents.
services.printing.enable = true; services.printing.enable = true;
hardware.nvidia = { hardware.nvidia = {
modesetting.enable = true; modesetting.enable = true;

View file

@ -7,48 +7,12 @@
... ...
}: { }: {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
steam /* ------------------------- Essential Applications ------------------------- */
# code
cargo rustc # Rust
jetbrains.pycharm-professional
vim
python311
python311Packages.pip
lua
git git
# (vscode-with-extensions.override {
# vscodeExtensions = with vscode-extensions; [
# dracula-theme.theme-dracula
# yzhang.markdown-all-in-one
# rust-lang.rust-analyzer
# # dependi
# jscearcy.rust-doc-viewer
# swellaby.vscode-rust-test-adapter
# tamasfe.even-better-toml
# ms-vsliveshare.vsliveshare
# aaron-bond.better-comments
# bbenoist.nix
# vue.volar
# ] ++ pkgs.vscode-utils.extensionsFromVscodeMarketplace [
# {
# name = "remote-ssh-edit";
# publisher = "ms-vscode-remote";
# version = "0.47.2";
# sha256 = "1hp6gjh4xp2m1xlm1jsdzxw9d8frkiidhph6nvl24d0h8z34w49g";
# }
# ];
#})
vscode.fhs
blockbench
wine wine
bottles bottles
# other /* ---------------------------- System Utilities ---------------------------- */
discord
nodejs_22
# sys utils
gnupg ffmpeg unzip gnupg ffmpeg unzip
mpv gparted mpv gparted
libappindicator-gtk3 libappindicator-gtk3
@ -56,25 +20,10 @@
hyfetch hyfetch
]; ];
hardware.bluetooth.enable = true;
hardware.bluetooth.powerOnBoot = true;
services.blueman.enable = true;
services.pipewire.wireplumber.enable = true;
services.pipewire.wireplumber.extraConfig.bluetoothEnhancements = {
"monitor.bluez.properties" = {
"bluez5.enable-sbc-xq" = true;
"bluez5.enable-msbc" = true;
"bluez5.enable-hw-volume" = true;
"bluez5.roles" = [ "hsp_hs" "hsp_ag" "hfp_hf" "hfp_ag" ];
};
};
programs.nix-ld.enable = true;
programs.firefox.enable = true; programs.firefox.enable = true;
## System security tweaks /* ----------------------------- Security Tweaks ---------------------------- */
# sets hidepid=2 on /proc (make process info visible only to owning user) # sets hidepid=2 on /proc (make process info visible only to owning user)
# NOTE Was removed on nixpkgs-unstable because it doesn't do anything # NOTE Was removed on nixpkgs-unstable because it doesn't do anything
# security.hideProcessInformation = true; # security.hideProcessInformation = true;

View file

@ -2,16 +2,19 @@
{ {
imports = [ imports = [
./desktop/apps/godot.nix ./desktop/apps/godot.nix
./desktop/apps/cad.nix
./desktop/apps/cam.nix
./desktop/apps/code.nix
./desktop/apps/art.nix
./desktop/apps/xiv.nix ./desktop/apps/xiv.nix
./desktop/apps/chat.nix
./desktop/apps/minecraft.nix ./desktop/apps/minecraft.nix
./desktop/cad.nix
./desktop/cam.nix
./desktop/code.nix
./desktop/daw.nix
./desktop/art.nix
./desktop/chat.nix
./system/boot/grub.nix ./system/boot/grub.nix
./system/audio.nix ./system/audio.nix
./system/bluetooth.nix
./system/locale.nix ./system/locale.nix
./system/network.nix ./system/network.nix
]; ];

View file

@ -1,18 +0,0 @@
{ lib, config, options, pkgs, ... }:
with lib;
let cfg = config.modules.desktop.apps.art;
in {
options.modules.desktop.apps.art = {
enable = mkEnableOption false;
};
config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [
aseprite
krita
lmms
inkscape
];
};
}

View file

@ -1,19 +0,0 @@
{ lib, config, options, pkgs, ... }:
with lib;
let cfg = config.modules.desktop.apps.cad;
in {
options.modules.desktop.apps.cad = {
enable = mkEnableOption false;
};
config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [
(blender.override {
cudaSupport = true;
})
openscad
freecad
];
};
}

View file

@ -1,15 +0,0 @@
{ lib, config, options, pkgs, ... }:
with lib;
let cfg = config.modules.desktop.apps.cam;
in {
options.modules.desktop.apps.cam = {
enable = mkEnableOption false;
};
config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [
prusa-slicer
];
};
}

View file

@ -1,16 +0,0 @@
{ lib, config, options, pkgs, ... }:
with lib;
let cfg = config.modules.desktop.apps.chat;
in {
options.modules.desktop.apps.chat = {
enable = mkEnableOption false;
};
config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [
discord
element-desktop
];
};
}

View file

@ -1,42 +0,0 @@
{ lib, config, options, pkgs, ... }:
with lib;
let cfg = config.modules.desktop.apps.code;
in {
options.modules.desktop.apps.code = {
enable = mkEnableOption false;
};
config = mkIf cfg.enable {
programs.nix-ld = {
enable = true;
libraries = with pkgs; [
stdenv.cc.cc.lib
];
};
environment.systemPackages = with pkgs; [
rustc rustup # Rust
# pkgs.rust-bin.stable.latest.default
jetbrains.idea-ultimate
jetbrains.rider
jetbrains.clion
jetbrains.pycharm-professional
jetbrains.datagrip
jetbrains.webstorm
vim
python3
lua
git
github-desktop
distrobox
# -- C/C++
gcc
libgcc
gnumake
cmake
extra-cmake-modules
];
};
}

View file

@ -1,4 +1,8 @@
{ lib, config, options, pkgs, ... }: /* -------------------------------------------------------------------------- */
/* App config: Godot Engine */
/* -------------------------------------------------------------------------- */
{ lib, config, options, pkgs ? import <nixpkgs>, ... }:
with lib; with lib;
let cfg = config.modules.desktop.apps.godot; let cfg = config.modules.desktop.apps.godot;

View file

@ -1,3 +1,7 @@
/* -------------------------------------------------------------------------- */
/* App config: Minecraft */
/* -------------------------------------------------------------------------- */
{ lib, config, options, pkgs, ... }: { lib, config, options, pkgs, ... }:
with lib; with lib;
@ -12,6 +16,7 @@ in {
modrinth-app modrinth-app
]; ];
environment.variables = { environment.variables = {
# This solves an issue where Modrinth refuses to start
WEBKIT_DISABLE_DMABUF_RENDERER=1; WEBKIT_DISABLE_DMABUF_RENDERER=1;
}; };
}; };

View file

@ -1,3 +1,7 @@
/* -------------------------------------------------------------------------- */
/* App config: FINAL FANTASY XIV: A Realm Reborn */
/* -------------------------------------------------------------------------- */
{ lib, config, options, pkgs, ... }: { lib, config, options, pkgs, ... }:
with lib; with lib;

25
modules/desktop/art.nix Normal file
View file

@ -0,0 +1,25 @@
/* -------------------------------------------------------------------------- */
/* Art tools config */
/* -------------------------------------------------------------------------- */
{ lib, config, options, pkgs, ... }:
with lib;
let cfg = config.modules.desktop.art;
in {
options.modules.desktop.art = {
enable = mkEnableOption false;
};
config = mkIf cfg.enable {
/* Driver includes support for Huion Kamvas Pro */
hardware.opentabletdriver.enable = true;
environment.systemPackages = with pkgs; [
aseprite
krita
inkscape
blockbench
];
};
}

29
modules/desktop/cad.nix Normal file
View file

@ -0,0 +1,29 @@
/* -------------------------------------------------------------------------- */
/* Computer-Aided Design config */
/* -------------------------------------------------------------------------- */
{ lib, config, options, pkgs, ... }:
with lib;
let cfg = config.modules.desktop.cad;
in {
options.modules.desktop.cad = {
enable = mkEnableOption false;
};
config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [
/* -------------------------------- Polygonal ------------------------------- */
(blender.override {
# Allows GPU support for Cycles
cudaSupport = true;
})
/* ------------------------------- Parametric ------------------------------- */
openscad
freecad
/* ---------------------------------- Voxel --------------------------------- */
];
};
}

20
modules/desktop/cam.nix Normal file
View file

@ -0,0 +1,20 @@
/* -------------------------------------------------------------------------- */
/* Computer-Aided Manufacturing config */
/* -------------------------------------------------------------------------- */
{ lib, config, options, pkgs, ... }:
with lib;
let cfg = config.modules.desktop.cam;
in {
options.modules.desktop.cam = {
enable = mkEnableOption false;
};
config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [
/* ------------------------------- 3D Printing ------------------------------ */
prusa-slicer
];
};
}

20
modules/desktop/chat.nix Normal file
View file

@ -0,0 +1,20 @@
/* -------------------------------------------------------------------------- */
/* Communications config */
/* -------------------------------------------------------------------------- */
{ lib, config, options, pkgs, ... }:
with lib;
let cfg = config.modules.desktop.chat;
in {
options.modules.desktop.chat = {
enable = mkEnableOption false;
};
config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [
discord
element-desktop
];
};
}

59
modules/desktop/code.nix Normal file
View file

@ -0,0 +1,59 @@
/* -------------------------------------------------------------------------- */
/* Programming/Development Environment config */
/* -------------------------------------------------------------------------- */
{ lib, config, options, pkgs, ... }:
with lib;
let cfg = config.modules.desktop.code;
in {
options.modules.desktop.code = {
enable = mkEnableOption false;
heavyweight = mkEnableOption false;
};
config = mkIf cfg.enable {
programs.nix-ld = {
enable = true;
libraries = with pkgs; [
stdenv.cc.cc.lib
];
};
environment.systemPackages = with pkgs; [
/* ---------------------------- Language support ---------------------------- */
# Rust
rustc rustup
# Python
python3
# Lua
lua
# C/C++
gcc
libgcc
gnumake
cmake
extra-cmake-modules
# JS
nodejs_22
/* --------------------------------- Editors -------------------------------- */
# ? FHS VScode is a variant that lets you manually install extensions.
# ? Otherwise, you'd specify extensions here.
vscode.fhs
vim
jetbrains.idea-ultimate
jetbrains.clion
jetbrains.pycharm-professional
jetbrains.datagrip
jetbrains.webstorm
/* ----------------------------- Version Control ---------------------------- */
git
github-desktop
/* ----------------------------- Virtualization ----------------------------- */
distrobox
];
};
}

29
modules/desktop/daw.nix Normal file
View file

@ -0,0 +1,29 @@
/* -------------------------------------------------------------------------- */
/* Digital Audio Workstation configuration */
/* -------------------------------------------------------------------------- */
{ lib, config, options, pkgs, ... }:
with lib;
let cfg = config.modules.desktop.daw;
in {
options.modules.desktop.daw = {
enable = mkEnableOption false;
};
config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [
/* ----------------------------- Low-level Audio ---------------------------- */
audacity
/* ------------------------------- Sequencers ------------------------------- */
lmms # Like FL Studio, but FOSS
ardour
# TODO: Add FL Studio if possible
/* ----------------------------- Music Trackers ----------------------------- */
furnace # Works by emulating classic systems - Good for chiptune
];
};
}

19
modules/desktop/games.nix Normal file
View file

@ -0,0 +1,19 @@
{ lib, config, options, pkgs, ... }:
with lib;
let cfg = config.modules.desktop.games;
in {
options.modules.desktop.games = {
enable = mkEnableOption false;
};
config = mkIf cfg.enable {
/* Driver includes support for Huion Kamvas Pro */
hardware.opentabletdriver.enable = true;
environment.systemPackages = with pkgs; [
steam
lutris
];
};
}

View file

@ -0,0 +1,29 @@
/* -------------------------------------------------------------------------- */
/* System Utility - Bluetooth config */
/* -------------------------------------------------------------------------- */
{ lib, config, options, pkgs, ... }:
with lib;
let cfg = config.modules.system.bluetooth;
in {
options.modules.system.bluetooth = {
enable = mkEnableOption true;
};
config = mkIf cfg.enable {
hardware.bluetooth.enable = true;
hardware.bluetooth.powerOnBoot = true;
services.blueman.enable = true;
services.pipewire.wireplumber.enable = true;
services.pipewire.wireplumber.extraConfig.bluetoothEnhancements = {
"monitor.bluez.properties" = {
"bluez5.enable-sbc-xq" = true;
"bluez5.enable-msbc" = true;
"bluez5.enable-hw-volume" = true;
"bluez5.roles" = [ "hsp_hs" "hsp_ag" "hfp_hf" "hfp_ag" ];
};
};
};
}

Binary file not shown.

41
pkgs/wallpaper-engine.nix Normal file
View file

@ -0,0 +1,41 @@
{ mkDerivation
, fetchFromGitHub
, cmake
, extra-cmake-modules
, mpv
, websockets
, qtwebsockets
, qtwebchannel
, qtdeclarative
, qtx11extras
, vulkan-headers
, vulkan-loader
, vulkan-tools
, pkg-config
, lz4
, glslang
}:
mkDerivation rec {
pname = "wallpaper-engine-kde-plugin";
version = "0.5.3";
cmakeFlags = [ "-DUSE_PLASMAPKG=ON" ];
nativeBuildInputs = [ cmake extra-cmake-modules pkg-config ];
buildInputs = [
libsForQt5.plasma-framework mpv qtwebsockets websockets qtwebchannel
qtdeclarative qtx11extras lz4
vulkan-headers vulkan-tools vulkan-loader
];
postPatch = ''
rmdir src/backend_scene/third_party/glslang
ln -s ${glslang.src} src/backend_scene/third_party/glslang
'';
src = fetchFromGitHub {
owner = "catsout";
repo = pname;
rev = "v${version}";
sha256 = "qmg+g1you3rm1EAfZWRUBBkEQm1QQ0V9/mIn8bBgbu4=";
};