Merge branch 'main' of git.datarift.nl:erwin/nixos-config

This commit is contained in:
Erwin Boskma 2022-12-12 16:49:16 +01:00
commit 0731782ab7
Signed by: erwin
SSH key fingerprint: SHA256:CyeNoWXd3kjX2Nwu6pDxxdS7OqmPVOy0NavA/KU/ntU
9 changed files with 54 additions and 46 deletions

View file

@ -39,7 +39,7 @@ in
family = "Iosevka Nerd Font"; family = "Iosevka Nerd Font";
style = "Medium"; style = "Medium";
}; };
size = 12.0; size = 14.0;
}; };
live_config_reload = true; live_config_reload = true;

View file

@ -56,7 +56,7 @@ in
assigns = { assigns = {
"1" = [{ class = "Firefox"; }]; "1" = [{ class = "Firefox"; }];
"2" = [{ class = "Alacritty"; } { class = "foot"; }]; "2" = [{ class = "Alacritty"; } { class = "foot"; }];
"3" = [{ class = "Code"; }]; "3" = [{ class = "Code"; } { class = "Emacs"; }];
"4" = [{ class = "telegramdesktop"; } { class = "Signal"; }]; "4" = [{ class = "telegramdesktop"; } { class = "Signal"; }];
}; };
# Dracula theme # Dracula theme

View file

