summaryrefslogtreecommitdiff
path: root/com/simatime.nix
diff options
context:
space:
mode:
authorBen Sima <ben@bsima.me>2019-10-27 12:43:49 -0700
committerBen Sima <ben@bsima.me>2019-11-01 14:22:07 -0700
commitc6662575a085242fd216729ee3429a8b69f91f73 (patch)
tree37a017fe67fd2e2a6e99dd72515e572a92898253 /com/simatime.nix
parentf82fddd83e8b713e211b6c3a7fcb0eacd88c3689 (diff)
use a standard buildNixOS function
Diffstat (limited to 'com/simatime.nix')
-rw-r--r--com/simatime.nix82
1 files changed, 36 insertions, 46 deletions
diff --git a/com/simatime.nix b/com/simatime.nix
index e26219a..d67c756 100644
--- a/com/simatime.nix
+++ b/com/simatime.nix
@@ -1,4 +1,4 @@
-{ nixos }:
+{ buildNixOS }:
/*
@@ -11,50 +11,40 @@ stuff deployed.
*/
-{
- service =
- let
- 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 nixos {
- system = "x86_64-linux";
- configuration = {
- imports = [
- ./simatime/hardware.nix
- ./simatime/networking.nix
-
- # common infra
- ./simatime/users.nix
- ./simatime/packages.nix
-
- # configured modules
- ./simatime/git.nix
- ./simatime/mail.nix
- ./simatime/web.nix
- ./simatime/znc.nix
-
- # third party
- nixos-mailserver
- ];
-
- nixpkgs.config.allowUnfree = true;
-
- programs.mosh = {
- enable = true;
- withUtempter = true;
- };
-
- services.openssh = {
- enable = true;
- passwordAuthentication = false;
- };
-
- security.sudo.wheelNeedsPassword = true;
- boot.cleanTmpDir = true;
- };
+let
+ 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 buildNixOS {
+ system = "x86_64-linux";
+ configuration = {
+ imports = [
+ ./simatime/hardware.nix
+ ./simatime/networking.nix
+ # common infra
+ ./simatime/users.nix
+ ./simatime/packages.nix
+ # configured modules
+ ./simatime/git.nix
+ ./simatime/mail.nix
+ ./simatime/web.nix
+ ./simatime/znc.nix
+ # third party
+ nixos-mailserver
+ ];
+ nixpkgs.config.allowUnfree = true;
+ programs.mosh = {
+ enable = true;
+ withUtempter = true;
};
-
- dev = import ./simatime/dev.nix { inherit nixos; };
+ services.openssh = {
+ enable = true;
+ passwordAuthentication = false;
+ };
+ security.sudo.wheelNeedsPassword = true;
+ boot.cleanTmpDir = true;
+ };
+} // {
+ dev = import ./simatime/dev.nix { inherit buildNixOS; };
}