mirror of
https://github.com/eRgo35/nix-config.git
synced 2026-02-04 11:26:12 +01:00
alejandra and dwm xf86 keys
This commit is contained in:
@@ -12,9 +12,9 @@
|
||||
./services.nix
|
||||
./users.nix
|
||||
./docker.nix
|
||||
./x.nix
|
||||
];
|
||||
|
||||
|
||||
nixpkgs = {
|
||||
# You can add overlays here
|
||||
overlays = [
|
||||
@@ -39,7 +39,7 @@
|
||||
allowUnfree = true;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
# This will add each flake input as a registry
|
||||
# To make nix3 commands consistent with your flake
|
||||
nix.registry = (lib.mapAttrs (_: flake: {inherit flake;})) ((lib.filterAttrs (_: lib.isType "flake")) inputs);
|
||||
@@ -75,7 +75,7 @@
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
# Enables wireless support via wpa_supplicant
|
||||
# networking.wireless.enable = true;
|
||||
# networking.wireless.enable = true;
|
||||
|
||||
# Configure network proxy if necessary
|
||||
# networking.proxy.default = "http://user:password@proxy:port/";
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
randomizedDelaySec = "45min";
|
||||
};
|
||||
|
||||
environment.systemPackages = (with pkgs; [
|
||||
environment.systemPackages = with pkgs; [
|
||||
# vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
|
||||
# wget
|
||||
ntfs3g
|
||||
@@ -27,9 +27,9 @@
|
||||
unstable.nh
|
||||
nix-output-monitor
|
||||
nvd
|
||||
]);
|
||||
];
|
||||
|
||||
fonts.packages = with pkgs; [
|
||||
fonts.packages = with pkgs; [
|
||||
nerdfonts
|
||||
noto-fonts
|
||||
noto-fonts-cjk
|
||||
|
||||
@@ -6,9 +6,8 @@
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
|
||||
# I use zsh btw
|
||||
environment.shells = with pkgs; [ bash zsh ];
|
||||
environment.shells = with pkgs; [bash zsh];
|
||||
users.defaultUserShell = pkgs.zsh;
|
||||
programs.zsh.enable = true;
|
||||
|
||||
@@ -40,11 +39,11 @@
|
||||
|
||||
# Some programs need SUID wrappers, can be configured further or are
|
||||
# started in user sessions.
|
||||
programs.mtr.enable = true;
|
||||
programs.gnupg.agent = {
|
||||
enable = true;
|
||||
enableSSHSupport = true;
|
||||
};
|
||||
programs.mtr.enable = true;
|
||||
programs.gnupg.agent = {
|
||||
enable = true;
|
||||
enableSSHSupport = true;
|
||||
};
|
||||
|
||||
# This setups a SSH server. Very important if you're setting up a headless system.
|
||||
# Feel free to remove if you don't need it.
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
openssh.authorizedKeys.keys = [
|
||||
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDfqPj+a2gmoUl3TuGSZxf0zRBabVWvXRrjLF7sFlqjMbfkx428F3L7C8OC3Z9XDT4ysbpgWcPuVKNtK5kkKGjSLHAgB2CgvD15K11Q+ag1+uyePaiOypZYJewvv1hhqU5IrVcxUbTsbREH/IsdQSlNSuyNFIr3oFnrff5iKEKEwEvSDeiqpqRh56pAkF6Kb15aYqZO7X9rbfoa8Sgj3VJXN0181lXMjXkNsYVa3gDmKv89C6qutg+KOpHlXgn4AfIRcCw8ik6OGBEfi/gUeb3SYpD+7undNLyloxCbGwHQ40IdoqPatyhTNS4jm9kb+Tno4hj0pbLHZSUdXgGaSfGx1W0MVVY0mm0Hu7EmYDBHUTfmPmPxnolWh8UH+XdkNPnwZfyZlyBcVVkVzog1ZCs1i9Y6oS1ZIbzuz+WxBPPDIHMRdmxv6+PMc5kZyrpuX1PgFb7Xt5cRNAL5/wywoi9Z45SS7qP9zNSb443UaaXzUatqnlawZ0GS0qXJh3ljwJ8= mike@odin"
|
||||
];
|
||||
extraGroups = [ "networkmanager" "wheel" "docker" "libvirtd" ];
|
||||
extraGroups = ["networkmanager" "wheel" "docker" "libvirtd"];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
28
hosts/common/x.nix
Normal file
28
hosts/common/x.nix
Normal file
@@ -0,0 +1,28 @@
|
||||
{
|
||||
inputs,
|
||||
outputs,
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
services.udisks2.enable = true;
|
||||
security.polkit.enable = true;
|
||||
services.upower.enable = config.powerManagement.enable;
|
||||
services.gvfs.enable = true;
|
||||
|
||||
services.autorandr = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
autorandr
|
||||
xorg.xrandr
|
||||
xorg.libX11
|
||||
xorg.libX11.dev
|
||||
xorg.libXft
|
||||
xorg.libXinerama
|
||||
xorg.xbacklight
|
||||
pulseaudioFull
|
||||
];
|
||||
}
|
||||
@@ -1,13 +1,13 @@
|
||||
# Edit this configuration file to define what should be installed on
|
||||
# your system. Help is available in the configuration.nix(5) man page
|
||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||||
{
|
||||
{
|
||||
inputs,
|
||||
outputs,
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
...
|
||||
}: {
|
||||
# You can import other NixOS modules here
|
||||
imports = [
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
enable = true;
|
||||
layout = "pl";
|
||||
xkbVariant = "";
|
||||
libinput.enable = true;
|
||||
|
||||
displayManager = {
|
||||
lightdm = {
|
||||
@@ -20,7 +21,7 @@
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
windowManager = {
|
||||
dwm = {
|
||||
enable = true;
|
||||
@@ -29,7 +30,7 @@
|
||||
owner = "eRgo35";
|
||||
repo = "dwm";
|
||||
rev = "a1725eb3c64d27864972a976c8ee18d63a8d9dad";
|
||||
sha256 = "sha256-sY6qFqfkfGtLmi+7mownx3bolM2mVNdhS9VUO6KimKk=";
|
||||
sha256 = "sha256-sY6qFqfkfGtLmi+7mownx3bolM2mVNdhS9VUO6KimKk=";
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -42,11 +43,6 @@
|
||||
};
|
||||
};
|
||||
|
||||
environment.systemPackages = (with pkgs; [
|
||||
autorandr
|
||||
xorg.xrandr
|
||||
]);
|
||||
|
||||
services.autorandr = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
@@ -1,31 +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 =
|
||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
modulesPath,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
boot.kernelParams = [ "resume=/var/swapfile" "resume_offset=16230400" ];
|
||||
boot.initrd.availableKernelModules = ["xhci_pci" "nvme" "usb_storage" "sd_mod"];
|
||||
boot.initrd.kernelModules = [];
|
||||
boot.kernelModules = ["kvm-intel"];
|
||||
boot.extraModulePackages = [];
|
||||
boot.kernelParams = ["resume=/var/swapfile" "resume_offset=16230400"];
|
||||
boot.resumeDevice = "/dev/disk/by-uuid/9bf8fe18-8b72-4e43-a472-546260574b1e";
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/9bf8fe18-8b72-4e43-a472-546260574b1e";
|
||||
fsType = "ext4";
|
||||
};
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/9bf8fe18-8b72-4e43-a472-546260574b1e";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/09BA-3F6F";
|
||||
fsType = "vfat";
|
||||
};
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/09BA-3F6F";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
swapDevices = [ { device = "/var/swapfile"; size = 32 * 1024; } ];
|
||||
swapDevices = [
|
||||
{
|
||||
device = "/var/swapfile";
|
||||
size = 32 * 1024;
|
||||
}
|
||||
];
|
||||
|
||||
# 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
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
inputs,
|
||||
outputs,
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
# You can import other NixOS modules here
|
||||
@@ -22,7 +22,7 @@
|
||||
# ./users.nix
|
||||
../common
|
||||
./gui.nix
|
||||
|
||||
|
||||
# nvidia drivers
|
||||
./nvidia.nix
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
--output $RIGHT --mode 2560x1440 --rate 74.92 --pos 4480x0
|
||||
'';
|
||||
};
|
||||
|
||||
|
||||
windowManager = {
|
||||
dwm = {
|
||||
enable = true;
|
||||
@@ -39,7 +39,7 @@
|
||||
owner = "eRgo35";
|
||||
repo = "dwm";
|
||||
rev = "a1725eb3c64d27864972a976c8ee18d63a8d9dad";
|
||||
sha256 = "sha256-sY6qFqfkfGtLmi+7mownx3bolM2mVNdhS9VUO6KimKk=";
|
||||
sha256 = "sha256-sY6qFqfkfGtLmi+7mownx3bolM2mVNdhS9VUO6KimKk=";
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -50,7 +50,7 @@
|
||||
enable = false;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
xrandrHeads = [
|
||||
{
|
||||
output = "HDMI-0";
|
||||
@@ -65,12 +65,6 @@
|
||||
];
|
||||
};
|
||||
|
||||
environment.systemPackages = (with pkgs; [
|
||||
autorandr
|
||||
xorg.xrandr
|
||||
]);
|
||||
|
||||
|
||||
services.autorandr = {
|
||||
enable = true;
|
||||
defaultTarget = "zion";
|
||||
|
||||
@@ -1,31 +1,35 @@
|
||||
# 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 =
|
||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
modulesPath,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-amd" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
boot.initrd.availableKernelModules = ["nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod"];
|
||||
boot.initrd.kernelModules = [];
|
||||
boot.kernelModules = ["kvm-amd"];
|
||||
boot.extraModulePackages = [];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/8af14034-1aec-4b6f-b8c4-de13e6987ac5";
|
||||
fsType = "ext4";
|
||||
};
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/8af14034-1aec-4b6f-b8c4-de13e6987ac5";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/CEC7-B082";
|
||||
fsType = "vfat";
|
||||
};
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/CEC7-B082";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
swapDevices =
|
||||
[ { device = "/dev/disk/by-uuid/00a782e1-71c2-4121-8608-9ed1104d6aa5"; }
|
||||
];
|
||||
swapDevices = [
|
||||
{device = "/dev/disk/by-uuid/00a782e1-71c2-4121-8608-9ed1104d6aa5";}
|
||||
];
|
||||
|
||||
# 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
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:{
|
||||
}: {
|
||||
# Enable OpenGL
|
||||
hardware.opengl = {
|
||||
enable = true;
|
||||
@@ -17,13 +17,12 @@
|
||||
services.xserver.videoDrivers = ["nvidia"];
|
||||
|
||||
hardware.nvidia = {
|
||||
|
||||
# Modesetting is required.
|
||||
modesetting.enable = true;
|
||||
|
||||
# Nvidia power management. Experimental, and can cause sleep/suspend to fail.
|
||||
# Enable this if you have graphical corruption issues or application crashes after waking
|
||||
# up from sleep. This fixes it by saving the entire VRAM memory to /tmp/ instead
|
||||
# up from sleep. This fixes it by saving the entire VRAM memory to /tmp/ instead
|
||||
# of just the bare essentials.
|
||||
powerManagement.enable = false;
|
||||
|
||||
@@ -33,15 +32,15 @@
|
||||
|
||||
# Use the NVidia open source kernel module (not to be confused with the
|
||||
# independent third-party "nouveau" open source driver).
|
||||
# Support is limited to the Turing and later architectures. Full list of
|
||||
# supported GPUs is at:
|
||||
# https://github.com/NVIDIA/open-gpu-kernel-modules#compatible-gpus
|
||||
# Support is limited to the Turing and later architectures. Full list of
|
||||
# supported GPUs is at:
|
||||
# https://github.com/NVIDIA/open-gpu-kernel-modules#compatible-gpus
|
||||
# Only available from driver 515.43.04+
|
||||
# Currently alpha-quality/buggy, so false is currently the recommended setting.
|
||||
open = false;
|
||||
|
||||
# Enable the Nvidia settings menu,
|
||||
# accessible via `nvidia-settings`.
|
||||
# accessible via `nvidia-settings`.
|
||||
nvidiaSettings = true;
|
||||
|
||||
# Optionally, you may need to select the appropriate driver version for your specific GPU.
|
||||
|
||||
Reference in New Issue
Block a user