Skip to content

Commit

Permalink
automattic: init machine
Browse files Browse the repository at this point in the history
Signed-off-by: Sumner Evans <me@sumnerevans.com>
  • Loading branch information
sumnerevans committed Apr 12, 2024
1 parent 469b019 commit f522b60
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 1 deletion.
6 changes: 6 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@
specialArgs = { inherit inputs; };
modules = [ ./configuration.nix ./host-configurations/mustafar.nix ];
};
automattic = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = { inherit inputs; };
modules =
[ ./configuration.nix ./host-configurations/automattic.nix ];
};
};
} // (flake-utils.lib.eachDefaultSystem (system:
let pkgs = import nixpkgs { system = system; };
Expand Down
55 changes: 55 additions & 0 deletions host-configurations/automattic.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
{ config, lib, pkgs, modulesPath, ... }: {
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];

# Set the hostname
networking.hostName = "automattic";
hardware.isPC = true;
hardware.ramSize = 32;
hardware.isLaptop = true;
hardware.cpu.amd.updateMicrocode =
lib.mkDefault config.hardware.enableRedistributableFirmware;

services.thinkfan.enable = true;

# Use systemd-boot
boot = {
loader.systemd-boot.enable = true;
initrd = {
availableKernelModules =
[ "nvme" "xhci_pci" "thunderbolt" "usb_storage" "sd_mod" ];
kernelModules = [ ];
};
kernelModules = [ "kvm-amd" ];
extraModulePackages = [ ];
kernelPackages = pkgs.linuxPackages_latest;
};

# Set up networking.
networking.useDHCP = lib.mkDefault true;

# Enable the OpenSSH daemon.
services.openssh.enable = true;

programs.sway.enable = true;
programs.steam.enable = true;

# Enable Docker.
virtualisation.docker.enable = true;

# Extra options for btrfs
fileSystems = {
"/" = {
device = "/dev/disk/by-uuid/e5c1f6c9-4417-4da6-9df9-ebc014050fed";
fsType = "ext4";
};
"/boot" = {
device = "/dev/disk/by-uuid/3A7A-964C";
fsType = "vfat";
};
};

swapDevices = [{
device = "/var/lib/swapfile";
size = 32 * 1024;
}];
}
1 change: 0 additions & 1 deletion host-configurations/scarif.nix
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
};

# Set up networking.
networking.interfaces.wlp1s0.useDHCP = true;
networking.useDHCP = lib.mkDefault true;

# Enable the OpenSSH daemon.
Expand Down

0 comments on commit f522b60

Please sign in to comment.