mirror of
https://github.com/srid/nixos-config.git
synced 2025-12-26 23:14:57 +08:00
second home
This commit is contained in:
parent
170bc60696
commit
2c859d5704
3 changed files with 12 additions and 15 deletions
13
Makefile
13
Makefile
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
10
flake.nix
10
flake.nix
|
|
@ -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;
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue