let nixpkgs-tar = builtins.fetchTarball (import ./nixpkgs.nix); nixpkgs = import "${nixpkgs-tar}" {}; nixos = import "${nixpkgs-tar}/nixos"; # TODO(bsima): buildNixOS should be split into multiple functions that each # return one thing, instead of a single function that returns multiple things buildNixOS = opts: let full = (nixos opts); in { system = full.system; vm = full.vm; }; buildHaskellApp = import ./Com/Simatime/buildHaskellApp.nix nixpkgs; nixos-mailserver = builtins.fetchTarball { url = "https://gitlab.com/simple-nixos-mailserver/nixos-mailserver/-/archive/v2.2.1/nixos-mailserver-v2.2.1.tar.gz"; sha256 = "03d49v8qnid9g9rha0wg2z6vic06mhp0b049s3whccn1axvs2zzx"; }; in { Com.Simatime = buildNixOS { system = "x86_64-linux"; configuration = { imports = [ ./Com/Simatime/hardware.nix ./Com/Simatime/networking.nix # common infra ./Com/Simatime/users.nix ./Com/Simatime/packages.nix # configured modules ./Com/Simatime/git.nix ./Com/Simatime/mail.nix ./Com/Simatime/web.nix ./Com/Simatime/znc.nix # third party nixos-mailserver ]; # TODO(bsima): move more stuff here to a common module nixpkgs.config.allowUnfree = true; programs.mosh = { enable = true; withUtempter = true; }; services.openssh = { enable = true; passwordAuthentication = false; }; security.sudo.wheelNeedsPassword = true; boot.cleanTmpDir = true; }; } // { dev = buildNixOS { system = "x86_64-linux"; configuration = { imports = [ ./Com/Simatime/users.nix ./Com/Simatime/packages.nix ./Com/Simatime/dev/hardware.nix ./Com/Simatime/dev/configuration.nix ]; }; }; }; Com.InfluencedByBooks = buildNixOS { system = "x86_64-linux"; configuration = { imports = [ ./Com/InfluencedByBooks/service.nix # common infra ./Com/Simatime/users.nix ./Com/Simatime/packages.nix ]; nixpkgs.config.allowUnfree = true; services.openssh = { enable = true; passwordAuthentication = false; }; security.sudo.wheelNeedsPassword = true; boot.cleanTmpDir = true; }; } // (buildHaskellApp { name = "Com.InfluencedByBooks"; nick = "ibb"; apex = "Com.InfluencedByBooks.Apex"; aero = "Com.InfluencedByBooks.Aero"; deps = { both = [ "clay" "miso" "protolude" "servant" "text" ]; apex = [ "MonadRandom" "acid-state" "blaze-html" "blaze-markup" "bytestring" "ixset" "random" "safecopy" "scotty" "servant-server" "text" ]; aero = [ "aeson" "containers" "ghcjs-base" ]; }; }); }