Common configuration is now implicit from hosts perspective
This means I can now define overlays that everyone can access
This commit is contained in:
parent
3e07b832c8
commit
ab9a08d510
6 changed files with 32 additions and 49 deletions
|
|
@ -3,12 +3,29 @@
|
|||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||||
|
||||
{ inputs, config, pkgs, ... }:
|
||||
|
||||
let
|
||||
system = "x86_64-linux";
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
../modules/default.nix
|
||||
];
|
||||
|
||||
nixpkgs.overlays = [
|
||||
(final: prev: {
|
||||
unstable = import inputs.unstable {
|
||||
inherit system;
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
})
|
||||
(final: prev: {
|
||||
update = import inputs.update {
|
||||
inherit system;
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
})
|
||||
];
|
||||
|
||||
nix.settings.experimental-features = "nix-command flakes";
|
||||
|
||||
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||
|
|
|
|||
55
flake.nix
55
flake.nix
|
|
@ -23,31 +23,13 @@
|
|||
let
|
||||
system = "x86_64-linux";
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
unstable-overlay = final: prev: {
|
||||
unstable = import unstable {
|
||||
mkSystem = h: {
|
||||
"${h}" = nixpkgs.lib.nixosSystem {
|
||||
inherit system;
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
};
|
||||
update-overlay = final: prev: {
|
||||
update = import update {
|
||||
inherit system;
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
};
|
||||
# Perhaps this could've been presented as an overlay?
|
||||
# bashcfg-overlay = final: prev: {
|
||||
# };
|
||||
in {
|
||||
|
||||
nixosConfigurations = {
|
||||
NixFrame = nixpkgs.lib.nixosSystem {
|
||||
inherit system;
|
||||
# specialArgs = { inherit inputs; };
|
||||
specialArgs = { inherit inputs; };
|
||||
modules = [
|
||||
{ nixpkgs.overlays = [ unstable-overlay update-overlay ]; }
|
||||
nixos-hardware.nixosModules.framework-13-7040-amd
|
||||
./hosts/NixFrame/configuration.nix
|
||||
./common/configuration.nix
|
||||
(./. + "/hosts/${h}/configuration.nix")
|
||||
home-manager.nixosModules.home-manager
|
||||
{
|
||||
home-manager.extraSpecialArgs = { inherit inputs; };
|
||||
|
|
@ -57,30 +39,17 @@
|
|||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
in {
|
||||
|
||||
NixDawn = nixpkgs.lib.nixosSystem {
|
||||
inherit system;
|
||||
# specialArgs = { inherit inputs; };
|
||||
modules = [
|
||||
{ nixpkgs.overlays = [ unstable-overlay update-overlay ]; }
|
||||
./hosts/NixDawn/configuration.nix
|
||||
home-manager.nixosModule
|
||||
{
|
||||
home-manager = {
|
||||
extraSpecialArgs = { inherit inputs; };
|
||||
useGlobalPkgs = true;
|
||||
useUserPackages = true;
|
||||
users.benson.imports = [ ./home/home.nix ];
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
nixosConfigurations =
|
||||
(nixpkgs.lib.foldr (a: b: a // b) {}
|
||||
(map mkSystem ["NixDawn" "NixFrame"])) // {
|
||||
NixGate = nixpkgs.lib.nixosSystem {
|
||||
inherit system;
|
||||
specialArgs = { inherit inputs; };
|
||||
modules = [
|
||||
{ nixpkgs.overlays = [ unstable-overlay update-overlay ]; }
|
||||
./common/configuration.nix
|
||||
./hosts/NixGate/configuration.nix
|
||||
];
|
||||
};
|
||||
|
|
@ -89,7 +58,7 @@
|
|||
inherit system;
|
||||
specialArgs = { inherit inputs; };
|
||||
modules = [
|
||||
{ nixpkgs.overlays = [ unstable-overlay update-overlay ]; }
|
||||
./common/configuration.nix
|
||||
./hosts/NixSentinel/configuration.nix
|
||||
];
|
||||
};
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@
|
|||
{ config, pkgs, ... }:
|
||||
{
|
||||
imports = [
|
||||
../../common/configuration.nix
|
||||
../../common/user-facing.nix
|
||||
../../common/development-machine.nix
|
||||
../../common/lxd-setup.nix
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
{ config, pkgs, ... }:
|
||||
{ config, pkgs, inputs, ... }:
|
||||
{
|
||||
imports = [
|
||||
# ./home-git-repos.nix
|
||||
../../common/configuration.nix
|
||||
../../common/development-machine.nix
|
||||
../../common/laptop-things.nix
|
||||
../../common/exwm.nix
|
||||
# Include the results of the hardware scan.
|
||||
inputs.nixos-hardware.nixosModules.framework-13-7040-amd
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@
|
|||
{
|
||||
imports = [
|
||||
../../common/moms-house
|
||||
../../common/configuration.nix
|
||||
# Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@
|
|||
{
|
||||
imports = [
|
||||
../../common/moms-house
|
||||
../../common/configuration.nix
|
||||
# Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
|
|
|
|||
Loading…
Reference in a new issue