This commit is contained in:
alydev 2025-09-23 18:47:53 +10:00
parent 533b95b540
commit 20a01c781a
3 changed files with 47 additions and 6 deletions

1
.gitignore vendored
View file

@ -1 +0,0 @@
hardware-configuration.nix

View file

@ -7,14 +7,17 @@
url = "github:nix-community/home-manager/release-25.05";
inputs.nixpkgs.follows = "nixpkgs";
};
authorizedKeys = builtins.fetchurl {
url = "https://aly.pet/authorized_keys.nix";
};
};
outputs = inputs@{ nixpkgs, home-manager, ... }: {
outputs = inputs@{ nixpkgs, home-manager, authorizedKeys, ... }: {
nixosConfigurations = {
aly-laptop = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
./hardware-configuration.nix
./hw-aly-laptop.nix
({ config, pkgs, ... }: {
networking.hostName = "aly-laptop";
services.logind = {
@ -51,9 +54,7 @@
isNormalUser = true;
description = "aly";
hashedPassword = "$y$j9T$Q.yFJjo9LMA8o.7Ac5uSr/$Y8pYIPSzCXHSd4nAlUohaaohwpquK6XEIjxFKq3J4s/";
openssh.authorizedKeys.keys = import builtins.fetchurl {
url = "https://aly.pet/authorized_keys.nix";
};
openssh.authorizedKeys.keys = import authorizedKeys;
extraGroups = [ "networkmanager" "wheel" ];
};

41
hw-aly-laptop.nix Normal file
View file

@ -0,0 +1,41 @@
# 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 = [ "xhci_pci" "nvme" "uas" "sd_mod" "rtsx_pci_sdmmc" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/ef82934f-dab4-42bb-9b9a-2b8d74c4e4e4";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/35CB-B28A";
fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ];
};
swapDevices =
[ { device = "/dev/disk/by-uuid/9a5ddb1d-cc66-4861-ba04-f4a3e4363500"; }
];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.enp0s31f6.useDHCP = lib.mkDefault true;
# networking.interfaces.wlp2s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}