mirror of
https://github.com/librephoenix/nixos-config
synced 2025-01-18 22:55:52 +05:30
Compare commits
14 commits
88caf2356f
...
020ba9b3b7
Author | SHA1 | Date | |
---|---|---|---|
020ba9b3b7 | |||
5570e49412 | |||
868b0db976 | |||
cabfed6f4b | |||
da89ee5f38 | |||
67d1ea26b4 | |||
bef375ef43 | |||
c0f7854c2c | |||
8cec3e5299 | |||
35c5e4f00b | |||
8f739d1583 | |||
ba2f97ab31 | |||
b6f621c964 | |||
6d10a848cf |
81
flake.lock
81
flake.lock
|
@ -53,11 +53,11 @@
|
|||
"base16-helix": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1696727917,
|
||||
"narHash": "sha256-FVrbPk+NtMra0jtlC5oxyNchbm8FosmvXIatkRbYy1g=",
|
||||
"lastModified": 1720809814,
|
||||
"narHash": "sha256-numb3xigRGnr/deF7wdjBwVg7fpbTH7reFDkJ75AJkY=",
|
||||
"owner": "tinted-theming",
|
||||
"repo": "base16-helix",
|
||||
"rev": "dbe1480d99fe80f08df7970e471fac24c05f2ddb",
|
||||
"rev": "34f41987bec14c0f3f6b2155c19787b1f6489625",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -117,11 +117,11 @@
|
|||
"blocklist-hosts": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1720371934,
|
||||
"narHash": "sha256-30Hl4Llh1wetlW3au2/bRR+/m5P9D7QvLGFWAYHKbKs=",
|
||||
"lastModified": 1721090606,
|
||||
"narHash": "sha256-tS7CDuotk+aAbtOR1x3u3ymyRvPgb3GZjuDcJNm6lZs=",
|
||||
"owner": "StevenBlack",
|
||||
"repo": "hosts",
|
||||
"rev": "67448bdb863d266fd6031f1330c8958d84eba1a2",
|
||||
"rev": "87af2c503dbd86ec8b1f7c70ae005a1dae422a60",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -451,16 +451,16 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1719827415,
|
||||
"narHash": "sha256-pvh+1hStXXAZf0sZ1xIJbWGx4u+OGBC1rVx6Wsw0fBw=",
|
||||
"lastModified": 1720042825,
|
||||
"narHash": "sha256-A0vrUB6x82/jvf17qPCpxaM+ulJnD8YZwH9Ci0BsAzE=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "f2e3c19867262dbe84fdfab42467fc8dd83a2005",
|
||||
"rev": "e1391fb22e18a36f57e6999c7a9f966dc80ac073",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"ref": "release-23.11",
|
||||
"ref": "release-24.05",
|
||||
"repo": "home-manager",
|
||||
"type": "github"
|
||||
}
|
||||
|
@ -472,11 +472,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1720327769,
|
||||
"narHash": "sha256-kAsg3Lg4YKKpGw+f1W2s5hzjP8B0y/juowvjK8utIag=",
|
||||
"lastModified": 1721135958,
|
||||
"narHash": "sha256-H548rpPMsn25LDKn1PCFmPxmWlClJJGnvdzImHkqjuY=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "6b7ce96f34b324e4e104abc30d06955d216bac71",
|
||||
"rev": "afd2021bedff2de92dfce0e257a3d03ae65c603d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -832,7 +832,10 @@
|
|||
"nix-on-droid",
|
||||
"nixpkgs"
|
||||
],
|
||||
"nmd": "nmd",
|
||||
"nmd": [
|
||||
"nix-on-droid",
|
||||
"nmd"
|
||||
],
|
||||
"nmt": "nmt"
|
||||
},
|
||||
"locked": {
|
||||
|
@ -860,14 +863,14 @@
|
|||
],
|
||||
"nixpkgs-docs": "nixpkgs-docs",
|
||||
"nixpkgs-for-bootstrap": "nixpkgs-for-bootstrap",
|
||||
"nmd": "nmd_2"
|
||||
"nmd": "nmd"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1720396533,
|
||||
"narHash": "sha256-UFzk/hZWO1VkciIO5UPaSpJN8s765wsngUSvtJM6d5Q=",
|
||||
"lastModified": 1720964831,
|
||||
"narHash": "sha256-UwVKfjrQ6FWTuqks6lF4+VlzPFDC/GR1Ti/iBKTEQco=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nix-on-droid",
|
||||
"rev": "f3d3b8294039f2f9a8fb7ea82c320f29c6b0fe25",
|
||||
"rev": "c00333ee42aa2b4d4825e0388a1049fdeeded6c6",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -896,11 +899,11 @@
|
|||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1720031269,
|
||||
"narHash": "sha256-rwz8NJZV+387rnWpTYcXaRNvzUSnnF9aHONoJIYmiUQ=",
|
||||
"lastModified": 1720957393,
|
||||
"narHash": "sha256-oedh2RwpjEa+TNxhg5Je9Ch6d3W1NKi7DbRO1ziHemA=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "9f4128e00b0ae8ec65918efeba59db998750ead6",
|
||||
"rev": "693bc46d169f5af9c992095736e82c3488bf7dbb",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -943,16 +946,16 @@
|
|||
},
|
||||
"nixpkgs-stable": {
|
||||
"locked": {
|
||||
"lastModified": 1719957072,
|
||||
"narHash": "sha256-gvFhEf5nszouwLAkT9nWsDzocUTqLWHuL++dvNjMp9I=",
|
||||
"lastModified": 1721226092,
|
||||
"narHash": "sha256-UBvzVpo5sXSi2S/Av+t+Q+C2mhMIw/LBEZR+d6NMjws=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "7144d6241f02d171d25fba3edeaf15e0f2592105",
|
||||
"rev": "c716603a63aca44f39bef1986c13402167450e0a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"id": "nixpkgs",
|
||||
"ref": "nixos-23.11",
|
||||
"ref": "nixos-24.05",
|
||||
"type": "indirect"
|
||||
}
|
||||
},
|
||||
|
@ -989,22 +992,6 @@
|
|||
}
|
||||
},
|
||||
"nmd": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1666190571,
|
||||
"narHash": "sha256-Z1hc7M9X6L+H83o9vOprijpzhTfOBjd0KmUTnpHAVjA=",
|
||||
"owner": "rycee",
|
||||
"repo": "nmd",
|
||||
"rev": "b75d312b4f33bd3294cd8ae5c2ca8c6da2afc169",
|
||||
"type": "gitlab"
|
||||
},
|
||||
"original": {
|
||||
"owner": "rycee",
|
||||
"repo": "nmd",
|
||||
"type": "gitlab"
|
||||
}
|
||||
},
|
||||
"nmd_2": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nix-on-droid",
|
||||
|
@ -1351,11 +1338,11 @@
|
|||
"nixpkgs": "nixpkgs_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1720405186,
|
||||
"narHash": "sha256-7D57KwmTIbsopE/1g8hFeIbVoeJGgU3wfuGYvTlNQG4=",
|
||||
"lastModified": 1721269159,
|
||||
"narHash": "sha256-eHrGuKZKQb762qdCkrfoyyxXLKumYhiXJca1ig0RftE=",
|
||||
"owner": "oxalica",
|
||||
"repo": "rust-overlay",
|
||||
"rev": "f0ca58b37ff4179ce4587589c32205764d9b4a4f",
|
||||
"rev": "c3e217122ac55680606d69bc693bdf262f14f602",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -1411,11 +1398,11 @@
|
|||
"nixpkgs": "nixpkgs_3"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1719525570,
|
||||
"narHash": "sha256-xSO/H67GAHEW0siD2PHoO/e97MbROL3r3s5SpF6A6Dc=",
|
||||
"lastModified": 1720818679,
|
||||
"narHash": "sha256-u9PqY7O6TN42SLeb0e6mnYAgQOoQmclaVSHfLKMpmu0=",
|
||||
"owner": "danth",
|
||||
"repo": "stylix",
|
||||
"rev": "1ff9d37d27377bfe8994c24a8d6c6c1734ffa116",
|
||||
"rev": "29148118cc33f08b71058e1cda7ca017f5300b51",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
13
flake.nix
13
flake.nix
|
@ -79,6 +79,15 @@
|
|||
};
|
||||
};
|
||||
|
||||
pkgs-unstable = import inputs.nixpkgs-patched {
|
||||
system = systemSettings.system;
|
||||
config = {
|
||||
allowUnfree = true;
|
||||
allowUnfreePredicate = (_: true);
|
||||
};
|
||||
overlays = [ inputs.rust-overlay.overlays.default ];
|
||||
};
|
||||
|
||||
pkgs-emacs = import inputs.emacs-pin-nixpkgs {
|
||||
system = systemSettings.system;
|
||||
};
|
||||
|
@ -192,7 +201,7 @@
|
|||
|
||||
inputs = {
|
||||
nixpkgs.url = "nixpkgs/nixos-unstable";
|
||||
nixpkgs-stable.url = "nixpkgs/nixos-23.11";
|
||||
nixpkgs-stable.url = "nixpkgs/nixos-24.05";
|
||||
emacs-pin-nixpkgs.url = "nixpkgs/f72123158996b8d4449de481897d855bc47c7bf6";
|
||||
kdenlive-pin-nixpkgs.url = "nixpkgs/cfec6d9203a461d9d698d8a60ef003cac6d0da94";
|
||||
nwg-dock-hyprland-pin-nixpkgs.url = "nixpkgs/2098d845d76f8a21ae4fe12ed7c7df49098d3f15";
|
||||
|
@ -200,7 +209,7 @@
|
|||
home-manager-unstable.url = "github:nix-community/home-manager/master";
|
||||
home-manager-unstable.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
home-manager-stable.url = "github:nix-community/home-manager/release-23.11";
|
||||
home-manager-stable.url = "github:nix-community/home-manager/release-24.05";
|
||||
home-manager-stable.inputs.nixpkgs.follows = "nixpkgs-stable";
|
||||
|
||||
nix-on-droid = {
|
||||
|
|
27
harden.sh
27
harden.sh
|
@ -19,17 +19,18 @@ else
|
|||
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
||||
fi
|
||||
pushd $SCRIPT_DIR &> /dev/null;
|
||||
chown 0:0 .;
|
||||
chown 0:0 profiles/*;
|
||||
chown -R 0:0 system;
|
||||
chown -R 0:0 patches;
|
||||
chown 0:0 flake.lock;
|
||||
chown 0:0 flake.nix
|
||||
chown 0:0 profiles
|
||||
chown 0:0 profiles/*/configuration.nix;
|
||||
chown 0:0 harden.sh;
|
||||
chown 0:0 soften.sh;
|
||||
chown 0:0 install.sh;
|
||||
chown 0:0 update.sh;
|
||||
chown 1000:users **/README.org;
|
||||
sudo chown 0:0 .;
|
||||
sudo chown 0:0 profiles/*;
|
||||
sudo chown -R 0:0 system;
|
||||
sudo chown -R 0:0 patches;
|
||||
sudo chown 0:0 flake.lock;
|
||||
sudo chown 0:0 flake.nix
|
||||
sudo chown 0:0 profiles
|
||||
sudo chown 0:0 profiles/*/configuration.nix;
|
||||
sudo chown 0:0 profiles/homelab/base.nix;
|
||||
sudo chown 0:0 harden.sh;
|
||||
sudo chown 0:0 soften.sh;
|
||||
sudo chown 0:0 install.sh;
|
||||
sudo chown 0:0 update.sh;
|
||||
sudo chown 1000:users **/README.org;
|
||||
popd &> /dev/null;
|
||||
|
|
|
@ -161,7 +161,7 @@ or for your own custom directory:
|
|||
sudo nixos-rebuild switch --flake /your/custom/directory#system
|
||||
#+END_SRC
|
||||
|
||||
*** Intall and Switch Home Manager Config
|
||||
*** Install and Switch Home Manager Config
|
||||
Home manager can be installed and the configuration activated with:
|
||||
#+BEGIN_SRC sh :noeval
|
||||
nix run home-manager/master -- switch --flake ~/.dotfiles#user
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
diff -crB nixpkgs/pkgs/build-support/emacs/generic.nix nixpkgs-patched/pkgs/build-support/emacs/generic.nix
|
||||
*** nixpkgs/pkgs/build-support/emacs/generic.nix 2023-09-08 20:42:24.476059868 -0500
|
||||
--- nixpkgs-patched/pkgs/build-support/emacs/generic.nix 2023-09-08 21:12:46.637645595 -0500
|
||||
diff -crB nixpkgs/pkgs/applications/editors/emacs/build-support/generic.nix nixpkgs-patched/pkgs/applications/editors/emacs/build-support/generic.nix
|
||||
*** nixpkgs/pkgs/applications/editors/emacs/build-support/generic.nix 2023-09-08 20:42:24.476059868 -0500
|
||||
--- nixpkgs-patched/pkgs/applications/editors/emacs/build-support/generic.nix 2023-09-08 21:12:46.637645595 -0500
|
||||
***************
|
||||
*** 3,9 ****
|
||||
{ lib, stdenv, emacs, texinfo, writeText, gcc, ... }:
|
||||
|
|
|
@ -89,6 +89,4 @@
|
|||
# It is ok to leave this unchanged for compatibility purposes
|
||||
system.stateVersion = "22.11";
|
||||
|
||||
news.display = "silent";
|
||||
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ config, pkgs, pkgs-kdenlive, userSettings, ... }:
|
||||
{ config, pkgs, pkgs-stable, pkgs-kdenlive, userSettings, ... }:
|
||||
|
||||
{
|
||||
# Home Manager needs a bit of information about you and the paths it should
|
||||
|
@ -111,19 +111,19 @@
|
|||
pinta
|
||||
krita
|
||||
inkscape
|
||||
musikcube
|
||||
(pkgs-stable.lollypop.override { youtubeSupport = false; })
|
||||
vlc
|
||||
mpv
|
||||
yt-dlp
|
||||
blender-hip
|
||||
# cura is moderately broken on wayland, so use xwayland
|
||||
(pkgs.cura.overrideAttrs (oldAttrs: {
|
||||
(pkgs-stable.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";
|
||||
exec = "env QT_QPA_PLATFORM=xcb ${pkgs-stable.cura}/bin/cura %F";
|
||||
tryExec = "env QT_QPA_PLATFORM=xcb ${pkgs-stable.cura}/bin/cura";
|
||||
terminal = false;
|
||||
type = "Application";
|
||||
categories = ["Graphics"];
|
||||
|
@ -133,8 +133,8 @@
|
|||
"model/gltf+json" "model/vnd.collada+xml+zip"];
|
||||
})}/share/applications $out/share'';
|
||||
}))
|
||||
(pkgs.writeShellScriptBin "curax" ''env QT_QPA_PLATFORM=xcb ${pkgs.cura}/bin/cura'')
|
||||
curaengine_stable
|
||||
(pkgs.writeShellScriptBin "curax" ''env QT_QPA_PLATFORM=xcb ${pkgs-stable.cura}/bin/cura'')
|
||||
(pkgs-stable.curaengine_stable)
|
||||
openscad
|
||||
(stdenv.mkDerivation {
|
||||
name = "cura-slicer";
|
||||
|
@ -154,7 +154,7 @@
|
|||
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; [
|
||||
propagatedBuildInputs = with pkgs-stable; [
|
||||
curaengine_stable
|
||||
];
|
||||
})
|
||||
|
|
|
@ -23,5 +23,5 @@ else
|
|||
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
||||
fi
|
||||
pushd $SCRIPT_DIR &> /dev/null;
|
||||
chown -R 1000:users .;
|
||||
sudo chown -R 1000:users .;
|
||||
popd &> /dev/null;
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
# Firewall
|
||||
networking.firewall.enable = true;
|
||||
# Open ports in the firewall.
|
||||
# networking.firewall.allowedTCPPorts = [ ... ];
|
||||
# networking.firewall.allowedUDPPorts = [ ... ];
|
||||
networking.firewall.allowedTCPPorts = [ 22000 21027 ]; # syncthing
|
||||
networking.firewall.allowedUDPPorts = [ 22000 21027 ]; # syncthing
|
||||
# Or disable the firewall altogether.
|
||||
# networking.firewall.enable = false;
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
fonts.packages = with pkgs; [
|
||||
# Fonts
|
||||
nerdfonts
|
||||
powerline
|
||||
# powerline # FIXME broken by python 311 -> 312 nixpkgs update
|
||||
];
|
||||
|
||||
}
|
||||
|
|
|
@ -116,7 +116,7 @@ if (os.path.isfile(secretFile)):
|
|||
secretsExists = True
|
||||
|
||||
config.set('qt.args',['ignore-gpu-blacklist','enable-gpu-rasterization','enable-native-gpu-memory-buffers','num-raster-threads=4'])
|
||||
config.load_autoconfig(False)
|
||||
config.load_autoconfig(True)
|
||||
|
||||
base00 = "#''+config.lib.stylix.colors.base00+''"
|
||||
base01 = "#''+config.lib.stylix.colors.base01+''"
|
||||
|
|
|
@ -727,8 +727,8 @@ If the path from LINK does not exist, nil is returned."
|
|||
(defun org-roam-open-dashboard ()
|
||||
"Open ${org-roam-directory}/dashboard.org (I use this naming convention to create dashboards for each of my org roam maps)"
|
||||
(interactive)
|
||||
(if (file-exists-p (concat org-roam-directory "/dashboard.org"))
|
||||
(org-open-file (concat org-roam-directory "/dashboard.org"))
|
||||
(if (org-roam-node-from-title-or-alias "Overview")
|
||||
(org-roam-node-open (org-roam-node-from-title-or-alias "Overview"))
|
||||
(dired org-roam-directory))
|
||||
)
|
||||
|
||||
|
@ -740,11 +740,19 @@ If the path from LINK does not exist, nil is returned."
|
|||
(message "No inbox found, capture something with M-x org-roam-capture-inbox"))
|
||||
)
|
||||
|
||||
(defun org-roam-open-inbox ()
|
||||
"Open ${org-roam-directory}/dashboard.org (I use this naming convention to create dashboards for each of my org roam maps)"
|
||||
(interactive)
|
||||
(if (org-roam-node-from-title-or-alias "Inbox")
|
||||
(org-roam-node-open (org-roam-node-from-title-or-alias "Inbox"))
|
||||
(message "No inbox found, capture something with M-x org-roam-capture-inbox"))
|
||||
)
|
||||
|
||||
(defun org-roam-capture-inbox ()
|
||||
(interactive)
|
||||
(org-roam-capture- :node (org-roam-node-create)
|
||||
(org-roam-capture- :node (org-roam-node-from-title-or-alias "Inbox")
|
||||
:templates '(("i" "inbox" plain "* %?"
|
||||
:if-new (file+head "inbox.org" "#+title: Inbox\n")))))
|
||||
:if-new (file+head "%<%Y%m%d%H%M%S>-inbox.org" "#+title: Inbox\n")))))
|
||||
|
||||
(defun org-roam-switch-db (&optional arg silent)
|
||||
"Switch to a different org-roam database, arg"
|
||||
|
@ -1042,13 +1050,12 @@ If the path from LINK does not exist, nil is returned."
|
|||
;; Custom styles for dates in agenda
|
||||
(custom-set-faces!
|
||||
'(org-agenda-date :inherit outline-1 :height 1.15)
|
||||
'(org-agenda-date-today :inherit diary :height 1.15)
|
||||
'(org-agenda-date-weekend :ineherit outline-2 :height 1.15)
|
||||
'(org-agenda-date-weekend-today :inherit outline-4 :height 1.15)
|
||||
'(org-agenda-date-today :inherit outline-2 :height 1.15)
|
||||
'(org-agenda-date-weekend :inherit outline-1 :height 1.15)
|
||||
'(org-agenda-date-weekend-today :inherit outline-2 :height 1.15)
|
||||
'(org-super-agenda-header :inherit custom-button :weight bold :height 1.05)
|
||||
`(link :foreground unspecified :underline nil :background ,(nth 1 (nth 7 doom-themes--colors)))
|
||||
'(org-link :foreground unspecified)
|
||||
)
|
||||
'(org-link :foreground unspecified))
|
||||
|
||||
;; Toggle completed entries function
|
||||
(defun org-agenda-toggle-completed ()
|
||||
|
@ -1495,6 +1502,11 @@ If the path from LINK does not exist, nil is returned."
|
|||
(require 'nix-mode)
|
||||
(require 'gdscript-mode)
|
||||
|
||||
(add-hook 'nix-mode-hook 'lsp-deferred)
|
||||
(add-hook 'gdscript-mode-hook 'lsp-deferred)
|
||||
|
||||
(setq gdscript-godot-executable "godot4")
|
||||
|
||||
(setq lsp-java-workspace-dir (concat user-home-directory "/.local/share/doom/java-workspace"))
|
||||
|
||||
(setq lsp-treemacs-deps-position-params
|
||||
|
@ -1512,6 +1524,37 @@ If the path from LINK does not exist, nil is returned."
|
|||
|
||||
(setq +format-on-save-enabled-modes '(not emacs-lisp-mode sql-mode tex-mode latex-mode org-msg-edit-mode nix-mode))
|
||||
|
||||
(defun lsp-booster--advice-json-parse (old-fn &rest args)
|
||||
"Try to parse bytecode instead of json."
|
||||
(or
|
||||
(when (equal (following-char) ?#)
|
||||
(let ((bytecode (read (current-buffer))))
|
||||
(when (byte-code-function-p bytecode)
|
||||
(funcall bytecode))))
|
||||
(apply old-fn args)))
|
||||
(advice-add (if (progn (require 'json)
|
||||
(fboundp 'json-parse-buffer))
|
||||
'json-parse-buffer
|
||||
'json-read)
|
||||
:around
|
||||
#'lsp-booster--advice-json-parse)
|
||||
|
||||
(defun lsp-booster--advice-final-command (old-fn cmd &optional test?)
|
||||
"Prepend emacs-lsp-booster command to lsp CMD."
|
||||
(let ((orig-result (funcall old-fn cmd test?)))
|
||||
(if (and (not test?) ;; for check lsp-server-present?
|
||||
(not (file-remote-p default-directory)) ;; see lsp-resolve-final-command, it would add extra shell wrapper
|
||||
lsp-use-plists
|
||||
(not (functionp 'json-rpc-connection)) ;; native json-rpc
|
||||
(executable-find "emacs-lsp-booster"))
|
||||
(progn
|
||||
(when-let ((command-from-exec-path (executable-find (car orig-result)))) ;; resolve command from exec-path (in case not found in $PATH)
|
||||
(setcar orig-result command-from-exec-path))
|
||||
(message "Using emacs-lsp-booster for %s!" orig-result)
|
||||
(cons "emacs-lsp-booster" orig-result))
|
||||
orig-result)))
|
||||
(advice-add 'lsp-resolve-final-command :around #'lsp-booster--advice-final-command)
|
||||
|
||||
(add-to-list 'tramp-remote-path 'tramp-own-remote-path)
|
||||
(after! vterm
|
||||
(add-to-list 'vterm-tramp-shells '("ssh" "zsh")) ;; I use zsh on all my servers
|
||||
|
|
|
@ -47,6 +47,7 @@ in
|
|||
};
|
||||
|
||||
home.packages = (with pkgs-emacs; [
|
||||
emacs-lsp-booster
|
||||
nil
|
||||
nixfmt
|
||||
file
|
||||
|
|
|
@ -866,8 +866,8 @@ exit
|
|||
(defun org-roam-open-dashboard ()
|
||||
"Open ${org-roam-directory}/dashboard.org (I use this naming convention to create dashboards for each of my org roam maps)"
|
||||
(interactive)
|
||||
(if (file-exists-p (concat org-roam-directory "/dashboard.org"))
|
||||
(org-open-file (concat org-roam-directory "/dashboard.org"))
|
||||
(if (org-roam-node-from-title-or-alias "Overview")
|
||||
(org-roam-node-open (org-roam-node-from-title-or-alias "Overview"))
|
||||
(dired org-roam-directory))
|
||||
)
|
||||
|
||||
|
@ -879,11 +879,19 @@ exit
|
|||
(message "No inbox found, capture something with M-x org-roam-capture-inbox"))
|
||||
)
|
||||
|
||||
(defun org-roam-open-inbox ()
|
||||
"Open ${org-roam-directory}/dashboard.org (I use this naming convention to create dashboards for each of my org roam maps)"
|
||||
(interactive)
|
||||
(if (org-roam-node-from-title-or-alias "Inbox")
|
||||
(org-roam-node-open (org-roam-node-from-title-or-alias "Inbox"))
|
||||
(message "No inbox found, capture something with M-x org-roam-capture-inbox"))
|
||||
)
|
||||
|
||||
(defun org-roam-capture-inbox ()
|
||||
(interactive)
|
||||
(org-roam-capture- :node (org-roam-node-create)
|
||||
(org-roam-capture- :node (org-roam-node-from-title-or-alias "Inbox")
|
||||
:templates '(("i" "inbox" plain "* %?"
|
||||
:if-new (file+head "inbox.org" "#+title: Inbox\n")))))
|
||||
:if-new (file+head "%<%Y%m%d%H%M%S>-inbox.org" "#+title: Inbox\n")))))
|
||||
|
||||
(defun org-roam-switch-db (&optional arg silent)
|
||||
"Switch to a different org-roam database, arg"
|
||||
|
@ -932,6 +940,10 @@ exit
|
|||
(org-roam-switch-db prev-org-roam-db-choice 1)))
|
||||
|
||||
#+END_SRC
|
||||
|
||||
#+RESULTS:
|
||||
: org-roam-switch-db-id-open
|
||||
|
||||
*** Org Roam "todos" Tagging for Org Agenda
|
||||
#+BEGIN_SRC emacs-lisp :tangle config.el
|
||||
;;;------ Org-roam-agenda configuration ------;;;
|
||||
|
@ -1210,13 +1222,12 @@ On Wayland, EAF doesn't work.
|
|||
;; Custom styles for dates in agenda
|
||||
(custom-set-faces!
|
||||
'(org-agenda-date :inherit outline-1 :height 1.15)
|
||||
'(org-agenda-date-today :inherit diary :height 1.15)
|
||||
'(org-agenda-date-weekend :ineherit outline-2 :height 1.15)
|
||||
'(org-agenda-date-weekend-today :inherit outline-4 :height 1.15)
|
||||
'(org-agenda-date-today :inherit outline-2 :height 1.15)
|
||||
'(org-agenda-date-weekend :inherit outline-1 :height 1.15)
|
||||
'(org-agenda-date-weekend-today :inherit outline-2 :height 1.15)
|
||||
'(org-super-agenda-header :inherit custom-button :weight bold :height 1.05)
|
||||
`(link :foreground unspecified :underline nil :background ,(nth 1 (nth 7 doom-themes--colors)))
|
||||
'(org-link :foreground unspecified)
|
||||
)
|
||||
'(org-link :foreground unspecified))
|
||||
|
||||
;; Toggle completed entries function
|
||||
(defun org-agenda-toggle-completed ()
|
||||
|
@ -1763,6 +1774,11 @@ I don't have this active right now since it's kinda weird with pgtk...
|
|||
(require 'nix-mode)
|
||||
(require 'gdscript-mode)
|
||||
|
||||
(add-hook 'nix-mode-hook 'lsp-deferred)
|
||||
(add-hook 'gdscript-mode-hook 'lsp-deferred)
|
||||
|
||||
(setq gdscript-godot-executable "godot4")
|
||||
|
||||
(setq lsp-java-workspace-dir (concat user-home-directory "/.local/share/doom/java-workspace"))
|
||||
|
||||
(setq lsp-treemacs-deps-position-params
|
||||
|
@ -1780,6 +1796,37 @@ I don't have this active right now since it's kinda weird with pgtk...
|
|||
|
||||
(setq +format-on-save-enabled-modes '(not emacs-lisp-mode sql-mode tex-mode latex-mode org-msg-edit-mode nix-mode))
|
||||
|
||||
(defun lsp-booster--advice-json-parse (old-fn &rest args)
|
||||
"Try to parse bytecode instead of json."
|
||||
(or
|
||||
(when (equal (following-char) ?#)
|
||||
(let ((bytecode (read (current-buffer))))
|
||||
(when (byte-code-function-p bytecode)
|
||||
(funcall bytecode))))
|
||||
(apply old-fn args)))
|
||||
(advice-add (if (progn (require 'json)
|
||||
(fboundp 'json-parse-buffer))
|
||||
'json-parse-buffer
|
||||
'json-read)
|
||||
:around
|
||||
#'lsp-booster--advice-json-parse)
|
||||
|
||||
(defun lsp-booster--advice-final-command (old-fn cmd &optional test?)
|
||||
"Prepend emacs-lsp-booster command to lsp CMD."
|
||||
(let ((orig-result (funcall old-fn cmd test?)))
|
||||
(if (and (not test?) ;; for check lsp-server-present?
|
||||
(not (file-remote-p default-directory)) ;; see lsp-resolve-final-command, it would add extra shell wrapper
|
||||
lsp-use-plists
|
||||
(not (functionp 'json-rpc-connection)) ;; native json-rpc
|
||||
(executable-find "emacs-lsp-booster"))
|
||||
(progn
|
||||
(when-let ((command-from-exec-path (executable-find (car orig-result)))) ;; resolve command from exec-path (in case not found in $PATH)
|
||||
(setcar orig-result command-from-exec-path))
|
||||
(message "Using emacs-lsp-booster for %s!" orig-result)
|
||||
(cons "emacs-lsp-booster" orig-result))
|
||||
orig-result)))
|
||||
(advice-add 'lsp-resolve-final-command :around #'lsp-booster--advice-final-command)
|
||||
|
||||
#+END_SRC
|
||||
** Terminal
|
||||
#+BEGIN_SRC emacs-lisp :tangle config.el
|
||||
|
@ -2124,6 +2171,7 @@ in
|
|||
};
|
||||
|
||||
home.packages = (with pkgs-emacs; [
|
||||
emacs-lsp-booster
|
||||
nil
|
||||
nixfmt
|
||||
file
|
||||
|
|
|
@ -173,6 +173,11 @@ in
|
|||
bind=SUPERSHIFT,K,exec,hyprctl kill
|
||||
bind=SUPER,W,exec,nwg-dock-wrapper
|
||||
|
||||
bind=,code:172,exec,lollypop -t
|
||||
bind=,code:174,exec,lollypop -s
|
||||
bind=,code:171,exec,lollypop -n
|
||||
bind=,code:173,exec,lollypop -p
|
||||
|
||||
bind = SUPER,R,pass,^(com\.obsproject\.Studio)$
|
||||
bind = SUPERSHIFT,R,pass,^(com\.obsproject\.Studio)$
|
||||
|
||||
|
@ -259,7 +264,7 @@ in
|
|||
bind=SUPER,Z,exec,pypr toggle term && hyprctl dispatch bringactivetotop
|
||||
bind=SUPER,F,exec,pypr toggle ranger && hyprctl dispatch bringactivetotop
|
||||
bind=SUPER,N,exec,pypr toggle numbat && hyprctl dispatch bringactivetotop
|
||||
bind=SUPER,M,exec,pypr toggle musikcube && hyprctl dispatch bringactivetotop
|
||||
bind=SUPER,M,exec,pypr toggle music && hyprctl dispatch bringactivetotop
|
||||
bind=SUPER,B,exec,pypr toggle btm && hyprctl dispatch bringactivetotop
|
||||
bind=SUPER,D,exec,hypr-element
|
||||
bind=SUPER,code:172,exec,pypr toggle pavucontrol && hyprctl dispatch bringactivetotop
|
||||
|
@ -275,6 +280,10 @@ in
|
|||
windowrulev2 = size 85% 90%,class:^(Element)$
|
||||
windowrulev2 = center,class:^(Element)$
|
||||
|
||||
windowrulev2 = float,class:^(lollypop)$
|
||||
windowrulev2 = size 85% 90%,class:^(lollypop)$
|
||||
windowrulev2 = center,class:^(lollypop)$
|
||||
|
||||
$savetodisk = title:^(Save to Disk)$
|
||||
windowrulev2 = float,$savetodisk
|
||||
windowrulev2 = size 70% 75%,$savetodisk
|
||||
|
@ -299,6 +308,7 @@ in
|
|||
|
||||
windowrulev2 = opacity 1.0,class:^(org.qutebrowser.qutebrowser),fullscreen:1
|
||||
windowrulev2 = opacity 0.85,class:^(Element)$
|
||||
windowrulev2 = opacity 0.85,class:^(lollypop)$
|
||||
windowrulev2 = opacity 1.0,class:^(Brave-browser),fullscreen:1
|
||||
windowrulev2 = opacity 1.0,class:^(librewolf),fullscreen:1
|
||||
windowrulev2 = opacity 0.85,title:^(My Local Dashboard Awesome Homepage - qutebrowser)$
|
||||
|
@ -726,8 +736,8 @@ in
|
|||
command = "alacritty --class scratchpad -e numbat"
|
||||
margin = 50
|
||||
|
||||
[scratchpads.musikcube]
|
||||
command = "alacritty --class scratchpad -e musikcube"
|
||||
[scratchpads.music]
|
||||
command = "lollypop"
|
||||
margin = 50
|
||||
|
||||
[scratchpads.btm]
|
||||
|
@ -796,7 +806,7 @@ in
|
|||
"9" = "";
|
||||
"scratch_term" = "_";
|
||||
"scratch_ranger" = "_";
|
||||
"scratch_musikcube" = "_";
|
||||
"scratch_music" = "_";
|
||||
"scratch_btm" = "_";
|
||||
"scratch_pavucontrol" = "_";
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue