misc: update and refactor

This commit is contained in:
Gabriel Arazas 2022-08-13 08:31:09 +08:00
parent 99a241e686
commit 08160eb827
6 changed files with 56 additions and 32 deletions

View File

@ -78,7 +78,7 @@
# The order here is important(?).
overlays = [
# Put my custom packages to be available.
(final: prev: import ./pkgs { pkgs = prev; })
self.overlays.default
# Putting a list for inputs without overlays.
(final: prev: {
@ -134,6 +134,8 @@
inputs.guix-overlay.nixosModules.guix-binary
];
environment.extraOutputsToInstall = [ "doc" "devdoc" "info" ];
# Bleeding edge, baybee!
nix.package = pkgs.nixUnstable;

View File

@ -22,10 +22,10 @@ rec {
home.homeDirectory = homeDirectory;
}
(lib.getUser "home-manager" user)
(getUser "home-manager" user)
];
};
users.users."${user}" = defaultUserConfig // settings // absoluteOverrides;
users.users."${user}" = defaultUserConfig // settings // absoluteOverrides;
};
getSecret = path: ../secrets/${path};

View File

@ -17,6 +17,7 @@ in {
home.packages = with pkgs; [
aseprite # Pixel art wannabe tool.
blender # 3D modelling wannabe tool.
emulsion-palette # Manage your color palettes.
inkscape # Illustration wannabe tool.
gimp # Photo editing wannabe tool.
krita # Digital art wannabe tool.

View File

@ -43,34 +43,56 @@ in {
"nvim"
];
bashrcExtra = ''
function f() {
dir=''${1:-$PWD}
dest=$(${pkgs.fd}/bin/fd --type directory --hidden --ignore-vcs --base-directory "$dir" \
| ${pkgs.fzf}/bin/fzf --prompt "Go to directory ")
destPrime=$(${pkgs.coreutils}/bin/realpath --canonicalize-existing --logical "$dir/$dest")
function f() {
dir=''${1:-$PWD}
dest=$(${pkgs.fd}/bin/fd --type directory --ignore-vcs --base-directory "$dir" \
| ${pkgs.fzf}/bin/fzf --prompt "Go to directory ")
destPrime=$(${pkgs.coreutils}/bin/realpath --canonicalize-existing --logical "$dir/$dest")
[ "$dest" ] && cd "$destPrime"
}
[ "$dest" ] && cd "$destPrime"
}
function ff() {
dir=''${1:-$PWD}
dest=$(${pkgs.fd}/bin/fd --hidden --ignore-vcs --base-directory "$dir" \
| ${pkgs.fzf}/bin/fzf --prompt "Open file ")
destPrime=$(${pkgs.coreutils}/bin/realpath --canonicalize-existing --logical "$dir/$dest")
function fh() {
dir=''${1:-$PWD}
dest=$(${pkgs.fd}/bin/fd --type directory --hidden --ignore-vcs --base-directory "$dir" \
| ${pkgs.fzf}/bin/fzf --prompt "Go to directory ")
destPrime=$(${pkgs.coreutils}/bin/realpath --canonicalize-existing --logical "$dir/$dest")
if [ -d "$destPrime" ]; then
[ "$dest" ] && cd "$destPrime";
else
[ "$dest" ] && ${pkgs.xdg-utils}/bin/xdg-open "$destPrime";
fi
}
[ "$dest" ] && cd "$destPrime"
}
function fm() {
${pkgs.man}/bin/man -k . \
| ${pkgs.fzf}/bin/fzf --multi --prompt "Open manpage(s) " \
| ${pkgs.gawk}/bin/awk '{ print $1 "." gensub(/[()]/, "", "g", $2) }' \
| ${pkgs.findutils}/bin/xargs man
}
function ff() {
dir=''${1:-$PWD}
dest=$(${pkgs.fd}/bin/fd --ignore-vcs --base-directory "$dir" \
| ${pkgs.fzf}/bin/fzf --prompt "Open file ")
destPrime=$(${pkgs.coreutils}/bin/realpath --canonicalize-existing --logical "$dir/$dest")
if [ -d "$destPrime" ]; then
[ "$dest" ] && cd "$destPrime";
else
[ "$dest" ] && ${pkgs.xdg-utils}/bin/xdg-open "$destPrime";
fi
}
function ffh() {
dir=''${1:-$PWD}
dest=$(${pkgs.fd}/bin/fd --hidden --ignore-vcs --base-directory "$dir" \
| ${pkgs.fzf}/bin/fzf --prompt "Open file ")
destPrime=$(${pkgs.coreutils}/bin/realpath --canonicalize-existing --logical "$dir/$dest")
if [ -d "$destPrime" ]; then
[ "$dest" ] && cd "$destPrime";
else
[ "$dest" ] && ${pkgs.xdg-utils}/bin/xdg-open "$destPrime";
fi
}
function fm() {
${pkgs.man}/bin/man -k . \
| ${pkgs.fzf}/bin/fzf --multi --prompt "Open manpage(s) " \
| ${pkgs.gawk}/bin/awk '{ print $1 "." gensub(/[()]/, "", "g", $2) }' \
| ${pkgs.findutils}/bin/xargs man
}
'';
};
programs.atuin = {

View File

@ -86,11 +86,8 @@ in {
virt-manager
];
# Enable podman just as my main container runtime or something.
virtualisation.podman = {
enable = true;
dockerCompat = true;
};
# Enable Docker just as my main container runtime or something.
virtualisation.docker.enable = true;
# Enable libvirt for muh qemu.
virtualisation.libvirtd = {

View File

@ -44,6 +44,8 @@ in {
serviceConfig.Type = "oneshot";
};
programs.extra-container.enable = true;
# Enable font-related options for more smoother and consistent experience.
fonts.fontconfig.enable = true;