From e1b05d65451cce58205a2c4b3d84f706b04fb17e Mon Sep 17 00:00:00 2001 From: John Bargman Date: Sat, 30 Nov 2024 13:15:05 +0000 Subject: reorg and update; add cgit --- flake.nix | 46 ++++++++++++---------------------------------- 1 file changed, 12 insertions(+), 34 deletions(-) (limited to 'flake.nix') diff --git a/flake.nix b/flake.nix index 4eda89e..4f7d5f9 100644 --- a/flake.nix +++ b/flake.nix @@ -5,7 +5,7 @@ nixinate.url = "github:matthewcroughan/nixinate"; agenix.url = "github:ryantm/agenix"; nixpkgs_unstable.url = "github:nixos/nixpkgs/nixos-unstable"; - nixpkgs.url = "github:nixos/nixpkgs/nixos-23.05"; + nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05"; simple-nixos-mailserver.url = "gitlab:simple-nixos-mailserver/nixos-mailserver"; }; @@ -14,6 +14,7 @@ pkgs = nixpkgs.legacyPackages.x86_64-linux; webroot = "${self}/webroot"; fqdn = "crashoverburn.com"; + hashedPasswordFile = "${self}/password.file"; in { formatter.x86_64-linux = pkgs.nixpkgs-fmt; @@ -59,41 +60,18 @@ nixpkgs.lib.nixosSystem { system = "x86_64-linux"; modules = [ - simple-nixos-mailserver.nixosModule - { - mailserver = { - fqdn = "mail.crashoverburn.com"; - domains = [ "mail.crashoverburn.com" "crashoverburn.com" ]; - enable = true; - # A list of all login accounts. To create the password hashes, use - # nix-shell -p mkpasswd --run 'mkpasswd -sm bcrypt' - loginAccounts = { - "crash@crashoverburn.com" = { - hashedPasswordFile = "${self}/password.file"; - aliases = [ "postmaster@mail.crashoverburn.com" "overburn@crashoverburn.com" ]; - }; - }; - certificateScheme = "acme-nginx"; - }; - } agenix.nixosModules.default + simple-nixos-mailserver.nixosModule ./openstack.nix - (import ./website.nix { inherit webroot; }) - (import ./ejabberd.nix { inherit fqdn; }) - ./commander.nix - { - networking.hostName = "crashoverburn"; - security.acme = { - acceptTerms = true; - defaults.email = "postmaster@mail.crashoverburn.com"; - }; - environment.systemPackages = [ - pkgs.btop - pkgs.tmux - pkgs.neovim - ]; + ./users/commander.nix + (import ./services/cgit.nix { inherit pkgs; inherit fqdn; }) + (import ./services/website.nix { inherit webroot; }) + (import ./services/ejabberd.nix { inherit fqdn; }) + (import ./services/mailserver.nix { inherit pkgs; inherit hashedPasswordFile; }) + ./machines/overburn-1.nix + { imports = [ - "${nixpkgs}/nixos/modules/virtualisation/openstack-config.nix" + "${nixpkgs}/nixos/modules/virtualisation/openstack-config.nix" ]; _module.args.nixinate = { host = "193.16.42.36"; @@ -102,7 +80,7 @@ hermetic = true; buildOn = "local"; }; - } + } ]; }; }; -- cgit v1.2.3