summaryrefslogtreecommitdiff
path: root/nixosConfigurations/default.nix
diff options
context:
space:
mode:
authorAzat Bahawi <azat@bahawi.net>2024-03-31 21:29:27 +0300
committerAzat Bahawi <azat@bahawi.net>2024-03-31 21:29:27 +0300
commit9a5427e3a0c0ccf2a82dc503149a26b23fbd6004 (patch)
treef28beec29deeea36038615a8fb98a810891940b5 /nixosConfigurations/default.nix
parent4ad0c3afc1f6caf0c3f05f99a15b22178f2c190b (diff)
2024-03-31
Diffstat (limited to 'nixosConfigurations/default.nix')
-rw-r--r--nixosConfigurations/default.nix129
1 files changed, 66 insertions, 63 deletions
diff --git a/nixosConfigurations/default.nix b/nixosConfigurations/default.nix
index b2e1511..1f0d78c 100644
--- a/nixosConfigurations/default.nix
+++ b/nixosConfigurations/default.nix
@@ -1,14 +1,17 @@
inputs:
-with inputs.self.lib; let
- mkConfiguration = name: {
- modules ? [],
- configuration ? ./${name},
- this ? my.configurations.${name},
- extraSpecialArgs ? {
- localUsername = my.username;
- localHostname = this.hostname;
- },
- }:
+with inputs.self.lib;
+let
+ mkConfiguration =
+ name:
+ {
+ modules ? [ ],
+ configuration ? ./${name},
+ this ? my.configurations.${name},
+ extraSpecialArgs ? {
+ localUsername = my.username;
+ localHostname = this.hostname;
+ },
+ }:
nameValuePair name (nixosSystem {
inherit (this) system;
modules =
@@ -16,12 +19,10 @@ with inputs.self.lib; let
++ attrValues inputs.self.modules
++ attrValues inputs.self.nixosModules
++ optional (configuration != null) (import configuration);
- specialArgs =
- {
- inherit inputs this;
- inherit (inputs.self) lib;
- }
- // extraSpecialArgs;
+ specialArgs = {
+ inherit inputs this;
+ inherit (inputs.self) lib;
+ } // extraSpecialArgs;
});
mkIso = system: {
@@ -32,7 +33,9 @@ with inputs.self.lib; let
isHeadful = false;
};
configuration = ./iso;
- modules = ["${inputs.nixpkgs}/nixos/modules/installer/cd-dvd/installation-cd-minimal-new-kernel.nix"];
+ modules = [
+ "${inputs.nixpkgs}/nixos/modules/installer/cd-dvd/installation-cd-minimal-new-kernel.nix"
+ ];
};
mkTest = this: {
@@ -43,55 +46,55 @@ with inputs.self.lib; let
inherit this;
};
in
- mapAttrs' mkConfiguration {
- iso-arm = mkIso "aarch64-linux";
- iso-x86 = mkIso "x86_64-linux";
+mapAttrs' mkConfiguration {
+ iso-arm = mkIso "aarch64-linux";
+ iso-x86 = mkIso "x86_64-linux";
- test-headless = mkTest {
- hostname = "test-headless";
- system = "x86_64-linux";
- isHeadless = true;
- isHeadful = false;
- };
- test-headful = mkTest {
- hostname = "test-headful";
- system = "x86_64-linux";
- isHeadless = false;
- isHeadful = true;
- };
+ test-headless = mkTest {
+ hostname = "test-headless";
+ system = "x86_64-linux";
+ isHeadless = true;
+ isHeadful = false;
+ };
+ test-headful = mkTest {
+ hostname = "test-headful";
+ system = "x86_64-linux";
+ isHeadless = false;
+ isHeadful = true;
+ };
- eonwe.modules = with inputs; [
- nixos-hardware.nixosModules.common-cpu-amd
- nixos-hardware.nixosModules.common-cpu-amd-pstate
- nixos-hardware.nixosModules.common-gpu-amd
- nixos-hardware.nixosModules.common-pc-ssd
- nixpkgs.nixosModules.notDetected
- ];
+ eonwe.modules = with inputs; [
+ nixos-hardware.nixosModules.common-cpu-amd
+ nixos-hardware.nixosModules.common-cpu-amd-pstate
+ nixos-hardware.nixosModules.common-gpu-amd
+ nixos-hardware.nixosModules.common-pc-ssd
+ nixpkgs.nixosModules.notDetected
+ ];
- melian.modules = with inputs; [
- nixos-hardware.nixosModules.common-pc-laptop-ssd
- nixos-hardware.nixosModules.lenovo-thinkpad-t480
- nixpkgs.nixosModules.notDetected
- ];
+ melian.modules = with inputs; [
+ nixos-hardware.nixosModules.common-pc-laptop-ssd
+ nixos-hardware.nixosModules.lenovo-thinkpad-t480
+ nixpkgs.nixosModules.notDetected
+ ];
- manwe.modules = with inputs; [
- "${nixpkgs}/nixos/modules/profiles/qemu-guest.nix"
- nixos-hardware.nixosModules.common-cpu-amd
- nixos-hardware.nixosModules.common-pc-ssd
- nixpkgs.nixosModules.notDetected
- ];
+ manwe.modules = with inputs; [
+ "${nixpkgs}/nixos/modules/profiles/qemu-guest.nix"
+ nixos-hardware.nixosModules.common-cpu-amd
+ nixos-hardware.nixosModules.common-pc-ssd
+ nixpkgs.nixosModules.notDetected
+ ];
- varda.modules = with inputs; [
- "${nixpkgs}/nixos/modules/profiles/qemu-guest.nix"
- nixos-hardware.nixosModules.common-cpu-amd
- nixos-hardware.nixosModules.common-pc-ssd
- nixpkgs.nixosModules.notDetected
- ];
+ varda.modules = with inputs; [
+ "${nixpkgs}/nixos/modules/profiles/qemu-guest.nix"
+ nixos-hardware.nixosModules.common-cpu-amd
+ nixos-hardware.nixosModules.common-pc-ssd
+ nixpkgs.nixosModules.notDetected
+ ];
- yavanna.modules = with inputs; [
- "${nixpkgs}/nixos/modules/profiles/qemu-guest.nix"
- nixos-hardware.nixosModules.common-cpu-intel
- nixos-hardware.nixosModules.common-pc-hdd
- nixpkgs.nixosModules.notDetected
- ];
- }
+ yavanna.modules = with inputs; [
+ "${nixpkgs}/nixos/modules/profiles/qemu-guest.nix"
+ nixos-hardware.nixosModules.common-cpu-intel
+ nixos-hardware.nixosModules.common-pc-hdd
+ nixpkgs.nixosModules.notDetected
+ ];
+}