fixes and improvements
This commit is contained in:
Executable
+90
@@ -0,0 +1,90 @@
|
||||
{ config, pkgs, lib, home-manager, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
../../system/modules/sway.nix
|
||||
../../system/modules/dev.nix
|
||||
../../system/modules/ml_dev.nix
|
||||
../../system/modules/latex.nix
|
||||
../../system/modules/docker.nix
|
||||
../../system/modules/bluetooth.nix
|
||||
../../system/modules/desktop_tools.nix
|
||||
../../system/modules/keyd.nix
|
||||
../../system/modules/entertainment.nix
|
||||
../../system/modules/gaming.nix
|
||||
|
||||
../../system/cpu/amd
|
||||
#../../system/gpu/nvidia/ampere
|
||||
../../system/pc/ssd
|
||||
../../system/pc/audio/pipewire.nix
|
||||
../../system/modules/mullvad.nix
|
||||
|
||||
./hardware-configuration.nix
|
||||
|
||||
./user.nix
|
||||
];
|
||||
environment.systemPackages = with pkgs; [
|
||||
keymapp
|
||||
];
|
||||
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.useGlobalPkgs = true;
|
||||
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
boot.loader.grub = {
|
||||
enable = true;
|
||||
version = 2;
|
||||
efiSupport = true;
|
||||
enableCryptodisk = true;
|
||||
device = "nodev";
|
||||
};
|
||||
|
||||
boot.initrd.luks.devices = {
|
||||
crypted = {
|
||||
device = "/dev/disk/by-uuid/58ae6681-79a6-418e-94e1-8ed298b19e7c";
|
||||
preLVM = true;
|
||||
};
|
||||
};
|
||||
|
||||
boot.kernelParams = [ "kvm.enable_virt_at_load=0" ];
|
||||
|
||||
console.keyMap = "us-acentos";
|
||||
|
||||
hardware.graphics.enable = true;
|
||||
services.xserver.videoDrivers = [ "nvidia" ];
|
||||
hardware.nvidia = {
|
||||
modesetting.enable = true;
|
||||
powerManagement.enable = true;
|
||||
powerManagement.finegrained = false;
|
||||
open = false;
|
||||
nvidiaSettings = true;
|
||||
package = config.boot.kernelPackages.nvidiaPackages.stable;
|
||||
};
|
||||
|
||||
# hibernation setup
|
||||
boot.resumeDevice = "/dev/disk/by-uuid/3876d89-a80d-4422-b852-d308fec68d4a";
|
||||
|
||||
# Suspend first
|
||||
|
||||
# Define time delay for hibernation
|
||||
systemd.sleep.extraConfig = ''
|
||||
HibernateDelaySec=30m
|
||||
SuspendState=mem
|
||||
'';
|
||||
|
||||
# networking and connection
|
||||
networking.hostName = "alex-desktop";
|
||||
|
||||
hardware.bluetooth.powerOnBoot = true;
|
||||
|
||||
# time and localization
|
||||
time.timeZone = "Europe/Berlin";
|
||||
|
||||
# users
|
||||
programs.fish.enable = true;
|
||||
users.users.alex = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [ "wheel" "video" "network" "audio" "networkmanager" "vboxusers" "docker" ];
|
||||
shell = pkgs.fish;
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
# 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")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ "dm-snapshot" ];
|
||||
boot.kernelModules = [ "kvm-amd" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/9f30b01a-fe8d-42e5-925e-02b971513c32";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/8D94-3117";
|
||||
fsType = "vfat";
|
||||
options = [ "fmask=0022" "dmask=0022" ];
|
||||
};
|
||||
|
||||
swapDevices =
|
||||
[ { device = "/dev/disk/by-uuid/33876d89-a80d-4422-b852-d308fec68d4a"; }
|
||||
];
|
||||
|
||||
# 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.eno1.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.wlp5s0.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
Executable
+70
@@ -0,0 +1,70 @@
|
||||
{ config, lib, pkgs, home-manager, ... }:
|
||||
{
|
||||
home-manager.users.alex= {
|
||||
imports = [
|
||||
(import ../../user/common.nix )
|
||||
../../user/modules/sway.nix
|
||||
../../user/modules/mako.nix
|
||||
../../user/modules/rofi.nix
|
||||
../../user/modules/waybar.nix
|
||||
../../user/modules/terminal.nix
|
||||
../../user/modules/ranger.nix
|
||||
../../user/modules/fish.nix
|
||||
../../user/modules/alacritty.nix
|
||||
../../user/modules/zellij.nix
|
||||
../../user/modules/dev.nix
|
||||
../../user/modules/dev_helpers.nix
|
||||
];
|
||||
home.packages = with pkgs; [
|
||||
neovim
|
||||
];
|
||||
# set custom scree resolution and refresh rate
|
||||
wayland.windowManager.sway = {
|
||||
config= {
|
||||
output = {
|
||||
"HDMI-A-1"= {
|
||||
resolution = "3840x2160@120HZ";
|
||||
};
|
||||
};
|
||||
bars = [
|
||||
{
|
||||
command = "waybar";
|
||||
mode = "hide";
|
||||
hiddenState = "hide";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
# place waybar on the bottom
|
||||
programs.waybar = {
|
||||
settings.main = lib.mkMerge [{
|
||||
position = lib.mkForce "bottom";
|
||||
ipc = true;
|
||||
}];
|
||||
};
|
||||
|
||||
# turn off swaylock background image
|
||||
programs.swaylock.settings = lib.mkForce {
|
||||
color = "000000";
|
||||
};
|
||||
services.swayidle.timeouts = [
|
||||
{
|
||||
timeout = 300;
|
||||
command = "${pkgs.bash}/bin/bash -c '${pkgs.mpv}/bin/mpv --fs --no-audio --image-display-duration=inf --loop --no-osc /home/alex/nixos/resources/blank.png & echo $! > /home/alex/black_screen.pid;'";
|
||||
#resumeCommand = "${pkgs.bash}/bin/bash -c '${pkgs.procps}/bin/pkill -U $(id -u) -x mpv; ${pkgs.coreutils}/bin/rm -f /tmp/black_screen.pid'";
|
||||
resumeCommand = "${pkgs.bash}/bin/bash -c 'pid=$(${pkgs.coreutils}/bin/cat /home/alex/black_screen.pid); ${pkgs.coreutils}/bin/kill $pid && ${pkgs.coreutils}/bin/rm /home/alex/black_screen.pid'";
|
||||
|
||||
|
||||
}
|
||||
];
|
||||
|
||||
# put notifications to bottom right
|
||||
services.mako = {
|
||||
settings = {
|
||||
anchor = "bottom-righ";
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user