# 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
```
"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,
"inputs": {
"disko": "disko",
"home-manager": "home-manager",
+ "nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs"
}
}
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
+ ];
+ };
};
};
}
--- /dev/null
+{ 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;
+}
--- /dev/null
+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 = "/";
+ };
+ };
+ };
+ };
+}
--- /dev/null
+# 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;
+}