Merge branch 'main' of github.com:jroeger23/.nixos
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
${pkgs.alejandra}/bin/alejandra . &>/dev/null
|
||||
${pkgs.git}/bin/git diff -U0
|
||||
echo "NixOS Rebuilding..."
|
||||
${pkgs.unstable.nh}/bin/nh home switch ~/.nixos
|
||||
${pkgs.nh}/bin/nh home switch ~/.nixos
|
||||
gen=$(home-manager generations | head -n1 | ${pkgs.gawk}/bin/awk '{print "Gen" $5 " @ " $1 "-" $2}')
|
||||
${pkgs.git}/bin/git commit --no-gpg-sign -am "Home $gen"
|
||||
popd
|
||||
@@ -24,7 +24,7 @@
|
||||
${pkgs.alejandra}/bin/alejandra . &>/dev/null
|
||||
${pkgs.git}/bin/git diff -U0
|
||||
echo "NixOS Rebuilding..."
|
||||
${pkgs.unstable.nh}/bin/nh os switch ~/.nixos
|
||||
${pkgs.nh}/bin/nh os switch ~/.nixos
|
||||
gen=$(sudo nix-env --list-generations --profile /nix/var/nix/profiles/system | ${pkgs.gnugrep}/bin/grep current | ${pkgs.gawk}/bin/awk '{print "Gen" $1 " @ " $2 "-" $3}')
|
||||
${pkgs.git}/bin/git commit --no-gpg-sign -am "System $gen"
|
||||
popd
|
||||
@@ -38,12 +38,23 @@
|
||||
echo ".nixos is unclean!"
|
||||
exit 1
|
||||
fi
|
||||
branch_staging="staging-update"
|
||||
|
||||
if ${pkgs.git}/bin/git rev-parse --verify "$branch_staging" >/dev/null 2>&1; then
|
||||
echo "Using staging update branch."
|
||||
else
|
||||
echo "No staging update branch found."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
${pkgs.git}/bin/git checkout "$branch_staging" flake.lock
|
||||
echo "Updating nix-flake..."
|
||||
nix flake update --flake .
|
||||
echo "NixOS Rebuilding..."
|
||||
${pkgs.unstable.nh}/bin/nh os switch ~/.nixos
|
||||
${pkgs.nh}/bin/nh os switch ~/.nixos
|
||||
gen=$(sudo nix-env --list-generations --profile /nix/var/nix/profiles/system | ${pkgs.gnugrep}/bin/grep current | ${pkgs.gawk}/bin/awk '{print "Gen" $1 " @ " $2 "-" $3}')
|
||||
${pkgs.git}/bin/git commit --no-gpg-sign -am "Upgrade $gen"
|
||||
${pkgs.git}/bin/git branch -D "$branch_staging"
|
||||
popd
|
||||
'';
|
||||
update =
|
||||
@@ -55,15 +66,28 @@
|
||||
echo ".nixos is unclean!"
|
||||
exit 1
|
||||
fi
|
||||
echo "Updating nix-flake..."
|
||||
nix flake update --flake .
|
||||
echo "NixOS Building..."
|
||||
${pkgs.unstable.nh}/bin/nh os build ~/.nixos
|
||||
branch_staging="staging-update"
|
||||
branch_current="$(${pkgs.git}/bin/git branch --show-current)"
|
||||
|
||||
if ${pkgs.git}/bin/git rev-parse --verify "$branch_staging" >/dev/null 2>&1; then
|
||||
echo "There is already a staging update branch."
|
||||
else
|
||||
echo "Creating a new staging update branch."
|
||||
${pkgs.git}/bin/git switch -c "$branch_staging"
|
||||
nix flake update --verbose --flake .
|
||||
${pkgs.git}/bin/git add flake.lock
|
||||
${pkgs.git}/bin/git commit --no-gpg-sign -m "staging update"
|
||||
${pkgs.git}/bin/git switch "$branch_current"
|
||||
fi
|
||||
|
||||
nix store diff-closures \
|
||||
'.?ref='"$branch_current"'#nixosConfigurations.'"$(${pkgs.hostname}/bin/hostname)"'.config.system.build.toplevel' \
|
||||
'.?ref='"$branch_staging"'#nixosConfigurations.'"$(${pkgs.hostname}/bin/hostname)"'.config.system.build.toplevel'
|
||||
|
||||
popd
|
||||
'';
|
||||
in {
|
||||
environment.systemPackages = [
|
||||
pkgs.bash
|
||||
home-rebuild
|
||||
rebuild
|
||||
upgrade
|
||||
|
||||
@@ -27,8 +27,11 @@ in {
|
||||
environment.systemPackages = with pkgs; [
|
||||
libsForQt5.kwallet
|
||||
libsForQt5.kwalletmanager
|
||||
spaceFM
|
||||
];
|
||||
|
||||
services.udisks2.enable = true;
|
||||
|
||||
programs.hyprland = {
|
||||
enable = true;
|
||||
withUWSM = true;
|
||||
|
||||
@@ -101,13 +101,6 @@
|
||||
("C-TAB" . 'copilot-accept-completion-by-word)
|
||||
("C-<tab>" . 'copilot-accept-completion-by-word)))
|
||||
|
||||
(add-hook! 'prog-mode-hook #'undo-tree-mode)
|
||||
(after! undo-tree
|
||||
(setq undo-tree-auto-save-history t)
|
||||
(setq undo-tree-enable-undo-in-region nil)
|
||||
(setq undo-tree-history-directory-alist '(("." . "~/.cache/doom/undo"))))
|
||||
|
||||
|
||||
(after! markdown-mode
|
||||
(setq markdown-split-window-direction 'right)
|
||||
(setq markdown-command "pandoc -t html5 -f markdown_mmd --embed-resources --standalone --mathjax --quiet --highlight-style=zenburn")
|
||||
@@ -122,7 +115,7 @@
|
||||
:config
|
||||
(setq graphviz-dot-indent-width 4))
|
||||
|
||||
(after! latex
|
||||
(after! auctex
|
||||
(add-hook! 'LaTeX-mode-hook 'lsp)
|
||||
(map! :map LaTeX-mode-map
|
||||
:localleader
|
||||
|
||||
@@ -70,9 +70,9 @@
|
||||
:emacs
|
||||
dired ; making dired pretty [functional]
|
||||
electric ; smarter, keyword-based electric-indent
|
||||
;;ibuffer ; interactive buffer management
|
||||
(ibuffer +icons) ; interactive buffer management
|
||||
|
||||
undo ; persistent, smarter undo for your inevitable mistakes
|
||||
(undo +tree) ; persistent, smarter undo for your inevitable mistakes
|
||||
vc ; version-control and Emacs, sitting in a tree
|
||||
|
||||
:term
|
||||
@@ -112,7 +112,7 @@
|
||||
|
||||
:os
|
||||
(:if (featurep :system 'macos) macos) ; improve compatibility with macOS
|
||||
;;tty ; improve the terminal Emacs experience
|
||||
(tty +osc) ; improve the terminal Emacs experience
|
||||
|
||||
:lang
|
||||
;;agda ; types of types of types of types...
|
||||
|
||||
@@ -55,9 +55,11 @@
|
||||
(package! copilot
|
||||
:recipe (:host github :repo "copilot-emacs/copilot.el" :files ("*.el")))
|
||||
|
||||
;; TODO: Remove this when a fix for https://github.com/doomemacs/doomemacs/issues/8286 is included
|
||||
(package! package-lint :pin "21edc6d0d0eadd2d0a537f422fb9b7b8a3ae6991")
|
||||
|
||||
(package! direnv)
|
||||
(package! copilot)
|
||||
(package! undo-tree)
|
||||
(package! pdf-tools)
|
||||
(package! eww)
|
||||
(package! pandoc-mode)
|
||||
|
||||
@@ -3,7 +3,34 @@
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
}: let
|
||||
screenshot = pkgs.writeShellScriptBin "screenshot" ''
|
||||
region=0
|
||||
clip=0
|
||||
while [[ "$#" -gt 0 ]]; do
|
||||
case $1 in
|
||||
--region) region=1; ;;
|
||||
--clip) clip=1; ;;
|
||||
*) echo "Unknown parameter passed: $1"; exit 1 ;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
if [[ $region -eq 1 ]]; then
|
||||
if [[ $clip -eq 1 ]]; then
|
||||
${pkgs.grim}/bin/grim -g "$(${pkgs.slurp}/bin/slurp)" - | ${pkgs.wl-clipboard}/bin/wl-copy
|
||||
else
|
||||
${pkgs.grim}/bin/grim -g "$(${pkgs.slurp}/bin/slurp)" ~/Pictures/Screenshots/$(${pkgs.coreutils}/bin/date +'%Y-%m-%d_%H-%M-%S').png
|
||||
fi
|
||||
else
|
||||
if [[ $clip -eq 1 ]]; then
|
||||
${pkgs.grim}/bin/grim - | ${pkgs.wl-clipboard}/bin/wl-copy
|
||||
else
|
||||
${pkgs.grim}/bin/grim ~/Pictures/Screenshots/$(${pkgs.coreutils}/bin/date +'%Y-%m-%d_%H-%M-%S').png
|
||||
fi
|
||||
fi
|
||||
'';
|
||||
in {
|
||||
services.hypridle.settings = {
|
||||
general = {
|
||||
# lock_cmd = notify-send "lock!" # dbus/sysd lock command (loginctl lock-session)
|
||||
@@ -190,8 +217,10 @@
|
||||
"$mod, 9, exec, ${pkgs.hyprlock}/bin/hyprlock"
|
||||
"$mod, 0, exec, ${pkgs.wlogout}/bin/wlogout -b 5"
|
||||
"$mod, n, exec, ${pkgs.swaynotificationcenter}/bin/swaync-client -t"
|
||||
", Print, exec, ${pkgs.grim}/bin/grim -g \"\$(${pkgs.slurp}/slurp)\" ~/Pictures/Screenshots/$(date +'%Y-%m-%d_%H-%M-%S').png"
|
||||
"CTRL, Print, exec, ${pkgs.grim}/bin/grim -g \"\$(${pkgs.slurp}/slurp)\" | wl-copy"
|
||||
", Print, exec, ${screenshot}/bin/screenshot"
|
||||
"CTRL, Print, exec, ${screenshot}/bin/screenshot --region"
|
||||
"SHIFT, Print, exec, ${screenshot}/bin/screenshot --clip"
|
||||
"CTRL SHIFT, Print, exec, ${screenshot}/bin/screenshot --region --clip"
|
||||
]
|
||||
++ (
|
||||
# workspaces
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
{config, ...}: {
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
programs.ranger = {
|
||||
settings = {
|
||||
preview_images = true;
|
||||
@@ -7,5 +11,50 @@
|
||||
then "kitty"
|
||||
else "ueberzug";
|
||||
};
|
||||
extraConfig = lib.strings.concatStringsSep "\n" [
|
||||
"default_linemode devicons"
|
||||
];
|
||||
mappings = {
|
||||
f = "console fzf_filter%space";
|
||||
};
|
||||
plugins =
|
||||
[
|
||||
{
|
||||
name = "ranger_fzf_filter";
|
||||
src = builtins.fetchGit {
|
||||
url = "https://github.com/MuXiu1997/ranger-fzf-filter";
|
||||
rev = "bf16de2e4ace415b685ff7c58306d0c5146f9f43";
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "ranger_archives";
|
||||
src = builtins.fetchGit {
|
||||
url = "https://github.com/maximtrp/ranger-archives";
|
||||
rev = "b4e136b24fdca7670e0c6105fb496e5df356ef25";
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "ranger_devicons";
|
||||
src = builtins.fetchGit {
|
||||
url = "https://github.com/alexanderjeurissen/ranger_devicons";
|
||||
rev = "f227f212e14996fbb366f945ec3ecaf5dc5f44b0";
|
||||
};
|
||||
}
|
||||
]
|
||||
++ (
|
||||
if config.services.kdeconnect.enable
|
||||
then
|
||||
lib.lists.singleton
|
||||
{
|
||||
name = "ranger_kdeconnect.py";
|
||||
src =
|
||||
builtins.fetchGit {
|
||||
url = "https://github.com/bwconrad/ranger-kdeconnect";
|
||||
rev = "710c600bb894fed3e293f6518930c16a494dd154";
|
||||
}
|
||||
+ "/kdeconnect_send.py";
|
||||
}
|
||||
else []
|
||||
);
|
||||
};
|
||||
}
|
||||
|
||||
@@ -7,16 +7,19 @@
|
||||
killall
|
||||
neofetch
|
||||
nix-search-cli
|
||||
nix-tree
|
||||
nixpkgs-fmt
|
||||
pass
|
||||
poetry
|
||||
python311Packages.radian
|
||||
ranger
|
||||
thefuck
|
||||
unstable.mmtui
|
||||
unzip
|
||||
vim
|
||||
w3m
|
||||
wget
|
||||
yt-dlp
|
||||
zip
|
||||
];
|
||||
}
|
||||
|
||||
@@ -13,16 +13,18 @@ in {
|
||||
nix-direnv.enable = true;
|
||||
};
|
||||
|
||||
# fancy ls command
|
||||
programs.lsd = {
|
||||
enable = true;
|
||||
enableAliases = true;
|
||||
};
|
||||
|
||||
# Zsh
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
enableCompletion = true;
|
||||
syntaxHighlighting.enable = true;
|
||||
|
||||
shellAliases = {
|
||||
ll = "ls -l";
|
||||
update = "sudo nixos-rebuild switch";
|
||||
};
|
||||
history.size = 10000;
|
||||
history.path = "${config.xdg.dataHome}/zsh/history";
|
||||
oh-my-zsh = {
|
||||
|
||||
@@ -32,18 +32,19 @@ in {
|
||||
pkgs.docker
|
||||
pkgs.docker-compose
|
||||
pkgs.drawio
|
||||
pkgs.feh
|
||||
pkgs.ffmpeg
|
||||
pkgs.firefox
|
||||
pkgs.gimp
|
||||
pkgs.git
|
||||
pkgs.insomnia
|
||||
pkgs.kicad
|
||||
pkgs.krita
|
||||
pkgs.libreoffice
|
||||
pkgs.lutris
|
||||
pkgs.mosquitto
|
||||
pkgs.mpv
|
||||
pkgs.mupdf
|
||||
pkgs.nh
|
||||
pkgs.nix-index
|
||||
pkgs.nix-output-monitor
|
||||
pkgs.obsidian
|
||||
@@ -53,7 +54,6 @@ in {
|
||||
pkgs.ranger
|
||||
pkgs.sops
|
||||
pkgs.spotify
|
||||
pkgs.unstable.nh
|
||||
pkgs.vim
|
||||
pkgs.vlc
|
||||
pkgs.vscode
|
||||
|
||||
Reference in New Issue
Block a user