mirror of
https://github.com/alyssadev/nixos.git
synced 2025-10-14 04:59:39 +10:00
add hw
This commit is contained in:
parent
533b95b540
commit
20a01c781a
3 changed files with 47 additions and 6 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1 +0,0 @@
|
|||
hardware-configuration.nix
|
11
flake.nix
11
flake.nix
|
@ -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
41
hw-aly-laptop.nix
Normal 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;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue