diff --git a/configs/bash.nix b/configs/bash.nix index 56c7e42..8cedc47 100644 --- a/configs/bash.nix +++ b/configs/bash.nix @@ -1,7 +1,7 @@ -{ +{pkgs, ...}: { programs.bash = { promptInit = '' - PS1="$(tput bold)\w \$([[ \$? == 0 ]] && echo \"\[\033[1;32m\]\" || echo \"\[\033[1;31m\]\")\$$(tput sgr0) "''; + PS1="$(${pkgs.ncurses}/bin/tput bold)\w \$([[ \$? == 0 ]] && echo \"\[\033[1;32m\]\" || echo \"\[\033[1;31m\]\")\$$(${pkgs.ncurses}/bin/tput sgr0) "''; interactiveShellInit = '' set -o vi ''; diff --git a/flake.nix b/flake.nix index 07bd155..40eb2de 100644 --- a/flake.nix +++ b/flake.nix @@ -32,6 +32,7 @@ menstruation-telegram.inputs.menstruation-backend.follows = "menstruation-backend"; menstruation-telegram.inputs.nixpkgs.follows = "nixpkgs-old"; nix-on-droid.inputs.nixpkgs.follows = "nixpkgs"; + nix-on-droid.inputs.home-manager.follows = "home-manager"; nixinate.inputs.nixpkgs.follows = "nixpkgs"; recht.inputs.flake-utils.follows = "flake-utils"; recht.inputs.nixpkgs.follows = "nixpkgs"; @@ -106,8 +107,13 @@ }; nixOnDroidConfigurations = { - motoG5 = nix-on-droid.lib.nixOnDroidConfiguration { + moto-g5 = nix-on-droid.lib.nixOnDroidConfiguration { modules = [systems/moto-g5/configuration.nix]; + pkgs = import nixpkgs { + system = "aarch64-linux"; + overlays = [nix-on-droid.overlays.default]; + }; + home-manager-path = home-manager.outPath; }; }; diff --git a/systems/moto-g5/configuration.nix b/systems/moto-g5/configuration.nix index edcd641..1f569ca 100644 --- a/systems/moto-g5/configuration.nix +++ b/systems/moto-g5/configuration.nix @@ -11,6 +11,7 @@ in { openssh curl findutils + coreutils utillinux gnugrep gnused @@ -27,6 +28,22 @@ in { '') ]; + home-manager = { + useGlobalPkgs = true; + backupFileExtension = "hm-bak"; + config = {pkgs, ...}: { + home.stateVersion = "23.05"; + programs.bash = { + enable = true; + profileExtra = '' + ${(import ../../configs/bash.nix {inherit pkgs;}).programs.bash.promptInit} + ''; + }; + }; + }; + + user.shell = "${pkgs.bash}/bin/bash"; + environment.etcBackupExtension = ".bak"; system.stateVersion = "23.05";