replace outputs with inputs.self

This commit is contained in:
Norbert Melzer 2024-06-26 20:55:57 +02:00 • committed by Gab Fontes
commit ce64bc072e
5 changed files with 14 additions and 18 deletions

View file

@ -120,14 +120,14 @@ add this to your NixOS configuration (either directly on
`nixos/configuration.nix` or on a separate file and import it):
```nix
{ inputs, outputs, ... }: {
{ inputs, ... }: {
imports = [
# Import home-manager's NixOS module
inputs.home-manager.nixosModules.home-manager
];
home-manager = {
extraSpecialArgs = { inherit inputs outputs; };
extraSpecialArgs = { inherit inputs; };
users = {
# Import your home-manager configuration
your-username = import ../home-manager/home.nix;

View file

@ -16,14 +16,13 @@
home-manager,
...
} @ inputs: let
inherit (self) outputs;
in {
# NixOS configuration entrypoint
# Available through 'nixos-rebuild --flake .#your-hostname'
nixosConfigurations = {
# FIXME replace with your hostname
your-hostname = nixpkgs.lib.nixosSystem {
specialArgs = {inherit inputs outputs;};
specialArgs = {inherit inputs;};
# > Our main nixos configuration file <
modules = [./nixos/configuration.nix];
};
@ -35,7 +34,7 @@
# FIXME replace with your username@hostname
"your-username@your-hostname" = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.x86_64-linux; # Home-manager requires 'pkgs' instance
extraSpecialArgs = {inherit inputs outputs;};
extraSpecialArgs = {inherit inputs;};
# > Our main home-manager configuration file <
modules = [./home-manager/home.nix];
};

View file

@ -20,7 +20,6 @@
home-manager,
...
} @ inputs: let
inherit (self) outputs;
# Supported systems for your flake packages, shell, etc.
systems = [
"aarch64-linux"
@ -54,7 +53,7 @@
nixosConfigurations = {
# FIXME replace with your hostname
your-hostname = nixpkgs.lib.nixosSystem {
specialArgs = {inherit inputs outputs;};
specialArgs = {inherit inputs;};
modules = [
# > Our main nixos configuration file <
./nixos/configuration.nix
@ -68,7 +67,7 @@
# FIXME replace with your username@hostname
"your-username@your-hostname" = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.x86_64-linux; # Home-manager requires 'pkgs' instance
extraSpecialArgs = {inherit inputs outputs;};
extraSpecialArgs = {inherit inputs;};
modules = [
# > Our main home-manager configuration file <
./home-manager/home.nix

View file

@ -2,7 +2,6 @@
# Use this to configure your home environment (it replaces ~/.config/nixpkgs/home.nix)
{
inputs,
outputs,
lib,
config,
pkgs,
@ -11,7 +10,7 @@
# You can import other home-manager modules here
imports = [
# If you want to use modules your own flake exports (from modules/home-manager):
# outputs.homeManagerModules.example
# inputs.self.homeManagerModules.example
# Or modules exported from other flakes (such as nix-colors):
# inputs.nix-colors.homeManagerModules.default
@ -24,9 +23,9 @@
# You can add overlays here
overlays = [
# Add overlays your own flake exports (from overlays and pkgs dir):
outputs.overlays.additions
outputs.overlays.modifications
outputs.overlays.unstable-packages
inputs.self.overlays.additions
inputs.self.overlays.modifications
inputs.self.overlays.unstable-packages
# You can also add overlays exported from other flakes:
# neovim-nightly-overlay.overlays.default

View file

@ -2,7 +2,6 @@
# Use this to configure your system environment (it replaces /etc/nixos/configuration.nix)
{
inputs,
outputs,
lib,
config,
pkgs,
@ -11,7 +10,7 @@
# You can import other NixOS modules here
imports = [
# If you want to use modules your own flake exports (from modules/nixos):
# outputs.nixosModules.example
# inputs.self.nixosModules.example
# Or modules from other flakes (such as nixos-hardware):
# inputs.hardware.nixosModules.common-cpu-amd
@ -28,9 +27,9 @@
# You can add overlays here
overlays = [
# Add overlays your own flake exports (from overlays and pkgs dir):
outputs.overlays.additions
outputs.overlays.modifications
outputs.overlays.unstable-packages
inputs.self.overlays.additions
inputs.self.overlays.modifications
inputs.self.overlays.unstable-packages
# You can also add overlays exported from other flakes:
# neovim-nightly-overlay.overlays.default