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

View File

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

View File

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