mirror of
https://github.com/willemml/dotfiles.nix.git
synced 2025-04-12 19:27:17 +00:00
fix home-switch, add home-build
This commit is contained in:
parent
0f809085d4
commit
142ada9298
6 changed files with 36 additions and 24 deletions
13
apps/home-build.nix
Normal file
13
apps/home-build.nix
Normal 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 "$@"
|
||||||
|
'';
|
||||||
|
}
|
|
@ -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 "$@"
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
|
|
@ -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;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
17
home-manager/modules/custom/nixpkgs.nix
Normal file
17
home-manager/modules/custom/nixpkgs.nix
Normal 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;
|
||||||
|
}
|
||||||
|
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
|
@ -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";
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Add table
Reference in a new issue