desktop-2024-06-02-13-55-55
This commit is contained in:
@ -1,151 +0,0 @@
|
|||||||
{ config, pkgs, lib, ... }:
|
|
||||||
|
|
||||||
let
|
|
||||||
secrets = import ../configs/secrets.nix;
|
|
||||||
secrets-desktop = import ../configs/secrets-desktop.nix;
|
|
||||||
be = import ../configs/borg-exclude.nix;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
imports =
|
|
||||||
[
|
|
||||||
/etc/nixos/hardware-configuration.nix
|
|
||||||
../configs/docker.nix
|
|
||||||
../configs/libvirt.nix
|
|
||||||
../configs/common.nix
|
|
||||||
../configs/user-gui-applications.nix
|
|
||||||
../configs/user-gui.nix
|
|
||||||
../configs/user.nix
|
|
||||||
../configs/bspwm.nix
|
|
||||||
#../configs/pantheon.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
fileSystems."/".options = [ "noatime" "discard" ];
|
|
||||||
fileSystems."/boot".options = [ "noatime" "discard" ];
|
|
||||||
fileSystems."/mnt/second" = {
|
|
||||||
device = "/dev/disk/by-uuid/49c04c91-752d-4dff-b4d9-40a0b9a7bf7c";
|
|
||||||
fsType = "ext4";
|
|
||||||
options = [ "noatime" "discard" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
boot = {
|
|
||||||
loader = {
|
|
||||||
grub = {
|
|
||||||
enable = true;
|
|
||||||
version = 2;
|
|
||||||
device = "nodev";
|
|
||||||
efiSupport = true;
|
|
||||||
gfxmodeEfi = "1024x768";
|
|
||||||
configurationLimit = 5;
|
|
||||||
};
|
|
||||||
|
|
||||||
efi.canTouchEfiVariables = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
initrd.kernelModules = [ "amdgpu" ];
|
|
||||||
plymouth.enable = true;
|
|
||||||
extraModulePackages = with pkgs.linuxPackages_lqx; [ it87 ];
|
|
||||||
kernelModules = [ "it87" "v4l2loopback" ];
|
|
||||||
kernelPackages = pkgs.linuxPackages_lqx;
|
|
||||||
};
|
|
||||||
|
|
||||||
networking = {
|
|
||||||
hostName = "desktop";
|
|
||||||
useDHCP = false;
|
|
||||||
wireguard.interfaces = {
|
|
||||||
wg0 = {
|
|
||||||
ips = [ "10.100.0.2/24" ];
|
|
||||||
privateKey = secrets-desktop.wireguard-private;
|
|
||||||
|
|
||||||
peers = [
|
|
||||||
{
|
|
||||||
publicKey = secrets.wireguard-vps-public;
|
|
||||||
presharedKey = secrets.wireguard-preshared;
|
|
||||||
allowedIPs = [ "10.100.0.0/24" ];
|
|
||||||
endpoint = "szczepan.ski:51820";
|
|
||||||
persistentKeepalive = 25;
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
time.timeZone = "Europe/Berlin";
|
|
||||||
|
|
||||||
console = {
|
|
||||||
font = "latarcyrheb-sun32";
|
|
||||||
keyMap = "us";
|
|
||||||
};
|
|
||||||
|
|
||||||
hardware = {
|
|
||||||
cpu.amd.updateMicrocode = true;
|
|
||||||
|
|
||||||
opengl = {
|
|
||||||
driSupport = true;
|
|
||||||
driSupport32Bit = true;
|
|
||||||
extraPackages = with pkgs; [
|
|
||||||
rocm-opencl-icd
|
|
||||||
rocm-opencl-runtime
|
|
||||||
# amdvlk
|
|
||||||
];
|
|
||||||
# extraPackages32 = with pkgs; [
|
|
||||||
# driversi686Linux.amdvlk
|
|
||||||
# ];
|
|
||||||
};
|
|
||||||
|
|
||||||
fancontrol = {
|
|
||||||
enable = true;
|
|
||||||
config = ''
|
|
||||||
INTERVAL=10
|
|
||||||
DEVPATH=hwmon2=devices/platform/it87.656
|
|
||||||
DEVNAME=hwmon2=it8665
|
|
||||||
FCTEMPS=hwmon2/pwm3=hwmon2/temp1_input hwmon2/pwm2=hwmon2/temp1_input hwmon2/pwm1=hwmon2/temp1_input
|
|
||||||
FCFANS=hwmon2/pwm3=hwmon2/fan2_input hwmon2/pwm2=hwmon2/fan1_input hwmon2/pwm1=
|
|
||||||
MINTEMP=hwmon2/pwm3=60 hwmon2/pwm2=60 hwmon2/pwm1=60
|
|
||||||
MAXTEMP=hwmon2/pwm3=75 hwmon2/pwm2=75 hwmon2/pwm1=75
|
|
||||||
MINSTART=hwmon2/pwm3=51 hwmon2/pwm2=51 hwmon2/pwm1=51
|
|
||||||
MINSTOP=hwmon2/pwm3=51 hwmon2/pwm2=51 hwmon2/pwm1=51
|
|
||||||
MINPWM=hwmon2/pwm1=51 hwmon2/pwm2=51 hwmon2/pwm3=51
|
|
||||||
MAXPWM=hwmon2/pwm3=127 hwmon2/pwm2=204
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
pulseaudio = {
|
|
||||||
enable = true;
|
|
||||||
support32Bit = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
sound.enable = true;
|
|
||||||
|
|
||||||
services = {
|
|
||||||
netdata.enable = true;
|
|
||||||
printing.enable = true;
|
|
||||||
xserver.videoDrivers = [ "amdgpu" ];
|
|
||||||
xserver.deviceSection = ''
|
|
||||||
Option "TearFree" "true"
|
|
||||||
'';
|
|
||||||
# hardware.xow.enable = true;
|
|
||||||
borgbackup.jobs.home = rec {
|
|
||||||
compression = "auto,zstd";
|
|
||||||
encryption = {
|
|
||||||
mode = "repokey-blake2";
|
|
||||||
passphrase = secrets-desktop.borg-key;
|
|
||||||
};
|
|
||||||
extraCreateArgs = "--checkpoint-interval 600 --exclude-caches";
|
|
||||||
environment.BORG_RSH = "ssh -i ~/.ssh/id_borg_rsa";
|
|
||||||
paths = "/home/alex";
|
|
||||||
repo = secrets-desktop.borg-repo;
|
|
||||||
startAt = "daily";
|
|
||||||
user = "alex";
|
|
||||||
prune.keep = {
|
|
||||||
daily = 7;
|
|
||||||
weekly = 4;
|
|
||||||
monthly = 6;
|
|
||||||
};
|
|
||||||
extraPruneArgs = "--save-space --list --stats";
|
|
||||||
exclude = map (x: paths + "/" + x) be.borg-exclude;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
system.stateVersion = "21.11";
|
|
||||||
}
|
|
@ -1,29 +1,24 @@
|
|||||||
{ config, pkgs, lib, ... }:
|
{ config, pkgs, lib, ... }:
|
||||||
let
|
let
|
||||||
unstable = import <nixos-unstable> {
|
unstable = import <nixos-unstable> {
|
||||||
config.allowUnfree = true;
|
config.allowUnfree = true;
|
||||||
config.packageOverrides = pkgs: {
|
config.packageOverrides = pkgs: {
|
||||||
steam = pkgs.steam.override {
|
steam = pkgs.steam.override {
|
||||||
extraPkgs = pkgs: with unstable.pkgs; [
|
extraPkgs = pkgs: with unstable.pkgs; [ gamescope mangohud ncurses6 ];
|
||||||
gamescope
|
|
||||||
mangohud
|
|
||||||
ncurses6
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
lutris = pkgs.lutris.override {
|
lutris = pkgs.lutris.override {
|
||||||
extraPkgs = pkgs: with unstable.pkgs; [
|
extraPkgs = pkgs: with unstable.pkgs; [ gamescope mangohud ];
|
||||||
gamescope
|
|
||||||
mangohud
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
in
|
in {
|
||||||
{
|
programs = {
|
||||||
programs.steam = {
|
gamescope.enable = true;
|
||||||
|
steam = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = unstable.pkgs.steam;
|
package = unstable.pkgs.steam;
|
||||||
};
|
};
|
||||||
|
};
|
||||||
|
|
||||||
environment.systemPackages = with unstable.pkgs; [
|
environment.systemPackages = with unstable.pkgs; [
|
||||||
goverlay
|
goverlay
|
||||||
|
@ -54,8 +54,6 @@
|
|||||||
# App indicator
|
# App indicator
|
||||||
environment.pathsToLink = [ "/libexec" ];
|
environment.pathsToLink = [ "/libexec" ];
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
# blackbox-terminal
|
|
||||||
# cinnamon.nemo-with-extensions
|
|
||||||
gnome-online-accounts
|
gnome-online-accounts
|
||||||
gnome.gnome-control-center
|
gnome.gnome-control-center
|
||||||
gnome.gnome-system-monitor
|
gnome.gnome-system-monitor
|
||||||
|
@ -38,4 +38,9 @@
|
|||||||
# updateDbusEnvironment = true;
|
# updateDbusEnvironment = true;
|
||||||
# };
|
# };
|
||||||
};
|
};
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
catppuccin-kde
|
||||||
|
sweet-nova
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
let
|
let
|
||||||
secrets = import ../configs/secrets.nix;
|
secrets = import ../configs/secrets.nix;
|
||||||
wireguard = import ../configs/wireguard.nix;
|
wireguard = import ../configs/wireguard.nix;
|
||||||
|
unstable = import <nixos-unstable> { config.allowUnfree = true; };
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
@ -12,7 +13,7 @@ in
|
|||||||
../configs/docker.nix
|
../configs/docker.nix
|
||||||
../configs/games.nix
|
../configs/games.nix
|
||||||
../configs/libvirt.nix
|
../configs/libvirt.nix
|
||||||
../configs/pantheon.nix
|
../configs/plasma.nix
|
||||||
../configs/user-gui.nix
|
../configs/user-gui.nix
|
||||||
../configs/user.nix
|
../configs/user.nix
|
||||||
];
|
];
|
||||||
@ -33,37 +34,33 @@ in
|
|||||||
|
|
||||||
nix.settings.system-features = [ "nixos-test" "benchmark" "big-parallel" "kvm" "gccarch-znver2" ];
|
nix.settings.system-features = [ "nixos-test" "benchmark" "big-parallel" "kvm" "gccarch-znver2" ];
|
||||||
|
|
||||||
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
|
||||||
boot = {
|
boot = {
|
||||||
initrd.systemd.enable = true;
|
initrd.systemd.enable = true;
|
||||||
loader = {
|
loader = {
|
||||||
systemd-boot.enable = true;
|
systemd-boot.enable = true;
|
||||||
efi = {
|
efi = { canTouchEfiVariables = true; };
|
||||||
canTouchEfiVariables = true;
|
|
||||||
};
|
};
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
# loader = {
|
|
||||||
# grub = {
|
|
||||||
# enable = true;
|
|
||||||
# device = "nodev";
|
|
||||||
# efiSupport = true;
|
|
||||||
# gfxmodeEfi = "1024x768";
|
|
||||||
# configurationLimit = 5;
|
|
||||||
# };
|
|
||||||
|
|
||||||
# efi.canTouchEfiVariables = true;
|
|
||||||
# };
|
|
||||||
|
|
||||||
initrd.kernelModules = [ "amdgpu" ];
|
initrd.kernelModules = [ "amdgpu" ];
|
||||||
plymouth.enable = true;
|
plymouth.enable = true;
|
||||||
|
|
||||||
extraModulePackages = with pkgs.linuxPackages_lqx; [ it87 ];
|
extraModulePackages = with pkgs.linuxPackages; [ it87 ];
|
||||||
kernelModules = [ "it87" "v4l2loopback" ];
|
kernelModules = [ "it87" ];
|
||||||
kernelPackages = pkgs.linuxPackages_lqx;
|
kernelParams = [ "amdgpu.ppfeaturemask=0xffffffff" ];
|
||||||
supportedFilesystems = [ "ntfs" ];
|
supportedFilesystems = [ "ntfs" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
systemd.services = {
|
||||||
|
monitor = {
|
||||||
|
description = "AMDGPU Control Daemon";
|
||||||
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
after = [ "multi-user.target" ];
|
||||||
|
serviceConfig = { ExecStart = "${unstable.pkgs.lact}/bin/lact daemon"; };
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
networking = {
|
networking = {
|
||||||
hostName = "desktop";
|
hostName = "desktop";
|
||||||
useDHCP = false;
|
useDHCP = false;
|
||||||
@ -89,43 +86,52 @@ in
|
|||||||
keyMap = "us";
|
keyMap = "us";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
environment.systemPackages = with unstable.pkgs; [
|
||||||
|
rustdesk
|
||||||
|
unigine-valley
|
||||||
|
unigine-superposition
|
||||||
|
lact
|
||||||
|
amdgpu_top
|
||||||
|
];
|
||||||
|
|
||||||
hardware = {
|
hardware = {
|
||||||
|
keyboard.qmk.enable = true;
|
||||||
|
enableAllFirmware = true;
|
||||||
|
xone.enable = true;
|
||||||
cpu.amd.updateMicrocode = true;
|
cpu.amd.updateMicrocode = true;
|
||||||
|
|
||||||
|
bluetooth.enable = true;
|
||||||
opengl = {
|
opengl = {
|
||||||
driSupport = true;
|
driSupport = true;
|
||||||
driSupport32Bit = true;
|
driSupport32Bit = true;
|
||||||
extraPackages = with pkgs; [
|
extraPackages = with pkgs; [
|
||||||
rocm-opencl-icd
|
rocm-opencl-icd
|
||||||
rocm-opencl-runtime
|
rocm-opencl-runtime
|
||||||
# amdvlk
|
amdvlk
|
||||||
|
];
|
||||||
|
extraPackages32 = with pkgs; [
|
||||||
|
driversi686Linux.amdvlk
|
||||||
];
|
];
|
||||||
# extraPackages32 = with pkgs; [
|
|
||||||
# driversi686Linux.amdvlk
|
|
||||||
# ];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
fancontrol = {
|
fancontrol = {
|
||||||
enable = true;
|
enable = true;
|
||||||
config = ''
|
config = ''
|
||||||
INTERVAL=10
|
INTERVAL=10
|
||||||
DEVPATH=hwmon2=devices/platform/it87.656
|
DEVPATH=hwmon3=devices/platform/it87.656
|
||||||
DEVNAME=hwmon2=it8665
|
DEVNAME=hwmon3=it8665
|
||||||
FCTEMPS=hwmon2/pwm3=hwmon2/temp1_input hwmon2/pwm2=hwmon2/temp1_input hwmon2/pwm1=hwmon2/temp1_input
|
FCTEMPS=hwmon3/pwm3=hwmon3/temp1_input hwmon3/pwm2=hwmon3/temp1_input hwmon3/pwm1=hwmon3/temp1_input
|
||||||
FCFANS=hwmon2/pwm3=hwmon2/fan2_input hwmon2/pwm2=hwmon2/fan1_input hwmon2/pwm1=
|
FCFANS=hwmon3/pwm3=hwmon3/fan2_input hwmon3/pwm2=hwmon3/fan1_input hwmon3/pwm1=
|
||||||
MINTEMP=hwmon2/pwm3=60 hwmon2/pwm2=60 hwmon2/pwm1=60
|
MINTEMP=hwmon3/pwm3=60 hwmon3/pwm2=60 hwmon3/pwm1=60
|
||||||
MAXTEMP=hwmon2/pwm3=75 hwmon2/pwm2=75 hwmon2/pwm1=75
|
MAXTEMP=hwmon3/pwm3=75 hwmon3/pwm2=75 hwmon3/pwm1=75
|
||||||
MINSTART=hwmon2/pwm3=51 hwmon2/pwm2=51 hwmon2/pwm1=51
|
MINSTART=hwmon3/pwm3=51 hwmon3/pwm2=51 hwmon3/pwm1=51
|
||||||
MINSTOP=hwmon2/pwm3=51 hwmon2/pwm2=51 hwmon2/pwm1=51
|
MINSTOP=hwmon3/pwm3=51 hwmon3/pwm2=51 hwmon3/pwm1=51
|
||||||
MINPWM=hwmon2/pwm1=51 hwmon2/pwm2=51 hwmon2/pwm3=51
|
MINPWM=hwmon3/pwm1=51 hwmon3/pwm2=51 hwmon3/pwm3=51
|
||||||
MAXPWM=hwmon2/pwm3=127 hwmon2/pwm2=204
|
MAXPWM=hwmon3/pwm3=127 hwmon3/pwm2=204
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
pulseaudio = {
|
pulseaudio.enable = false;
|
||||||
enable = true;
|
|
||||||
support32Bit = true;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
sound.enable = true;
|
sound.enable = true;
|
||||||
@ -134,10 +140,19 @@ in
|
|||||||
netdata.enable = true;
|
netdata.enable = true;
|
||||||
printing.enable = true;
|
printing.enable = true;
|
||||||
xserver.videoDrivers = [ "amdgpu" ];
|
xserver.videoDrivers = [ "amdgpu" ];
|
||||||
# xserver.deviceSection = ''
|
|
||||||
# Option "TearFree" "true"
|
displayManager.autoLogin = {
|
||||||
# '';
|
enable = true;
|
||||||
# hardware.xow.enable = true;
|
user = "alex";
|
||||||
|
};
|
||||||
|
|
||||||
|
pipewire = {
|
||||||
|
enable = true;
|
||||||
|
alsa.enable = true;
|
||||||
|
alsa.support32Bit = true;
|
||||||
|
pulse.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
# borgbackup.jobs.home = rec {
|
# borgbackup.jobs.home = rec {
|
||||||
# compression = "auto,zstd";
|
# compression = "auto,zstd";
|
||||||
# encryption = {
|
# encryption = {
|
||||||
@ -167,6 +182,5 @@ in
|
|||||||
server = "192.168.0.168:24800";
|
server = "192.168.0.168:24800";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
system.stateVersion = "24.05";
|
||||||
system.stateVersion = "23.05";
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user