{ description = "tacocat's nix configuration"; nixConfig = { experimental-features = ["nix-command" "flakes"]; extra-substituters = [ # Nix community's cache server "https://nix-community.cachix.org" ]; extra-trusted-public-keys = [ "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" ]; }; inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; home-manager = { url = "github:nix-community/home-manager"; inputs.nixpkgs.follows = "nixpkgs"; }; nixos-hardware.url = "github:NixOs/nixos-hardware/master"; nur.url = "github:nix-community/nur"; agenix.url = "github:ryantm/agenix"; nixvim = { url = "github:nix-community/nixvim"; inputs.nixpkgs.follows = "nixpkgs"; }; nix-matlab = { inputs.nixpkgs.follows = "nixpkgs"; url = "gitlab:doronbehar/nix-matlab"; }; radian = { url = "github:radian-software/radian/main"; flake = false; }; }; # pass in the urls defined above # the @ syntax stores the arguments in the inputs variable outputs = { self, nixpkgs, home-manager, nixos-hardware, nur, agenix, nixvim, nix-matlab, radian, ... } @ inputs: let system = "x86_64-linux"; pkgs = inputs.nixpkgs.legacyPackages.${system}; overlays = [ nur.overlay nix-matlab.overlay ]; home-manager-config = toplevel: [ home-manager.nixosModules.home-manager { home-manager.backupFileExtension = "bk"; home-manager.useGlobalPkgs = true; home-manager.extraSpecialArgs = {inherit inputs;}; home-manager.users.tacocat = { imports = [ toplevel agenix.homeManagerModules.default nixvim.homeManagerModules.nixvim ]; }; } ]; common = [ ./modules/nixos-common.nix {nixpkgs.overlays = overlays;} agenix.nixosModules.default ] ++ home-manager-config ./users/tacocat/home.nix; in { # desktop nixosConfigurations."bicep" = nixpkgs.lib.nixosSystem { inherit system; specialArgs = {inherit inputs;}; modules = [ ./hosts/bicep/configuration.nix ] ++ common; }; # laptop nixosConfigurations."jwst" = nixpkgs.lib.nixosSystem { inherit system; specialArgs = {inherit inputs;}; modules = [ ./hosts/jwst/configuration.nix nixos-hardware.nixosModules.dell-xps-15-9520 ] ++ common; }; formatter.${system} = pkgs.alejandra; }; }