From 06101a3e352121b9edb6ce1049e0bd8052b98815 Mon Sep 17 00:00:00 2001 From: Lyes Saadi Date: Thu, 14 Aug 2025 18:45:01 +0200 Subject: [PATCH] Further nixifying the shell --- flake.lock | 12 ++++++------ hosts/lyes-pc/default.nix | 2 +- modules/common/system.nix | 4 ++-- users/lyes/desktop/dconf.nix | 25 +++++++++++-------------- users/lyes/home/default.nix | 5 +++-- users/lyes/home/home.nix | 17 +++++++++++++++++ users/lyes/home/shells/default.nix | 8 ++++++++ users/lyes/home/shells/fish.nix | 29 +++++++++++++++++++++++++++++ users/lyes/home/shells/starship.nix | 9 +++++++++ 9 files changed, 86 insertions(+), 25 deletions(-) create mode 100644 users/lyes/home/shells/default.nix create mode 100644 users/lyes/home/shells/fish.nix create mode 100644 users/lyes/home/shells/starship.nix diff --git a/flake.lock b/flake.lock index 1f8c466..1e8e52a 100644 --- a/flake.lock +++ b/flake.lock @@ -93,11 +93,11 @@ ] }, "locked": { - "lastModified": 1754842705, - "narHash": "sha256-2vvncPLsBWV6dRM5LfGHMGYZ+vzqRDqSPBzxPAS0R/A=", + "lastModified": 1754924470, + "narHash": "sha256-asI/or9AcUMydwzodCgpHGytnMSNUlciw3uaycpXm4E=", "owner": "nix-community", "repo": "home-manager", - "rev": "91586008a23c01cc32894ee187dca8c0a7bd20a4", + "rev": "67393957c27b4e4c6c48a60108a201413ced7800", "type": "github" }, "original": { @@ -258,11 +258,11 @@ "nixpkgs": "nixpkgs_2" }, "locked": { - "lastModified": 1754857314, - "narHash": "sha256-taPsifiPMop6kydjYJEge3JmIzf/cRHL12NRrMOJQ6E=", + "lastModified": 1754887481, + "narHash": "sha256-tVUL4zteseaPi1E9pymhJGYgnJZjGzHLzBUnP1CQbcU=", "owner": "0xc000022070", "repo": "zen-browser-flake", - "rev": "31c82886eda8ba3ea7f97db91ced74f5bf741c12", + "rev": "72e1881d340fec7e418207ac292118179c89eea6", "type": "github" }, "original": { diff --git a/hosts/lyes-pc/default.nix b/hosts/lyes-pc/default.nix index 844a80f..290dea2 100644 --- a/hosts/lyes-pc/default.nix +++ b/hosts/lyes-pc/default.nix @@ -36,5 +36,5 @@ # Before changing this value read the documentation for this option # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). system.stateVersion = "22.11"; # Did you read the comment? - home-manager.users.lyes.home.stateVersion = config.system.stateVersion; + # home-manager.users.lyes.home.stateVersion = config.system.stateVersion; } diff --git a/modules/common/system.nix b/modules/common/system.nix index 224dc65..f62bf03 100644 --- a/modules/common/system.nix +++ b/modules/common/system.nix @@ -2,8 +2,8 @@ { # Time - # time.timeZone = "Europe/Paris"; - time.timeZone = "Africa/Tunis"; + time.timeZone = "Europe/Paris"; + # time.timeZone = "Africa/Tunis"; # Locale i18n.defaultLocale = "fr_FR.UTF-8"; diff --git a/users/lyes/desktop/dconf.nix b/users/lyes/desktop/dconf.nix index ff0e89e..ed8c881 100644 --- a/users/lyes/desktop/dconf.nix +++ b/users/lyes/desktop/dconf.nix @@ -1,18 +1,7 @@ -{ pkgs, lib, ... }: +{ lib, ... }: with lib.hm.gvariant; -let - extensions = with pkgs.gnomeExtensions; [ - appindicator - dash-to-panel - caffeine - blur-my-shell - vitals - gsconnect - weather-oclock - ]; -in { dconf.settings = { # Gnome Settings @@ -86,8 +75,16 @@ in ## Shell & Extensions "org/gnome/shell" = { disable-user-extensions = false; - enabled-extensions = map (x: x.extensionUuid) extensions; - favorite-apps = [ "zen-beta.desktop" "thunderbird.desktop" "vesktop.desktop" "element-desktop.desktop" "org.signal.Signal.desktop" "com.github.xeco23.WasIstLos.desktop" "org.gnome.Nautilus.desktop" ]; + favorite-apps = + [ + "zen-beta.desktop" + "thunderbird.desktop" + "vesktop.desktop" + "element-desktop.desktop" + "org.signal.Signal.desktop" + "org.gnome.Nautilus.desktop" + "org.gnome.Console.desktop" + ]; last-selected-power-profile = "power-saver"; remember-mount-password = true; }; diff --git a/users/lyes/home/default.nix b/users/lyes/home/default.nix index ad8e228..1bdba1f 100644 --- a/users/lyes/home/default.nix +++ b/users/lyes/home/default.nix @@ -1,4 +1,4 @@ -{ home-manager, ... }: +{ home-manager, config, ... }: { imports = @@ -13,12 +13,13 @@ imports = [ ./editors + ./shells ./home.nix ]; home.username = "lyes"; home.homeDirectory = "/home/lyes"; - home.stateVersion = "22.11"; + home.stateVersion = config.system.stateVersion; }; } diff --git a/users/lyes/home/home.nix b/users/lyes/home/home.nix index 1e8b851..8a0088a 100644 --- a/users/lyes/home/home.nix +++ b/users/lyes/home/home.nix @@ -22,6 +22,23 @@ }; }; + # Eza config + programs.eza = { + enable = true; + git = true; + icons = "always"; + colors = "always"; + enableFishIntegration = true; + }; + + # Bat config + programs.bat = { + enable = true; + config = { + theme = "gruvbox-dark"; + }; + }; + # Protonup config home.sessionVariables = { STEAM_EXTRA_COMPAT_TOOLS_PATHS = diff --git a/users/lyes/home/shells/default.nix b/users/lyes/home/shells/default.nix new file mode 100644 index 0000000..c1d9de8 --- /dev/null +++ b/users/lyes/home/shells/default.nix @@ -0,0 +1,8 @@ +{ ... }: + +{ + imports = [ + ./fish.nix + ./starship.nix + ]; +} diff --git a/users/lyes/home/shells/fish.nix b/users/lyes/home/shells/fish.nix new file mode 100644 index 0000000..52b0371 --- /dev/null +++ b/users/lyes/home/shells/fish.nix @@ -0,0 +1,29 @@ +{ pkgs, ... }: + +{ + programs.fish = { + enable = true; + + generateCompletions = true; + + plugins = + [ + { + name = "fishbang"; + src = pkgs.fetchFromGitHub { + name = "fishbang"; + owner = "BrewingWeasel"; + repo = "fishbang"; + rev = "master"; + sha256 = "sha256-VHtjt3Xobvs0DTXJ1mFU8i84EEsNQv3yqbhjs7c1mNE="; + }; + } + ]; + + shellAliases = { + ls = "eza"; + cat = "bat"; + grep = "rg"; + }; + }; +} diff --git a/users/lyes/home/shells/starship.nix b/users/lyes/home/shells/starship.nix new file mode 100644 index 0000000..73402a7 --- /dev/null +++ b/users/lyes/home/shells/starship.nix @@ -0,0 +1,9 @@ +{ ... }: + +{ + programs.starship = { + enable = true; + enableInteractive = true; + enableFishIntegration = true; + }; +}