fix home-switch, add home-build

This commit is contained in:
willemml 2023-03-17 15:48:56 -07:00
parent 0f809085d4
commit 142ada9298
Signed by: willemml
GPG key ID: C3DE5DF6198DACBD
6 changed files with 36 additions and 24 deletions

13
apps/home-build.nix Normal file
View file

@ -0,0 +1,13 @@
{ writeShellApplication
, home-manager
, stdenv
,
}:
writeShellApplication {
name = "home-build";
runtimeInputs = [ home-manager ];
text = ''
export FLAKE_CONFIG_URI=".#homeConfigurations.${stdenv.hostPlatform.system}.$USER"
exec home-manager build "$@"
'';
}

View file

@ -1,11 +1,13 @@
{ writeShellApplication
, home-manager
, stdenv
,
}:
writeShellApplication {
name = "home-switch";
runtimeInputs = [ home-manager ];
text = ''
exec home-manager switch --flake . "$@"
export FLAKE_CONFIG_URI=".#homeConfigurations.${stdenv.hostPlatform.system}.$USER"
exec home-manager switch "$@"
'';
}

View file

@ -20,14 +20,13 @@
};
nixpkgs-Config = {
nixpkgs.config.allowUnfreePredicate = lib.const true;
nixpkgs.config.allowUnfreePredicate = (_: true);
nixpkgs.config.allowUnsupportedSystem = true;
nixpkgs.overlays = builtins.attrValues self.overlays;
};
nixpkgs-useFlakeNixpkgs = {
home.sessionVariables.NIX_PATH = "nixpkgs=${inputs.nixpkgs}";
systemd.user.sessionVariables.NIX_PATH = lib.mkForce "nixpkgs=${inputs.nixpkgs}";
nix.registry.nixpkgs.flake = inputs.nixpkgs;
};
}

View file

@ -0,0 +1,17 @@
{
home.file = {
".config/nix/nix.conf".text = ''
allow-dirty = true
experimental-features = flakes nix-command repl-flake
builders-use-substitutes = true
'';
".config/nixpkgs/config.nix".text = ''
# -*-nix-*-
{
nixpkgs.config.allowUnfreePredicate = (_: true);
allowUnfree = true;
}
'';
};
}

View file

@ -5,25 +5,6 @@ let
in
rec {
home = {
file = {
".config/nix/nix.conf".text = ''
allow-dirty = true
experimental-features = flakes nix-command repl-flake
builders-use-substitutes = true
'';
".config/nixpkgs/config.nix".text = ''
# -*-nix-*-
{
packageOverrides = pkgs: {
nur = import (builtins.fetchTarball "https://github.com/nix-community/NUR/archive/master.tar.gz") {
inherit pkgs;
};
};
allowUnfree = true;
}
'';
};
homeDirectory = "/Users/willem";
keyboard = {
layout = "us";

View file

@ -73,9 +73,9 @@
#bypass-paywalls-clean
clearurls
don-t-fuck-with-paste
dracula-dark-colorscheme
#dracula-dark-colorscheme
edit-with-emacs
fastforward
#fastforward
i-dont-care-about-cookies
musescore-downloader
offline-qr-code-generator