Merge pull request #112 from nix-community/build01
Build01: prepare for users
This commit is contained in:
commit
55a97ceafa
3 changed files with 31 additions and 0 deletions
|
@ -13,6 +13,8 @@
|
||||||
imports = [
|
imports = [
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
|
|
||||||
|
../roles/dev-packages.nix
|
||||||
|
../roles/clone-nixpkgs.nix
|
||||||
../roles/common.nix
|
../roles/common.nix
|
||||||
../roles/hetzner-network.nix
|
../roles/hetzner-network.nix
|
||||||
];
|
];
|
||||||
|
|
15
roles/clone-nixpkgs.nix
Normal file
15
roles/clone-nixpkgs.nix
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
({ pkgs, ... }: {
|
||||||
|
systemd.services.clone-nixpkgs = {
|
||||||
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
after = [ "network-online.target" ];
|
||||||
|
serviceConfig.Type = "oneshot";
|
||||||
|
startAt = "daily";
|
||||||
|
script = ''
|
||||||
|
if [ -d /var/lib/nixpkgs.git ]; then
|
||||||
|
${pkgs.git}/bin/git -C /var/lib/nixpkgs.git fetch
|
||||||
|
else
|
||||||
|
${pkgs.git}/bin/git clone --bare https://github.com/nixos/nixpkgs /var/lib/nixpkgs.git
|
||||||
|
fi
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
})
|
14
roles/dev-packages.nix
Normal file
14
roles/dev-packages.nix
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
# useful for people that want to test stuff
|
||||||
|
environment.systemPackages = [
|
||||||
|
pkgs.vim
|
||||||
|
pkgs.nano # ?
|
||||||
|
pkgs.tmux
|
||||||
|
pkgs.git
|
||||||
|
pkgs.tig
|
||||||
|
pkgs.nixpkgs-review
|
||||||
|
pkgs.ripgrep
|
||||||
|
pkgs.fd
|
||||||
|
];
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue