use the mkComputer function everywhere

This commit is contained in:
Andreas Zweili 2022-01-03 20:29:08 +01:00
parent ffea9b40c3
commit 0a989caa18
3 changed files with 24 additions and 36 deletions

View File

@ -15,7 +15,7 @@
}; };
outputs = outputs =
inputs @ { self inputs@{ self
, nixpkgs , nixpkgs
, nixpkgs-unstable , nixpkgs-unstable
, nixos-hardware , nixos-hardware
@ -55,12 +55,14 @@
in in
{ {
nixosConfigurations = { nixosConfigurations = {
gwyn = nixpkgs.lib.nixosSystem { gwyn = mkComputer
inherit system pkgs; ./systems/gwyn/configuration.nix
modules = [ [
./systems/gwyn/configuration.nix
nixos-hardware.nixosModules.dell-precision-5530 nixos-hardware.nixosModules.dell-precision-5530
nixos-hardware.nixosModules.common-gpu-nvidia nixos-hardware.nixosModules.common-gpu-nvidia
./hardware/bluetooth
./hardware/nvidia
./modules/desktop.nix
home-manager.nixosModules.home-manager home-manager.nixosModules.home-manager
{ {
home-manager.useGlobalPkgs = true; home-manager.useGlobalPkgs = true;
@ -71,14 +73,13 @@
}; };
} }
]; ];
};
staubfinger = mkComputer staubfinger = mkComputer
./systems/staubfinger/configuration.nix ./systems/staubfinger/configuration.nix
[ [
./modules/desktop.nix
./hardware/bluetooth
nixos-hardware.nixosModules.common-pc-laptop nixos-hardware.nixosModules.common-pc-laptop
nixos-hardware.nixosModules.common-pc-laptop-ssd nixos-hardware.nixosModules.common-pc-laptop-ssd
./hardware/bluetooth
./modules/desktop.nix
home-manager.nixosModules.home-manager home-manager.nixosModules.home-manager
{ {
home-manager.useGlobalPkgs = true; home-manager.useGlobalPkgs = true;
@ -89,10 +90,9 @@
}; };
} }
]; ];
nixos-vm = nixpkgs.lib.nixosSystem { nixos-vm = mkComputer
inherit system pkgs; ./systems/vm/configuration.nix
modules = [ [
./systems/vm/configuration.nix
home-manager.nixosModules.home-manager home-manager.nixosModules.home-manager
{ {
home-manager.useGlobalPkgs = true; home-manager.useGlobalPkgs = true;
@ -103,12 +103,11 @@
}; };
} }
]; ];
};
nixos-test-vm = mkComputer nixos-test-vm = mkComputer
./systems/proxmox-vm/configuration.nix ./systems/proxmox-vm/configuration.nix
[ [
./modules/docker.nix
./modules/code-server ./modules/code-server
./modules/docker.nix
home-manager.nixosModules.home-manager home-manager.nixosModules.home-manager
{ {
home-manager.useGlobalPkgs = true; home-manager.useGlobalPkgs = true;

View File

@ -2,8 +2,6 @@
{ {
imports = imports =
[ [
../../modules/desktop.nix
../../hardware/bluetooth
./hardware-configuration.nix ./hardware-configuration.nix
]; ];

View File

@ -1,10 +1,5 @@
{ lib, ... }: { lib, ... }:
{ {
imports = [
../../hardware/nvidia
];
boot.initrd.availableKernelModules = [ boot.initrd.availableKernelModules = [
"aesni_intel" "aesni_intel"
"ahci" "ahci"
@ -22,22 +17,18 @@
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
boot.kernelParams = [ ]; boot.kernelParams = [ ];
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
boot.initrd.luks.devices."cryptlvm".device = "/dev/nvme0n1p2"; boot.initrd.luks.devices."cryptlvm".device = "/dev/nvme0n1p2";
fileSystems."/" =
{
device = "/dev/disk/by-label/nixos";
fsType = "ext4";
};
fileSystems."/boot" =
{
device = "/dev/disk/by-label/BOOT";
fsType = "vfat";
};
swapDevices =
[{ device = "/dev/disk/by-label/swap"; }];
fileSystems."/" = {
device = "/dev/disk/by-label/nixos";
fsType = "ext4";
};
fileSystems."/boot" = {
device = "/dev/disk/by-label/BOOT";
fsType = "vfat";
};
swapDevices = [
{ device = "/dev/disk/by-label/swap"; }
];
} }