# My first run with nix. The config is based on Matthias Benaets config and youtube tutorial # https://github.com/MatthiasBenaets/nixos-config # https://www.youtube.com/watch?v=AGVXJ-TIv3Y # # flake.nix * # ├─ ./hosts # │ └─ default.nix { description = "Opel personal NixOS Flake config"; inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-26.05"; nixos-hardware.url = "github:NixOS/nixos-hardware/master"; home-manager = { # User Package Management url = "github:nix-community/home-manager/release-26.05"; inputs.nixpkgs.follows = "nixpkgs"; }; agenix = { url = "github:ryantm/agenix"; inputs.nixpkgs.follows = "nixpkgs"; }; lanzaboote = { url = "github:nix-community/lanzaboote/master"; inputs.nixpkgs.follows = "nixpkgs"; }; }; outputs = { self, nixpkgs, nixos-hardware, home-manager, agenix, lanzaboote, ... } @ inputs: let systems = [ "x86_64-linux" ]; forAllSystems = nixpkgs.lib.genAttrs systems; in { # Your custom packages # Accessible through 'nix build', 'nix shell', etc packages = forAllSystems (system: import nixpkgs {pkgs = nixpkgs.legacyPackages.${system};}); # Formatter for your nix files, available through 'nix fmt' # Other options beside 'alejandra' include 'nixpkgs-fmt' formatter = forAllSystems (system: nixpkgs.legacyPackages.${system}.alejandra); nixosConfigurations = ( # NixOS configurations import ./hosts { inherit (nixpkgs) lib; inherit inputs nixpkgs nixos-hardware home-manager agenix lanzaboote; # Also inherit home-manager so it does not need to be defined here. } ); }; }