summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Keller <tjkeller.xyz>2024-10-20 12:01:50 -0500
committerTim Keller <tjkeller.xyz>2024-10-20 12:01:50 -0500
commitcde90c250dc193ef683cd84614815fdbd848598c (patch)
tree400258d2a2e37d48f1a522a64a2d9170e5caffd2
parent04c5bb8b026ccdbd0a4ceb60c83c321ad3eb11b8 (diff)
downloadnixos-cde90c250dc193ef683cd84614815fdbd848598c.tar.xz
nixos-cde90c250dc193ef683cd84614815fdbd848598c.zip
add host config for T495 and make function to create system configs
-rw-r--r--flake.nix12
-rw-r--r--modules/hosts/T495/configuration.nix10
2 files changed, 18 insertions, 4 deletions
diff --git a/flake.nix b/flake.nix
index 64c8544..3b9f6be 100644
--- a/flake.nix
+++ b/flake.nix
@@ -26,20 +26,24 @@
email = "tjkeller.xyz";
fullname = "Tim Keller";
};
- in {
- nixosConfigurations.T430 = nixpkgs.lib.nixosSystem {
+ mkNixosConfiguration = hostname: nixpkgs.lib.nixosSystem {
inherit system;
specialArgs = {
inherit inputs;
inherit userDetails;
};
modules = [
- ./modules/hosts/T430/configuration.nix
+ ./modules/hosts/${hostname}/configuration.nix
./modules/root
];
};
+ in {
+ nixosConfigurations = {
+ T430 = mkNixosConfiguration "T430";
+ T495 = mkNixosConfiguration "T495";
+ };
- homeConfigurations.timmy = home-manager.lib.homeManagerConfiguration {
+ homeConfigurations.${userDetails.username} = home-manager.lib.homeManagerConfiguration {
inherit pkgs;
extraSpecialArgs = {
inherit userDetails;
diff --git a/modules/hosts/T495/configuration.nix b/modules/hosts/T495/configuration.nix
new file mode 100644
index 0000000..6624a9e
--- /dev/null
+++ b/modules/hosts/T495/configuration.nix
@@ -0,0 +1,10 @@
+{ config, lib, pkgs, ... }: {
+ imports = [ ./hardware-configuration.nix ];
+ system.stateVersion = "24.05";
+
+ networking.hostName = "T495";
+
+ environment.systemPackages = with pkgs; [
+ input-leap
+ ];
+}