Build symlinks on apollo to always have all modes in a gc-root
This commit is contained in:
parent
6facc0f281
commit
d19cdcc8f5
42
home.nix
42
home.nix
|
@ -1,9 +1,25 @@
|
|||
let
|
||||
inherit (import <nixpkgs> { }) lib;
|
||||
makeConfig = hostName: imports:
|
||||
{ ... }: {
|
||||
imports = imports ++ [ ./home ];
|
||||
m-0.hostName = hostName;
|
||||
};
|
||||
wrapWithOthers = config: all:
|
||||
{ lib, ... }: {
|
||||
imports = [ config ];
|
||||
home.file = lib.listToAttrs (builtins.map (name: {
|
||||
inherit name;
|
||||
value = {
|
||||
source = (import <home-manager/home-manager/home-manager.nix> {
|
||||
confPath = ~/git/config/home.nix;
|
||||
confAttr = "apollo-${name}-without-symlinks";
|
||||
}).activationPackage;
|
||||
target = ".gc-roots-home/${name}";
|
||||
};
|
||||
}) (lib.attrNames all));
|
||||
};
|
||||
apollo = let
|
||||
setStartpage = startpage:
|
||||
{ ... }: {
|
||||
programs.firefox.profiles."fz2sm95u.default".settings = {
|
||||
|
@ -17,7 +33,8 @@ let
|
|||
Unit = { Description = "Serve a blocklist"; };
|
||||
Service = {
|
||||
ExecStart = "${pkgs.python3}/bin/python -m http.server 8842 -d ${
|
||||
pkgs.writeTextDir "blocklist" (lib.concatStringsSep "\r\n" list)
|
||||
pkgs.writeTextDir "blocklist"
|
||||
(lib.concatStringsSep "\r\n" list)
|
||||
}";
|
||||
Restart = "always";
|
||||
};
|
||||
|
@ -63,8 +80,8 @@ let
|
|||
home/git-sign.nix
|
||||
home/laptop.nix
|
||||
]);
|
||||
in {
|
||||
apollo-orga = apolloConfig [
|
||||
in {
|
||||
orga = apolloConfig [
|
||||
home/accounting.nix
|
||||
home/mail.nix
|
||||
home/pythia.nix
|
||||
|
@ -72,13 +89,13 @@ in {
|
|||
(setStartpage "https://cloud.maralorn.de/apps/calendar")
|
||||
(makeBlock (tinkerPages ++ leisurePages))
|
||||
];
|
||||
apollo-research = apolloConfig [
|
||||
research = apolloConfig [
|
||||
home/latex.nix
|
||||
(makeBlock (tinkerPages ++ leisurePages))
|
||||
(setStartpage "http://localhost:8042")
|
||||
];
|
||||
|
||||
apollo-tinkering = apolloConfig [
|
||||
tinkering = apolloConfig [
|
||||
home/mail.nix
|
||||
home/update-script.nix
|
||||
home/tinkering.nix
|
||||
|
@ -86,13 +103,15 @@ in {
|
|||
(makeBlock leisurePages)
|
||||
(setStartpage "https://stats.maralorn.de/d/health-status")
|
||||
];
|
||||
apollo-leisure = apolloConfig [
|
||||
leisure = apolloConfig [
|
||||
home/games.nix
|
||||
home/chat.nix
|
||||
(makeBlock [ ])
|
||||
(setStartpage "https://stats.maralorn.de/d/health-status")
|
||||
];
|
||||
};
|
||||
|
||||
in {
|
||||
hera = makeConfig "hera" [
|
||||
./home
|
||||
home/on-my-machine.nix
|
||||
|
@ -102,4 +121,13 @@ in {
|
|||
home/headless-mpd.nix
|
||||
home/mail.nix
|
||||
];
|
||||
}
|
||||
} // lib.listToAttrs (lib.flatten (lib.mapAttrsToList (name: config: [
|
||||
{
|
||||
name = "apollo-${name}";
|
||||
value = wrapWithOthers config apollo;
|
||||
}
|
||||
{
|
||||
name = "apollo-${name}-without-symlinks";
|
||||
value = config;
|
||||
}
|
||||
]) apollo))
|
||||
|
|
Loading…
Reference in a new issue