Compare commits

...

4 commits

3 changed files with 59 additions and 39 deletions

View file

@ -1,13 +1,35 @@
{ {
services.xserver = { services = {
enable = true; xserver = {
displayManager = { enable = true;
gdm.enable = true; displayManager = {
gdm = {
enable = true;
autoSuspend = false;
};
desktopManager = {
gnome.enable = true;
};
layout = "us";
xkbVariant = "";
}; };
desktopManager = { logind.lidSwitch = "ignore";
gnome.enable = true; };
}; security.polkit.extraConfig = ''
layout = "us"; polkit.addRule(function(action, subject) {
xkbVariant = ""; if (action.id == "org.freedesktop.login1.suspend" ||
action.id == "org.freedesktop.login1.suspend-multiple-sessions" ||
action.id == "org.freedesktop.login1.hibernate" ||
action.id == "org.freedesktop.login1.hibernate-multiple-sessions")
{
return polkit.Result.NO;
}
});
'';
systemd.targets = {
sleep.enable = false;
suspend.enable = false;
hibernate.enable = false;
hybrid-sleep.enable = false;
}; };
} }

View file

@ -16,13 +16,6 @@
../common/optional/sshd.nix ../common/optional/sshd.nix
]; ];
boot = {
loader = {
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
};
};
networking = { networking = {
hostName = "pixnix"; hostName = "pixnix";
networkmanager.enable = true; networkmanager.enable = true;

View file

@ -1,38 +1,43 @@
# 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, modulesPath, ... }: { config, lib, pkgs, modulesPath, ... }:
{ {
imports = imports = [
[ (modulesPath + "/installer/scan/not-detected.nix") (modulesPath + "/installer/scan/not-detected.nix")
]; ];
boot.initrd.availableKernelModules = [ "xhci_pci" "usb_storage" "sd_mod" "sdhci_pci" ]; boot = {
boot.initrd.kernelModules = [ ]; initrd = {
boot.kernelModules = [ "kvm-intel" ]; availableKernelModules = [ "xhci_pci" "usb_storage" "sd_mod" "sdhci_pci" ];
boot.extraModulePackages = [ ]; kernelModules = [ ];
};
kernelModules = [ "kvm-intel" ];
extraModulePackages = [ ];
loader = {
systemd-boot = {
enable = true;
consoleMode = "max";
};
efi.canTouchEfiVariables = true;
};
};
fileSystems."/" =
{ device = "/dev/disk/by-uuid/b2c7656b-2292-4dc9-94f2-a66690a14969"; filesystems = {
"/" = {
device = "/dev/disk/by-uuid/b2c7656b-2292-4dc9-94f2-a66690a14969";
fsType = "ext4"; fsType = "ext4";
}; };
"/boot" = {
fileSystems."/boot" = device = "/dev/disk/by-uuid/495A-C854";
{ device = "/dev/disk/by-uuid/495A-C854";
fsType = "vfat"; fsType = "vfat";
}; };
};
swapDevices = swapDevices = [{
[ { device = "/dev/disk/by-uuid/9cd48b44-07e5-4d0f-aaf0-7ca07e7b7945"; } device = "/dev/disk/by-uuid/9cd48b44-07e5-4d0f-aaf0-7ca07e7b7945";
]; }];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true; networking.useDHCP = lib.mkDefault true;
# networking.interfaces.wlp1s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";