Skip to content

Commit 26ddd60

Browse files
committed
meta: Create a "Nixathena Standard" "metapackage"
Inspired by `debathena-standard`, this is certainly not complete, but is intended to be "the Nixathena you'd want on your laptop".
1 parent bb81190 commit 26ddd60

File tree

2 files changed

+47
-1
lines changed

2 files changed

+47
-1
lines changed

modules/default.nix

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,15 @@
11
{
2-
# Add your NixOS modules here
32
# Don't forget that nixathena.modules.whatever also needs to be in the
43
# `modules = [ ... ]` list of your config to actually process these.
4+
5+
# Enable the "standard" metapackage (clients, pyhesiodfs, etc.) by including
6+
# the `nixathena.meta.standard` module and then setting
7+
# `nixathena.meta.standard.enable = true;`
8+
59
discussd = ./discussd.nix;
610
remctld = ./remctld.nix;
711
pyhesiodfs = ./pyhesiodfs.nix;
12+
meta = {
13+
standard = ./meta/standard.nix;
14+
};
815
}

modules/meta/standard.nix

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
{ lib, pkgs, config, options, ...
2+
}:
3+
4+
let
5+
cfg = config.nixathena.meta.standard;
6+
athena-pkgs = import ../../pkgs { inherit pkgs; };
7+
defaultPackages = [
8+
athena-pkgs.discuss
9+
athena-pkgs.remctl
10+
];
11+
in
12+
{
13+
imports = [
14+
../pyhesiodfs.nix
15+
];
16+
17+
options.nixathena.meta.standard = (let
18+
mkOption = lib.mkOption;
19+
mkEnableOption = lib.mkEnableOption;
20+
types = lib.types;
21+
in {
22+
enable = mkEnableOption "Nixathena standard";
23+
packages = mkOption {
24+
description = "list of packages to install";
25+
default = defaultPackages;
26+
type = types.listOf types.package;
27+
};
28+
});
29+
30+
config = lib.mkIf cfg.enable {
31+
environment.systemPackages = cfg.packages;
32+
services.pyhesiodfs.enable = true;
33+
security.krb5.enable = true;
34+
services.openafsClient = {
35+
enable = true;
36+
cellName = "athena.mit.edu";
37+
};
38+
};
39+
}

0 commit comments

Comments
 (0)