1
Fork 0

feat: hardware stuff

This commit is contained in:
Matei Adriel 2021-11-21 15:52:49 +02:00
parent 38b5c3488a
commit 7ec6dc54a2
3 changed files with 49 additions and 6 deletions

View file

@ -1,7 +1,5 @@
{ pkgs, lib, ... }: { pkgs, lib, ... }: {
let sources = import ./nix/sources.nix; imports = [ ./modules ];
in {
imports = [ "${sources.home-manager}/nixos" ./modules ];
nixpkgs.config.allowBroken = true; nixpkgs.config.allowBroken = true;
boot.loader.systemd-boot.enable = true; boot.loader.systemd-boot.enable = true;

View file

@ -1,8 +1,23 @@
{ {
outputs = { self, nixpkgs }: { description = "NixOS configuration";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/release-21.05";
nixos-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
home.url = "github:nix-community/home-manager/release-21.05";
home.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = { self, nixpkgs, home-manager, ... }: {
nixosConfigurations.nixos = nixpkgs.lib.nixosSystem { nixosConfigurations.nixos = nixpkgs.lib.nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";
modules = [ /etc/nixos/hardware-configuration.nix ./configuration.nix ]; modules = [
home-manager.nixosModules.home-manager
./hardware/laptop.nix
./configuration.nix
];
}; };
}; };
} }

30
hardware/laptop.nix Normal file
View file

@ -0,0 +1,30 @@
# 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, ... }:
{
imports =
[ <nixpkgs/nixos/modules/installer/scan/not-detected.nix>
];
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usb_storage" "sd_mod" "sdhci_pci" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/57846041-f177-45eb-aff3-503006bac638";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/01E6-A013";
fsType = "vfat";
};
swapDevices = [ ];
nix.maxJobs = lib.mkDefault 8;
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
}