{ inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11"; nixpkgs-droid.url = "github:NixOS/nixpkgs/nixos-23.05"; nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable"; home-manager = { url = "github:nix-community/home-manager/release-23.11"; inputs.nixpkgs.follows = "nixpkgs"; }; home-manager-unstable = { url = "github:nix-community/home-manager"; inputs.nixpkgs.follows = "nixpkgs-unstable"; }; # simple mailserver snm = { url = "gitlab:simple-nixos-mailserver/nixos-mailserver/master"; # inputs.nixpkgs-23_05.follows = "nixpkgs"; }; nix-on-droid = { url = "github:t184256/nix-on-droid/release-23.05"; inputs.nixpkgs.follows = "nixpkgs-droid"; }; emacs = { url = "github:nix-community/emacs-overlay"; inputs.nixpkgs.follows = "nixpkgs-unstable"; }; # simplex-chat = { # url = "github:simplex-chat/simplex-chat"; # inputs.nixpkgs.follows = "nixpkgs"; # }; # age for nix to store encrypted passwords conveniently agenix = { url = "github:ryantm/agenix"; inputs.nixpkgs.follows = "nixpkgs"; }; disko.url = "github:nix-community/disko"; disko.inputs.nixpkgs.follows = "nixpkgs"; }; outputs = { home-manager, nixpkgs, nixpkgs-unstable, ... }@inputs: { nixosConfigurations."thrall" = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; specialArgs = { inherit inputs; }; modules = let postfix-overlay = final: prev: { postfix = nixpkgs-unstable.legacyPackages."x86_64-linux".postfix; }; in [ ({ inputs, lib, ... }: { nixpkgs = { config.allowUnfree = true; overlays = with inputs; [ emacs.overlay postfix-overlay ]; }; nix.registry = lib.mapAttrs (_: value: { flake = value; }) inputs; }) ./hosts/thrall home-manager.nixosModules.home-manager { home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; home-manager.users.alex = import ./home/alex/cli.nix; } ]; }; nixosConfigurations."dregil" = nixpkgs-unstable.lib.nixosSystem { system = "x86_64-linux"; specialArgs = { inherit inputs; }; modules = [ ./hosts/dregil ]; }; nixosConfigurations."igor" = nixpkgs-unstable.lib.nixosSystem { system = "x86_64-linux"; specialArgs = { inherit inputs; }; modules = [ ./hosts/igor ]; }; nixOnDroidConfigurations.default = with inputs; nix-on-droid.lib.nixOnDroidConfiguration { modules = [ ./hosts/redmi { nix.registry.nixpkgs.flake = nixpkgs-droid; } { nix.nixPath = [ "nixpkgs=${nixpkgs-droid}" ]; } ]; }; }; }