{ inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; home = { url = "git+https://git.sondell.org/glennwso/home.git"; # inputs.nixpkgs.follows = "nixpkgs"; }; home-manager = { url = "github:nix-community/home-manager"; inputs.nixpkgs.follows = "nixpkgs"; }; nixos-mailserver = { url = "gitlab:simple-nixos-mailserver/nixos-mailserver"; inputs.nixpkgs.follows = "nixpkgs"; }; }; outputs = { self, nixpkgs, home, nixos-mailserver, home-manager, } @ attrs: let system = "x86_64-linux"; homepage = home.packages.${system}.default; mailserver = nixos-mailserver.nixosModules.default; homeSettings = { home-manager = { useGlobalPkgs = true; useUserPackages = true; users.sondell = import ./home/sondell.nix; users.root = import ./home/root.nix; }; }; homeModules = [ home-manager.nixosModules.home-manager homeSettings ]; in { # replace 'joes-desktop' with your hostname here. nixosConfigurations.nixos = nixpkgs.lib.nixosSystem { inherit system; specialArgs = attrs; modules = [ ./configuration.nix ./audiobooks.nix ./tunnel.nix ./forgejo.nix ./nextcloud.nix ./jellyfin.nix ./filebrowser.nix ./tail.nix # ./ai.nix ./ebooks.nix # ./matrix.nix TODO does not work atm, fixit # ./coturn.nix ./vaultwarden.nix ./dufs.nix (import ./mail.nix {inherit mailserver;}) (import ./homepage.nix {inherit homepage;}) ] ++ homeModules; }; }; }