mirror of
https://github.com/librephoenix/nixos-config
synced 2025-01-18 22:55:52 +05:30
Compare commits
6 commits
e83212dfec
...
d558c9a91e
Author | SHA1 | Date | |
---|---|---|---|
d558c9a91e | |||
7888439a8d | |||
46387c6f57 | |||
9af1be6b69 | |||
4c25bedde2 | |||
74c362e9ca |
27
flake.lock
27
flake.lock
|
@ -760,15 +760,15 @@
|
|||
"org-krita": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1619935377,
|
||||
"narHash": "sha256-+HI8P0/LI8gdiCD7OiPKTAtLKrPt0REnQ+6oblHSHzU=",
|
||||
"owner": "lepisma",
|
||||
"lastModified": 1713037764,
|
||||
"narHash": "sha256-EHJwe3G/k5/UWFfY+vEkCdKvKNCK7Oh3fFKgMUa87lw=",
|
||||
"owner": "librephoenix",
|
||||
"repo": "org-krita",
|
||||
"rev": "7e334951b8de8f2f1c8cbe5068e7dfe6b9e9808f",
|
||||
"rev": "6b85cf06f17dfcf9daeb6e045caea6df882bc4ff",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "lepisma",
|
||||
"owner": "librephoenix",
|
||||
"repo": "org-krita",
|
||||
"type": "github"
|
||||
}
|
||||
|
@ -805,6 +805,22 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"org-sliced-images": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1711408181,
|
||||
"narHash": "sha256-ck3mGXtJJ0N8asGE4cRtWeJx5/iC+bTXw2cvZgePJqM=",
|
||||
"owner": "jcfk",
|
||||
"repo": "org-sliced-images",
|
||||
"rev": "bd1141d6df6edfd9749c0bbf3a72836148c0e39d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "jcfk",
|
||||
"repo": "org-sliced-images",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"org-timeblock": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
|
@ -918,6 +934,7 @@
|
|||
"org-krita": "org-krita",
|
||||
"org-nursery": "org-nursery",
|
||||
"org-side-tree": "org-side-tree",
|
||||
"org-sliced-images": "org-sliced-images",
|
||||
"org-timeblock": "org-timeblock",
|
||||
"org-yaap": "org-yaap",
|
||||
"phscroll": "phscroll",
|
||||
|
|
46
flake.nix
46
flake.nix
|
@ -1,10 +1,7 @@
|
|||
{
|
||||
description = "Flake of LibrePhoenix";
|
||||
|
||||
outputs = inputs@{ self, nixpkgs, nixpkgs-stable, emacs-pin-nixpkgs, kdenlive-pin-nixpkgs,
|
||||
home-manager-unstable, home-manager-stable, nix-doom-emacs,
|
||||
nix-straight, stylix, blocklist-hosts, rust-overlay, org-nursery, org-yaap,
|
||||
org-side-tree, org-timeblock, org-krita, phscroll, mini-frame, ... }:
|
||||
outputs = inputs@{ self, ... }:
|
||||
let
|
||||
# ---- SYSTEM SETTINGS ---- #
|
||||
systemSettings = {
|
||||
|
@ -51,9 +48,9 @@
|
|||
|
||||
# create patched nixpkgs
|
||||
nixpkgs-patched =
|
||||
(import nixpkgs { system = systemSettings.system; }).applyPatches {
|
||||
(import inputs.nixpkgs { system = systemSettings.system; }).applyPatches {
|
||||
name = "nixpkgs-patched";
|
||||
src = nixpkgs;
|
||||
src = inputs.nixpkgs;
|
||||
patches = [ ./patches/emacs-no-version-check.patch ];
|
||||
};
|
||||
|
||||
|
@ -70,10 +67,10 @@
|
|||
allowUnfree = true;
|
||||
allowUnfreePredicate = (_: true);
|
||||
};
|
||||
overlays = [ rust-overlay.overlays.default ];
|
||||
overlays = [ inputs.rust-overlay.overlays.default ];
|
||||
}));
|
||||
|
||||
pkgs-stable = import nixpkgs-stable {
|
||||
pkgs-stable = import inputs.nixpkgs-stable {
|
||||
system = systemSettings.system;
|
||||
config = {
|
||||
allowUnfree = true;
|
||||
|
@ -81,11 +78,11 @@
|
|||
};
|
||||
};
|
||||
|
||||
pkgs-emacs = import emacs-pin-nixpkgs {
|
||||
pkgs-emacs = import inputs.emacs-pin-nixpkgs {
|
||||
system = systemSettings.system;
|
||||
};
|
||||
|
||||
pkgs-kdenlive = import kdenlive-pin-nixpkgs {
|
||||
pkgs-kdenlive = import inputs.kdenlive-pin-nixpkgs {
|
||||
system = systemSettings.system;
|
||||
};
|
||||
|
||||
|
@ -94,17 +91,17 @@
|
|||
# otherwise use patched nixos-unstable nixpkgs
|
||||
lib = (if ((systemSettings.profile == "homelab") || (systemSettings.profile == "worklab"))
|
||||
then
|
||||
nixpkgs-stable.lib
|
||||
inputs.nixpkgs-stable.lib
|
||||
else
|
||||
nixpkgs.lib);
|
||||
inputs.nixpkgs.lib);
|
||||
|
||||
# use home-manager-stable if running a server (homelab or worklab profile)
|
||||
# otherwise use home-manager-unstable
|
||||
home-manager = (if ((systemSettings.profile == "homelab") || (systemSettings.profile == "worklab"))
|
||||
then
|
||||
home-manager-stable
|
||||
inputs.home-manager-stable
|
||||
else
|
||||
home-manager-unstable);
|
||||
inputs.home-manager-unstable);
|
||||
|
||||
# Systems that can run tests:
|
||||
supportedSystems = [ "aarch64-linux" "i686-linux" "x86_64-linux" ];
|
||||
|
@ -123,7 +120,6 @@
|
|||
modules = [
|
||||
(./. + "/profiles" + ("/" + systemSettings.profile)
|
||||
+ "/home.nix") # load home.nix from selected PROFILE
|
||||
# inputs.nix-flatpak.homeManagerModules.nix-flatpak # Declarative flatpaks
|
||||
];
|
||||
extraSpecialArgs = {
|
||||
# pass config variables from above
|
||||
|
@ -132,16 +128,7 @@
|
|||
inherit pkgs-kdenlive;
|
||||
inherit systemSettings;
|
||||
inherit userSettings;
|
||||
inherit (inputs) nix-doom-emacs;
|
||||
inherit (inputs) org-nursery;
|
||||
inherit (inputs) org-yaap;
|
||||
inherit (inputs) org-side-tree;
|
||||
inherit (inputs) org-timeblock;
|
||||
inherit (inputs) org-krita;
|
||||
inherit (inputs) phscroll;
|
||||
inherit (inputs) mini-frame;
|
||||
#inherit (inputs) nix-flatpak;
|
||||
inherit (inputs) stylix;
|
||||
inherit inputs;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -157,8 +144,7 @@
|
|||
inherit pkgs-stable;
|
||||
inherit systemSettings;
|
||||
inherit userSettings;
|
||||
inherit (inputs) stylix;
|
||||
inherit (inputs) blocklist-hosts;
|
||||
inherit inputs;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -229,7 +215,11 @@
|
|||
flake = false;
|
||||
};
|
||||
org-krita = {
|
||||
url = "github:lepisma/org-krita";
|
||||
url = "github:librephoenix/org-krita";
|
||||
flake = false;
|
||||
};
|
||||
org-sliced-images = {
|
||||
url = "github:jcfk/org-sliced-images";
|
||||
flake = false;
|
||||
};
|
||||
phscroll = {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ config, pkgs, pkgs-kdenlive, nix-doom-emacs, stylix, userSettings, ... }:
|
||||
{ config, pkgs, pkgs-kdenlive, userSettings, ... }:
|
||||
|
||||
{
|
||||
# Home Manager needs a bit of information about you and the paths it should
|
||||
|
@ -9,8 +9,6 @@
|
|||
programs.home-manager.enable = true;
|
||||
|
||||
imports = [
|
||||
(if ((userSettings.editor == "emacs") || (userSettings.editor == "emacsclient")) then nix-doom-emacs.hmModule else null)
|
||||
stylix.homeManagerModules.stylix
|
||||
(./. + "../../../user/wm"+("/"+userSettings.wm+"/"+userSettings.wm)+".nix") # My window manager selected from flake
|
||||
../../user/shell/sh.nix # My zsh and bash config
|
||||
../../user/shell/cli-collection.nix # Useful CLI apps
|
||||
|
@ -99,6 +97,7 @@
|
|||
blender-hip
|
||||
cura
|
||||
curaengine_stable
|
||||
openscad
|
||||
(stdenv.mkDerivation {
|
||||
name = "cura-slicer";
|
||||
version = "0.0.7";
|
||||
|
@ -141,6 +140,7 @@
|
|||
texinfo
|
||||
libffi zlib
|
||||
nodePackages.ungit
|
||||
ventoy
|
||||
]) ++ ([ pkgs-kdenlive.kdenlive ]);
|
||||
|
||||
services.syncthing.enable = true;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ config, pkgs, nix-doom-emacs, stylix, userSettings, ... }:
|
||||
{ config, pkgs, userSettings, ... }:
|
||||
|
||||
{
|
||||
# Home Manager needs a bit of information about you and the paths it should
|
||||
|
@ -9,8 +9,6 @@
|
|||
programs.home-manager.enable = true;
|
||||
|
||||
imports = [
|
||||
(if ((userSettings.editor == "emacs") || (userSettings.editor == "emacsclient")) then nix-doom-emacs.hmModule else null)
|
||||
stylix.homeManagerModules.stylix
|
||||
../../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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{ blocklist-hosts, ... }:
|
||||
{ inputs, ... }:
|
||||
|
||||
let blocklist = builtins.readFile "${blocklist-hosts}/alternates/gambling-porn/hosts";
|
||||
let blocklist = builtins.readFile "${inputs.blocklist-hosts}/alternates/gambling-porn/hosts";
|
||||
in
|
||||
{
|
||||
networking.extraHosts = ''
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ lib, pkgs, stylix, userSettings, ... }:
|
||||
{ lib, pkgs, inputs, userSettings, ... }:
|
||||
|
||||
let
|
||||
themePath = "../../../themes/"+userSettings.theme+"/"+userSettings.theme+".yaml";
|
||||
|
@ -8,7 +8,7 @@ let
|
|||
backgroundSha256 = builtins.readFile (./. + "../../../themes/"+("/"+userSettings.theme)+"/backgroundsha256.txt");
|
||||
in
|
||||
{
|
||||
imports = [ stylix.nixosModules.stylix ];
|
||||
imports = [ inputs.stylix.nixosModules.stylix ];
|
||||
|
||||
stylix.autoEnable = false;
|
||||
stylix.polarity = themePolarity;
|
||||
|
|
|
@ -272,7 +272,7 @@
|
|||
org-pretty-entities t
|
||||
org-ellipsis "…")
|
||||
|
||||
(setq-default line-spacing 0.15)
|
||||
(setq-default line-spacing 0)
|
||||
|
||||
; Automatic table of contents is nice
|
||||
(if (require 'toc-org nil t)
|
||||
|
@ -437,26 +437,8 @@ same directory as the org-buffer and insert a link to this file."
|
|||
(add-load-path! "~/.emacs.d/org-krita")
|
||||
(require 'org-krita)
|
||||
(add-hook 'org-mode-hook 'org-krita-mode)
|
||||
|
||||
(defun org-krita-show-link (link)
|
||||
(org-krita-hide-link link)
|
||||
(let* ((start (org-element-property :begin link))
|
||||
(end (org-element-property :end link))
|
||||
(overlay (make-overlay (+ start 0) (+ end 0)))
|
||||
(kra-path (org-element-property :path link)))
|
||||
(overlay-put overlay 'display (create-image (org-krita-extract-png kra-path) 'png t :scale 0.5))
|
||||
(push (cons kra-path overlay) org-krita-overlays)))
|
||||
|
||||
(defun org-krita-edit (path &optional full-mode)
|
||||
"Edit given PATH in krita canvasonly mode.
|
||||
|
||||
If FULL-MODE is not null, run full krita."
|
||||
(let ((kra-path (expand-file-name path)))
|
||||
(when (f-exists-p kra-path)
|
||||
(if full-mode
|
||||
(call-process org-krita-executable nil 0 nil kra-path)
|
||||
(call-process org-krita-executable nil 0 nil kra-path))
|
||||
(org-krita-add-watcher kra-path))))
|
||||
(setq org-krita-extract-filename "preview.png")
|
||||
(setq org-krita-scale 1)
|
||||
|
||||
(defun org-copy-link-to-clipboard-at-point ()
|
||||
"Copy current link at point into clipboard (useful for images and links)"
|
||||
|
@ -482,6 +464,12 @@ If FULL-MODE is not null, run full krita."
|
|||
:desc "Copy link/file at point into system clipbord (C-g to escape if copying a file)"
|
||||
"y y" 'org-copy-link-to-clipboard-at-point))
|
||||
|
||||
(add-load-path! "~/.emacs.d/org-sliced-images")
|
||||
(require 'org-sliced-images)
|
||||
(defalias 'org-remove-inline-images #'org-sliced-images-remove-inline-images)
|
||||
(defalias 'org-toggle-inline-images #'org-sliced-images-toggle-inline-images)
|
||||
(defalias 'org-display-inline-images #'org-sliced-images-display-inline-images)
|
||||
|
||||
;; Online images inside of org mode is pretty cool
|
||||
;; This snippit is from Tobias on Stack Exchange
|
||||
;; https://emacs.stackexchange.com/questions/42281/org-mode-is-it-possible-to-display-online-images
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
{ config, lib, pkgs-emacs, pkgs-stable, userSettings, systemSettings,
|
||||
org-nursery, org-yaap, org-side-tree, org-timeblock, org-krita, phscroll, mini-frame, ... }:
|
||||
{ config, lib, pkgs-emacs, pkgs-stable, inputs, userSettings, systemSettings, ... }:
|
||||
let
|
||||
themePolarity = lib.removeSuffix "\n" (builtins.readFile (./. + "../../../../themes"+("/"+userSettings.theme)+"/polarity.txt"));
|
||||
dashboardLogo = ./. + "/nix-" + themePolarity + ".png";
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
inputs.nix-doom-emacs.hmModule
|
||||
../git/git.nix
|
||||
../../shell/sh.nix
|
||||
../../shell/cli-collection.nix
|
||||
|
@ -79,26 +79,30 @@ in
|
|||
};
|
||||
|
||||
home.file.".emacs.d/org-yaap" = {
|
||||
source = "${org-yaap}";
|
||||
source = "${inputs.org-yaap}";
|
||||
recursive = true;
|
||||
};
|
||||
|
||||
home.file.".emacs.d/org-side-tree" = {
|
||||
source = "${org-side-tree}";
|
||||
source = "${inputs.org-side-tree}";
|
||||
recursive = true;
|
||||
};
|
||||
|
||||
home.file.".emacs.d/org-timeblock" = {
|
||||
source = "${org-timeblock}";
|
||||
source = "${inputs.org-timeblock}";
|
||||
recursive = true;
|
||||
};
|
||||
|
||||
home.file.".emacs.d/org-nursery" = {
|
||||
source = "${org-nursery}";
|
||||
source = "${inputs.org-nursery}";
|
||||
};
|
||||
|
||||
home.file.".emacs.d/org-krita" = {
|
||||
source = "${org-krita}";
|
||||
source = "${inputs.org-krita}";
|
||||
};
|
||||
|
||||
home.file.".emacs.d/org-sliced-images" = {
|
||||
source = "${inputs.org-sliced-images}";
|
||||
};
|
||||
|
||||
home.file.".emacs.d/dashboard-logo.png".source = dashboardLogo;
|
||||
|
@ -108,11 +112,11 @@ in
|
|||
};
|
||||
|
||||
home.file.".emacs.d/phscroll" = {
|
||||
source = "${phscroll}";
|
||||
source = "${inputs.phscroll}";
|
||||
};
|
||||
|
||||
home.file.".emacs.d/mini-frame" = {
|
||||
source = "${mini-frame}";
|
||||
source = "${inputs.mini-frame}";
|
||||
};
|
||||
|
||||
home.file.".emacs.d/system-vars.el".text = ''
|
||||
|
|
|
@ -342,7 +342,7 @@ Doom Emacs is traditionally installed by cloning the repository ([[https://githu
|
|||
org-pretty-entities t
|
||||
org-ellipsis "…")
|
||||
|
||||
(setq-default line-spacing 0.15)
|
||||
(setq-default line-spacing 0)
|
||||
|
||||
; Automatic table of contents is nice
|
||||
(if (require 'toc-org nil t)
|
||||
|
@ -514,26 +514,8 @@ same directory as the org-buffer and insert a link to this file."
|
|||
(add-load-path! "~/.emacs.d/org-krita")
|
||||
(require 'org-krita)
|
||||
(add-hook 'org-mode-hook 'org-krita-mode)
|
||||
|
||||
(defun org-krita-show-link (link)
|
||||
(org-krita-hide-link link)
|
||||
(let* ((start (org-element-property :begin link))
|
||||
(end (org-element-property :end link))
|
||||
(overlay (make-overlay (+ start 0) (+ end 0)))
|
||||
(kra-path (org-element-property :path link)))
|
||||
(overlay-put overlay 'display (create-image (org-krita-extract-png kra-path) 'png t :scale 0.5))
|
||||
(push (cons kra-path overlay) org-krita-overlays)))
|
||||
|
||||
(defun org-krita-edit (path &optional full-mode)
|
||||
"Edit given PATH in krita canvasonly mode.
|
||||
|
||||
If FULL-MODE is not null, run full krita."
|
||||
(let ((kra-path (expand-file-name path)))
|
||||
(when (f-exists-p kra-path)
|
||||
(if full-mode
|
||||
(call-process org-krita-executable nil 0 nil kra-path)
|
||||
(call-process org-krita-executable nil 0 nil kra-path))
|
||||
(org-krita-add-watcher kra-path))))
|
||||
(setq org-krita-extract-filename "preview.png")
|
||||
(setq org-krita-scale 1)
|
||||
|
||||
#+END_SRC
|
||||
*** Copy Links/Files into Clipboard
|
||||
|
@ -587,6 +569,14 @@ else
|
|||
fi
|
||||
exit
|
||||
#+END_SRC
|
||||
*** Org Sliced Images
|
||||
#+begin_src emacs-lisp :tangle config.el
|
||||
(add-load-path! "~/.emacs.d/org-sliced-images")
|
||||
(require 'org-sliced-images)
|
||||
(defalias 'org-remove-inline-images #'org-sliced-images-remove-inline-images)
|
||||
(defalias 'org-toggle-inline-images #'org-sliced-images-toggle-inline-images)
|
||||
(defalias 'org-display-inline-images #'org-sliced-images-display-inline-images)
|
||||
#+end_src
|
||||
*** Org Online Images
|
||||
#+BEGIN_SRC emacs-lisp :tangle config.el
|
||||
;; Online images inside of org mode is pretty cool
|
||||
|
@ -1993,14 +1983,14 @@ Any git package can be configured for a particular commit or branch:
|
|||
* Nix Integration
|
||||
In order to have Nix load my Doom Emacs configuration [[./doom.nix][doom.nix]], which I source in the =imports= block of my [[../../../profiles/work/home.nix][home.nix]].
|
||||
#+BEGIN_SRC nix :tangle doom.nix
|
||||
{ config, lib, pkgs-emacs, pkgs-stable, userSettings, systemSettings,
|
||||
org-nursery, org-yaap, org-side-tree, org-timeblock, org-krita, phscroll, mini-frame, ... }:
|
||||
{ config, lib, pkgs-emacs, pkgs-stable, inputs, userSettings, systemSettings, ... }:
|
||||
let
|
||||
themePolarity = lib.removeSuffix "\n" (builtins.readFile (./. + "../../../../themes"+("/"+userSettings.theme)+"/polarity.txt"));
|
||||
dashboardLogo = ./. + "/nix-" + themePolarity + ".png";
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
inputs.nix-doom-emacs.hmModule
|
||||
../git/git.nix
|
||||
../../shell/sh.nix
|
||||
../../shell/cli-collection.nix
|
||||
|
@ -2074,26 +2064,30 @@ in
|
|||
};
|
||||
|
||||
home.file.".emacs.d/org-yaap" = {
|
||||
source = "${org-yaap}";
|
||||
source = "${inputs.org-yaap}";
|
||||
recursive = true;
|
||||
};
|
||||
|
||||
home.file.".emacs.d/org-side-tree" = {
|
||||
source = "${org-side-tree}";
|
||||
source = "${inputs.org-side-tree}";
|
||||
recursive = true;
|
||||
};
|
||||
|
||||
home.file.".emacs.d/org-timeblock" = {
|
||||
source = "${org-timeblock}";
|
||||
source = "${inputs.org-timeblock}";
|
||||
recursive = true;
|
||||
};
|
||||
|
||||
home.file.".emacs.d/org-nursery" = {
|
||||
source = "${org-nursery}";
|
||||
source = "${inputs.org-nursery}";
|
||||
};
|
||||
|
||||
home.file.".emacs.d/org-krita" = {
|
||||
source = "${org-krita}";
|
||||
source = "${inputs.org-krita}";
|
||||
};
|
||||
|
||||
home.file.".emacs.d/org-sliced-images" = {
|
||||
source = "${inputs.org-sliced-images}";
|
||||
};
|
||||
|
||||
home.file.".emacs.d/dashboard-logo.png".source = dashboardLogo;
|
||||
|
@ -2103,11 +2097,11 @@ in
|
|||
};
|
||||
|
||||
home.file.".emacs.d/phscroll" = {
|
||||
source = "${phscroll}";
|
||||
source = "${inputs.phscroll}";
|
||||
};
|
||||
|
||||
home.file.".emacs.d/mini-frame" = {
|
||||
source = "${mini-frame}";
|
||||
source = "${inputs.mini-frame}";
|
||||
};
|
||||
|
||||
home.file.".emacs.d/system-vars.el".text = ''
|
||||
|
|
|
@ -256,7 +256,7 @@ set cd_tab_fuzzy false
|
|||
|
||||
# Avoid previewing files larger than this size, in bytes. Use a value of 0 to
|
||||
# disable this feature.
|
||||
set preview_max_size 200000000
|
||||
set preview_max_size 0
|
||||
|
||||
# The key hint lists up to this size have their sublists expanded.
|
||||
# Otherwise the submaps are replaced with "...".
|
||||
|
|
|
@ -75,8 +75,18 @@ ext nes, has fceux, X = fceux "$1"
|
|||
#ext exe = wine "$1"
|
||||
name ^[mM]akefile$ = make
|
||||
|
||||
#----------- FL STUDIO --------------
|
||||
ext flp = flstudio "$@" & &>/dev/null
|
||||
#------------------------------------------
|
||||
# My applications
|
||||
#------------------------------------------
|
||||
ext kra, has krita, X, flag f = krita "$@" &>/dev/null
|
||||
ext kra~, has krita, X, flag f = krita "$@" &>/dev/null
|
||||
ext blend, has blender, X, flag f = blender "$@" &>/dev/null
|
||||
ext blend~, has blender, X, flag f = blender "$@" &>/dev/null
|
||||
ext xopp, has xournalpp, X, flag f = xournalpp "$@" &>/dev/null
|
||||
ext xopp~, has blender, X, flag f = xournalpp "$@" &>/dev/null
|
||||
ext helio, has helio, X, flag f = helio "$@" &>/dev/null
|
||||
ext kdenlive, has kdenlive-accel, X, flag f = kdenlive-accel "$@" &>/dev/null
|
||||
ext flp, has flstudio, X, flag f = flstudio "$@" &>/dev/null
|
||||
|
||||
#--------------------------------------------
|
||||
# Scripts
|
||||
|
@ -212,11 +222,6 @@ label pager, !mime ^text, !ext xml|json|csv|tex|py|pl|rb|js|sh|php = "$PAGER"
|
|||
# they are never triggered accidentally. #
|
||||
######################################################################
|
||||
|
||||
# My applications
|
||||
ext kra = krita "$@" & &>/dev/null
|
||||
ext blend* = blender "$@" & &>/dev/null
|
||||
ext helio = helio "$@" & &>/dev/null
|
||||
ext kdenlive = kdenlive-accel "$@" & &>/dev/null
|
||||
|
||||
# Execute a file as program/script.
|
||||
mime application/x-executable = "$1"
|
||||
|
|
|
@ -170,29 +170,29 @@ handle_image() {
|
|||
## as above), but might fail for unsupported types.
|
||||
exit 7;;
|
||||
|
||||
## Video
|
||||
# video/*)
|
||||
# # Get embedded thumbnail
|
||||
# ffmpeg -i "${FILE_PATH}" -map 0:v -map -0:V -c copy "${IMAGE_CACHE_PATH}" && exit 6
|
||||
# # Get frame 10% into video
|
||||
# ffmpegthumbnailer -i "${FILE_PATH}" -o "${IMAGE_CACHE_PATH}" -s 0 && exit 6
|
||||
# exit 1;;
|
||||
# Video
|
||||
video/*)
|
||||
# Get frame 10% into video
|
||||
ffmpegthumbnailer -i "${FILE_PATH}" -o "${IMAGE_CACHE_PATH}" -s 0 && exit 6
|
||||
# Get embedded thumbnail
|
||||
ffmpeg -i "${FILE_PATH}" -map 0:v -map -0:V -c copy "${IMAGE_CACHE_PATH}" && exit 6
|
||||
exit 1;;
|
||||
|
||||
## Audio
|
||||
# audio/*)
|
||||
# # Get embedded thumbnail
|
||||
# ffmpeg -i "${FILE_PATH}" -map 0:v -map -0:V -c copy \
|
||||
# "${IMAGE_CACHE_PATH}" && exit 6;;
|
||||
# Audio
|
||||
audio/*)
|
||||
# Get embedded thumbnail
|
||||
ffmpeg -i "${FILE_PATH}" -map 0:v -map -0:V -c copy \
|
||||
"${IMAGE_CACHE_PATH}" && exit 6;;
|
||||
|
||||
## PDF
|
||||
# application/pdf)
|
||||
# pdftoppm -f 1 -l 1 \
|
||||
# -scale-to-x "${DEFAULT_SIZE%x*}" \
|
||||
# -scale-to-y -1 \
|
||||
# -singlefile \
|
||||
# -jpeg -tiffcompression jpeg \
|
||||
# -- "${FILE_PATH}" "${IMAGE_CACHE_PATH%.*}" \
|
||||
# && exit 6 || exit 1;;
|
||||
# PDF
|
||||
application/pdf)
|
||||
pdftoppm -f 1 -l 1 \
|
||||
-scale-to-x "${DEFAULT_SIZE%x*}" \
|
||||
-scale-to-y -1 \
|
||||
-singlefile \
|
||||
-jpeg -tiffcompression jpeg \
|
||||
-- "${FILE_PATH}" "${IMAGE_CACHE_PATH%.*}" \
|
||||
&& exit 6 || exit 1;;
|
||||
|
||||
|
||||
## ePub, MOBI, FB2 (using Calibre)
|
||||
|
@ -205,7 +205,7 @@ handle_image() {
|
|||
# >/dev/null && exit 6
|
||||
# exit 1;;
|
||||
|
||||
## Font
|
||||
# Font
|
||||
application/font*|application/*opentype)
|
||||
preview_png="/tmp/$(basename "${IMAGE_CACHE_PATH%.*}").png"
|
||||
if fontimage -o "${preview_png}" \
|
||||
|
@ -265,29 +265,42 @@ handle_image() {
|
|||
# ;;
|
||||
esac
|
||||
|
||||
# openscad_image() {
|
||||
# TMPPNG="$(mktemp -t xxxxxx.png)"
|
||||
# openscad --colorscheme="${OPENSCAD_COLORSCHEME}" \
|
||||
# --imgsize="${OPENSCAD_IMGSIZE/x/,}" \
|
||||
# -o "${TMPPNG}" "${1}"
|
||||
# mv "${TMPPNG}" "${IMAGE_CACHE_PATH}"
|
||||
# }
|
||||
openscad_image() {
|
||||
TMPPNG="$(mktemp -t XXXXXXXXXX --suffix '.png')"
|
||||
openscad --colorscheme="${OPENSCAD_COLORSCHEME}" \
|
||||
--imgsize="${OPENSCAD_IMGSIZE/x/,}" \
|
||||
-o "${TMPPNG}" "${1}"
|
||||
mv "${TMPPNG}" "${IMAGE_CACHE_PATH}"
|
||||
}
|
||||
|
||||
FULL_FILE_PATH=$(readlink -f $FILE_PATH);
|
||||
case "${FILE_EXTENSION_LOWER}" in
|
||||
## 3D models
|
||||
## OpenSCAD only supports png image output, and ${IMAGE_CACHE_PATH}
|
||||
## is hardcoded as jpeg. So we make a tempfile.png and just
|
||||
## move/rename it to jpg. This works because image libraries are
|
||||
## smart enough to handle it.
|
||||
# csg|scad)
|
||||
# openscad_image "${FILE_PATH}" && exit 6
|
||||
# ;;
|
||||
# 3mf|amf|dxf|off|stl)
|
||||
# openscad_image <(echo "import(\"${FILE_PATH}\");") && exit 6
|
||||
# ;;
|
||||
# 3D models
|
||||
# OpenSCAD only supports png image output, and ${IMAGE_CACHE_PATH}
|
||||
# is hardcoded as jpeg. So we make a tempfile.png and just
|
||||
# move/rename it to jpg. This works because image libraries are
|
||||
# smart enough to handle it.
|
||||
csg|scad)
|
||||
openscad_image "${FILE_PATH}" && exit 6
|
||||
;;
|
||||
stl)
|
||||
openscad_image <(echo "import(\"${FULL_FILE_PATH}\");") && exit 6
|
||||
;;
|
||||
3mf|amf|dxf|off|stl)
|
||||
openscad_image <(echo "import(\"${FULL_FILE_PATH}\");") && exit 6
|
||||
;;
|
||||
drawio)
|
||||
draw.io -x "${FILE_PATH}" -o "${IMAGE_CACHE_PATH}" \
|
||||
--width "${DEFAULT_SIZE%x*}" && exit 6
|
||||
;;
|
||||
blend|blend~)
|
||||
blender-thumbnailer "${FILE_PATH}" "${IMAGE_CACHE_PATH}" && exit 6
|
||||
;;
|
||||
kra|kra~)
|
||||
unzip -pP "" -- "${FILE_PATH}" "mergedimage.png" > "${IMAGE_CACHE_PATH}" && exit 6
|
||||
;;
|
||||
xopp|xopp~)
|
||||
xournalpp "${FILE_PATH}" --create-img "${IMAGE_CACHE_PATH}" && exit 6
|
||||
exit 1;;
|
||||
esac
|
||||
}
|
||||
|
|
|
@ -1,58 +0,0 @@
|
|||
{ lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
nixpkgs.overlays = [
|
||||
(self: super:
|
||||
{
|
||||
blockbench-electron =
|
||||
super.blockbench-electron.overrideAttrs (oldAttrs: rec {
|
||||
pname = "blockbench-electron";
|
||||
alias = "blockbench";
|
||||
version = "4.8.1";
|
||||
|
||||
src = super.fetchurl {
|
||||
inherit pname version;
|
||||
url = "https://github.com/JannisX11/blockbench/releases/download/v${version}/Blockbench_${version}.AppImage";
|
||||
sha256 = "sha256-CE2wDOt1WBcYmPs4sEyZ3LYvKLequFZH0B3huMYHlwA=";
|
||||
name = "${pname}-${version}.AppImage";
|
||||
};
|
||||
|
||||
appimageContents = super.appimageTools.extractType2 {
|
||||
inherit pname version;
|
||||
name = "${pname}-${version}";
|
||||
inherit src;
|
||||
};
|
||||
|
||||
dontUnpack = true;
|
||||
dontConfigure = true;
|
||||
dontBuild = true;
|
||||
|
||||
nativeBuildInputs = [ super.makeWrapper ];
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
mkdir -p $out/bin $out/share/${pname} $out/share/applications
|
||||
cp -a ${appimageContents}/{locales,resources} $out/share/${pname}
|
||||
cp -a ${appimageContents}/blockbench.desktop $out/share/applications/${pname}.desktop
|
||||
cp -a ${appimageContents}/usr/share/icons $out/share
|
||||
substituteInPlace $out/share/applications/${pname}.desktop \
|
||||
--replace 'Exec=AppRun' 'Exec=${pname}'
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
postFixup = ''
|
||||
makeWrapper ${super.electron_22}/bin/electron $out/bin/${pname} \
|
||||
--add-flags $out/share/${pname}/resources/app.asar \
|
||||
--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ super.stdenv.cc.cc ]}"
|
||||
|
||||
makeWrapper ${super.electron_22}/bin/electron $out/bin/${alias} \
|
||||
--add-flags $out/share/${pname}/resources/app.asar \
|
||||
--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ super.stdenv.cc.cc ]}"
|
||||
'';
|
||||
});
|
||||
}
|
||||
)
|
||||
];
|
||||
|
||||
home.packages = [ pkgs.blockbench-electron ];
|
||||
}
|
|
@ -1,45 +0,0 @@
|
|||
# THIS DOES NOT WORK YET!
|
||||
{ lib, buildPythonPackage, pkgs, ... }:
|
||||
|
||||
let name = "Impressive";
|
||||
_name = "impressive";
|
||||
version = "0.13.2";
|
||||
in
|
||||
buildPythonPackage rec {
|
||||
inherit name version;
|
||||
|
||||
src = fetchTarball {
|
||||
url = "https://sourceforge.net/projects/${_name}/files/${name}/${version}/${name}-${version}.tar.gz/download";
|
||||
sha256 = "sha256:0zbkqc29mgm93mysf3y5gvkaj4xxp1jv4ix1fqrcpfx3cricrkql";
|
||||
};
|
||||
|
||||
phases = "installPhase";
|
||||
|
||||
pyproject = false;
|
||||
doCheck = false;
|
||||
|
||||
propagatedBuildInputs = with pkgs; [
|
||||
python3Packages.pygame
|
||||
python3Packages.pyopengl
|
||||
python3Packages.pillow
|
||||
python3Packages.pygame_sdl2
|
||||
python3Packages.pygame-gui
|
||||
ffmpeg
|
||||
mplayer
|
||||
xdg-utils
|
||||
];
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out $out/bin $out/opt $out/share $out/share/doc $out/share/man
|
||||
cp $src/impressive.py $out/opt
|
||||
chmod +x $out/opt/impressive.py
|
||||
ln -s $out/opt/impressive.py $out/bin/impressive
|
||||
'';
|
||||
|
||||
meta = {
|
||||
homepage = "https://impressive.sourceforge.net/";
|
||||
description = "the Chuck Norris of presentation software";
|
||||
license = lib.licenses.gpl2Only;
|
||||
maintainers = [];
|
||||
};
|
||||
}
|
|
@ -1,32 +0,0 @@
|
|||
# THIS DOESN'T WORK YET!!!
|
||||
# I'M NOT SMART ENOUGH TO FIGURE THIS OUT XD
|
||||
{ lib, stdenv, fetchgit, pkgs, ... }:
|
||||
|
||||
let name = "pokefinder";
|
||||
version = "4.1.2";
|
||||
in
|
||||
stdenv.mkDerivation {
|
||||
inherit name version;
|
||||
|
||||
src = fetchgit {
|
||||
url = "https://github.com/Admiral-Fish/${name}";
|
||||
fetchSubmodules = true;
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-ps8F6IcbCNybrZ02tbLNyB3YEvKlcYgCpv5Em7Riv+Q=";
|
||||
};
|
||||
|
||||
buildInputs = with pkgs; [ qt6.full qt6.qttools ];
|
||||
nativeBuildInputs = with pkgs; [ python3 pkgs.cmake qt6.wrapQtAppsHook ];
|
||||
|
||||
cmakeFlags = [
|
||||
"-DCMAKE_BUILD_TYPE=RELEASE"
|
||||
"-DCMAKE_PREFIX_PATH=${pkgs.qt6.full}"
|
||||
];
|
||||
|
||||
meta = {
|
||||
homepage = "https://github.com/Admiral-Fish/PokeFinder";
|
||||
description = "Cross platform Pokémon RNG tool";
|
||||
license = lib.licenses.gpl3;
|
||||
maintainers = [];
|
||||
};
|
||||
}
|
|
@ -7,7 +7,7 @@
|
|||
ranger = super.ranger.overrideAttrs (oldAttrs: rec {
|
||||
preConfigure = ''
|
||||
substituteInPlace ranger/__init__.py \
|
||||
--replace "DEFAULT_PAGER = 'less'" "DEFAULT_PAGER = '${lib.getBin pkgs.less}/bin/less'"
|
||||
--replace "DEFAULT_PAGER = 'less'" "DEFAULT_PAGER = '${lib.getBin pkgs.bat}/bin/bat'"
|
||||
|
||||
# give image previews out of the box when building with w3m
|
||||
substituteInPlace ranger/config/rc.conf \
|
||||
|
@ -28,5 +28,10 @@
|
|||
}
|
||||
)
|
||||
];
|
||||
home.packages = with pkgs; [
|
||||
poppler_utils
|
||||
librsvg
|
||||
ffmpegthumbnailer
|
||||
];
|
||||
|
||||
}
|
||||
|
|
|
@ -1,27 +0,0 @@
|
|||
{ lib, pkgs, ... }:
|
||||
let
|
||||
rustPlatform = pkgs.makeRustPlatform {
|
||||
cargo = pkgs.rust-bin.stable.latest.minimal;
|
||||
rustc = pkgs.rust-bin.stable.latest.minimal;
|
||||
};
|
||||
in
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "smartcalc-tui";
|
||||
version = "1.0.7";
|
||||
|
||||
src = fetchTarball {
|
||||
url = "https://github.com/superhawk610/smartcalc-tui/archive/refs/tags/v1.0.7.tar.gz";
|
||||
sha256 = "1dv24rsj87avpbrmab0hy3v729fdqh1cfbvl1xsjmfn8y35z4m5m";
|
||||
};
|
||||
|
||||
cargoSha256 = "sha256-0AWsJccfzkUkpB6imibN6iUNDEx3vrX9kEgD98nXURw=";
|
||||
|
||||
checkType = "debug";
|
||||
|
||||
meta = with lib; {
|
||||
description = "Terminal UI for erhanbaris/smartcalc";
|
||||
homepage = "https://github.com/superhawk610/smartcalc-tui";
|
||||
license = licenses.mit;
|
||||
maintainers = [];
|
||||
};
|
||||
}
|
|
@ -1,5 +1,4 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
# Collection of useful CLI apps
|
||||
home.packages = with pkgs; [
|
||||
|
@ -15,16 +14,12 @@
|
|||
bat eza fd bottom ripgrep
|
||||
rsync
|
||||
unzip
|
||||
tmux
|
||||
w3m
|
||||
pandoc
|
||||
hwinfo
|
||||
pciutils
|
||||
numbat
|
||||
(pkgs.callPackage ../pkgs/smartcalc.nix { })
|
||||
#(pkgs.writeShellScriptBin "sc" ''smartcalc'')
|
||||
#(pkgs.callPackage ../pkgs/pokemon-colorscripts.nix { })
|
||||
#(pkgs.python3Packages.callPackage ../pkgs/impressive.nix { })
|
||||
(pkgs.callPackage ../pkgs/pokemon-colorscripts.nix { })
|
||||
(pkgs.writeShellScriptBin "airplane-mode" ''
|
||||
#!/bin/sh
|
||||
connectivity="$(nmcli n connectivity)"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ config, lib, pkgs, userSettings, ... }:
|
||||
{ config, lib, pkgs, inputs, userSettings, ... }:
|
||||
|
||||
let
|
||||
themePath = "../../../themes"+("/"+userSettings.theme+"/"+userSettings.theme)+".yaml";
|
||||
|
@ -7,6 +7,9 @@ let
|
|||
backgroundSha256 = builtins.readFile (./. + "../../../themes/"+("/"+userSettings.theme)+"/backgroundsha256.txt");
|
||||
in
|
||||
{
|
||||
|
||||
imports = [ inputs.stylix.homeManagerModules.stylix ];
|
||||
|
||||
home.file.".currenttheme".text = userSettings.theme;
|
||||
stylix.autoEnable = false;
|
||||
stylix.polarity = themePolarity;
|
||||
|
|
Loading…
Reference in a new issue