From 4dcff3d3347e3a7b3fa830b7d3c4c14a1741cd0d Mon Sep 17 00:00:00 2001 From: Erwin Boskma Date: Fri, 9 Dec 2022 10:36:36 +0100 Subject: [PATCH 1/9] Update flake.lock --- flake.lock | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/flake.lock b/flake.lock index 8e6159c..1915927 100644 --- a/flake.lock +++ b/flake.lock @@ -34,11 +34,11 @@ ] }, "locked": { - "lastModified": 1670438727, - "narHash": "sha256-c8SAz45BtQTZLxX0BRoj7aGlk6jogjlTE7Tj40lQr6Q=", + "lastModified": 1670556527, + "narHash": "sha256-vNsC6COhRRepzzV+y1delpsbH1zFYuY6qxsNS61D6Qs=", "owner": "nix-community", "repo": "emacs-overlay", - "rev": "e9c4d10bbb4e810cbfe5e31248fe835e08efb35a", + "rev": "7279dc6f75d0983a552eeacef992246c53473aea", "type": "github" }, "original": { @@ -156,11 +156,11 @@ "utils": "utils" }, "locked": { - "lastModified": 1670280307, - "narHash": "sha256-3x+0whP1nCz5adQMIsBA3L9fI/ABOpRUJdbw0AmxBnU=", + "lastModified": 1670513770, + "narHash": "sha256-muL74fsbGA8K8WlZSPNWddOiuBnC54kAajncX6nXrh4=", "owner": "nix-community", "repo": "home-manager", - "rev": "2af0d07678fc15612345e0dd55337550dcf6465f", + "rev": "054d9e3187ca00479e8036dc0e92900a384f30fd", "type": "github" }, "original": { @@ -179,11 +179,11 @@ "xdph": "xdph" }, "locked": { - "lastModified": 1670439422, - "narHash": "sha256-m1JjdqVcwM2CAytb4Avfx+F7CFdT65dq71h33uOaaIQ=", + "lastModified": 1670534695, + "narHash": "sha256-YNPiXsaZSQvetwsnrHuRxQnm8t9p5y9Nd3lRW6bPVxM=", "owner": "Hyprwm", "repo": "Hyprland", - "rev": "e1d7a133334936be2ddd55754787dcdcf4a95515", + "rev": "726732244a5d51a0da54219174c13f4428017b79", "type": "github" }, "original": { @@ -257,11 +257,11 @@ ] }, "locked": { - "lastModified": 1670273694, - "narHash": "sha256-Rb+AIMyncKNnP0EahDg5w37v6TXlGtd2SczugSQzMQU=", + "lastModified": 1670452176, + "narHash": "sha256-jtNinXtCUJ+6Zu55HxrGN1zCLCH5qd4GoK2m1RgUW+Q=", "owner": "oxalica", "repo": "nil", - "rev": "101387fb2f54ebc67c894979d1ae0efac2b4ad5c", + "rev": "661af99ab69eef0cfc32f77ddbf74f252dba97d5", "type": "github" }, "original": { @@ -287,11 +287,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1670242877, - "narHash": "sha256-jBLh7dRHnbfvPPA9znOC6oQfKrCPJ0El8Zoe0BqnCjQ=", + "lastModified": 1670424663, + "narHash": "sha256-jj3Pq8Co7lRem8lF9vqeBTTTs+rX3UjSuebAF+QGezw=", "owner": "nixos", "repo": "nixpkgs", - "rev": "6e51c97f1c849efdfd4f3b78a4870e6aa2da4198", + "rev": "e62dbca3771f42c81dec4e704c09ef110ef3a3f8", "type": "github" }, "original": { @@ -432,11 +432,11 @@ ] }, "locked": { - "lastModified": 1670380307, - "narHash": "sha256-7fJN5ndnE8YbrrtYdqMo3gDV/BW37M4wNBRhjdfP/XY=", + "lastModified": 1670552927, + "narHash": "sha256-lCE51eAGrAFS4k9W5aDGFpVtOAwQQ/rFMN80PCDh0vo=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "fc98242f5f49d39b8fd3a611c146741a35dc012d", + "rev": "a0fdafd18c9cf599fde17fbaf07dbb20fa57eecb", "type": "github" }, "original": { From 7ce34dca304859938cce6e98148bdc5a0e938426 Mon Sep 17 00:00:00 2001 From: Erwin Boskma Date: Fri, 9 Dec 2022 10:37:48 +0100 Subject: [PATCH 2/9] Increase font size in alacritty --- home-manager/modules/alacritty/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/home-manager/modules/alacritty/default.nix b/home-manager/modules/alacritty/default.nix index f9d7302..47f2eab 100644 --- a/home-manager/modules/alacritty/default.nix +++ b/home-manager/modules/alacritty/default.nix @@ -39,7 +39,7 @@ in family = "Iosevka Nerd Font"; style = "Medium"; }; - size = 12.0; + size = 14.0; }; live_config_reload = true; From 6e1ae4eb18f67a709cba715b4a6eae175cd86bc7 Mon Sep 17 00:00:00 2001 From: Erwin Boskma Date: Fri, 9 Dec 2022 10:38:47 +0100 Subject: [PATCH 3/9] Update picom module --- home-manager/modules/picom/default.nix | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/home-manager/modules/picom/default.nix b/home-manager/modules/picom/default.nix index 7c1152d..660b5ed 100644 --- a/home-manager/modules/picom/default.nix +++ b/home-manager/modules/picom/default.nix @@ -1,13 +1,9 @@ -{ pkgs -, config +{ config , lib , ... }: with lib; let cfg = config.eboskma.programs.picom; - picom = pkgs.writeShellScriptBin "picom" '' - ${pkgs.nixgl.auto.nixGLDefault}/bin/nixGL ${pkgs.picom}/bin/picom $@ - ''; in { options.eboskma.programs.picom = { enable = mkEnableOption "activate picom"; }; @@ -17,18 +13,16 @@ in services.picom = { enable = true; - package = picom; backend = "glx"; vSync = true; - experimentalBackends = true; - fade = true; + fade = false; fadeSteps = [ 0.08 0.08 ]; shadow = true; - inactiveOpacity = 0.8; + inactiveOpacity = 0.9; opacityRules = [ "0:_NET_WM_STATE@[*]:32a = '_NET_WM_STATE_HIDDEN'" @@ -53,11 +47,11 @@ in mark-ovredir-focused = true; use-ewmh-active-win = true; blur = { - method = "gaussian"; + method = "dual_kawase"; size = 10; deviation = 5.0; }; - inactive-dim = 0.2; + inactive-dim = 0.1; wintypes = { dock = { shadow = false; }; From 3f7d351186eb00203e3c5e9e7eacee4f3956aa1c Mon Sep 17 00:00:00 2001 From: Erwin Boskma Date: Fri, 9 Dec 2022 10:39:03 +0100 Subject: [PATCH 4/9] Forward SSH agent by default --- home-manager/modules/ssh/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/home-manager/modules/ssh/default.nix b/home-manager/modules/ssh/default.nix index 68aa434..eb0f82e 100644 --- a/home-manager/modules/ssh/default.nix +++ b/home-manager/modules/ssh/default.nix @@ -19,6 +19,7 @@ in "*" = { identityFile = if var.workSystem then horusKey else personalKey; identitiesOnly = true; + forwardAgent = true; extraOptions = { 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"; From 1163568fcf6712a431e8f2b77eda9ab581be3f1a Mon Sep 17 00:00:00 2001 From: Erwin Boskma Date: Fri, 9 Dec 2022 10:40:13 +0100 Subject: [PATCH 5/9] Enable hidpi, configure libinput, enable nvidia support in docker --- machines/mimir/configuration.nix | 15 ++++++++++--- machines/mimir/hardware-configuration.nix | 27 +++++++++-------------- 2 files changed, 22 insertions(+), 20 deletions(-) diff --git a/machines/mimir/configuration.nix b/machines/mimir/configuration.nix index a93e88f..dcf28f3 100644 --- a/machines/mimir/configuration.nix +++ b/machines/mimir/configuration.nix @@ -41,13 +41,20 @@ enable = true; home-manager = true; }; - docker.enable = true; + docker = { + enable = true; + enableNvidia = true; + enableTcpSocket = true; + }; fonts.enable = true; gnome.enable = true; # greetd.enable = true; lightdm.enable = true; networking.enable = true; - nix-common.enable = true; + nix-common = { + enable = true; + cross-systems = [ "aarch64-linux" ]; + }; sound.enable = true; systemd.enable = true; }; @@ -79,6 +86,9 @@ 12345 5555 5556 + + # sccache server + 10501 ]; }; }; @@ -141,4 +151,3 @@ system.stateVersion = "22.11"; # Did you read the comment? } - diff --git a/machines/mimir/hardware-configuration.nix b/machines/mimir/hardware-configuration.nix index 157b30e..6b51c19 100644 --- a/machines/mimir/hardware-configuration.nix +++ b/machines/mimir/hardware-configuration.nix @@ -39,11 +39,12 @@ powerManagement.cpuFreqGovernor = "ondemand"; hardware = { - video.hidpi.enable = false; + video.hidpi.enable = true; enableAllFirmware = true; nvidia.modesetting.enable = true; opengl = { + driSupport32Bit = true; extraPackages = with pkgs; [ vaapiVdpau ]; @@ -53,25 +54,17 @@ services.xserver = { 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 = '' 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" ''; + + libinput = { + enable = true; + mouse = { + naturalScrolling = true; + accelSpeed = "1.0"; + }; + }; }; } From b9df8a092ccd79983728d669027006d7bda2073e Mon Sep 17 00:00:00 2001 From: Erwin Boskma Date: Fri, 9 Dec 2022 10:41:01 +0100 Subject: [PATCH 6/9] Add sd-image module to pi4 config --- machines/eitri/configuration.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/machines/eitri/configuration.nix b/machines/eitri/configuration.nix index 584ba30..bb1ede0 100644 --- a/machines/eitri/configuration.nix +++ b/machines/eitri/configuration.nix @@ -6,6 +6,7 @@ let in { imports = [ + "${nixpkgs}/nixos/modules/installer/sd-card/sd-image-aarch64.nix" nixos-hardware.nixosModules.raspberry-pi-4 ../../users/root ../../users/erwin From 201090eee629bbe4cc7608482f9030180fef18ba Mon Sep 17 00:00:00 2001 From: Erwin Boskma Date: Fri, 9 Dec 2022 10:41:47 +0100 Subject: [PATCH 7/9] Enable picom, add some tools --- users/erwin/work.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/users/erwin/work.nix b/users/erwin/work.nix index 9614851..190339b 100644 --- a/users/erwin/work.nix +++ b/users/erwin/work.nix @@ -46,6 +46,7 @@ in gpg.enable = true; i3.enable = true; mpd.enable = true; + picom.enable = true; polybar.enable = true; neovim.enable = true; rclone = { @@ -83,13 +84,16 @@ in }; home.packages = with pkgs; [ + appimage-run atool bandwhich bitwarden blink1-tool bottom cider + commitgpt fd + feh ffmpeg_5-full git gnome.nautilus From d9e13fb4b34f12e960ab096d76600195fec57c84 Mon Sep 17 00:00:00 2001 From: Erwin Boskma Date: Fri, 9 Dec 2022 10:42:31 +0100 Subject: [PATCH 8/9] Add nvidia support to docker module --- modules/docker/default.nix | 32 +++++++++++++++++++------------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/modules/docker/default.nix b/modules/docker/default.nix index 539a113..c481b2e 100644 --- a/modules/docker/default.nix +++ b/modules/docker/default.nix @@ -16,22 +16,16 @@ in config = mkIf cfg.enable { environment.systemPackages = with pkgs; [ docker-compose ]; - virtualisation.podman = { + virtualisation.docker = { enable = true; enableNvidia = cfg.enableNvidia; - networkSocket = mkIf cfg.enableTcpSocket { + + autoPrune = { enable = true; - openFirewall = true; + dates = "weekly"; }; - dockerSocket.enable = true; - dockerCompat = true; - defaultNetwork.dnsname.enable = true; }; - # virtualisation.docker = { - # autoPrune = { - # enable = true; - # dates = "weekly"; - # }; + virtualisation.containers = { registries = { 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" ]; + + # 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 + # ''; + # }; + # }; }; } From 6ca95e6889d143339ef68b05f90cc816a98f90d3 Mon Sep 17 00:00:00 2001 From: Erwin Boskma Date: Fri, 9 Dec 2022 11:49:12 +0100 Subject: [PATCH 9/9] Assign emacs to workspace 3 --- home-manager/modules/i3/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/home-manager/modules/i3/default.nix b/home-manager/modules/i3/default.nix index 5b9b062..9a65d63 100644 --- a/home-manager/modules/i3/default.nix +++ b/home-manager/modules/i3/default.nix @@ -56,7 +56,7 @@ in assigns = { "1" = [{ class = "Firefox"; }]; "2" = [{ class = "Alacritty"; } { class = "foot"; }]; - "3" = [{ class = "Code"; }]; + "3" = [{ class = "Code"; } { class = "Emacs"; }]; "4" = [{ class = "telegramdesktop"; } { class = "Signal"; }]; }; # Dracula theme