flake: drop usage of @attrs

Using @attrs for the flake was cool at first, but this doesn't actually
work if we want to use our nix-config inside NixOS containers due to how
`self` works.

Because of this, it's easier to simply ban @attrs altogether and use
`nix-config` for everything since it's possible to access *all* the
inputs of nix-config from itself instead of having to manually inherit
each input we want (which could be any of them).
This commit is contained in:
Donovan Glover 2024-10-11 13:34:06 -04:00
parent 469b18907e
commit eac686339b
No known key found for this signature in database
GPG Key ID: EA7408A77AE1BE65
3 changed files with 12 additions and 12 deletions

View File

@ -31,7 +31,7 @@
self, self,
nixpkgs, nixpkgs,
... ...
}@attrs: }:
let let
inherit (nixpkgs.lib) nixosSystem; inherit (nixpkgs.lib) nixosSystem;
inherit (nixpkgs.lib.filesystem) packagesFromDirectoryRecursive listFilesRecursive; inherit (nixpkgs.lib.filesystem) packagesFromDirectoryRecursive listFilesRecursive;
@ -92,7 +92,7 @@
nixos = nixosSystem { nixos = nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";
specialArgs = attrs // { specialArgs = {
nix-config = self; nix-config = self;
}; };
@ -105,7 +105,7 @@
mobile-nixos = nixosSystem { mobile-nixos = nixosSystem {
system = "aarch64-linux"; system = "aarch64-linux";
specialArgs = attrs // { specialArgs = {
nix-config = self; nix-config = self;
}; };

View File

@ -1,13 +1,13 @@
{ self, pkgs, ... }: { nix-config, pkgs, ... }:
let let
inherit (builtins) attrValues; inherit (builtins) attrValues;
in in
{ {
imports = attrValues self.nixosModules; imports = attrValues nix-config.nixosModules;
nixpkgs.overlays = attrValues self.overlays; nixpkgs.overlays = attrValues nix-config.overlays;
home-manager.sharedModules = attrValues self.homeModules; home-manager.sharedModules = attrValues nix-config.homeModules;
environment.systemPackages = attrValues self.packages.${pkgs.system}; environment.systemPackages = attrValues nix-config.packages.${pkgs.system};
modules = { modules = {
hardware = { hardware = {

View File

@ -1,20 +1,20 @@
{ self, ... }: { nix-config, ... }:
let let
inherit (builtins) attrValues; inherit (builtins) attrValues;
in in
{ {
imports = attrValues self.nixosModules ++ attrValues self.inputs.mobile-nixos.nixosModules; imports = attrValues nix-config.nixosModules ++ attrValues nix-config.inputs.mobile-nixos.nixosModules;
nixpkgs = { nixpkgs = {
overlays = with self.overlays; [ phinger-cursors ]; overlays = with nix-config.overlays; [ phinger-cursors ];
config.permittedInsecurePackages = [ config.permittedInsecurePackages = [
"olm-3.2.16" "olm-3.2.16"
]; ];
}; };
home-manager.sharedModules = with self.homeModules; [ home-manager.sharedModules = with nix-config.homeModules; [
dconf dconf
eza eza
fish fish