]> Repositories - machines.git/commitdiff
Configure monsoon
authorAyo Reis <hey@ayoreis.com>
Wed, 18 Feb 2026 18:33:41 +0000 (18:33 +0000)
committerAyo Reis <hey@ayoreis.com>
Wed, 18 Feb 2026 18:33:41 +0000 (18:33 +0000)
README.md
flake.lock
flake.nix
monsoon/configuration.nix [new file with mode: 0644]
monsoon/disko.nix [new file with mode: 0644]
monsoon/hardware-configuration.nix [new file with mode: 0644]

index 1da016d3a9a1dde47d5e03268e61da37f5151b87..47d20ef7a7ff03743968ab01482ebd8c03a6c4a1 100644 (file)
--- a/README.md
+++ b/README.md
@@ -1,5 +1,9 @@
 # Machines
 
 ```shell
-nixos-rebuild --target-host <machine> --sudo --flake . switch
+# Rebuild VPS
+nixos-rebuild --target-host levanter --sudo --flake . switch
+
+# Rebuild laptop
+sudo nixos-rebuild --flake . switch
 ```
index 0978eeffc4095f192534c54ffb74b9c1c19bb975..7395637dc98ef81d4807eab5f7400a46aeb7c9e1 100644 (file)
         "type": "indirect"
       }
     },
+    "nixos-hardware": {
+      "locked": {
+        "lastModified": 1769302137,
+        "narHash": "sha256-QEDtctEkOsbx8nlFh4yqPEOtr4tif6KTqWwJ37IM2ds=",
+        "owner": "NixOS",
+        "repo": "nixos-hardware",
+        "rev": "a351494b0e35fd7c0b7a1aae82f0afddf4907aa8",
+        "type": "github"
+      },
+      "original": {
+        "id": "nixos-hardware",
+        "type": "indirect"
+      }
+    },
     "nixpkgs": {
       "locked": {
         "lastModified": 1770380644,
@@ -56,6 +70,7 @@
       "inputs": {
         "disko": "disko",
         "home-manager": "home-manager",
+        "nixos-hardware": "nixos-hardware",
         "nixpkgs": "nixpkgs"
       }
     }
index efd047d703e60f144596118f26a46d9dcd339724..71261035c4dc96cb1d35ee7ed69f04601315643d 100644 (file)
--- a/flake.nix
+++ b/flake.nix
                        url = "home-manager";
                        inputs.nixpkgs.follows = "nixpkgs";
                };
+
+               nixos-hardware.url = "nixos-hardware";
        };
 
