1
0
Fork 0

Get hera running

This commit is contained in:
Malte Brandy 2019-08-02 05:55:27 +02:00
parent a5e1361adc
commit 9586aae4f0
6 changed files with 128 additions and 124 deletions

View file

@ -15,6 +15,7 @@ in {
./hardware-configuration.nix
../../system
../../system/fonts.nix
../../system/boot-key.nix
../../system/standalone
];
@ -91,4 +92,4 @@ in {
ip4address = "172.20.71.2";
};
}
}

View file

@ -53,7 +53,7 @@ in rec {
main = do
path <- readTrim pwd
bump <- fmap ((== "bump") . listToMaybe) getArgs
bump <- (maybe False (== "bump") . listToMaybe) <$> getArgs
bracket checkout (rm "-rf") $ \dir -> do
withCurrentDirectory dir $ do
mapM_ (\x -> git_crypt "unlock" ([i|${configPath}/.git/git-crypt/keys/#{x}|] :: String)) ${

View file

@ -1,6 +1,6 @@
let
my-lib = import ../lib;
inherit (my-lib) pkgs unstable sources writeHaskellScript;
inherit (my-lib) pkgs unstable sources writeHaskellScript gcRetentionDays;
in rec {
tasktree = pkgs.callPackage ./tasktree { };
neovim = pkgs.neovim.override {
@ -162,9 +162,9 @@ in rec {
};
system-pkgs = core-system-pkgs // extra-system-pkgs // {
inherit (import ../lib/test.nix)
test-system-config test-home-config test-and-bump-config;
test-system-config test-home-config test-config;
inherit (my-lib) home-manager;
};
foreign-home-pkgs = extra-system-pkgs;
eventd = pkgs.callPackage ./eventd { };
}
}

View file

@ -1,4 +1,6 @@
{ config, pkgs, lib, ... }: {
{ config, pkgs, lib, ... }:
{
imports = [ ./init_ssh.nix ];
@ -7,24 +9,25 @@
environment.NIX_PATH =
"/etc/nix-path:nixos-config=/etc/nixos/configuration.nix";
path = [ pkgs.nix pkgs.gnutar pkgs.gzip pkgs.git pkgs.git-crypt ];
WorkingDirectory = "/var/cache/gc-links";
restartIfChanged = false;
unitConfig.X-StopOnRemoval = false;
serviceConfig = {
Type = "oneshot";
WorkingDirectory = "/var/cache/gc-links";
};
script = ''
${(import ../lib/test.nix).test-config}/bin/test-config
${(import ../../lib/test.nix).test-config}/bin/test-config
sudo -u maralorn git -C /home/maralorn/git/nixos/config pull
${
(import ../lib/update-system.nix
(import ../../lib/update-system.nix
config.system.build.nixos-rebuild).update-system
}/bin/update-system
sudo -u maralorn update-home
'';
};
};
nix = {
gc.automatic = true;
optimise.automatic = true;
};
}
}

View file

@ -1,7 +1,7 @@
{ pkgs, config, lib, ... }:
with lib; {
{
imports = [ ./admin.nix ./boot-key.nix ];
imports = [ ./admin.nix ];
# So that boot does not fill up with old kernels
boot.loader.grub.configurationLimit = 5;
@ -23,7 +23,7 @@ with lib; {
systemPackages = builtins.attrValues ({
inherit (import ../../lib/update-system.nix
config.system.build.nixos-rebuild)
update-system system-maintenance;
update-system;
} // (import ../../pkgs).system-pkgs);
sessionVariables = { TERMINFO = "/run/current-system/sw/share/terminfo"; };
};