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 ./hardware-configuration.nix
../../system ../../system
../../system/fonts.nix ../../system/fonts.nix
../../system/boot-key.nix
../../system/standalone ../../system/standalone
]; ];
@ -91,4 +92,4 @@ in {
ip4address = "172.20.71.2"; ip4address = "172.20.71.2";
}; };
} }

View file

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

View file

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

View file

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

View file

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