second home

This commit is contained in:
Sridhar Ratnakumar 2021-09-12 18:37:47 -04:00
parent 170bc60696
commit 2c859d5704
3 changed files with 12 additions and 15 deletions

View file

@ -1,12 +1,9 @@
include /etc/lsb-release
export $(shell sed 's/=.*//' /etc/lsb-release)
all:
# FIXME: Should just check for nixos instead.
@if [ "${DISTRIB_ID}" = "Ubuntu" ]; then \
make home;\
else \
@if [ test -d /etc/nixos ]; then \
make nixos;\
else \
make home;\
fi
nixos:
@ -14,8 +11,8 @@ nixos:
systemctl restart --user emanote
# Not sure why this doesn't reliably work
homeBroken:
nix build --no-link ".#homeConfigurations."`whoami`@`hostname`".activationPackage"
home0:
nix build --no-link ".#homeConfigurations."`hostname`".activationPackage"
./result/activate
# This requires the symlink to be setup; see README

View file

@ -10,11 +10,11 @@ VSCode note: <kbd>Ctrl+Shift+B</kbd> will run effectuate the new configuration (
First time run,
```
make home0
ln -s /path/to/here ~/.config/nixpkgs # Why? See Makefile
make
```
Afterwards, feel free to use `home-manager switch`.
Afterwards, feel free to use `home-manager switch` (or `make`).
## Install notes

View file

@ -93,11 +93,7 @@
homeConfigurations =
let
username = "srid";
hostname = "P71";
in
{
# WSL ubuntu
"${username}@${hostname}" = home-manager.lib.homeManagerConfiguration {
mkHomeConfig = home-manager.lib.homeManagerConfiguration {
inherit username system;
homeDirectory = "/home/${username}";
configuration = import ./home.nix {
@ -106,6 +102,10 @@
pkgs = import nixpkgs { inherit system; };
};
};
in
{
"P71" = mkHomeConfig;
"x1c7" = mkHomeConfig;
};
};