Skip to content

Commit

Permalink
+ v2
Browse files Browse the repository at this point in the history
~

~

-

~

~
  • Loading branch information
oluceps committed Mar 11, 2024
1 parent bcdb9fc commit 17116ec
Show file tree
Hide file tree
Showing 58 changed files with 647 additions and 476 deletions.
5 changes: 3 additions & 2 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
description = "oluceps' flake";
outputs = inputs@{ flake-parts, ... }:
let extraLibs = (import ./hosts/lib.nix inputs); /* f = excludes: valueFunc: */
let extraLibs = (import ./hosts/lib.nix inputs);
in
flake-parts.lib.mkFlake { inherit inputs; } ({ withSystem, ... }: {
imports = (import ./hosts inputs) ++ (with inputs;[
Expand Down Expand Up @@ -45,11 +45,12 @@
};

flake = {
lib = inputs.nixpkgs.lib.extend inputs.self.overlays.lib;

agenix-rekey = inputs.agenix-rekey.configure {
userFlake = inputs.self;
nodes = with inputs.nixpkgs.lib;
filterAttrs (n: _: !elem n [ "nixos" "bootstrap" ]) inputs.self.nixosConfigurations;
filterAttrs (n: _: !elem n [ "livecd" "bootstrap" ]) inputs.self.nixosConfigurations;
};

overlays =
Expand Down
48 changes: 25 additions & 23 deletions hosts/abhoth/default.nix
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
{ self, inputs, ... }: {
flake =
let lib = inputs.nixpkgs.lib.extend self.overlays.lib; in
{
nixosConfigurations = {
abhoth = lib.nixosSystem
{ withSystem, self, inputs, ... }:
{
flake.nixosConfigurations.abhoth = withSystem "x86_64-linux" (_ctx@{ config, inputs', system, ... }:
let inherit (self) lib; in lib.nixosSystem
{
specialArgs = {
inherit lib self inputs inputs';
inherit (config) packages;
inherit (lib) data;
user = "elen";
};
modules = lib.sharedModules ++ [
{
pkgs = import inputs.nixpkgs {
system = "x86_64-linux";
nixpkgs = {
hostPlatform = system;
config = {
# contentAddressedByDefault = true;
allowUnfree = true;
Expand All @@ -22,19 +28,15 @@
"nixpkgs-wayland"
]);
};
specialArgs = lib.base // { user = "elen"; };
modules = [
./hardware.nix
./network.nix
./rekey.nix
./spec.nix
../../age.nix
../../packages.nix
../../misc.nix
../../users.nix
]
++ lib.sharedModules;
};
};
};
}
./hardware.nix
./network.nix
./rekey.nix
./spec.nix
../../age.nix
../../packages.nix
../../misc.nix
../../users.nix
];
});
}
49 changes: 26 additions & 23 deletions hosts/azasos/default.nix
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
{ self, inputs, ... }: {
flake =
let lib = inputs.nixpkgs.lib.extend self.overlays.lib; in
{
nixosConfigurations = {
azasos = lib.nixosSystem
{ withSystem, self, inputs, ... }:
{
flake.nixosConfigurations.azasos = withSystem "x86_64-linux" (_ctx@{ config, inputs', system, ... }:
let inherit (self) lib; in lib.nixosSystem
{
specialArgs = {
inherit lib self inputs inputs';
inherit (config) packages;
inherit (lib) data;
user = "elen";
};
modules = lib.sharedModules ++ [
{
pkgs = import inputs.nixpkgs {
system = "x86_64-linux";
nixpkgs = {
hostPlatform = system;
config = {
# contentAddressedByDefault = true;
allowUnfree = true;
};
overlays = (import ../../overlays.nix inputs)
++
Expand All @@ -21,19 +28,15 @@
"nixpkgs-wayland"
]);
};
specialArgs = lib.base // { user = "elen"; };
modules = [
./hardware.nix
./network.nix
./rekey.nix
./spec.nix
../../age.nix
../../packages.nix
../../misc.nix
../../users.nix
]
++ lib.sharedModules;
};
};
};
}
./hardware.nix
./network.nix
./rekey.nix
./spec.nix
../../age.nix
../../packages.nix
../../misc.nix
../../users.nix
];
});
}
43 changes: 24 additions & 19 deletions hosts/bootstrap/default.nix
Original file line number Diff line number Diff line change
@@ -1,22 +1,27 @@
{ self, inputs, ... }: {
flake =
let lib = inputs.nixpkgs.lib.extend self.overlays.lib; in
{
nixosConfigurations = {
bootstrap = lib.nixosSystem
{ withSystem, self, inputs, ... }: {
flake.nixosConfigurations.bootstrap = withSystem "x86_64-linux" (_ctx@{ config, inputs', system, ... }:
let inherit (self) lib; in lib.nixosSystem
{
specialArgs = {
inherit lib self inputs inputs';
inherit (config) packages;
inherit (lib) data;
user = "elen";
};
modules = [
./configuration.nix
./disk-config.nix
inputs.disko.nixosModules.disko
{
pkgs = import inputs.nixpkgs {
system = "x86_64-linux";
config = { };
overlays = (import ../../overlays.nix inputs);
nixpkgs = {
hostPlatform = lib.mkDefault system;
overlays = with inputs;[
agenix-rekey.overlays.default
fenix.overlays.default
self.overlays.default
];
};
specialArgs = lib.base // { user = "elen"; };
modules = [
./configuration.nix
./disk-config.nix
inputs.disko.nixosModules.disko
];
};
};
};
}
];
});
}
57 changes: 29 additions & 28 deletions hosts/colour/default.nix
Original file line number Diff line number Diff line change
@@ -1,13 +1,21 @@
{ self, inputs, ... }: {
flake =
let lib = inputs.nixpkgs.lib.extend self.overlays.lib; in
{
nixosConfigurations = {
colour = lib.nixosSystem
{ withSystem, self, inputs, ... }:
{
flake.nixosConfigurations.colour = withSystem "x86_64-linux" (_ctx@{ config, inputs', system, ... }:
let inherit (self) lib; in lib.nixosSystem
{
specialArgs = {
inherit lib self inputs inputs';
inherit (config) packages;
inherit (lib) data;
user = "elen";
};
modules = lib.sharedModules ++ [
{
pkgs = import inputs.nixpkgs {
system = "x86_64-linux";
config = { allowUnfree = true; };
nixpkgs = {
hostPlatform = system;
config = {
allowUnfree = true;
};
overlays = (import ../../overlays.nix inputs)
++
(lib.genOverlays [
Expand All @@ -19,23 +27,16 @@
"nixpkgs-wayland"
]);
};
specialArgs = lib.base // {
inherit lib;
user = "elen";
};
modules = [
./hardware.nix
./network.nix
./rekey.nix
./spec.nix
./caddy.nix
../../age.nix
../../packages.nix
../../misc.nix
../../users.nix
]
++ lib.sharedModules;
};
};
};
}
./hardware.nix
./network.nix
./rekey.nix
./spec.nix
./caddy.nix
../../age.nix
../../packages.nix
../../misc.nix
../../users.nix
];
});
}
60 changes: 30 additions & 30 deletions hosts/eihort/default.nix
Original file line number Diff line number Diff line change
@@ -1,13 +1,21 @@
{ self, inputs, ... }: {
flake =
let lib = inputs.nixpkgs.lib.extend self.overlays.lib; in
{
nixosConfigurations = {
eihort = lib.nixosSystem
{ withSystem, self, inputs, ... }:
{
flake.nixosConfigurations.eihort = withSystem "x86_64-linux" (_ctx@{ config, inputs', system, ... }:
let inherit (self) lib; in lib.nixosSystem
{
specialArgs = {
inherit lib self inputs inputs';
inherit (config) packages;
inherit (lib) data;
user = "elen";
};
modules = lib.sharedModules ++ [
{
pkgs = import inputs.nixpkgs {
system = "x86_64-linux";
config = { allowUnfree = true; };
nixpkgs = {
hostPlatform = system;
config = {
allowUnfree = true;
};
overlays = (import ../../overlays.nix inputs)
++
(lib.genOverlays [
Expand All @@ -19,25 +27,17 @@
"nixpkgs-wayland"
]);
};
specialArgs = lib.base // {
inherit lib;
user = "elen";
};
modules = [
./hardware.nix
./network.nix
./rekey.nix
./spec.nix
../../age.nix
../../packages.nix
../../misc.nix
../../users.nix
]
++ lib.sharedModules ++
[
inputs.disko.nixosModules.default
];
};
};
};
}
./hardware.nix
./network.nix
./rekey.nix
./spec.nix
../../age.nix
../../packages.nix
../../misc.nix
../../users.nix

inputs.disko.nixosModules.default
];
});
}
Loading

0 comments on commit 17116ec

Please sign in to comment.