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;
|
mypkgs = import ./pkgs;
|
||||||
deploy = import lib/deploy.nix;
|
deploy = import lib/deploy.nix;
|
||||||
|
|
||||||
hardware = import lib/hardware.nix;
|
|
||||||
|
|
||||||
forAllSystems = f: nixpkgs.lib.genAttrs
|
forAllSystems = f: nixpkgs.lib.genAttrs
|
||||||
[ "x86_64-linux" "aarch64-linux" ]
|
[ "x86_64-linux" "aarch64-linux" ]
|
||||||
(system: f system);
|
(system: f system);
|
||||||
|
@ -41,13 +39,13 @@
|
||||||
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
lib = { inherit forAllSystems hardware deploy; };
|
lib = { inherit forAllSystems deploy; };
|
||||||
|
|
||||||
nixosModules = mods // { default.imports = builtins.attrValues mods; };
|
nixosModules = mods // { default.imports = builtins.attrValues mods; };
|
||||||
|
|
||||||
nixosConfigurations = builtins.mapAttrs
|
nixosConfigurations = builtins.mapAttrs
|
||||||
(_: nixpkgs.lib.nixosSystem)
|
(_: nixpkgs.lib.nixosSystem)
|
||||||
(import ./hosts hardware self.nixosModules.default);
|
(import ./hosts self.nixosModules.default);
|
||||||
|
|
||||||
apps = forAllSystems (system:
|
apps = forAllSystems (system:
|
||||||
import lib/apps.nix nixpkgs.legacyPackages.${system});
|
import lib/apps.nix nixpkgs.legacyPackages.${system});
|
||||||
|
|
|
@ -33,6 +33,9 @@
|
||||||
kernelParams = map (x: "video=DP-${x}:1280x720@60") [ "0" "1" "2" ];
|
kernelParams = map (x: "video=DP-${x}:1280x720@60") [ "0" "1" "2" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
hardware.cpu.amd.updateMicrocode = true;
|
||||||
|
hardware.enableRedistributableFirmware = true;
|
||||||
|
|
||||||
fileSystems = {
|
fileSystems = {
|
||||||
"/" = { device = "tmpfs"; fsType = "tmpfs"; options = [ "mode=755" ]; };
|
"/" = { device = "tmpfs"; fsType = "tmpfs"; options = [ "mode=755" ]; };
|
||||||
"/boot" = { device = "/dev/disk/by-partlabel/_esp"; fsType = "vfat"; };
|
"/boot" = { device = "/dev/disk/by-partlabel/_esp"; fsType = "vfat"; };
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
hardware: nixosModule:
|
nixosModule:
|
||||||
with hardware;
|
|
||||||
|
|
||||||
builtins.mapAttrs
|
builtins.mapAttrs
|
||||||
|
|
||||||
(name: { system, mods }: {
|
(name: system: {
|
||||||
inherit system;
|
inherit system;
|
||||||
modules = mods ++ [
|
modules = [
|
||||||
nixosModule
|
nixosModule
|
||||||
|
(./. + "/${name}")
|
||||||
{ networking.hostName = name; }
|
{ networking.hostName = name; }
|
||||||
];
|
];
|
||||||
})
|
})
|
||||||
|
|
||||||
{
|
{
|
||||||
cube = { system = "x86_64-linux"; mods = [ physical ./cube ]; };
|
cube = "x86_64-linux";
|
||||||
hp = { system = "x86_64-linux"; mods = [ physical ./hp ]; };
|
hp = "x86_64-linux";
|
||||||
lenny = { system = "x86_64-linux"; mods = [ physical ./lenny ]; };
|
lenny = "x86_64-linux";
|
||||||
nixdev = { system = "x86_64-linux"; mods = [ qemu ./nixdev ]; };
|
nixdev = "x86_64-linux";
|
||||||
slate = { system = "x86_64-linux"; mods = [ physical ./slate ]; };
|
slate = "x86_64-linux";
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,6 +30,9 @@
|
||||||
loader.efi.canTouchEfiVariables = false;
|
loader.efi.canTouchEfiVariables = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
hardware.cpu.intel.updateMicrocode = true;
|
||||||
|
hardware.enableRedistributableFirmware = true;
|
||||||
|
|
||||||
fileSystems = {
|
fileSystems = {
|
||||||
"/" = { device = "tmpfs"; fsType = "tmpfs"; options = [ "mode=755" ]; };
|
"/" = { device = "tmpfs"; fsType = "tmpfs"; options = [ "mode=755" ]; };
|
||||||
"/nix" = { device = "zroot/locker/nix"; fsType = "zfs"; };
|
"/nix" = { device = "zroot/locker/nix"; fsType = "zfs"; };
|
||||||
|
|
|
@ -37,6 +37,9 @@
|
||||||
loader.efi.canTouchEfiVariables = true;
|
loader.efi.canTouchEfiVariables = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
hardware.cpu.intel.updateMicrocode = true;
|
||||||
|
hardware.enableRedistributableFirmware = true;
|
||||||
|
|
||||||
fileSystems = {
|
fileSystems = {
|
||||||
"/" = { device = "tmpfs"; fsType = "tmpfs"; options = [ "mode=755" "size=4G" ]; };
|
"/" = { device = "tmpfs"; fsType = "tmpfs"; options = [ "mode=755" "size=4G" ]; };
|
||||||
"/nix" = { device = "lenny/locker/nix"; fsType = "zfs"; };
|
"/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 = {
|
sconfig = {
|
||||||
gnome = true;
|
gnome = true;
|
||||||
profile = "desktop";
|
profile = "desktop";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
services.qemuGuest.enable = true;
|
||||||
|
|
||||||
services.openssh.enable = true;
|
services.openssh.enable = true;
|
||||||
|
|
||||||
users.mutableUsers = false;
|
users.mutableUsers = false;
|
||||||
|
|
|
@ -11,6 +11,9 @@
|
||||||
initrd.luks.devices.cryptroot = { device = "/dev/disk/by-partlabel/_luks"; };
|
initrd.luks.devices.cryptroot = { device = "/dev/disk/by-partlabel/_luks"; };
|
||||||
};
|
};
|
||||||
|
|
||||||
|
hardware.cpu.intel.updateMicrocode = true;
|
||||||
|
hardware.enableRedistributableFirmware = true;
|
||||||
|
|
||||||
fileSystems = {
|
fileSystems = {
|
||||||
"/" = { device = "/dev/mapper/cryptroot"; fsType = "btrfs"; options = [ "subvol=/os" "discard" "compress=zstd" ]; };
|
"/" = { 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" ]; };
|
"/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