stash whatever we got

This commit is contained in:
Sridhar Ratnakumar 2021-09-12 18:48:15 -04:00
parent 4ad08495a5
commit f70e13b40a
5 changed files with 30 additions and 29 deletions

View file

@ -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:

View file

@ -10,7 +10,7 @@ VSCode note: <kbd>Ctrl+Shift+B</kbd> will run effectuate the new configuration (
First time run,
```
make home0
make h0
ln -s /path/to/here ~/.config/nixpkgs # Why? See Makefile
```

View file

@ -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;
};
};
};

View file

@ -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;

View file

@ -1,6 +1,6 @@
{ pkgs ? import <nixpkgs> {}, ...}:
{ pkgs ? import <nixpkgs> { }, ... }:
pkgs.mkShell {
buildInputs = [
pkgs.nixpkgs-fmt
];
}
buildInputs = [
pkgs.nixpkgs-fmt
];
}