Compare commits

..

No commits in common. "160f3ab303eddb4c018360190e7c73d7335049d1" and "e78028c2d36afc186b1d5ed2d7c3717c98df78db" have entirely different histories.

6 changed files with 83 additions and 34 deletions

View File

@ -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 # TODO: nix options should be joint for darwin and nix-os
nix.gc = { nix.gc = {
@ -92,8 +90,6 @@ in
coreutils coreutils
git git
zulu8 # for minecraft
home-manager home-manager
keepassxc keepassxc
@ -106,8 +102,6 @@ in
hexfiend hexfiend
inkscape inkscape
pkgs-unsupported.prismlauncher
wireshark wireshark
]; ];

View File

@ -1,12 +1,83 @@
#!/bin/zsh #!/bin/zsh
export PATH="$HOME/.cargo/bin:$PATH" export PATH="$HOME/.cargo/bin:$PATH"
export PATH="/Applications/ARM/bin:$PATH"
alias ls="ls --color=auto" 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 py="python"
alias ipy="ipython" alias ipy="ipython"
alias c="cargo" alias c="cargo"
alias bqn="rlwrap BQN"
alias nix-zsh="nix-shell --run zsh"
alias z=nix-zsh
dev() { _BLUE="\033[38;5;4m"
nix develop ".#${1:-default}" -c "$SHELL" _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"

View File

@ -38,7 +38,6 @@
outputs = { self, nixpkgs, home-manager, nix-darwin, kak, unispect, ansi-utils, unambig-path, nixos-apple-silicon }: outputs = { self, nixpkgs, home-manager, nix-darwin, kak, unispect, ansi-utils, unambig-path, nixos-apple-silicon }:
let let
mkPkgs = system: import nixpkgs { system = system; config.allowUnfree = true; }; 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 { mkHome = {username, home-dir, prompt-color, system, pkgs} : import ./home/common.nix {
inherit username home-dir prompt-color pkgs; inherit username home-dir prompt-color pkgs;
@ -54,8 +53,8 @@
inherit pkgs; inherit pkgs;
}; };
mkDarwin = {system, pkgs, pkgs-unsupported}: import ./darwin.nix { mkDarwin = {system, pkgs}: import ./darwin.nix {
inherit system pkgs pkgs-unsupported; inherit system pkgs;
nixpkgs-flake = nixpkgs; nixpkgs-flake = nixpkgs;
}; };
@ -89,8 +88,7 @@
let let
system = "aarch64-darwin"; system = "aarch64-darwin";
pkgs = mkPkgs system; pkgs = mkPkgs system;
pkgs-unsupported = mkPkgsUnsupported system; darwin = mkDarwin { inherit system pkgs; };
darwin = mkDarwin { inherit system pkgs pkgs-unsupported; };
in nix-darwin.lib.darwinSystem { in nix-darwin.lib.darwinSystem {
modules = [ darwin ]; modules = [ darwin ];
}; };

View File

@ -54,7 +54,7 @@ esac";
}; };
mouse.hide_when_typing = stdenv.isDarwin; mouse.hide_when_typing = stdenv.isDarwin;
font = { font = {
normal.family = "uzura_font"; normal.family = "SAX2";
size = font-size; size = font-size;
}; };
colors.primary = { colors.primary = {

View File

@ -95,11 +95,14 @@ in rec {
echo -en "%{\033[0m\033[38:5:''${BG}m%}" echo -en "%{\033[0m\033[38:5:''${BG}m%}"
echo -en "%{\033[0m%} "; echo -en "%{\033[0m%} ";
)' )'
setopt prompt_subst
'' ''
+ builtins.readFile ../dotfiles/zshrc; + builtins.readFile ../dotfiles/zshrc;
}; };
home.shellAliases = {
dev = "nix develop -c $SHELL";
};
programs.direnv = { programs.direnv = {
enable = true; enable = true;
enableZshIntegration = true; enableZshIntegration = true;
@ -170,7 +173,6 @@ in rec {
pull.ff = "only"; pull.ff = "only";
pull.rebase = true; pull.rebase = true;
core.editor = "kak"; core.editor = "kak";
core.fileMode = false; # don't track changes to file modes
}; };
}; };
} }

View File

@ -95,24 +95,8 @@ rec {
sha256 = "sha256-tZnDoxZnIrZkTwjOTUjGcqLaXtdZ2Tl6gcRXMclT6PY="; 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 = [ all = [
qr-generator qr-paste qr-generator qr-paste
sax2 manrope metrophobic cleanvertising stencila uzura sax2 manrope metrophobic cleanvertising stencila
]; ];
} }