2024-04-14 01:51:51 +05:30
|
|
|
{ config, pkgs, pkgs-kdenlive, userSettings, ... }:
|
2023-06-21 20:03:51 +05:30
|
|
|
|
|
|
|
{
|
|
|
|
# Home Manager needs a bit of information about you and the paths it should
|
|
|
|
# manage.
|
2024-01-19 03:06:52 +05:30
|
|
|
home.username = userSettings.username;
|
|
|
|
home.homeDirectory = "/home/"+userSettings.username;
|
2023-06-21 20:03:51 +05:30
|
|
|
|
|
|
|
programs.home-manager.enable = true;
|
|
|
|
|
|
|
|
imports = [
|
2024-01-19 03:06:52 +05:30
|
|
|
(./. + "../../../user/wm"+("/"+userSettings.wm+"/"+userSettings.wm)+".nix") # My window manager selected from flake
|
2023-06-21 20:03:51 +05:30
|
|
|
../../user/shell/sh.nix # My zsh and bash config
|
|
|
|
../../user/shell/cli-collection.nix # Useful CLI apps
|
|
|
|
../../user/app/doom-emacs/doom.nix # My doom emacs config
|
|
|
|
../../user/app/ranger/ranger.nix # My ranger file manager config
|
|
|
|
../../user/app/git/git.nix # My git config
|
|
|
|
../../user/app/keepass/keepass.nix # My password manager
|
2024-01-19 03:06:52 +05:30
|
|
|
(./. + "../../../user/app/browser"+("/"+userSettings.browser)+".nix") # My default browser selected from flake
|
2023-06-21 20:03:51 +05:30
|
|
|
../../user/app/virtualization/virtualization.nix # Virtual machines
|
2024-03-17 00:45:10 +05:30
|
|
|
#../../user/app/flatpak/flatpak.nix # Flatpaks
|
2023-06-21 20:03:51 +05:30
|
|
|
../../user/style/stylix.nix # Styling and themes for my apps
|
|
|
|
../../user/lang/cc/cc.nix # C and C++ tools
|
|
|
|
../../user/lang/godot/godot.nix # Game development
|
2024-01-19 03:06:52 +05:30
|
|
|
#../../user/pkgs/blockbench.nix # Blockbench ## marked as insecure
|
2023-10-07 02:42:24 +05:30
|
|
|
../../user/hardware/bluetooth.nix # Bluetooth
|
2023-06-21 20:03:51 +05:30
|
|
|
];
|
|
|
|
|
|
|
|
home.stateVersion = "22.11"; # Please read the comment before changing.
|
|
|
|
|
2024-03-17 00:45:10 +05:30
|
|
|
home.packages = (with pkgs; [
|
2023-06-21 20:03:51 +05:30
|
|
|
# Core
|
|
|
|
zsh
|
|
|
|
alacritty
|
|
|
|
librewolf
|
|
|
|
brave
|
2023-09-28 06:47:55 +05:30
|
|
|
qutebrowser
|
2023-06-21 20:03:51 +05:30
|
|
|
git
|
|
|
|
syncthing
|
|
|
|
|
|
|
|
# Office
|
2023-08-18 08:40:08 +05:30
|
|
|
libreoffice-fresh
|
2023-06-21 20:03:51 +05:30
|
|
|
mate.atril
|
2024-03-23 02:11:41 +05:30
|
|
|
openboard
|
2023-06-21 20:03:51 +05:30
|
|
|
xournalpp
|
2024-04-07 06:09:27 +05:30
|
|
|
gnome.adwaita-icon-theme
|
|
|
|
shared-mime-info
|
2023-06-21 20:03:51 +05:30
|
|
|
glib
|
2023-11-16 05:51:25 +05:30
|
|
|
newsflash
|
2024-04-01 23:12:11 +05:30
|
|
|
foliate
|
2023-10-05 07:32:19 +05:30
|
|
|
gnome.nautilus
|
2023-06-21 20:03:51 +05:30
|
|
|
gnome.gnome-calendar
|
|
|
|
gnome.seahorse
|
|
|
|
gnome.gnome-maps
|
|
|
|
openvpn
|
2023-06-27 19:52:02 +05:30
|
|
|
protonmail-bridge
|
2023-11-26 00:39:54 +05:30
|
|
|
texliveSmall
|
2024-03-22 05:34:08 +05:30
|
|
|
numbat
|
2024-05-21 07:47:46 +05:30
|
|
|
element-desktop-wayland
|
2023-06-21 20:03:51 +05:30
|
|
|
|
2024-07-08 20:31:54 +05:30
|
|
|
openai-whisper-cpp
|
|
|
|
|
2023-09-30 22:28:02 +05:30
|
|
|
wine
|
|
|
|
bottles
|
|
|
|
# The following requires 64-bit FL Studio (FL64) to be installed to a bottle
|
|
|
|
# With a bottle name of "FL Studio"
|
|
|
|
(pkgs.writeShellScriptBin "flstudio" ''
|
|
|
|
#!/bin/sh
|
|
|
|
if [ -z "$1" ]
|
|
|
|
then
|
|
|
|
bottles-cli run -b "FL Studio" -p FL64
|
|
|
|
#flatpak run --command=bottles-cli com.usebottles.bottles run -b FL\ Studio -p FL64
|
|
|
|
else
|
|
|
|
filepath=$(winepath --windows "$1")
|
|
|
|
echo \'"$filepath"\'
|
|
|
|
bottles-cli run -b "FL Studio" -p "FL64" --args \'"$filepath"\'
|
|
|
|
#flatpak run --command=bottles-cli com.usebottles.bottles run -b FL\ Studio -p FL64 -args "$filepath"
|
|
|
|
fi
|
|
|
|
'')
|
|
|
|
(pkgs.makeDesktopItem {
|
|
|
|
name = "flstudio";
|
|
|
|
desktopName = "FL Studio 64";
|
2023-10-01 21:03:49 +05:30
|
|
|
exec = "flstudio %U";
|
2023-09-30 22:28:02 +05:30
|
|
|
terminal = false;
|
2023-10-01 21:03:49 +05:30
|
|
|
type = "Application";
|
2024-06-05 06:40:35 +05:30
|
|
|
icon = "flstudio";
|
2023-10-05 07:32:19 +05:30
|
|
|
mimeTypes = ["application/octet-stream"];
|
2023-09-30 22:28:02 +05:30
|
|
|
})
|
2024-06-05 06:40:35 +05:30
|
|
|
(stdenv.mkDerivation {
|
|
|
|
name = "flstudio-icon";
|
|
|
|
# icon from https://www.reddit.com/r/MacOS/comments/jtmp7z/i_made_icons_for_discord_spotify_and_fl_studio_in/
|
|
|
|
src = [ ../../user/pkgs/flstudio.png ];
|
|
|
|
|
|
|
|
unpackPhase = ''
|
|
|
|
for srcFile in $src; do
|
|
|
|
# Copy file into build dir
|
|
|
|
cp $srcFile ./
|
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out $out/share $out/share/pixmaps
|
|
|
|
ls $src
|
|
|
|
ls
|
|
|
|
cp $src $out/share/pixmaps/flstudio.png
|
|
|
|
'';
|
|
|
|
})
|
2023-09-30 22:28:02 +05:30
|
|
|
|
2023-06-21 20:03:51 +05:30
|
|
|
# Media
|
2024-03-17 00:45:10 +05:30
|
|
|
gimp
|
2023-08-24 03:32:54 +05:30
|
|
|
pinta
|
2023-06-21 20:03:51 +05:30
|
|
|
krita
|
2023-11-19 02:48:41 +05:30
|
|
|
inkscape
|
2023-06-21 20:03:51 +05:30
|
|
|
musikcube
|
|
|
|
vlc
|
|
|
|
mpv
|
|
|
|
yt-dlp
|
2024-04-01 23:12:11 +05:30
|
|
|
blender-hip
|
2024-05-30 06:50:55 +05:30
|
|
|
# cura is moderately broken on wayland, so use xwayland
|
|
|
|
(pkgs.cura.overrideAttrs (oldAttrs: {
|
|
|
|
postInstall = oldAttrs.postInstall + ''cp -rf ${(pkgs.makeDesktopItem {
|
|
|
|
name = "com.ultimaker.cura";
|
|
|
|
icon = "cura-icon";
|
|
|
|
desktopName = "Cura";
|
|
|
|
exec = "env QT_QPA_PLATFORM=xcb ${pkgs.cura}/bin/cura %F";
|
|
|
|
tryExec = "env QT_QPA_PLATFORM=xcb ${pkgs.cura}/bin/cura";
|
|
|
|
terminal = false;
|
|
|
|
type = "Application";
|
|
|
|
categories = ["Graphics"];
|
|
|
|
mimeTypes = ["model/stl" "application/vnd.ms-3mfdocument" "application/prs.wavefront-obj"
|
|
|
|
"image/bmp" "image/gif" "image/jpeg" "image/png" "text/x-gcode" "application/x-amf"
|
|
|
|
"application/x-ply" "application/x-ctm" "model/vnd.collada+xml" "model/gltf-binary"
|
|
|
|
"model/gltf+json" "model/vnd.collada+xml+zip"];
|
|
|
|
})}/share/applications $out/share'';
|
|
|
|
}))
|
|
|
|
(pkgs.writeShellScriptBin "curax" ''env QT_QPA_PLATFORM=xcb ${pkgs.cura}/bin/cura'')
|
2024-03-10 04:07:11 +05:30
|
|
|
curaengine_stable
|
2024-04-13 22:55:39 +05:30
|
|
|
openscad
|
2024-03-10 04:07:11 +05:30
|
|
|
(stdenv.mkDerivation {
|
|
|
|
name = "cura-slicer";
|
|
|
|
version = "0.0.7";
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Spiritdude";
|
|
|
|
repo = "Cura-CLI-Wrapper";
|
|
|
|
rev = "ff076db33cfefb770e1824461a6336288f9459c7";
|
|
|
|
sha256 = "sha256-BkvdlqUqoTYEJpCCT3Utq+ZBU7g45JZFJjGhFEXPXi4=";
|
|
|
|
};
|
|
|
|
phases = "installPhase";
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out $out/bin $out/share $out/share/cura-slicer
|
|
|
|
cp $src/cura-slicer $out/bin
|
|
|
|
cp $src/settings/fdmprinter.def.json $out/share/cura-slicer
|
|
|
|
cp $src/settings/base.ini $out/share/cura-slicer
|
|
|
|
sed -i 's+#!/usr/bin/perl+#! /usr/bin/env nix-shell\n#! nix-shell -i perl -p perl538 perl538Packages.JSON+g' $out/bin/cura-slicer
|
|
|
|
sed -i 's+/usr/share+/home/${userSettings.username}/.nix-profile/share+g' $out/bin/cura-slicer
|
|
|
|
'';
|
|
|
|
propagatedBuildInputs = with pkgs; [
|
|
|
|
curaengine_stable
|
|
|
|
];
|
|
|
|
})
|
2023-06-21 20:03:51 +05:30
|
|
|
obs-studio
|
2023-10-22 08:35:18 +05:30
|
|
|
ffmpeg
|
2023-10-10 07:06:23 +05:30
|
|
|
(pkgs.writeScriptBin "kdenlive-accel" ''
|
|
|
|
#!/bin/sh
|
2024-02-27 07:27:08 +05:30
|
|
|
DRI_PRIME=0 kdenlive "$1"
|
2023-10-10 07:06:23 +05:30
|
|
|
'')
|
2023-06-21 20:03:51 +05:30
|
|
|
movit
|
|
|
|
mediainfo
|
|
|
|
libmediainfo
|
|
|
|
audio-recorder
|
2024-03-22 23:08:55 +05:30
|
|
|
gnome.cheese
|
|
|
|
ardour
|
2024-04-01 23:12:11 +05:30
|
|
|
rosegarden
|
2024-03-22 23:08:55 +05:30
|
|
|
tenacity
|
2023-06-21 20:03:51 +05:30
|
|
|
|
|
|
|
# Various dev packages
|
|
|
|
texinfo
|
|
|
|
libffi zlib
|
|
|
|
nodePackages.ungit
|
2024-04-13 22:55:39 +05:30
|
|
|
ventoy
|
2024-06-24 06:54:14 +05:30
|
|
|
nextcloud-client
|
2024-03-17 00:45:10 +05:30
|
|
|
]) ++ ([ pkgs-kdenlive.kdenlive ]);
|
2023-06-21 20:03:51 +05:30
|
|
|
|
2024-06-06 07:33:56 +05:30
|
|
|
home.file.".local/share/pixmaps/nixos-snowflake-stylix.svg".source =
|
|
|
|
config.lib.stylix.colors {
|
|
|
|
template = builtins.readFile ../../user/pkgs/nixos-snowflake-stylix.svg.mustache;
|
|
|
|
extension = "svg";
|
|
|
|
};
|
|
|
|
|
2023-06-21 20:03:51 +05:30
|
|
|
services.syncthing.enable = true;
|
|
|
|
|
|
|
|
xdg.enable = true;
|
|
|
|
xdg.userDirs = {
|
|
|
|
enable = true;
|
|
|
|
createDirectories = true;
|
|
|
|
music = "${config.home.homeDirectory}/Media/Music";
|
|
|
|
videos = "${config.home.homeDirectory}/Media/Videos";
|
|
|
|
pictures = "${config.home.homeDirectory}/Media/Pictures";
|
|
|
|
templates = "${config.home.homeDirectory}/Templates";
|
|
|
|
download = "${config.home.homeDirectory}/Downloads";
|
|
|
|
documents = "${config.home.homeDirectory}/Documents";
|
|
|
|
desktop = null;
|
|
|
|
publicShare = null;
|
|
|
|
extraConfig = {
|
|
|
|
XDG_DOTFILES_DIR = "${config.home.homeDirectory}/.dotfiles";
|
|
|
|
XDG_ARCHIVE_DIR = "${config.home.homeDirectory}/Archive";
|
|
|
|
XDG_VM_DIR = "${config.home.homeDirectory}/Machines";
|
|
|
|
XDG_ORG_DIR = "${config.home.homeDirectory}/Org";
|
|
|
|
XDG_PODCAST_DIR = "${config.home.homeDirectory}/Media/Podcasts";
|
|
|
|
XDG_BOOK_DIR = "${config.home.homeDirectory}/Media/Books";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
xdg.mime.enable = true;
|
|
|
|
xdg.mimeApps.enable = true;
|
2023-10-05 07:32:19 +05:30
|
|
|
xdg.mimeApps.associations.added = {
|
2024-05-12 09:03:36 +05:30
|
|
|
# TODO fix mime associations, most of them are totally broken :(
|
2023-10-05 07:32:19 +05:30
|
|
|
"application/octet-stream" = "flstudio.desktop;";
|
|
|
|
};
|
2023-06-21 20:03:51 +05:30
|
|
|
|
2023-06-23 02:18:09 +05:30
|
|
|
home.sessionVariables = {
|
2024-01-19 03:06:52 +05:30
|
|
|
EDITOR = userSettings.editor;
|
|
|
|
SPAWNEDITOR = userSettings.spawnEditor;
|
|
|
|
TERM = userSettings.term;
|
|
|
|
BROWSER = userSettings.browser;
|
2023-06-23 02:18:09 +05:30
|
|
|
};
|
|
|
|
|
2024-04-28 02:04:36 +05:30
|
|
|
news.display = "silent";
|
|
|
|
|
2024-06-10 17:59:40 +05:30
|
|
|
gtk.iconTheme = {
|
|
|
|
package = pkgs.papirus-icon-theme;
|
|
|
|
name = if (config.stylix.polarity == "dark") then "Papirus-Dark" else "Papirus-Light";
|
|
|
|
};
|
|
|
|
|
2023-06-21 20:03:51 +05:30
|
|
|
}
|