From 2c576715de78d834e654c03bf1f7e75a2dcae9f7 Mon Sep 17 00:00:00 2001 From: OlivierChiasson Date: Fri, 1 May 2026 17:19:42 -0300 Subject: [PATCH] Rebase to flake parts #3 --- modules/hosts/14900k/default.nix | 14 ++++++++++++++ modules/hosts/client-services.nix | 22 ++++++++++++++++++++++ modules/hosts/nix-server/default.nix | 13 +++++++++++++ modules/hosts/t2mbp/configuration.nix | 2 +- modules/hosts/t2mbp/default.nix | 14 ++++++++++++++ modules/hosts/uConsole/default.nix | 19 +++++++++++++++++++ 6 files changed, 83 insertions(+), 1 deletion(-) create mode 100644 modules/hosts/14900k/default.nix create mode 100644 modules/hosts/client-services.nix create mode 100644 modules/hosts/nix-server/default.nix create mode 100644 modules/hosts/t2mbp/default.nix create mode 100644 modules/hosts/uConsole/default.nix diff --git a/modules/hosts/14900k/default.nix b/modules/hosts/14900k/default.nix new file mode 100644 index 0000000..a17b24d --- /dev/null +++ b/modules/hosts/14900k/default.nix @@ -0,0 +1,14 @@ +{ self, inputs, ... }: { + + flake.nixosConfigurations."14900k" = inputs.nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + specialArgs = { + inherit self inputs; + host = "14900k"; + system = "x86_64-linux"; + }; + modules = [ + self.nixosModules."14900kConfiguration" + ]; + }; +} diff --git a/modules/hosts/client-services.nix b/modules/hosts/client-services.nix new file mode 100644 index 0000000..d920ade --- /dev/null +++ b/modules/hosts/client-services.nix @@ -0,0 +1,22 @@ +{ self, ... }: { + #TODO[epic=Moderate] Move this somewhere else, would prefer not relying on this module + flake.nixosModules."client-services" = { ... }: { + imports = [ self.nixosModules.systemBluetooth ]; + + # Lab-ish SSH defaults on clients — tighten for anything exposed. + services.openssh = { + enable = true; + settings = { + KbdInteractiveAuthentication = false; + PasswordAuthentication = true; + PermitRootLogin = "yes"; # consider tightening later + UseDns = false; + }; + }; + + # Printing, polkit, udisks. + services.printing.enable = true; + security.polkit.enable = true; + services.udisks2.enable = true; + }; +} diff --git a/modules/hosts/nix-server/default.nix b/modules/hosts/nix-server/default.nix new file mode 100644 index 0000000..c9f6144 --- /dev/null +++ b/modules/hosts/nix-server/default.nix @@ -0,0 +1,13 @@ +{ self, inputs, ... }: { + flake.nixosConfigurations.nix-server = inputs.nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + specialArgs = { + inherit self inputs; + host = "nix-server"; + system = "x86_64-linux"; + }; + modules = [ + self.nixosModules.nix-serverConfiguration + ]; + }; +} diff --git a/modules/hosts/t2mbp/configuration.nix b/modules/hosts/t2mbp/configuration.nix index 8259282..7efb4d3 100644 --- a/modules/hosts/t2mbp/configuration.nix +++ b/modules/hosts/t2mbp/configuration.nix @@ -6,7 +6,7 @@ imports = [ self.nixosModules.t2mbpHardware self.nixosModules.t2linux - inputs.t2fanrd.nixosModules.t2fanrd + inputs.t2fanrd.nixosModules.t2fanrd #TODO[epic=Moderate] Convert to flake parts module inputs.home-manager.nixosModules.home-manager inputs.sops-nix.nixosModules.sops diff --git a/modules/hosts/t2mbp/default.nix b/modules/hosts/t2mbp/default.nix new file mode 100644 index 0000000..955eaf8 --- /dev/null +++ b/modules/hosts/t2mbp/default.nix @@ -0,0 +1,14 @@ +{ self, inputs, ... }: { + + flake.nixosConfigurations.t2mbp = inputs.nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + specialArgs = { + inherit self inputs; + host = "t2mbp"; + system = "x86_64-linux"; + }; + modules = [ + self.nixosModules.t2mbpConfiguration + ]; + }; +} \ No newline at end of file diff --git a/modules/hosts/uConsole/default.nix b/modules/hosts/uConsole/default.nix new file mode 100644 index 0000000..3c9b3e0 --- /dev/null +++ b/modules/hosts/uConsole/default.nix @@ -0,0 +1,19 @@ +{ self, inputs, ... }: { + flake.nixosConfigurations.uConsole = inputs.nixos-raspberrypi.lib.nixosSystem { + system = "aarch64-linux"; + specialArgs = inputs // { + inherit self; + inputs = inputs; + host = "uConsole"; + system = "aarch64-linux"; + }; + trustCaches = false; + modules = [ + inputs.nixos-raspberrypi.nixosModules.raspberry-pi-5.base + inputs.oom-hardware.nixosModules.uc.kernel + inputs.oom-hardware.nixosModules.uc.configtxt + inputs.oom-hardware.nixosModules.uc.base-cm5 + self.nixosModules.uConsoleConfiguration + ]; + }; +}