-       outputs = { nixpkgs, disko, home-manager, ... }: let
-               hostname = "levanter";
+       outputs = { nixpkgs, disko, home-manager, nixos-hardware, ... }: let
+               vps_hostname = "levanter";
+               laptop_hostname = "monsoon";
        in {
-               nixosConfigurations.${hostname} = nixpkgs.lib.nixosSystem {
-                       specialArgs = {
-                               device = "/dev/sda";
-                               inherit hostname;
-                               ayo_public_key = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIeBrQONJC4u4M0/gYhsMMcVxs+mVlk5bmT7vtReEyK7 ayo@monsoon";
+               nixosConfigurations = {
+                       ${vps_hostname} = nixpkgs.lib.nixosSystem {
+                               specialArgs = {
+                                       device = "/dev/sda";
+                                       hostname = vps_hostname;
+                                       ayo_public_key = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIeBrQONJC4u4M0/gYhsMMcVxs+mVlk5bmT7vtReEyK7 ayo@monsoon";
+                               };
+
+                               modules = [
+                                       disko.nixosModules.disko
+                                       home-manager.nixosModules.home-manager
+                                       ./${vps_hostname}/configuration.nix
+                               ];
                        };
 
-                       modules = [
-                               disko.nixosModules.disko
-                               home-manager.nixosModules.home-manager
-                               ./levanter/configuration.nix
-                       ];
+                       ${laptop_hostname} = nixpkgs.lib.nixosSystem {
+                               specialArgs = {
+                                       hostname = laptop_hostname;
+                               };
+
+                               modules = [
+                                       disko.nixosModules.disko
+                                       nixos-hardware.nixosModules.framework-13-7040-amd
+                                       home-manager.nixosModules.home-manager
+                                       ./${laptop_hostname}/configuration.nix
+                               ];
+                       };
                };
        };
 }
diff --git a/monsoon/configuration.nix b/monsoon/configuration.nix
new file mode 100644 (file)
index 0000000..e060414
--- /dev/null
@@ -0,0 +1,85 @@
+{ pkgs, hostname, ... }: {
+       imports = [
+               ./hardware-configuration.nix
+               ./disko.nix
+       ];
+
+       boot = {
+               loader = {
+                       systemd-boot.enable = true;
+                       efi.canTouchEfiVariables = true;
+               };
+
+               kernelPackages = pkgs.linuxPackages_latest;
+       };
+
+       hardware.amdgpu.opencl.enable = true;
+
+       networking = {
+               hostName = hostname;
+               firewall.allowedTCPPorts = [ 25565 ];
+       };
+
+       services = {
+               displayManager.gdm.enable = true;
+               desktopManager.gnome.enable = true;
+               fprintd.enable = true;
+       };
+
+       users.users."ayo" = {
+               isNormalUser = true;
+               hashedPassword = "$y$j9T$SN8qS1E4b2gLlhMZdIuba1$pxCgfhZkcfnmm.2OrMuALKgzcFmg/UcHdf192yWEP69";
+               extraGroups = [ "wheel" ];
+       };
+
+       home-manager.users."ayo" = {
+               home = {
+                       stateVersion = "25.11";
+
+                       packages = with pkgs; [
+                               git
+                               wakatime-cli
+                               deno
+                               zig
+                               fastfetch
+                               stow
+                               killall
+                               file
+
+                               librewolf
+                               tor-browser
+                               kicad
+                               darktable
+                               gimp
+                               vlc
+                               fragments
+                               signal-desktop
+                               prismlauncher
+                       ];
+               };
+
+               programs.vscode = {
+                       enable = true;
+                       package = pkgs.vscodium;
+
+                       profiles.default.extensions = with pkgs.vscode-extensions; [
+                               wakatime.vscode-wakatime
+                               denoland.vscode-deno
+                               ziglang.vscode-zig
+                               jnoortheen.nix-ide
+                               streetsidesoftware.code-spell-checker
+                               github.copilot-chat
+                               sourcegraph.amp
+                       ];
+               };
+
+               xdg.userDirs = {
+                       enable = true;
+                       createDirectories = true;
+               };
+       };
+
+       system.stateVersion = "25.11";
+       nix.settings.experimental-features = [ "nix-command" "flakes" ];
+       nixpkgs.config.allowUnfree = true;
+}
diff --git a/monsoon/disko.nix b/monsoon/disko.nix
new file mode 100644 (file)
index 0000000..70b6aea
--- /dev/null
@@ -0,0 +1,31 @@
+let
+       device = "/dev/nvme0n1";
+in {
+       disko.devices.disk.${device} = {
+               inherit device;
+
+               content = {
+                       type = "gpt";
+
+                       partitions = {
+                               "boot" = {
+                                       type = "ef00";
+                                       size = "2G";
+
+                                       content = {
+                                               type = "filesystem";
+                                               format = "vfat";
+                                               mountpoint = "/boot";
+                                               mountOptions = [ "umask=77" ];
+                                       };
+                               };
+
+                               "root".content = {
+                                       type = "filesystem";
+                                       format = "ext4";
+                                       mountpoint = "/";
+                               };
+                       };
+               };
+       };
+}
diff --git a/monsoon/hardware-configuration.nix b/monsoon/hardware-configuration.nix
new file mode 100644 (file)
index 0000000..016c5f2
--- /dev/null
@@ -0,0 +1,18 @@
+# Do not modify this file!  It was generated by ‘nixos-generate-config’
+# and may be overwritten by future invocations.  Please make changes
+# to /etc/nixos/configuration.nix instead.
+{ config, lib, pkgs, modulesPath, ... }:
+
+{
+  imports =
+    [ (modulesPath + "/installer/scan/not-detected.nix")
+    ];
+
+  boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "thunderbolt" "usbhid" ];
+  boot.initrd.kernelModules = [ ];
+  boot.kernelModules = [ "kvm-amd" ];
+  boot.extraModulePackages = [ ];
+
+  nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
+  hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
+}