feat: zenbrowser + nas attempt through tailscale + lib cc
This commit is contained in:
parent
0a5118e815
commit
da3cf14e5e
5 changed files with 120 additions and 40 deletions
|
@ -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";
|
||||
|
|
|
@ -71,6 +71,7 @@
|
|||
# Sets up all the libraries to load
|
||||
nix-ld.libraries = with pkgs; [
|
||||
stdenv.cc.cc
|
||||
stdenv.cc.cc.lib
|
||||
zlib
|
||||
];
|
||||
};
|
||||
|
|
|
@ -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
|
||||
];
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
45
modules/zen-browser.nix
Normal file
45
modules/zen-browser.nix
Normal file
|
@ -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 <<EOF
|
||||
[Desktop Entry]
|
||||
Type=Application
|
||||
Name=Zen Browser
|
||||
Icon=zen-browser
|
||||
Exec=zen %F
|
||||
Comment=Internet Browser
|
||||
EOF
|
||||
'';
|
||||
};
|
||||
|
||||
# Fetch and convert the icon
|
||||
icon =
|
||||
pkgs.runCommand "zenbrowser-icon"
|
||||
{
|
||||
nativeBuildInputs = [ pkgs.imagemagick ];
|
||||
src = pkgs.fetchurl {
|
||||
url = "https://raw.githubusercontent.com/zen-browser/desktop/163cc6b6bdfbf81673a0b5ea55ee7bf2eba46a42/configs/branding/release/logo.png";
|
||||
sha256 = "9e27e02a924c73c0101757aa6f726ec6a91f7e908bcc900e9a4dab2c8cd3e61a";
|
||||
};
|
||||
}
|
||||
''
|
||||
mkdir -p $out/share/icons/hicolor/512x512/apps
|
||||
convert $src $out/share/icons/hicolor/512x512/apps/zen-browser.png
|
||||
'';
|
||||
|
||||
in
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
zenbrowser
|
||||
];
|
||||
}
|
Loading…
Add table
Reference in a new issue