mirror of
https://github.com/srid/nixos-config.git
synced 2025-12-26 15:04:59 +08:00
stash whatever we got
This commit is contained in:
parent
4ad08495a5
commit
f70e13b40a
5 changed files with 30 additions and 29 deletions
10
Makefile
10
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:
|
||||
|
|
|
|||
|
|
@ -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
|
||||
```
|
||||
|
||||
|
|
|
|||
24
flake.nix
24
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;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
|||
13
home.nix
13
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;
|
||||
|
|
|
|||
10
shell.nix
10
shell.nix
|
|
@ -1,6 +1,6 @@
|
|||
{ pkgs ? import <nixpkgs> {}, ...}:
|
||||
{ pkgs ? import <nixpkgs> { }, ... }:
|
||||
pkgs.mkShell {
|
||||
buildInputs = [
|
||||
pkgs.nixpkgs-fmt
|
||||
];
|
||||
}
|
||||
buildInputs = [
|
||||
pkgs.nixpkgs-fmt
|
||||
];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue