diff --git a/Makefile b/Makefile
index 29b72ae..a2f56c7 100644
--- a/Makefile
+++ b/Makefile
@@ -1,9 +1,9 @@
all:
- @if [ test -d /etc/nixos ]; then \
+ @if [[ -d "/etc/nixos" ]]; then \
make nixos;\
else \
- make home;\
+ make h;\
fi
nixos:
@@ -11,12 +11,12 @@ nixos:
systemctl restart --user emanote
# Not sure why this doesn't reliably work
-home0:
- nix build --no-link ".#homeConfigurations."`hostname`".activationPackage"
+h0:
+ nix build ".#homeConfigurations."`hostname`".activationPackage"
./result/activate
# This requires the symlink to be setup; see README
-home:
+h:
PATH="${HOME}/.nix-profile/bin/:${PATH}" home-manager switch
freeupboot:
diff --git a/README.md b/README.md
index 439f172..5ffaf7e 100644
--- a/README.md
+++ b/README.md
@@ -10,7 +10,7 @@ VSCode note: Ctrl+Shift+B will run effectuate the new configuration (
First time run,
```
-make home0
+make h0
ln -s /path/to/here ~/.config/nixpkgs # Why? See Makefile
```
diff --git a/flake.nix b/flake.nix
index a8ae2e2..c57096f 100644
--- a/flake.nix
+++ b/flake.nix
@@ -93,19 +93,27 @@
homeConfigurations =
let
username = "srid";
- mkHomeConfig = home-manager.lib.homeManagerConfiguration {
+ baseConfiguration = {
+ programs.home-manager.enable = true;
+ home.username = "srid";
+ home.homeDirectory = "/home/srid";
+ };
+ mkHomeConfig = cfg: home-manager.lib.homeManagerConfiguration {
inherit username system;
homeDirectory = "/home/${username}";
- configuration = import ./home.nix {
- inherit inputs system;
- bare = false;
- pkgs = import nixpkgs { inherit system; };
- };
+ configuration = baseConfiguration // cfg;
};
in
{
- "P71" = mkHomeConfig;
- "x1c7" = mkHomeConfig;
+ "P71" = mkHomeConfig (import ./home.nix {
+ inherit inputs system;
+ pkgs = import nixpkgs { inherit system; };
+ });
+ # FIXME: This is broken on Clear Linux
+ "x1c7" = mkHomeConfig {
+ programs.git = import ./home/git.nix;
+ programs.tmux = import ./home/tmux.nix;
+ };
};
};
diff --git a/home.nix b/home.nix
index 7237090..140a224 100644
--- a/home.nix
+++ b/home.nix
@@ -1,5 +1,4 @@
-# HACK: bare
-{ bare ? false, pkgs, inputs, system, ... }:
+{ pkgs, inputs, system, ... }:
let
#himalayaSrc = inputs.himalaya;
#himalaya = import ./features/email/himalaya.nix { inherit pkgs inputs system; };
@@ -7,18 +6,12 @@ let
emanote = inputs.emanote.outputs.defaultPackage.${system};
in
rec {
- # Let Home Manager install and manage itself.
- programs.home-manager.enable = true;
- # Home Manager needs a bit of information about you and the
- # paths it should manage.
- home.username = "srid";
- home.homeDirectory = "/home/srid";
#imports = pkgs.lib.optional (!bare)
# inputs.nix-doom-emacs.hmModule;
- home.packages = with pkgs; lib.optionals (!bare) [
+ home.packages = [
emanote
gnumake
@@ -55,7 +48,7 @@ rec {
#};
neovim = {
- enable = !bare;
+ enable = true;
package = neovim-nightly;
viAlias = true;
# withNodeJs = true;
diff --git a/shell.nix b/shell.nix
index 6ca6c44..450c93d 100644
--- a/shell.nix
+++ b/shell.nix
@@ -1,6 +1,6 @@
-{ pkgs ? import {}, ...}:
+{ pkgs ? import { }, ... }:
pkgs.mkShell {
- buildInputs = [
- pkgs.nixpkgs-fmt
- ];
-}
\ No newline at end of file
+ buildInputs = [
+ pkgs.nixpkgs-fmt
+ ];
+}