summaryrefslogtreecommitdiff
path: root/default.nix
diff options
context:
space:
mode:
authorBen Sima <ben@bsima.me>2019-11-02 08:43:57 -0700
committerBen Sima <ben@bsima.me>2019-11-02 08:43:57 -0700
commit6094867053604fd911d2f71f4ce03c173dc5256a (patch)
tree568c7f00c3d43517e7cc5d879484168f826591b8 /default.nix
parent71c5c8e85071a67904d1b08d2f7fb0204bee5772 (diff)
unify nix entrypoints to default.nix
Diffstat (limited to 'default.nix')
-rw-r--r--default.nix48
1 files changed, 47 insertions, 1 deletions
diff --git a/default.nix b/default.nix
index aedf4a0..42b6c3a 100644
--- a/default.nix
+++ b/default.nix
@@ -9,8 +9,54 @@ let
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 = import ./com/simatime.nix { inherit buildNixOS; };
+ 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 = {