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 { writeShellApplication
, home-manager , home-manager
, stdenv
, ,
}: }:
writeShellApplication { writeShellApplication {
name = "home-switch"; name = "home-switch";
runtimeInputs = [ home-manager ]; runtimeInputs = [ home-manager ];
text = '' 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 = {
nixpkgs.config.allowUnfreePredicate = lib.const true; nixpkgs.config.allowUnfreePredicate = (_: true);
nixpkgs.config.allowUnsupportedSystem = true; nixpkgs.config.allowUnsupportedSystem = true;
nixpkgs.overlays = builtins.attrValues self.overlays; nixpkgs.overlays = builtins.attrValues self.overlays;
}; };
nixpkgs-useFlakeNixpkgs = { nixpkgs-useFlakeNixpkgs = {
home.sessionVariables.NIX_PATH = "nixpkgs=${inputs.nixpkgs}"; home.sessionVariables.NIX_PATH = "nixpkgs=${inputs.nixpkgs}";
systemd.user.sessionVariables.NIX_PATH = lib.mkForce "nixpkgs=${inputs.nixpkgs}";
nix.registry.nixpkgs.flake = 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 in
rec { rec {
home = { 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"; homeDirectory = "/Users/willem";
keyboard = { keyboard = {
layout = "us"; layout = "us";

View file

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