From da3cf14e5e1875129e41b9d5d4e4734538140906 Mon Sep 17 00:00:00 2001 From: Florian Schmitt Date: Fri, 28 Feb 2025 18:52:13 +0300 Subject: [PATCH] feat: zenbrowser + nas attempt through tailscale + lib cc --- machines/dragon/configuration.nix | 88 ++++++++++++++++++------------- modules/desktop.nix | 1 + modules/home-config.nix | 18 ++++++- modules/local-dev.nix | 8 +-- modules/zen-browser.nix | 45 ++++++++++++++++ 5 files changed, 120 insertions(+), 40 deletions(-) create mode 100644 modules/zen-browser.nix diff --git a/machines/dragon/configuration.nix b/machines/dragon/configuration.nix index 8fa3a13..0c987a7 100644 --- a/machines/dragon/configuration.nix +++ b/machines/dragon/configuration.nix @@ -1,4 +1,4 @@ -{ config, ... }: +{ config, pkgs, ... }: { boot.loader.systemd-boot.enable = true; @@ -41,7 +41,17 @@ nvidiaSettings = true; package = config.boot.kernelPackages.nvidiaPackages.latest; }; - + services.tailscale = { + enable = true; + }; + services.syncthing = { + enable = true; + openDefaultPorts = true; + settings.gui = { + user = "mrflos"; + password = "VerySecurePassword"; + }; + }; services.xserver = { enable = true; videoDrivers = [ @@ -51,45 +61,50 @@ xkb.variant = ""; }; - fileSystems."/mnt/nas/music" = { - device = "192.168.1.2:/volume1/music"; + fileSystems."/home/mrflos/Nas-music" = { + device = "diskstation.tailed460c.ts.net:/volume1/music"; options = [ - "nfsvers=4.2" + #"nfsvers=4.2" "x-systemd.automount" "noauto" - "rw" - "relatime" - "user" - "acl" - "defaults" + #"rw" + #"relatime" + #"user" + #"acl" + #"defaults" ]; fsType = "nfs"; }; services.rpcbind.enable = true; # needed for NFS - systemd.mounts = [ - { - type = "nfs"; - mountConfig = { - Options = "defaults,acl,user,noauto,relatime,rw"; - }; - what = "192.168.1.2:/volume1/music"; - where = "/mnt/nas/music"; - } - ]; + #systemd.mounts = [ + # { + # type = "nfs"; + # mountConfig = { + # Options = "defaults,acl,user,noauto,relatime,rw"; + # }; + # what = "diskstation.tailed460c.ts.net:/volume1/music"; + # where = "/mnt/nas/music"; + # } + #]; - systemd.automounts = [ - { - wantedBy = [ "multi-user.target" ]; - automountConfig = { - TimeoutIdleSec = "600"; - }; - where = "/mnt/nas/music"; - } - ]; + #systemd.automounts = [ + # { + # wantedBy = [ "multi-user.target" ]; + # automountConfig = { + # TimeoutIdleSec = "600"; + # }; + # where = "/mnt/nas/music"; + # } + #]; services.printing.enable = true; - + security.wrappers."mount.nfs" = { + setuid = true; + owner = "root"; + group = "root"; + source = "${pkgs.nfs-utils.out}/bin/mount.nfs"; + }; security.rtkit.enable = true; services.pipewire = { enable = true; @@ -98,6 +113,12 @@ pulse.enable = true; }; + environment = { + sessionVariables = { + LD_LIBRARY_PATH = "${pkgs.stdenv.cc.cc.lib}/lib"; + }; + }; + imports = [ ../../modules/console.nix ../../modules/desktop.nix @@ -106,14 +127,9 @@ ../../modules/local-dev.nix ../../modules/nixos.nix ../../modules/systemd-unfreeze.nix + ../../modules/zen-browser.nix ]; - #programs.proxychains.enable = true; - #programs.proxychains.proxies.prx1.enable = true; - #programs.proxychains.proxies.prx1.type = "socks5"; - #programs.proxychains.proxies.prx1.host = "127.0.0.1"; - #programs.proxychains.proxies.prx1.port = 9090; - #services.ollama = { # enable = true; # acceleration = "cuda"; diff --git a/modules/desktop.nix b/modules/desktop.nix index 6b5ce86..0c95fa0 100644 --- a/modules/desktop.nix +++ b/modules/desktop.nix @@ -71,6 +71,7 @@ # Sets up all the libraries to load nix-ld.libraries = with pkgs; [ stdenv.cc.cc + stdenv.cc.cc.lib zlib ]; }; diff --git a/modules/home-config.nix b/modules/home-config.nix index c71b13e..c97dfd2 100644 --- a/modules/home-config.nix +++ b/modules/home-config.nix @@ -60,6 +60,19 @@ in waybar yarn ]; + xdg = { + enable = true; + desktopEntries."zen" = { + name = "Zen Browser"; + genericName = "Web Browser"; + exec = "zen"; + terminal = false; + mimeType = [ + "text/html" + "text/xml" + ]; + }; + }; # imports = [ # (plasma-manager + "/modules") @@ -104,6 +117,7 @@ in }; home.sessionVariables = { EDITOR = "nvim"; + #LD_LIBRARY_PATH = "${pkgs.stdenv.cc.cc.lib}/lib"; }; home.sessionPath = [ "$HOME/.local/bin" @@ -238,7 +252,9 @@ in mpris sponsorblock thumbfast - uosc + #uosc + #modernx + mpv-osc-tethys visualizer ]; diff --git a/modules/local-dev.nix b/modules/local-dev.nix index 8a41b51..03a7b3f 100644 --- a/modules/local-dev.nix +++ b/modules/local-dev.nix @@ -10,11 +10,11 @@ # enable = true; # setSocketVariable = true; #}; - #libvirtd.enable = true; - #lxd.enable = true; + libvirtd.enable = true; + lxd.enable = true; #waydroid.enable = true }; - #programs.virt-manager.enable = true; + programs.virt-manager.enable = true; #systemd.services.yeswikidev = { # enable = true; # script = '' @@ -93,6 +93,8 @@ gcc go nixfmt-rfc-style + libstdcxx5 + stdenv.cc.cc.lib lua lua-language-server luarocks diff --git a/modules/zen-browser.nix b/modules/zen-browser.nix new file mode 100644 index 0000000..773fb75 --- /dev/null +++ b/modules/zen-browser.nix @@ -0,0 +1,45 @@ +{ config, pkgs, ... }: + +let + version = "1.8.2b"; + + zenbrowser = pkgs.appimageTools.wrapType2 { + name = "zen"; + src = pkgs.fetchurl { + url = "https://github.com/zen-browser/desktop/releases/download/${version}/zen-x86_64.AppImage"; + hash = "sha256-hZiJ8JLzLhtD1W8DAso3yBAJYhFE+nJEbQJa59AWjnU="; + }; + extraInstallCommands = '' + mkdir -p $out/share/applications + cat > $out/share/applications/zenbrowser.desktop <