mirror of
https://github.com/buckley310/nixos-config.git
synced 2024-11-09 18:47:02 +00:00
remove hardware module
This commit is contained in:
parent
32c889d46a
commit
eab4920463
8 changed files with 30 additions and 33 deletions
|
@ -7,8 +7,6 @@
|
|||
mypkgs = import ./pkgs;
|
||||
deploy = import lib/deploy.nix;
|
||||
|
||||
hardware = import lib/hardware.nix;
|
||||
|
||||
forAllSystems = f: nixpkgs.lib.genAttrs
|
||||
[ "x86_64-linux" "aarch64-linux" ]
|
||||
(system: f system);
|
||||
|
@ -41,13 +39,13 @@
|
|||
|
||||
in
|
||||
{
|
||||
lib = { inherit forAllSystems hardware deploy; };
|
||||
lib = { inherit forAllSystems deploy; };
|
||||
|
||||
nixosModules = mods // { default.imports = builtins.attrValues mods; };
|
||||
|
||||
nixosConfigurations = builtins.mapAttrs
|
||||
(_: nixpkgs.lib.nixosSystem)
|
||||
(import ./hosts hardware self.nixosModules.default);
|
||||
(import ./hosts self.nixosModules.default);
|
||||
|
||||
apps = forAllSystems (system:
|
||||
import lib/apps.nix nixpkgs.legacyPackages.${system});
|
||||
|
|
|
@ -33,6 +33,9 @@
|
|||
kernelParams = map (x: "video=DP-${x}:1280x720@60") [ "0" "1" "2" ];
|
||||
};
|
||||
|
||||
hardware.cpu.amd.updateMicrocode = true;
|
||||
hardware.enableRedistributableFirmware = true;
|
||||
|
||||
fileSystems = {
|
||||
"/" = { device = "tmpfs"; fsType = "tmpfs"; options = [ "mode=755" ]; };
|
||||
"/boot" = { device = "/dev/disk/by-partlabel/_esp"; fsType = "vfat"; };
|
||||
|
|
|
@ -1,20 +1,20 @@
|
|||
hardware: nixosModule:
|
||||
with hardware;
|
||||
nixosModule:
|
||||
|
||||
builtins.mapAttrs
|
||||
|
||||
(name: { system, mods }: {
|
||||
(name: system: {
|
||||
inherit system;
|
||||
modules = mods ++ [
|
||||
modules = [
|
||||
nixosModule
|
||||
(./. + "/${name}")
|
||||
{ networking.hostName = name; }
|
||||
];
|
||||
})
|
||||
|
||||
{
|
||||
cube = { system = "x86_64-linux"; mods = [ physical ./cube ]; };
|
||||
hp = { system = "x86_64-linux"; mods = [ physical ./hp ]; };
|
||||
lenny = { system = "x86_64-linux"; mods = [ physical ./lenny ]; };
|
||||
nixdev = { system = "x86_64-linux"; mods = [ qemu ./nixdev ]; };
|
||||
slate = { system = "x86_64-linux"; mods = [ physical ./slate ]; };
|
||||
cube = "x86_64-linux";
|
||||
hp = "x86_64-linux";
|
||||
lenny = "x86_64-linux";
|
||||
nixdev = "x86_64-linux";
|
||||
slate = "x86_64-linux";
|
||||
}
|
||||
|
|
|
@ -30,6 +30,9 @@
|
|||
loader.efi.canTouchEfiVariables = false;
|
||||
};
|
||||
|
||||
hardware.cpu.intel.updateMicrocode = true;
|
||||
hardware.enableRedistributableFirmware = true;
|
||||
|
||||
fileSystems = {
|
||||
"/" = { device = "tmpfs"; fsType = "tmpfs"; options = [ "mode=755" ]; };
|
||||
"/nix" = { device = "zroot/locker/nix"; fsType = "zfs"; };
|
||||
|
|
|
@ -37,6 +37,9 @@
|
|||
loader.efi.canTouchEfiVariables = true;
|
||||
};
|
||||
|
||||
hardware.cpu.intel.updateMicrocode = true;
|
||||
hardware.enableRedistributableFirmware = true;
|
||||
|
||||
fileSystems = {
|
||||
"/" = { device = "tmpfs"; fsType = "tmpfs"; options = [ "mode=755" "size=4G" ]; };
|
||||
"/nix" = { device = "lenny/locker/nix"; fsType = "zfs"; };
|
||||
|
|
|
@ -1,10 +1,16 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
{ config, lib, modulesPath, pkgs, ... }:
|
||||
{
|
||||
imports = [
|
||||
"${modulesPath}/profiles/qemu-guest.nix"
|
||||
];
|
||||
|
||||
sconfig = {
|
||||
gnome = true;
|
||||
profile = "desktop";
|
||||
};
|
||||
|
||||
services.qemuGuest.enable = true;
|
||||
|
||||
services.openssh.enable = true;
|
||||
|
||||
users.mutableUsers = false;
|
||||
|
|
|
@ -11,6 +11,9 @@
|
|||
initrd.luks.devices.cryptroot = { device = "/dev/disk/by-partlabel/_luks"; };
|
||||
};
|
||||
|
||||
hardware.cpu.intel.updateMicrocode = true;
|
||||
hardware.enableRedistributableFirmware = true;
|
||||
|
||||
fileSystems = {
|
||||
"/" = { device = "/dev/mapper/cryptroot"; fsType = "btrfs"; options = [ "subvol=/os" "discard" "compress=zstd" ]; };
|
||||
"/home" = { device = "/dev/mapper/cryptroot"; fsType = "btrfs"; options = [ "subvol=/home" "discard" "compress=zstd" ]; };
|
||||
|
|
|
@ -1,19 +0,0 @@
|
|||
{
|
||||
physical = { lib, ... }: lib.mkMerge
|
||||
[
|
||||
{ hardware.cpu.amd.updateMicrocode = true; }
|
||||
{ hardware.cpu.intel.updateMicrocode = true; }
|
||||
{ hardware.enableRedistributableFirmware = true; }
|
||||
];
|
||||
|
||||
qemu = { config, lib, modulesPath, ... }: lib.mkMerge
|
||||
[
|
||||
(import "${modulesPath}/profiles/qemu-guest.nix" { inherit config lib; })
|
||||
{ services.qemuGuest.enable = true; }
|
||||
];
|
||||
|
||||
vmware = { lib, ... }: lib.mkMerge
|
||||
[
|
||||
{ virtualisation.vmware.guest.enable = true; }
|
||||
];
|
||||
}
|
Loading…
Reference in a new issue