mirror of
https://github.com/donovanglover/nix-config.git
synced 2024-11-22 00:03:55 +01:00
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:
parent
469b18907e
commit
eac686339b
@ -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;
|
||||
};
|
||||
|
||||
|
@ -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 = {
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user