1
0
Fork 0
forked from Bun/nixos-config

The big variable overhaul

This commit is contained in:
Jimbo 2024-09-23 16:22:01 -04:00
parent 3f0a235dc8
commit 6dab8fc029
36 changed files with 269 additions and 326 deletions

View file

@ -1,8 +1,5 @@
{pkgs, config, ...}: {
programs.zsh = let
auth = import ../common/auth.nix;
nixcfg = import ../common/nixcfg.nix;
in {
{pkgs, config, outputs, ...}: {
programs.zsh = {
enable = true;
autosuggestion.enable = true;
syntaxHighlighting.enable = true;
@ -13,14 +10,14 @@
};
shellAliases = {
# NixOS aliases
nixcfg = "${nixcfg.open}";
nixclean = "${auth.method} nix-store --gc; nix-collect-garbage -d";
nixpurge = "${auth.method} nix-collect-garbage --delete-old";
nixoptimize = "${auth.method} nix store optimise";
nixcfg = "${outputs.cmd.nixcfg}";
nixclean = "${outputs.cmd.auth} nix-store --gc; nix-collect-garbage -d";
nixpurge = "${outputs.cmd.auth} nix-collect-garbage --delete-old";
nixoptimize = "${outputs.cmd.auth} nix store optimise";
# Flake commands
flakedate = "${auth.method} nix flake update /etc/nixos";
sysswitch = "${auth.method} nixos-rebuild switch --flake /etc/nixos";
flakedate = "${outputs.cmd.auth} nix flake update /etc/nixos";
sysswitch = "${outputs.cmd.auth} nixos-rebuild switch --flake /etc/nixos";
homeswitch = "home-manager switch --flake /etc/nixos";
nixswitch = "sysswitch; homeswitch";
nixdate = "flakedate && sysswitch; homeswitch";