{ description = "jahanson's NixOS Flake"; # This is the standard format for flake.nix. # `inputs` are the dependencies of the flake, # and `outputs` function will return all the build results of the flake. # Each item in `inputs` will be passed as a parameter to # the `outputs` function after being pulled and built. inputs = { # There are many ways to reference flake inputs. # The most widely used is `github:owner/name/reference`, # which represents the GitHub repository URL + branch/commit-id/tag. nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; talhelper.url = "github:budimanjojo/talhelper/v1.16.4"; home-manager = { url = "github:nix-community/home-manager"; inputs.nixpkgs.follows = "nixpkgs"; }; }; # The `@` syntax here is used to alias the attribute set of the # inputs's parameter, making it convenient to use inside the function. outputs = { self, nixpkgs, home-manager, ... }@inputs: { nixosConfigurations = { "durincore" = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; specialArgs = inputs; modules = [ # Import the configuration.nix here, so that the # old configuration file can still take effect. # Note: configuration.nix itself is also a Nixpkgs Module, ./configuration.nix home-manager.nixosModules.home-manager { home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; home-manager.users.jahanson = import ./home.nix; } ]; }; }; }; }