add blahaj hm config
This commit is contained in:
parent
4fb61dfe46
commit
dc66621753
9
hosts/blahaj/chaos.nix
Normal file
9
hosts/blahaj/chaos.nix
Normal file
|
@ -0,0 +1,9 @@
|
|||
{tree, ...}: {
|
||||
imports = with tree.presets.home-manager; [
|
||||
devBase
|
||||
];
|
||||
|
||||
home.username = "chaos";
|
||||
home.homeDirectory = "/home/chaos";
|
||||
home.stateVersion = "24.05";
|
||||
}
|
|
@ -1,3 +1,4 @@
|
|||
inputs: {
|
||||
nixosConfigurations = import ./nixos.nix inputs;
|
||||
homeConfigurations = import ./home-manager.nix inputs;
|
||||
}
|
||||
|
|
44
hosts/home-manager.nix
Normal file
44
hosts/home-manager.nix
Normal 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];
|
||||
};
|
||||
}
|
|
@ -8,7 +8,7 @@
|
|||
hosts = import ./hosts inputs;
|
||||
in
|
||||
{
|
||||
inherit (hosts) nixosConfigurations;
|
||||
inherit (hosts) nixosConfigurations homeConfigurations;
|
||||
}
|
||||
// (inputs.flake-utils.lib.eachDefaultSystem (
|
||||
system: let
|
||||
|
@ -49,6 +49,7 @@ in
|
|||
inherit (pkgs) mk-enc-usb mk-encrypted-drive;
|
||||
inherit (pkgs) gotosocial mpd-headless;
|
||||
inherit (pkgs) kitty-terminfo;
|
||||
inherit (inputs.home-manager-unstable.packages."${system}") home-manager;
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -10,14 +10,16 @@ sudo ${BASH_SOURCE[0]} $@
|
|||
exit
|
||||
fi
|
||||
|
||||
MODE=${1-}
|
||||
if [ -z "${MODE}" ]; then
|
||||
MODE=""
|
||||
if [ -z "${1-}" ]; then
|
||||
MODE=switch
|
||||
else
|
||||
shift
|
||||
fi
|
||||
|
||||
set -x
|
||||
|
||||
sudo cpupower frequency-set -g performance
|
||||
nix build --keep-failed --log-format internal-json -v "${REPO_ROOT}#nixosConfigurations.$(hostname).config.system.build.toplevel" "$@" 2>&1 | nom --json
|
||||
nixos-rebuild --fast --flake "${REPO_ROOT}#$(hostname)" "$MODE" "$@"
|
||||
if command -v nom &> /dev/null; then
|
||||
nixos-rebuild --flake "${REPO_ROOT}#$(hostname)" "$MODE" "$@" --keep-failed --log-format internal-json -v |& nom --json
|
||||
else
|
||||
echo "Install nix-output-monitor for better output"
|
||||
nixos-rebuild --flake "${REPO_ROOT}#$(hostname)" "$MODE" "$@"
|
||||
fi
|
||||
|
|
21
scripts/rebuildHM.sh
Executable file
21
scripts/rebuildHM.sh
Executable 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
|
Loading…
Reference in a new issue