add blahaj hm config

This commit is contained in:
chaos 2024-07-24 16:15:46 +01:00
parent 4fb61dfe46
commit dc66621753
No known key found for this signature in database
7 changed files with 7975 additions and 8 deletions

9
hosts/blahaj/chaos.nix Normal file
View file

@ -0,0 +1,9 @@
{tree, ...}: {
imports = with tree.presets.home-manager; [
devBase
];
home.username = "chaos";
home.homeDirectory = "/home/chaos";
home.stateVersion = "24.05";
}

View file

@ -1,3 +1,4 @@
inputs: { inputs: {
nixosConfigurations = import ./nixos.nix inputs; nixosConfigurations = import ./nixos.nix inputs;
homeConfigurations = import ./home-manager.nix inputs;
} }

44
hosts/home-manager.nix Normal file
View file

@ -0,0 +1,44 @@
{self, ...} @ inputs: let
mkTree = inputs.tree-input.tree;
metaTree = mkTree ((import ../treeConfig.nix {}) // {inherit inputs;});
tree = metaTree.impure;
nixpkgs = inputs.nixpkgs-unstable;
home-manager = inputs.home-manager-unstable;
patchedInputs =
inputs
// {
# set these to the correct versions from inputs
inherit nixpkgs home-manager;
};
specialArgs = {
inherit self;
tree = metaTree.impure;
pureTree = metaTree.pure;
inputs = patchedInputs;
};
defaultModules = [
tree.profiles.home-manager.base
tree.modules.home.vscode-mod-module
];
pkgsFor = system:
import nixpkgs {
inherit system;
config.allowUnfree = true;
overlays = [
(import ../overlay)
];
};
in rec {
"blahaj-chaos" = home-manager.lib.homeManagerConfiguration {
pkgs = pkgsFor "x86_64-linux";
extraSpecialArgs = specialArgs;
modules = defaultModules ++ [./blahaj/chaos.nix];
};
}

7889
nom Normal file

File diff suppressed because it is too large Load diff

View file

@ -8,7 +8,7 @@
hosts = import ./hosts inputs; hosts = import ./hosts inputs;
in in
{ {
inherit (hosts) nixosConfigurations; inherit (hosts) nixosConfigurations homeConfigurations;
} }
// (inputs.flake-utils.lib.eachDefaultSystem ( // (inputs.flake-utils.lib.eachDefaultSystem (
system: let system: let
@ -49,6 +49,7 @@ in
inherit (pkgs) mk-enc-usb mk-encrypted-drive; inherit (pkgs) mk-enc-usb mk-encrypted-drive;
inherit (pkgs) gotosocial mpd-headless; inherit (pkgs) gotosocial mpd-headless;
inherit (pkgs) kitty-terminfo; inherit (pkgs) kitty-terminfo;
inherit (inputs.home-manager-unstable.packages."${system}") home-manager;
}; };
} }

View file

@ -10,14 +10,16 @@ sudo ${BASH_SOURCE[0]} $@
exit exit
fi fi
MODE=${1-} MODE=""
if [ -z "${MODE}" ]; then if [ -z "${1-}" ]; then
MODE=switch MODE=switch
else
shift
fi fi
set -x
sudo cpupower frequency-set -g performance if command -v nom &> /dev/null; then
nix build --keep-failed --log-format internal-json -v "${REPO_ROOT}#nixosConfigurations.$(hostname).config.system.build.toplevel" "$@" 2>&1 | nom --json nixos-rebuild --flake "${REPO_ROOT}#$(hostname)" "$MODE" "$@" --keep-failed --log-format internal-json -v |& nom --json
nixos-rebuild --fast --flake "${REPO_ROOT}#$(hostname)" "$MODE" "$@" else
echo "Install nix-output-monitor for better output"
nixos-rebuild --flake "${REPO_ROOT}#$(hostname)" "$MODE" "$@"
fi

21
scripts/rebuildHM.sh Executable file
View file

@ -0,0 +1,21 @@
#!/usr/bin/env bash
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
REPO_ROOT="${SCRIPT_DIR}/.."
cd $REPO_ROOT
MODE=${1-}
if [ -z "${MODE}" ]; then
MODE=switch
else
shift
fi
if command -v nom &> /dev/null; then
nix build "${REPO_ROOT}#homeConfigurations.$(hostname)-$(whoami).activationPackage" "$@" --keep-failed --log-format internal-json -v |& nom --json
./activate
else
echo "Install nix-output-monitor for better output"
nix run .#home-manager -- --flake "${REPO_ROOT}#$(hostname)-$(whoami)"
fi