{ # INFORMATION # When building for a system, remember to change the hostname variable below description = "NixOS System Config"; inputs = { # NixOS packages nixpkgs.url = "nixpkgs/nixos-23.05"; # Manage dotfiles in a home directory home-manager.url = "github:nix-community/home-manager/release-23.05"; home-manager.inputs.nixpkgs.follows = "nixpkgs"; # Secureboot Configuration lanzaboote.url = "github:nix-community/lanzaboote"; lanzaboote.inputs.nixpkgs.follows = "nixpkgs"; }; outputs = { nixpkgs, home-manager, lanzaboote, ... }@inputs: let # Variables - Remember to set these hostname = "nixos-laptop"; system = "x86_64-linux"; pkgs = import nixpkgs { # Tells Flake what OS version we are using inherit system; config = { allowUnfree = true; }; }; lib = nixpkgs.lib; in { # NixOS Configuration files: nixosConfigurations = { # Declare a generic configuration using the $hostname variable: ${hostname} = lib.nixosSystem { inherit system; modules = [ # Hardware Configuration ./hosts/${hostname}/hardware-configuration.nix # Extra options for the host hardware configuration ./hosts/${hostname}/configuration.nix # SecureBoot Configuration lanzaboote.nixosModules.lanzaboote # Common NixOS Configuration file ./configuration.nix # Tell home-manager to use both global and user packages: home-manager.nixosModules.home-manager { home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; home-manager.users.albert = import ./users/albert/home.nix; home-manager.users.root = import ./users/root/home.nix; } ]; # modules }; # lib.nixosSystem - nixos-laptop }; # nixosConfiguration }; }