Configure desktop

inky
Elnu 2 years ago
parent 0461a90ff8
commit 58c1114531

@ -9,6 +9,33 @@ let
lib = nixpkgs.lib;
in
{
desktop = lib.nixosSystem {
inherit system;
specialArgs = { inherit user; };
modules = [
./desktop
./configuration.nix
./desktop.nix
{
boot.loader.grub.gfxmodeEfi = "1920x1080";
networking.hostName = "${user}";
}
home-manager.nixosModules.home-manager {
home-manager = {
useUserPackages = true;
extraSpecialArgs = { inherit user; };
users.${user} = {
imports = [
(import ./home.nix)
(import ./desktop/home.nix)
];
};
};
}
];
};
x220 = lib.nixosSystem {
inherit system;
specialArgs = { inherit user; };

@ -0,0 +1,29 @@
{ ... }:
{
imports = [ (import ./hardware-configuration.nix) ];
services.xserver = {
videoDrivers = [ "nvidia" ];
# nvidiaXineramaInfoOrder sets primary display
# DFP-0 is default and would set left monitor, DVI-D-0, to be primary
screenSection = ''
Option "metamodes" "DVI-D-0: 1920x1080 +0+0, HDMI-0: 1920x1080 +1920+0, DP-3: 1920x1080 +1920+0"
Option "nvidiaXineramaInfoOrder" "DFP-1"
'';
};
hardware.opengl.enable = true;
boot.loader = {
efi = {
canTouchEfiVariables = true;
efiSysMountPoint = "/boot";
};
grub = {
efiSupport = true;
device = "nodev";
useOSProber = true;
};
};
}

@ -0,0 +1,40 @@
# 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, ... }:
{
imports = [ ];
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
boot.kernelPackages = pkgs.linuxPackages_latest;
boot.kernelModules = [ "kvm-intel" "coretemp" ];
boot.extraModulePackages = [ ];
hardware.enableAllFirmware = true;
hardware.enableRedistributableFirmware = true;
fileSystems = {
"/" = {
device = "/dev/disk/by-label/nixos";
fsType = "ext4";
};
"/boot" = {
device = "/dev/disk/by-label/boot";
fsType = "vfat";
};
};
swapDevices = [ ];
# 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.interfaces.eno2.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

@ -0,0 +1,5 @@
{ ... }:
{
imports = [ (import ./i3.nix) ];
}

@ -0,0 +1,14 @@
{ ... }:
{
xsession.windowManager.i3.config.workspaceOutputAssign = [
{
output = "HDMI-0";
workspace = "1";
}
{
output = "DVI-D-0";
workspace = "2";
}
];
}

@ -100,6 +100,10 @@ in {
command = "border pixel 0";
criteria = { class = "^.*"; };
}
{
command = "floating enable";
criteria = { class = "Nextcloud"; };
}
];
bars = [];
};

Loading…
Cancel
Save