Compare commits
No commits in common. "160f3ab303eddb4c018360190e7c73d7335049d1" and "e78028c2d36afc186b1d5ed2d7c3717c98df78db" have entirely different histories.
160f3ab303
...
e78028c2d3
|
@ -1,7 +1,5 @@
|
|||
{ system, pkgs, pkgs-unsupported, nixpkgs-flake, ... }:
|
||||
{ system, pkgs, nixpkgs-flake, ... }:
|
||||
|
||||
let prismlauncher = pkgs-unsupported.prismlauncher.override { jdks = [ pkgs.jdk8 pkgs.jdk21 ]; };
|
||||
in
|
||||
{
|
||||
# TODO: nix options should be joint for darwin and nix-os
|
||||
nix.gc = {
|
||||
|
@ -92,8 +90,6 @@ in
|
|||
coreutils
|
||||
git
|
||||
|
||||
zulu8 # for minecraft
|
||||
|
||||
home-manager
|
||||
|
||||
keepassxc
|
||||
|
@ -106,8 +102,6 @@ in
|
|||
hexfiend
|
||||
inkscape
|
||||
|
||||
pkgs-unsupported.prismlauncher
|
||||
|
||||
wireshark
|
||||
];
|
||||
|
||||
|
|
|
@ -1,12 +1,83 @@
|
|||
#!/bin/zsh
|
||||
|
||||
export PATH="$HOME/.cargo/bin:$PATH"
|
||||
export PATH="/Applications/ARM/bin:$PATH"
|
||||
|
||||
alias ls="ls --color=auto"
|
||||
alias bashcols="python3 ~/cloud/Projekt/Programmering/Python/BashCols.py"
|
||||
alias bashcurmov="python3 ~/cloud/Projekt/Programmering/Python/Bashcurmoves.py"
|
||||
alias objdump="objdump -M intel"
|
||||
alias atsc="patscc -cleanaft -DATS_MEMALLOC_LIBC"
|
||||
alias i2="idris2"
|
||||
alias py="python"
|
||||
alias ipy="ipython"
|
||||
alias c="cargo"
|
||||
alias bqn="rlwrap BQN"
|
||||
alias nix-zsh="nix-shell --run zsh"
|
||||
alias z=nix-zsh
|
||||
|
||||
dev() {
|
||||
nix develop ".#${1:-default}" -c "$SHELL"
|
||||
_BLUE="\033[38;5;4m"
|
||||
_GREEN="\033[38;5;2m"
|
||||
_RED="\033[38;5;1m"
|
||||
_RESET="\033[0m"
|
||||
function activate {
|
||||
(
|
||||
cd ~/cloud/Projekt
|
||||
F=$( fd '' -t d -d 4 . | fzf -1 -q "$1" ) || return
|
||||
LINKEE=$(realpath "$F")
|
||||
DEFAULT_NAME=$(basename "$LINKEE")
|
||||
LINK="${2:-${DEFAULT_NAME}}"
|
||||
cd ~/cloud/A-Aktivta
|
||||
if [[ -d "$LINK" ]] then
|
||||
echo "Project ${_BLUE}$LINK${_RESET} already exists!"
|
||||
else
|
||||
echo "${_BLUE}$LINK${_RESET} -> ${_BLUE}$LINKEE${_RESET} has been ${_GREEN}activated${_RESET}"
|
||||
ln -s "$LINKEE" "$LINK"
|
||||
fi
|
||||
)
|
||||
_check_proj_count
|
||||
}
|
||||
|
||||
function _check_proj_count {
|
||||
(
|
||||
cd ~/cloud/A-Aktivta
|
||||
N_FILES=$(ls | wc -l | tr -d ' ')
|
||||
if [[ $N_FILES > 4 ]] then
|
||||
echo "You have $_RED$N_FILES$_RESET active projets. Consider deactivating some"
|
||||
fi
|
||||
)
|
||||
}
|
||||
|
||||
function deactivate {
|
||||
(
|
||||
cd ~/cloud/A-Aktivta
|
||||
F=$( fd '' -t l -d 1 . | fzf -1 -q "$1" ) || return
|
||||
rm "$F"
|
||||
echo "Deactivated $_BLUE$F$RESET"
|
||||
)
|
||||
_check_proj_count
|
||||
}
|
||||
|
||||
function project {
|
||||
pushd >/dev/null
|
||||
cd ~/cloud/A-Aktivta
|
||||
PROJ_NAME=$( fd '' -t l -d 1 . | fzf -1 -q "$1" ) || { popd >/dev/null ; return }
|
||||
F=$(realpath "$PROJ_NAME")
|
||||
|
||||
echo "In $_BLUE${PROJ_NAME}$_RESET"
|
||||
cd "$F"
|
||||
_check_proj_count
|
||||
}
|
||||
|
||||
alias p=project
|
||||
|
||||
setopt prompt_subst
|
||||
|
||||
# export RPROMPT='%(?.%F{green}√.%?%F{red}?)%f'
|
||||
|
||||
# tmux stuff
|
||||
function setwd {
|
||||
tmux command-prompt -I "attach -c $(pwd)"
|
||||
}
|
||||
|
||||
alias nix-zsh="nix-shell --run zsh"
|
||||
|
|
|
@ -38,7 +38,6 @@
|
|||
outputs = { self, nixpkgs, home-manager, nix-darwin, kak, unispect, ansi-utils, unambig-path, nixos-apple-silicon }:
|
||||
let
|
||||
mkPkgs = system: import nixpkgs { system = system; config.allowUnfree = true; };
|
||||
mkPkgsUnsupported = system: import nixpkgs { system = system; config.allowUnfree = true; config.allowUnsupportedSystem = true; };
|
||||
mkHome = {username, home-dir, prompt-color, system, pkgs} : import ./home/common.nix {
|
||||
inherit username home-dir prompt-color pkgs;
|
||||
|
||||
|
@ -54,8 +53,8 @@
|
|||
inherit pkgs;
|
||||
};
|
||||
|
||||
mkDarwin = {system, pkgs, pkgs-unsupported}: import ./darwin.nix {
|
||||
inherit system pkgs pkgs-unsupported;
|
||||
mkDarwin = {system, pkgs}: import ./darwin.nix {
|
||||
inherit system pkgs;
|
||||
nixpkgs-flake = nixpkgs;
|
||||
};
|
||||
|
||||
|
@ -89,8 +88,7 @@
|
|||
let
|
||||
system = "aarch64-darwin";
|
||||
pkgs = mkPkgs system;
|
||||
pkgs-unsupported = mkPkgsUnsupported system;
|
||||
darwin = mkDarwin { inherit system pkgs pkgs-unsupported; };
|
||||
darwin = mkDarwin { inherit system pkgs; };
|
||||
in nix-darwin.lib.darwinSystem {
|
||||
modules = [ darwin ];
|
||||
};
|
||||
|
|
|
@ -54,7 +54,7 @@ esac";
|
|||
};
|
||||
mouse.hide_when_typing = stdenv.isDarwin;
|
||||
font = {
|
||||
normal.family = "uzura_font";
|
||||
normal.family = "SAX2";
|
||||
size = font-size;
|
||||
};
|
||||
colors.primary = {
|
||||
|
|
|
@ -95,11 +95,14 @@ in rec {
|
|||
echo -en "%{\033[0m\033[38:5:''${BG}m%}"
|
||||
echo -en "%{\033[0m%} ";
|
||||
)'
|
||||
setopt prompt_subst
|
||||
''
|
||||
+ builtins.readFile ../dotfiles/zshrc;
|
||||
};
|
||||
|
||||
home.shellAliases = {
|
||||
dev = "nix develop -c $SHELL";
|
||||
};
|
||||
|
||||
programs.direnv = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
|
@ -170,7 +173,6 @@ in rec {
|
|||
pull.ff = "only";
|
||||
pull.rebase = true;
|
||||
core.editor = "kak";
|
||||
core.fileMode = false; # don't track changes to file modes
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -95,24 +95,8 @@ rec {
|
|||
sha256 = "sha256-tZnDoxZnIrZkTwjOTUjGcqLaXtdZ2Tl6gcRXMclT6PY=";
|
||||
};
|
||||
|
||||
uzura = pkgs.fetchurl {
|
||||
name = "uzura";
|
||||
url = "http://azukifont.com/font/uzurafont100.zip";
|
||||
|
||||
downloadToTemp = true;
|
||||
recursiveHash = true;
|
||||
|
||||
postFetch = ''
|
||||
mkdir -p $out/share/fonts/opentype
|
||||
${pkgs.unzip}/bin/unzip -j $downloadedFile 'uzurafont100/uzura.ttf' -d $out/share/fonts/opentype
|
||||
'';
|
||||
|
||||
sha256 = "sha256-FXkb7JQ+CYAKnOgIkeOxPovjVfIOn3xUQHWUT2oCIEM=";
|
||||
};
|
||||
|
||||
|
||||
all = [
|
||||
qr-generator qr-paste
|
||||
sax2 manrope metrophobic cleanvertising stencila uzura
|
||||
sax2 manrope metrophobic cleanvertising stencila
|
||||
];
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user