Move server stuff to T420-Laptop
This commit is contained in:
parent
5cb4e11286
commit
9b08252935
@ -1,15 +1,7 @@
|
|||||||
{ inputs, ... }: {
|
{ inputs, ... }: {
|
||||||
imports = with inputs.self.nixosModules; [
|
imports = [
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
inputs.self.nixosProfiles.desktop
|
inputs.self.nixosProfiles.desktop
|
||||||
gitea
|
|
||||||
jitsi
|
|
||||||
mailserver
|
|
||||||
matrix-synapse
|
|
||||||
minidlna
|
|
||||||
nextcloud
|
|
||||||
nginx
|
|
||||||
vsftpd
|
|
||||||
];
|
];
|
||||||
deviceSpecific.devInfo = {
|
deviceSpecific.devInfo = {
|
||||||
cpu = {
|
cpu = {
|
||||||
|
@ -1,7 +1,21 @@
|
|||||||
{ inputs, ... }: {
|
{ inputs, ... }: {
|
||||||
imports = [ ./hardware-configuration.nix inputs.self.nixosProfiles.desktop ];
|
imports = with inputs.self.nixosModules; [
|
||||||
|
./hardware-configuration.nix
|
||||||
|
inputs.self.nixosProfiles.desktop
|
||||||
|
gitea
|
||||||
|
jitsi
|
||||||
|
mailserver
|
||||||
|
matrix-synapse
|
||||||
|
minidlna
|
||||||
|
nextcloud
|
||||||
|
nginx
|
||||||
|
vsftpd
|
||||||
|
];
|
||||||
|
|
||||||
|
security.sudo.wheelNeedsPassword = false;
|
||||||
|
|
||||||
deviceSpecific.devInfo = {
|
deviceSpecific.devInfo = {
|
||||||
legacy = false;
|
legacy = true;
|
||||||
cpu = {
|
cpu = {
|
||||||
vendor = "intel";
|
vendor = "intel";
|
||||||
clock = 2500;
|
clock = 2500;
|
||||||
|
@ -1,29 +1,33 @@
|
|||||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||||
# and may be overwritten by future invocations. Please make changes
|
# and may be overwritten by future invocations. Please make changes
|
||||||
# to /etc/nixos/configuration.nix instead.
|
# to /etc/nixos/configuration.nix instead.
|
||||||
{ config, lib, pkgs, inputs, ... }:
|
{ config, lib, pkgs, modulesPath, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports =
|
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||||
[ "${inputs.nixpkgs}/nixos/modules/installer/scan/not-detected.nix" ];
|
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = [ "ehci_pci" "ahci" "usb_storage" "sd_mod" "sdhci_pci" ];
|
boot.initrd.availableKernelModules =
|
||||||
|
[ "ehci_pci" "ahci" "uas" "sd_mod" "sdhci_pci" ];
|
||||||
boot.initrd.kernelModules = [ ];
|
boot.initrd.kernelModules = [ ];
|
||||||
boot.kernelModules = [ "kvm-intel" ];
|
boot.kernelModules = [ "kvm-intel" ];
|
||||||
boot.extraModulePackages = [ ];
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
fileSystems."/" =
|
fileSystems."/" = {
|
||||||
{ device = "/dev/disk/by-uuid/29edff1b-4457-4d0c-9dfc-2cf5b6afcb46";
|
device = "/dev/disk/by-uuid/29edff1b-4457-4d0c-9dfc-2cf5b6afcb46";
|
||||||
fsType = "ext4";
|
fsType = "ext4";
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/boot" =
|
fileSystems."/boot" = {
|
||||||
{ device = "/dev/disk/by-uuid/4976-D10F";
|
device = "/dev/disk/by-uuid/4976-D10F";
|
||||||
fsType = "vfat";
|
fsType = "vfat";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
fileSystems."/var" = {
|
||||||
|
device = "/dev/disk/by-uuid/ad3f31e2-e6d1-43a0-a1ef-7f493fd3a9e2";
|
||||||
|
fsType = "ext4";
|
||||||
|
};
|
||||||
|
|
||||||
swapDevices = [ ];
|
swapDevices = [ ];
|
||||||
|
|
||||||
nix.maxJobs = lib.mkDefault 4;
|
|
||||||
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
|
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
|
||||||
}
|
}
|
||||||
|
@ -1,13 +1,17 @@
|
|||||||
{ lib, pkgs, config, ... }: {
|
{ lib, pkgs, config, ... }: {
|
||||||
boot = {
|
boot = {
|
||||||
loader.timeout = 1;
|
loader = {
|
||||||
|
timeout = 1;
|
||||||
loader.systemd-boot.enable = lib.mkIf (pkgs.system == "x86_64-linux") true;
|
} // (if config.deviceSpecific.devInfo.legacy or false then { # Non-UEFI config
|
||||||
|
grub.enable = true;
|
||||||
loader.grub.enable = false;
|
grub.version = 2;
|
||||||
|
grub.useOSProber = true;
|
||||||
|
grub.device = "/dev/sda";
|
||||||
|
} else { # UEFI config
|
||||||
|
systemd-boot.enable = true;
|
||||||
|
});
|
||||||
kernelParams = [ "quiet" "scsi_mod.use_blk_mq=1" "modeset" "nofb" ]
|
kernelParams = [ "quiet" "scsi_mod.use_blk_mq=1" "modeset" "nofb" ]
|
||||||
++ lib.optional (pkgs.system == "x86_64-linux") [
|
++ lib.optionals (pkgs.system == "x86_64-linux") [
|
||||||
"rd.systemd.show_status=auto"
|
"rd.systemd.show_status=auto"
|
||||||
"rd.udev.log_priority=3"
|
"rd.udev.log_priority=3"
|
||||||
"pti=off"
|
"pti=off"
|
||||||
|
@ -22,6 +22,7 @@ with types; {
|
|||||||
size = mkOption { type = int; };
|
size = mkOption { type = int; };
|
||||||
};
|
};
|
||||||
ram = mkOption { type = int; };
|
ram = mkOption { type = int; };
|
||||||
|
legacy = mkOption { type = bool; default = false; };
|
||||||
bigScreen = mkOption {
|
bigScreen = mkOption {
|
||||||
type = bool;
|
type = bool;
|
||||||
default = true;
|
default = true;
|
||||||
|
Loading…
Reference in New Issue
Block a user