diff --git a/common/hosts/zerotier b/common/hosts/zerotier index 14f9e13..77ba209 100644 --- a/common/hosts/zerotier +++ b/common/hosts/zerotier @@ -1,2 +1,3 @@ 10.1.2.16 zeus 10.1.2.175 nixbox +10.1.2.152 thinkpad \ No newline at end of file diff --git a/flake.nix b/flake.nix index e702ba0..a1fc770 100644 --- a/flake.nix +++ b/flake.nix @@ -84,6 +84,7 @@ nixosConfigurations.aarch64-live = mkNixos "aarch64" ./nixos/hosts/aarch64-live.nix; nixosConfigurations.nixbox = mkNixos "x86_64" ./nixos/hosts/nixbox.nix; + nixosConfigurations.thinkpad = mkNixos "x86_64" ./nixos/hosts/thinkpad.nix; nixosConfigurations.darwin-arm-minimal-vm = mkNixos "aarch64" ./nixos/hosts/vms/aarch64-darwin-host/minimal.nix; nixosConfigurations.darwin-arm-homeconsole-vm = mkNixos "aarch64" ./nixos/hosts/vms/aarch64-darwin-host/home-console.nix; diff --git a/home/programs/ssh.nix b/home/programs/ssh.nix index 8dd675f..568ea87 100644 --- a/home/programs/ssh.nix +++ b/home/programs/ssh.nix @@ -20,6 +20,10 @@ hostname = "10.1.2.175"; user = "willem"; }; + "thinkpad" = { + hostname = "10.1.2.152"; + user = "willem"; + }; "ubc" = { hostname = "remote.students.cs.ubc.ca"; user = "willemml"; diff --git a/nixos/hosts/thinkpad.nix b/nixos/hosts/thinkpad.nix new file mode 100644 index 0000000..ac17fcb --- /dev/null +++ b/nixos/hosts/thinkpad.nix @@ -0,0 +1,43 @@ +{ + config, + lib, + pkgs, + modulesPath, + ... +}: { + imports = [ + (modulesPath + "/installer/scan/not-detected.nix") + ../profiles/hyprland.nix + ../profiles/default.nix + ../users/willem/home.nix + ../modules/zerotier.nix + ]; + + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + + boot.initrd.availableKernelModules = ["ehci_pci" "ahci" "uas" "sd_mod" "rtsx_pci_sdmmc"]; + boot.initrd.kernelModules = []; + boot.kernelModules = ["kvm-intel"]; + boot.extraModulePackages = []; + + fileSystems."/" = { + device = "/dev/disk/by-uuid/1fb0caa2-f036-4403-b75f-beed8ba54984"; + fsType = "ext4"; + }; + + fileSystems."/boot" = { + device = "/dev/disk/by-uuid/49F5-0E0A"; + fsType = "vfat"; + }; + + swapDevices = [ + {device = "/dev/disk/by-uuid/aed88966-e44e-4d2f-99ba-1fe6fb57cf89";} + ]; + + networking.useDHCP = lib.mkDefault true; + networking.hostName = "thinkpad"; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/nixos/profiles/default.nix b/nixos/profiles/default.nix index e3b0694..fc69af6 100644 --- a/nixos/profiles/default.nix +++ b/nixos/profiles/default.nix @@ -8,7 +8,6 @@ ../../common/system.nix ../modules/nix/use-flake-pkgs.nix ../users/willem/default.nix - inputs.nix-index-database.nixosModules.nix-index ]; console.keyMap = "colemak"; diff --git a/nixos/users/willem/default.nix b/nixos/users/willem/default.nix index e40287e..d8ffa4e 100644 --- a/nixos/users/willem/default.nix +++ b/nixos/users/willem/default.nix @@ -10,6 +10,7 @@ openssh.authorizedKeys.keys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBx1z962nl87rmOk/vw3EBSgqU/VlCqON8zTeLHQcSBp willem@zeus" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGFprwUFAmOqWlUtRkpGMAQJs6zJVesYIstXVLL3yjse willem@nixbox" + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGe3g5Fuw+jcj+KMeV3cLJPkoBxUogqTtC3Hg7hMj8py willem@thinkpad" ]; }; }