Skip to content

Commit

Permalink
laptop changes
Browse files Browse the repository at this point in the history
  • Loading branch information
rasmus-kirk committed Oct 8, 2024
1 parent eaf6fdd commit 8ab482f
Show file tree
Hide file tree
Showing 6 changed files with 71 additions and 17 deletions.
37 changes: 37 additions & 0 deletions configurations/home-manager/work/home.nix
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,31 @@ in {
};
};

xdg.desktopEntries = with pkgs.lib; {
zathura = {
name = "Zathura";
exec = "${getExe pkgs.zathura} %U";
#mimeType = [ "application/pdf" ];
};
yazi = {
name = "Yazi";
exec = "${getExe pkgs.foot} ${getExe pkgs.yazi} %u";
mimeType = [ "inode/directory" ];
};
};

xdg.mimeApps = {
enable = true;
defaultApplications = {
"application/pdf" = [ "zathura.desktop" ];
"inode/directory" = [ "yazi.desktop" ];
"x-scheme-handler/about" = [ "librewolf.desktop" ];
"x-scheme-handler/http" = [ "librewolf.desktop" ];
"x-scheme-handler/https" = [ "librewolf.desktop" ];
"x-scheme-handler/unknown" = [ "librewolf.desktop" ];
};
};

programs.zsh.profileExtra = ''
export PATH=$PATH:~/.cargo/bin:~/.local/bin
Expand Down Expand Up @@ -198,5 +223,17 @@ in {
# Misc Terminal Tools
wl-clipboard
yt-dlp

(pkgs.writeShellApplication {
name = "concordium-test-smart-contracts";
text = ''
CONCORDIUM_STD_PATH="$HOME/desktop/concordium/concordium-rust-smart-contracts/concordium-std"
CARGO_CONCORDIUM_PATH="$HOME/desktop/concordium/concordium-smart-contract-tools/cargo-concordium/Cargo.toml"
pushd "$CONCORDIUM_STD_PATH"
cargo run --manifest-path "$CARGO_CONCORDIUM_PATH" -- concordium test --only-unit-tests -- --features internal-wasm-test
popd
'';
})
];
}
30 changes: 15 additions & 15 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions modules/home-manager/git/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ in {
su = "status -uno";
};
extraConfig = {
init.defaultBranch = "main";
push = {
autoSetupRemote = true;
};
Expand Down
2 changes: 1 addition & 1 deletion modules/home-manager/helix/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ with lib; let
# Nix
nil
# Rust
rust-analyzer-unwrapped
#rust-analyzer-unwrapped
# Scala
metals
# Makdown
Expand Down
15 changes: 14 additions & 1 deletion modules/home-manager/scripts/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,13 @@ with lib; let
name = "updap";
runtimeInputs = with pkgs; [rsync];
text = ''
set +e
if [ "$EUID" -ne 0 ]; then
echo "Please run as root"
exit
fi
if [[ $# -ne 1 ]]; then
echo "Error: Script takes one argument, the path to the audio directory"
exit 0
Expand Down Expand Up @@ -128,6 +135,11 @@ with lib; let
text = ''
set +e
if [ "$EUID" -ne 0 ]; then
echo "Please run as root"
exit
fi
if [[ $# -ne 1 ]]; then
echo "Error: Script takes one argument, the path to the book directory"
exit 0
Expand Down Expand Up @@ -169,7 +181,8 @@ with lib; let
driveSize=$(lsblk --output LABEL,SIZE | grep "$driveLabel" | grep -Po "[^ \t]*$") &&
echo "$driveUsedSize/$driveSize" &&
echo ""
echo "" ||
echo "Error: Something went wrong!"
else
echo "Error: Kobo not detected!"
fi
Expand Down
3 changes: 3 additions & 0 deletions modules/home-manager/zsh/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ in {
alias rustfmt="cargo +nightly-2023-04-01-x86_64-unknown-linux-gnu fmt"
alias todo="$EDITOR ~/.local/share/todo.md"
alias g="git"
# Fuck ghostscript!
alias gs="git status"
# TODO: this is bad, generalize...
alias t="foot </dev/null &>/dev/null zsh &"
Expand Down

0 comments on commit 8ab482f

Please sign in to comment.