in
{
options = {
- services.buildbot.enable = lib.mkOption {
+ myServices.buildbot.enable = lib.mkOption {
type = lib.types.bool;
default = false;
description = ''
};
};
- config = lib.mkIf config.services.buildbot.enable {
+ config = lib.mkIf config.myServices.buildbot.enable {
ids.uids.buildbot = myconfig.env.buildbot.user.uid;
ids.gids.buildbot = myconfig.env.buildbot.user.gid;
peertubeTool = ./websites/tools/peertube;
toolsTool = ./websites/tools/tools;
+ buildbot = ./buildbot;
+ certificates = ./certificates.nix;
+ gitolite = ./gitolite;
irc = ./irc.nix;
+ pub = ./pub;
+ tasks = ./tasks;
+ dns = ./dns.nix;
+ ftp = ./ftp.nix;
+ mail = ./mail.nix;
+ mpd = ./mpd.nix;
+ ssh = ./ssh;
+
+ system = ./system.nix;
};
in
builtins.listToAttrs (map (attr: { name = "priv${attr}"; value = set.${attr}; }) (builtins.attrNames set))
{ lib, pkgs, config, myconfig, ... }:
let
- cfg = config.services.myGitolite;
+ cfg = config.myServices.gitolite;
in {
- options.services.myGitolite = {
+ options.myServices.gitolite = {
enable = lib.mkEnableOption "my gitolite service";
gitoliteDir = lib.mkOption {
type = lib.types.string;
{ lib, pkgs, config, myconfig, ... }:
{
options = {
- services.pub.enable = lib.mkOption {
+ myServices.pub.enable = lib.mkOption {
type = lib.types.bool;
default = false;
description = ''
};
};
- config = lib.mkIf config.services.pub.enable {
+ config = lib.mkIf config.myServices.pub.enable {
users.users.pub = let
restrict = pkgs.runCommand "restrict" {
file = ./restrict;
--- /dev/null
+{ pkgs, privateFiles, ... }:
+{
+ config = {
+ nixpkgs.overlays = builtins.attrValues (import ../../overlays);
+ _module.args = {
+ pkgsNext = import <nixpkgsNext> {};
+ pkgsPrevious = import <nixpkgsPrevious> {};
+ myconfig = {
+ inherit privateFiles;
+ env = import "${privateFiles}/environment.nix";
+ };
+ };
+
+ services.journald.extraConfig = ''
+ MaxLevelStore="warning"
+ MaxRetentionSec="1year"
+ '';
+
+ users.users.root.packages = [
+ pkgs.telnet
+ pkgs.htop
+ pkgs.iftop
+ ];
+
+ environment.systemPackages = [
+ pkgs.vim
+ ];
+
+ };
+}
{ lib, pkgs, config, myconfig, ... }:
let
- cfg = config.services.myTasks;
+ cfg = config.myServices.tasks;
server_vardir = config.services.taskserver.dataDir;
fqdn = "task.immae.eu";
user = config.services.taskserver.user;
echo "Please login" > $out/index.html
'';
in {
- options.services.myTasks = {
+ options.myServices.tasks = {
enable = lib.mkEnableOption "my tasks service";
};
inherit (pkgs.webapps) mantisbt_2 mantisbt_2-plugins;
env = myconfig.env.tools.mantisbt;
};
- gitweb = pkgs.callPackage ./gitweb.nix { gitoliteDir = config.services.myGitolite.gitoliteDir; };
+ gitweb = pkgs.callPackage ./gitweb.nix {
+ gitoliteDir = config.myServices.gitolite.gitoliteDir;
+ };
cfg = config.myServices.websites.tools.git;
in {
eldiron = { config, pkgs, myconfig, ... }:
{
- nixpkgs.overlays = builtins.attrValues (import ../overlays);
- _module.args = {
- pkgsNext = import <nixpkgsNext> {};
- pkgsPrevious = import <nixpkgsPrevious> {};
- myconfig = {
- inherit privateFiles;
- env = import "${privateFiles}/environment.nix";
- };
- };
-
boot.kernelPackages = pkgs.linuxPackages_latest;
+ _module.args.privateFiles = privateFiles;
networking = {
firewall.enable = true;
myconfig.env.servers.eldiron.ips);
};
- imports = [
- ./modules/ssh
- ./modules/certificates.nix
- ./modules/gitolite
- ./modules/mpd.nix
- ./modules/mail.nix
- ./modules/ftp.nix
- ./modules/pub
- ./modules/task
- ./modules/buildbot
- ./modules/dns.nix
- ] ++ (builtins.attrValues (import ../modules));
+ imports = builtins.attrValues (import ../modules);
+
+ myServices.buildbot.enable = true;
myServices.databases.enable = true;
+ myServices.gitolite.enable = true;
myServices.irc.enable = true;
- services.myGitolite.enable = true;
+ myServices.pub.enable = true;
+ myServices.tasks.enable = true;
services.pure-ftpd.enable = true;
- services.pub.enable = true;
- services.myTasks.enable = true;
- services.buildbot.enable = true;
-
- services.journald.extraConfig = ''
- MaxLevelStore="warning"
- MaxRetentionSec="1year"
- '';
deployment = {
targetEnv = "hetzner";
};
};
- users.users.root.packages = [
- pkgs.telnet
- pkgs.htop
- pkgs.iftop
- ];
-
- environment.systemPackages = [
- pkgs.vim
- ];
-
services.cron = {
enable = true;
systemCronJobs = [