From 1d438b291dbf436a201e5f3c77ee32383868d73f Mon Sep 17 00:00:00 2001 From: Ivan Kirilov Dimitrov Date: Sat, 3 Aug 2024 15:41:51 +0200 Subject: [PATCH] nice root shell --- flake.lock | 6 +++--- home/modules/default.nix | 3 --- nixos/configs/default.nix | 2 +- nixos/modules/default.nix | 28 ++++++++++++++++++++++++++++ 4 files changed, 32 insertions(+), 7 deletions(-) diff --git a/flake.lock b/flake.lock index bdc8a71..d7d30db 100644 --- a/flake.lock +++ b/flake.lock @@ -377,11 +377,11 @@ "systems": "systems_2" }, "locked": { - "lastModified": 1722536391, - "narHash": "sha256-LAL00y8IMU1I2IMTy4q8vlBW+hS6ulElh1kX+CWJgSo=", + "lastModified": 1722691995, + "narHash": "sha256-TWpmjsNJN75sHfAfsFTlhSl2t5ZQtoRTthu2XfaFnpw=", "owner": "ivandimitrov8080", "repo": "flake-ide", - "rev": "24a89c8ed56a635683decec0e0d43b132c404150", + "rev": "c3a2cc3f24a854ad91513f1692607764ee9e6b8e", "type": "github" }, "original": { diff --git a/home/modules/default.nix b/home/modules/default.nix index e2819a8..cdea3b9 100644 --- a/home/modules/default.nix +++ b/home/modules/default.nix @@ -111,9 +111,6 @@ toplevel@{ moduleWithSystem, ... }: { ls = "eza"; la = "eza --all"; lt = "eza --git-ignore --all --tree --level=10"; - torrent = "transmission-remote"; - torrent-start = "transmission-daemon"; - vi = "nvim"; sc = "systemctl"; neofetch = "${pkgs.fastfetch}/bin/fastfetch -c all.jsonc"; }; diff --git a/nixos/configs/default.nix b/nixos/configs/default.nix index 8f06168..3132d04 100644 --- a/nixos/configs/default.nix +++ b/nixos/configs/default.nix @@ -3,7 +3,7 @@ let system = "x86_64-linux"; mods = toplevel.config.flake.nixosModules; hardwareConfigurations = toplevel.config.flake.hardwareConfigurations; - essential = with mods; [ grub base security wireless wireguard ]; + essential = with mods; [ grub base shell security wireless wireguard ]; desktop = with mods; [ sound wayland ]; configWithModules = { hardware, modules }: withSystem system (ctx@{ config, inputs', pkgs, ... }: inputs.nixpkgs.lib.nixosSystem { specialArgs = { diff --git a/nixos/modules/default.nix b/nixos/modules/default.nix index 0d522cb..506d06e 100644 --- a/nixos/modules/default.nix +++ b/nixos/modules/default.nix @@ -31,6 +31,34 @@ top@{ inputs, moduleWithSystem, ... }: { }; networking = { stevenBlackHosts = { enable = true; blockFakenews = true; blockGambling = true; blockSocial = true; }; }; }); + shell = moduleWithSystem (toplevel@{ ... }: perSystem@{ pkgs, ... }: { + programs = { + starship.enable = true; + zsh = { + enableBashCompletion = true; + syntaxHighlighting.enable = true; + autosuggestions = { + enable = true; + strategy = [ "completion" ]; + }; + shellAliases = { + cal = "cal $(date +%Y)"; + GG = "git add . && git commit -m 'GG' && git push --set-upstream origin HEAD"; + gad = "git add . && git diff --cached"; + gac = "ga && gc"; + ga = "git add ."; + gc = "git commit"; + dev = "nix develop --command $SHELL"; + eza = "${pkgs.eza}/bin/eza '--long' '--header' '--icons' '--smart-group' '--mounts' '--octal-permissions' '--git'"; + ls = "eza"; + la = "eza --all"; + lt = "eza --git-ignore --all --tree --level=10"; + sc = "systemctl"; + neofetch = "${pkgs.fastfetch}/bin/fastfetch -c all.jsonc"; + }; + }; + }; + }); sound = moduleWithSystem (toplevel@{ ... }: perSystem@{ pkgs, ... }: { services = { pipewire = { enable = true; alsa.enable = true; pulse.enable = true; }; }; environment.systemPackages = with pkgs; [ pwvucontrol ];