@ -1,13 +1,9 @@
{ pkgs { config
, config
, lib , lib
, ... , ...
}: }:
with lib; let with lib; let
cfg = config.eboskma.programs.picom; cfg = config.eboskma.programs.picom;
picom = pkgs.writeShellScriptBin "picom" ''
${pkgs.nixgl.auto.nixGLDefault}/bin/nixGL ${pkgs.picom}/bin/picom $@
'';
in in
{ {
options.eboskma.programs.picom = { enable = mkEnableOption "activate picom"; }; options.eboskma.programs.picom = { enable = mkEnableOption "activate picom"; };
@ -17,18 +13,16 @@ in
services.picom = { services.picom = {
enable = true; enable = true;
package = picom;
backend = "glx"; backend = "glx";
vSync = true; vSync = true;
experimentalBackends = true;
fade = true; fade = false;
fadeSteps = [ 0.08 0.08 ]; fadeSteps = [ 0.08 0.08 ];
shadow = true; shadow = true;
inactiveOpacity = 0.8; inactiveOpacity = 0.9;
opacityRules = [ opacityRules = [
"0:_NET_WM_STATE@[*]:32a = '_NET_WM_STATE_HIDDEN'" "0:_NET_WM_STATE@[*]:32a = '_NET_WM_STATE_HIDDEN'"
@ -53,11 +47,11 @@ in
mark-ovredir-focused = true; mark-ovredir-focused = true;
use-ewmh-active-win = true; use-ewmh-active-win = true;
blur = { blur = {
method = "gaussian"; method = "dual_kawase";
size = 10; size = 10;
deviation = 5.0; deviation = 5.0;
}; };
inactive-dim = 0.2; inactive-dim = 0.1;
wintypes = { wintypes = {
dock = { shadow = false; }; dock = { shadow = false; };

View file

@ -19,6 +19,7 @@ in
"*" = { "*" = {
identityFile = if var.workSystem then horusKey else personalKey; identityFile = if var.workSystem then horusKey else personalKey;
identitiesOnly = true; identitiesOnly = true;
forwardAgent = true;
extraOptions = { extraOptions = {
Ciphers = "chacha20-poly1305@openssh.com,aes256-gcm@openssh.com,aes128-gcm@openssh.com,aes256-ctr,aes192-ctr,aes128-ctr"; Ciphers = "chacha20-poly1305@openssh.com,aes256-gcm@openssh.com,aes128-gcm@openssh.com,aes256-ctr,aes192-ctr,aes128-ctr";
KexAlgorithms = "curve25519-sha256,curve25519-sha256@libssh.org,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group-exchange-sha256"; KexAlgorithms = "curve25519-sha256,curve25519-sha256@libssh.org,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group-exchange-sha256";

View file

@ -6,6 +6,7 @@ let
in in
{ {
imports = [ imports = [
"${nixpkgs}/nixos/modules/installer/sd-card/sd-image-aarch64.nix"
nixos-hardware.nixosModules.raspberry-pi-4 nixos-hardware.nixosModules.raspberry-pi-4
../../users/root ../../users/root
../../users/erwin ../../users/erwin

View file

@ -41,13 +41,20 @@
enable = true; enable = true;
home-manager = true; home-manager = true;
}; };
docker.enable = true; docker = {
enable = true;
enableNvidia = true;
enableTcpSocket = true;
};
fonts.enable = true; fonts.enable = true;
gnome.enable = true; gnome.enable = true;
# greetd.enable = true; # greetd.enable = true;
lightdm.enable = true; lightdm.enable = true;
networking.enable = true; networking.enable = true;
nix-common.enable = true; nix-common = {
enable = true;
cross-systems = [ "aarch64-linux" ];
};
sound.enable = true; sound.enable = true;
systemd.enable = true; systemd.enable = true;
}; };
@ -79,6 +86,9 @@
12345 12345
5555 5555
5556 5556
# sccache server
10501
]; ];
}; };
}; };
@ -141,4 +151,3 @@
system.stateVersion = "22.11"; # Did you read the comment? system.stateVersion = "22.11"; # Did you read the comment?
} }

View file

@ -39,11 +39,12 @@
powerManagement.cpuFreqGovernor = "ondemand"; powerManagement.cpuFreqGovernor = "ondemand";
hardware = { hardware = {
video.hidpi.enable = false; video.hidpi.enable = true;
enableAllFirmware = true; enableAllFirmware = true;
nvidia.modesetting.enable = true; nvidia.modesetting.enable = true;
opengl = { opengl = {
driSupport32Bit = true;
extraPackages = with pkgs; [ extraPackages = with pkgs; [
vaapiVdpau vaapiVdpau
]; ];
@ -53,25 +54,17 @@
services.xserver = { services.xserver = {
videoDrivers = [ "nvidia" ]; videoDrivers = [ "nvidia" ];
# Section "Screen"
# Identifier "Screen0"
# Device "Device0"
# Monitor "Monitor0"
# DefaultDepth 24
# Option "Stereo" "0"
# Option "nvidiaXineramaInfoOrder" "DFP-2"
# Option "metamodes" "DP-4: nvidia-auto-select +3840+0 {ForceCompositionPipeline=On, ForceFullCompositionPipeline=On, AllowGSYNCCompatible=On}, DP-0: nvidia-auto-select +0+0 {ForceCompositionPipeline=On, ForceFullCompositionPipeline=On, AllowGSYNCCompatible=On}"
# Option "SLI" "Off"
# Option "MultiGPU" "Off"
# Option "BaseMosaic" "off"
# SubSection "Display"
# Depth 24
# EndSubSection
# EndSection
screenSection = '' screenSection = ''
Option "metamodes" "DP-0: nvidia-auto-select +0+0 {ForceFullCompositionPipeline=On, AllowGSYNCCompatible=On}, DP-4: nvidia-auto-select +3840+0 {ForceFullCompositionPipeline=On, AllowGSYNCCompatible=On}" Option "metamodes" "DP-0: nvidia-auto-select +0+0 {ForceFullCompositionPipeline=On, AllowGSYNCCompatible=On}, DP-4: nvidia-auto-select +3840+0 {ForceFullCompositionPipeline=On, AllowGSYNCCompatible=On}"
Option "TripleBuffer" "On" Option "TripleBuffer" "On"
''; '';
libinput = {
enable = true;
mouse = {
naturalScrolling = true;
accelSpeed = "1.0";
};
};
}; };
} }

View file

@ -16,22 +16,16 @@ in
config = mkIf cfg.enable { config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [ docker-compose ]; environment.systemPackages = with pkgs; [ docker-compose ];
virtualisation.podman = { virtualisation.docker = {
enable = true; enable = true;
enableNvidia = cfg.enableNvidia; enableNvidia = cfg.enableNvidia;
networkSocket = mkIf cfg.enableTcpSocket {
autoPrune = {
enable = true; enable = true;
openFirewall = true; dates = "weekly";
}; };
dockerSocket.enable = true;
dockerCompat = true;
defaultNetwork.dnsname.enable = true;
}; };
# virtualisation.docker = {
# autoPrune = {
# enable = true;
# dates = "weekly";
# };
virtualisation.containers = { virtualisation.containers = {
registries = { registries = {
insecure = [ "docker02.bedum.horus.nu:5000" "yocto-build-server.bedum.horus.nu:5000" "containers.internal.horus.nu" ]; insecure = [ "docker02.bedum.horus.nu:5000" "yocto-build-server.bedum.horus.nu:5000" "containers.internal.horus.nu" ];
@ -45,8 +39,20 @@ in
}; };
}; };
# virtualisation.oci-containers.backend = "podman";
users.extraUsers.${config.eboskma.var.mainUser}.extraGroups = [ "docker" "podman" ]; users.extraUsers.${config.eboskma.var.mainUser}.extraGroups = [ "docker" "podman" ];
# services.ghostunnel = mkIf cfg.enableTcpSocket {
# enable = true;
# servers."podman-socket" = {
# listen = "0.0.0.0:2376";
# target = "unix:/run/podman/podman.sock";
# allowAll = mkDefault true;
# extraArguments = ''
# --auto-acme-cert=mimir.internal.horus.nu
# --auto-acme-email=erwin@horus.nu
# --auto-acme-ca=https://mimir.internal.horus.nu
# '';
# };
# };
}; };
} }

View file

@ -46,6 +46,7 @@ in
gpg.enable = true; gpg.enable = true;
i3.enable = true; i3.enable = true;
mpd.enable = true; mpd.enable = true;
picom.enable = true;
polybar.enable = true; polybar.enable = true;
neovim.enable = true; neovim.enable = true;
rclone = { rclone = {
@ -83,13 +84,16 @@ in
}; };
home.packages = with pkgs; [ home.packages = with pkgs; [
appimage-run
atool atool
bandwhich bandwhich
bitwarden bitwarden
blink1-tool blink1-tool
bottom bottom
cider cider
commitgpt
fd fd
feh
ffmpeg_5-full ffmpeg_5-full
git git
gnome.nautilus gnome.nautilus