From ce81f4fef6dc5ab579af553bad7e0500a281b1d3 Mon Sep 17 00:00:00 2001 From: Henry Hiles Date: Sat, 1 Jul 2023 19:04:05 -0400 Subject: [PATCH] Add more aliases --- common.nix | 33 ++++++++++++++++++++++++--------- flake.nix | 5 ++++- home-manager/bat.nix | 14 +++++++------- quadraticpc/configuration.nix | 8 ++++---- 4 files changed, 39 insertions(+), 21 deletions(-) diff --git a/common.nix b/common.nix index 28683aa..b6f9d20 100755 --- a/common.nix +++ b/common.nix @@ -22,34 +22,49 @@ environment = { etc = { - "programs.sqlite".source = inputs.programsdb.packages.${pkgs.system}.programs-sqlite; - "backup".source = self; + "programs.sqlite".source = inputs.programsdb.packages.${pkgs.system}.programs-sqlite; + "backup".source = self; }; shells = [pkgs.fish]; shellAliases = { - free = "free -h"; + # Utility cat = "bat"; + rm = "rmtrash"; + free = "free -h"; + ping = "prettyping"; + shutdown = "shutdown now"; + ls = "exa -a --color=always --group-directories-first --icons"; - # NixOS Helper Aliases - config = "$EDITOR ~/.config/nixos/$(hostname)/configuration.nix"; + # Git + clone = "gh repo clone"; + create = "gh repo create"; + + push = "git push"; + commit = "git add -A && git commit -am"; + + # NixOS + garbage = "sudo nix-collect-garbage -d"; flake = "$EDITOR ~/.config/nixos/flake.nix"; common = "$EDITOR ~/.config/nixos/common.nix"; - stylix = "$EDITOR ~/.config/nixos/$(hostname)/stylix.nix"; - home-manager = "$EDITOR ~/.config/nixos/$(hostname)/home-manager.nix"; format = "cd ~/.config/nixos/ && nix fmt; cd -"; + stylix = "$EDITOR ~/.config/nixos/$(hostname)/stylix.nix"; rebuild = "sudo nixos-rebuild switch --flake ~/.config/nixos/#"; - garbage = "sudo nix-collect-garbage -d"; + config = "$EDITOR ~/.config/nixos/$(hostname)/configuration.nix"; + home-manager = "$EDITOR ~/.config/nixos/$(hostname)/home-manager.nix"; }; systemPackages = with pkgs; [ + exa micro + rmtrash + prettyping ]; }; + security.rtkit.enable = true; nixpkgs.config.allowUnfree = true; time.timeZone = "America/Toronto"; i18n.defaultLocale = "en_CA.UTF-8"; hardware.pulseaudio.enable = false; nix.settings.experimental-features = ["nix-command" "flakes"]; - security.rtkit.enable = true; } diff --git a/flake.nix b/flake.nix index f8fa62c..6c42f7c 100755 --- a/flake.nix +++ b/flake.nix @@ -22,7 +22,10 @@ system = hostname: nixpkgs.lib.nixosSystem { system = "x86_64-linux"; - specialArgs = {inherit inputs; inherit self;}; + specialArgs = { + inherit inputs; + inherit self; + }; modules = [ "${self}/${hostname}/configuration.nix" diff --git a/home-manager/bat.nix b/home-manager/bat.nix index 82a624d..821f8cc 100644 --- a/home-manager/bat.nix +++ b/home-manager/bat.nix @@ -1,9 +1,9 @@ { - programs.bat = { - enable = true; - config = { - theme = "TwoDark"; - italic-text = "always"; - }; - }; + programs.bat = { + enable = true; + config = { + theme = "TwoDark"; + italic-text = "always"; + }; + }; } diff --git a/quadraticpc/configuration.nix b/quadraticpc/configuration.nix index 3de89cc..8c260c5 100755 --- a/quadraticpc/configuration.nix +++ b/quadraticpc/configuration.nix @@ -92,10 +92,10 @@ steam = { enable = true; # package = pkgs.symlinkJoin { - # name = pkgs.steam.name; - # paths = [pkgs.steam]; - # buildInputs = [pkgs.makeWrapper]; - # postBuild = ''wrapProgram $out/bin/steam --add-flags "-gamepadui"''; + # name = pkgs.steam.name; + # paths = [pkgs.steam]; + # buildInputs = [pkgs.makeWrapper]; + # postBuild = ''wrapProgram $out/bin/steam --add-flags "-gamepadui"''; # }; }; fish.interactiveShellInit = "neowofetch";