nix: add channel configuration and rework update process
This commit is contained in:
parent
239c2c9c44
commit
dd4cd9aaf4
14 changed files with 137 additions and 51 deletions
34
nix/home-manager/profiles/nix-channels.nix
Normal file
34
nix/home-manager/profiles/nix-channels.nix
Normal file
|
@ -0,0 +1,34 @@
|
|||
{ pkgs
|
||||
, config
|
||||
, ...
|
||||
}:
|
||||
|
||||
let
|
||||
in {
|
||||
home.file.".nix-channels".text = ''
|
||||
https://nixos.org/channels/nixos-18.09 nixos
|
||||
https://nixos.org/channels/nixos-unstable nixos-unstable
|
||||
'';
|
||||
|
||||
home.activation._removeExistingNixChannels = config.lib.dag.entryBefore ["checkLinkTargets"] ''
|
||||
$DRY_RUN_CMD ${pkgs.writeScript "activation-script" ''
|
||||
set -ex
|
||||
if test -f $HOME/.nix-channels; then
|
||||
echo Moving existing file away...
|
||||
touch $HOME/.nix-channels.dummy
|
||||
mv --backup=numbered $HOME/.nix-channels.dummy $HOME/.nix-channels
|
||||
rm $HOME/.nix-channels
|
||||
fi
|
||||
''};
|
||||
'';
|
||||
|
||||
nixpkgs.config = {
|
||||
|
||||
packageOverrides = pkgs: with pkgs; {
|
||||
homeshick = builtins.fetchGit {
|
||||
url = "https://github.com/andsens/homeshick.git";
|
||||
ref = "master";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue