diff --git a/common/packages.nix b/common/packages.nix index cc209ad..d5a2882 100644 --- a/common/packages.nix +++ b/common/packages.nix @@ -8,6 +8,10 @@ environment.systemPackages = with pkgs; [ + onboard + maliit-keyboard + maliit-framework + wvkbd acpi aria2 binutils diff --git a/flake.nix b/flake.nix index 62e0169..716d614 100644 --- a/flake.nix +++ b/flake.nix @@ -78,7 +78,7 @@ { home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; - home-manager.users.akill = import ./home/home.nix; + home-manager.users.akill = import ./home/nixy/home.nix; home-manager.extraSpecialArgs = { inherit inputs system; }; home-manager.backupFileExtension = "home_backup"; } @@ -101,7 +101,7 @@ { home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; - home-manager.users.akill = import ./home/home.nix; + home-manager.users.akill = import ./home/mediabox/home.nix; home-manager.extraSpecialArgs = { inherit inputs system; }; } ]; @@ -120,7 +120,7 @@ { home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; - home-manager.users.akill = import ./home/home.nix; + home-manager.users.akill = import ./home/blue/home.nix; home-manager.extraSpecialArgs = { inherit inputs system; }; } ]; diff --git a/home/home.nix b/home/blue/home.nix similarity index 98% rename from home/home.nix rename to home/blue/home.nix index 68aea07..97fbae7 100644 --- a/home/home.nix +++ b/home/blue/home.nix @@ -10,12 +10,12 @@ let in { imports = [ - ./zsh.nix - ./i3status-rust.nix - ./sway.nix - ./i3.nix + ../common/zsh.nix + ../common/i3status-rust.nix + ../common/sway.nix + ../common/i3.nix ./home_packages.nix - ./whatsapp-for-linux.nix + ../common/whatsapp-for-linux.nix ]; home.stateVersion = "22.11"; diff --git a/home/home_packages.nix b/home/blue/home_packages.nix similarity index 96% rename from home/home_packages.nix rename to home/blue/home_packages.nix index 473019d..59dd74d 100644 --- a/home/home_packages.nix +++ b/home/blue/home_packages.nix @@ -33,7 +33,7 @@ let ''; wrap_sh = let - bubblewrap = pkgs.callPackage ../packages/bubblewrap/default.nix { }; + bubblewrap = pkgs.callPackage ../../packages/bubblewrap/default.nix { }; in pkgs.writeShellScriptBin "wrap.sh" '' if ${pkgs.coreutils-full}/bin/test $# -ne 1; then @@ -178,6 +178,6 @@ in ] ++ [ inputs.swaysw.packages.${system}.swaysw - (pkgs.callPackage ../packages/bubblewrap/default.nix { }) + (pkgs.callPackage ../../packages/bubblewrap/default.nix { }) ]; } diff --git a/home/i3.nix b/home/common/i3.nix similarity index 100% rename from home/i3.nix rename to home/common/i3.nix diff --git a/home/i3status-rust.nix b/home/common/i3status-rust.nix similarity index 100% rename from home/i3status-rust.nix rename to home/common/i3status-rust.nix diff --git a/home/sway.nix b/home/common/sway.nix similarity index 100% rename from home/sway.nix rename to home/common/sway.nix diff --git a/home/whatsapp-for-linux.nix b/home/common/whatsapp-for-linux.nix similarity index 100% rename from home/whatsapp-for-linux.nix rename to home/common/whatsapp-for-linux.nix diff --git a/home/zsh.nix b/home/common/zsh.nix similarity index 100% rename from home/zsh.nix rename to home/common/zsh.nix diff --git a/home/mediabox/home.nix b/home/mediabox/home.nix new file mode 100644 index 0000000..c682137 --- /dev/null +++ b/home/mediabox/home.nix @@ -0,0 +1,348 @@ +{ + lib, + pkgs, + ... +}: +let + qutebrowser_firejail = pkgs.writeShellScriptBin "qutebrowser" '' + firejail -- ${lib.getExe pkgs.qutebrowser} "$@" + ''; +in +{ + imports = [ + ../common/zsh.nix + ./home_packages.nix + ../common/whatsapp-for-linux.nix + ]; + + home.stateVersion = "22.11"; + home.username = "akill"; + home.homeDirectory = "/home/akill"; + + xdg.enable = true; + xdg.mimeApps = { + enable = true; + defaultApplications = { + "application/pdf" = "sioyek.desktop"; + "default-web-browser" = "org.qutebrowser.qutebrowser.desktop"; + "text/html" = "org.qutebrowser.qutebrowser.desktop"; + "x-scheme-handler/about" = "org.qutebrowser.qutebrowser.desktop"; + "x-scheme-handler/http" = "org.qutebrowser.qutebrowser.desktop"; + "x-scheme-handler/https" = "org.qutebrowser.qutebrowser.desktop"; + "x-scheme-handler/unknown" = "org.qutebrowser.qutebrowser.desktop"; + }; + }; + + fonts.fontconfig.enable = true; + + home.sessionVariables = rec { + BROWSER = lib.getExe qutebrowser_firejail; + DEFAULT_BROWSER = "${BROWSER}"; + EDITOR = "nvim"; + _JAVA_AWT_WM_NONREPARENTING = "1"; + MOZ_ENABLE_WAYLAND = "1"; + NIXOS_OZONE_WL = "1"; + QT_WAYLAND_DISABLE_WINDOWDECORATION = "1"; + SUDO_EDITOR = "nvim"; + WLR_RENDERER = "vulkan"; + }; + + wayland.windowManager.sway = { + enable = false; + }; + + programs = { + home-manager.enable = true; + + librewolf = { + enable = true; + package = pkgs.librewolf-wayland; + settings = { + "webgl.disable" = true; + "middlemouse.paste" = false; + }; + }; + + tmux = { + enable = true; + clock24 = true; + keyMode = "vi"; + terminal = "screen-256color"; + plugins = with pkgs.tmuxPlugins; [ + sysstat + net-speed + gruvbox + ]; + }; + + mpv = { + enable = true; + config = { + slang = "eng,en"; + alang = "eng,en"; + hwdec = "auto"; + vo = "gpu-next"; + ao = "pipewire"; + osd-bar = "no"; + border = "no"; + script-opts-set = ""; + ytdl-format = "bestvideo[height<=?1080]+bestaudio/best"; + }; + + bindings = { + WHEEL_UP = "ignore"; + WHEEL_DOWN = "ignore"; + WHEEL_LEFT = "ignore"; + WHEEL_RIGHT = "ignore"; + }; + }; + + alacritty = { + enable = true; + + settings = { + font = { + normal.family = "JetBrainsMono"; + italic.family = "JetBrainsMono"; + bold.family = "JetBrainsMono"; + bold_italic.family = "JetBrainsMono"; + size = 14.0; + }; + + selection = { + text = "0xcfcfc2"; + background = "0x232629"; + + normal = { + black = "0x1c1b19"; + red = "0xef2f27"; + green = "0x519f50"; + yellow = "0xfbb829"; + blue = "0x2c78bf"; + magenta = "0xe02c6d"; + cyan = "0x0aaeb3"; + white = "0x918175"; + }; + + bright = { + black = "0x2D2C29"; + red = "0xf75341"; + green = "0x98bc37"; + yellow = "0xfed06e"; + blue = "0x68A8E4"; + magenta = "0xff5c8f"; + cyan = "0x53fde9"; + white = "0xfce8c3"; + }; + }; + }; + }; + + rofi = { + enable = true; + theme = "gruvbox-dark"; + }; + + foot = { + enable = true; + server.enable = true; + settings = { + main = { + font = "JetBrainsMono:size=10"; + dpi-aware = "yes"; + }; + mouse = { + hide-when-typing = "yes"; + }; + }; + }; + + qutebrowser = { + enable = true; + keyBindings = { + normal = { + "j" = "scroll-px 0 25"; + "k" = "scroll-px 0 -25"; + "u" = "undo --window"; + ";v" = "hint links spawn mpv {hint-url}"; + }; + }; + + settings = { + content.notifications.enabled = false; + content.pdfjs = true; + content.webgl = false; + fonts.completion.category = "14pt monospace"; + fonts.completion.entry = "14pt monospace"; + fonts.contextmenu = "14pt monospace"; + fonts.debug_console = "14pt monospace"; + fonts.downloads = "14pt monospace"; + fonts.hints = "14pt monospace"; + fonts.keyhint = "14pt monospace"; + fonts.messages.info = "14pt monospace"; + fonts.prompts = "14pt monospace"; + fonts.statusbar = "14pt monospace"; + hints.chars = "1qaz2wsx3edc4rfv5tgb6yhn7ujm8ik9ol0p"; + tabs.last_close = "close"; + tabs.position = "left"; + tabs.show = "multiple"; + tabs.tabs_are_windows = true; + tabs.width = "12%"; + zoom.default = "125%"; + }; + }; + + git = { + enable = true; + userName = "Asmir A"; + userEmail = "asmir.abdulahovic@gmail.com"; + extraConfig = { + init.defaultBranch = "master"; + pull = { + rebase = true; + }; + credential = { + helper = "store"; + }; + }; + signing.key = "020C42B7A9ABA3E2"; + signing.signByDefault = true; + }; + + obs-studio = { + enable = true; + plugins = with pkgs.obs-studio-plugins; [ + obs-vkcapture + input-overlay + obs-multi-rtmp + obs-pipewire-audio-capture + wlrobs + obs-vaapi + ]; + }; + + i3status-rust.enable = false; + z-lua.enable = true; + zsh.enable = true; + }; + + services = { + lorri.enable = false; + mako.enable = true; + cliphist.enable = true; + gammastep = { + enable = true; + latitude = "44.53"; + longitude = "18.67"; + temperature.day = 5500; + temperature.night = 2900; + }; + + gnome-keyring.enable = true; + + gpg-agent = { + enable = true; + defaultCacheTtl = 1800; + enableSshSupport = true; + }; + + swayidle = + let + locker = pkgs.writeShellScriptBin "swaylock_fancy" '' + ALL_IMGS="" + LOCK_ARGS="" + for OUTPUT in $(${pkgs.sway}/bin/swaymsg -t get_outputs | ${lib.getExe pkgs.jq} -r '.[].name') + do + TMP_FILE=$(${pkgs.coreutils}/bin/mktemp /tmp/.swaylock_ss_XXXXXX.jpg) + ${lib.getExe pkgs.grim} -t ppm -o $OUTPUT - | \ + ${lib.getExe pkgs.ffmpeg} -y -loglevel 0 -i - -vframes 1 -vf "boxblur=10" "$TMP_FILE" + LOCK_ARGS="$LOCK_ARGS --image $OUTPUT:$TMP_FILE" + ALL_IMGS="$ALL_IMGS $TMP_FILE" + done + ${lib.getExe pkgs.swaylock} -f $LOCK_ARGS + ${pkgs.coreutils}/bin/shred $ALL_IMGS + ${pkgs.coreutils}/bin/rm $ALL_IMGS + ''; + in + /* + refresh_i3status = pkgs.writeShellScriptBin "refresh_i3status" '' + ${pkgs.coreutils}/bin/sleep 1 && ${pkgs.procps}/bin/pkill -USR1 i3status-rs + ''; + */ + { + enable = false; + events = [ + { + event = "before-sleep"; + command = "${locker}/bin/swaylock_fancy"; + } + { + event = "lock"; + command = "${locker}/bin/swaylock_fancy"; + } + /* + { + event = "after-resume"; + command = "${refresh_i3status}/bin/refresh_i3status"; + } + */ + ]; + timeouts = [ + { + timeout = 15 * 60; + command = "${locker}/bin/swaylock_fancy"; + } + ]; + }; + + kanshi = { + enable = false; + settings = [ + { + profile.name = "undocked"; + profile.outputs = [ + { + criteria = "eDP-1"; + } + ]; + } + + { + profile.name = "docked"; + profile.outputs = [ + { + criteria = "eDP-1"; + position = "0,0"; + } + { + criteria = "Philips Consumer Electronics Company PHL 272S1 UHB2347026536"; + mode = "1920x1080@74.973Hz"; + position = "1920,0"; + } + { + criteria = "Philips Consumer Electronics Company PHL 272S1 UHB2347026535"; + mode = "1920x1080@74.973Hz"; + position = "3840,0"; + } + ]; + } + ]; + }; + }; + + systemd.user = { + services = { + wayland-pipewire-idle-inhibit = { + Unit.Description = "inhibit sleep while audio output is active"; + Service = { + ExecStart = "${lib.getExe pkgs.wayland-pipewire-idle-inhibit}"; + Restart = "always"; + RestartSec = 10; + }; + Install = { + WantedBy = [ "graphical-session.target" ]; + }; + }; + }; + }; +} diff --git a/home/mediabox/home_packages.nix b/home/mediabox/home_packages.nix new file mode 100644 index 0000000..4977bf2 --- /dev/null +++ b/home/mediabox/home_packages.nix @@ -0,0 +1,59 @@ +{ lib +, pkgs +, ... +}: +let + chromium_discord = pkgs.writeShellScriptBin "chromium_discord" '' + ${lib.getExe pkgs.ungoogled-chromium} --socket=wayland org.chromium.Chromium --app=https://discordapp.com/channels/@me + ''; +in +{ + home.packages = + with pkgs; + [ + cached-nix-shell + deluge + dualsensectl + ffmpeg-full + firefox + freetube + imv + inkscape + jellyfin-media-player + kodi-wayland + libnotify + libreoffice-qt6-fresh + libva-utils + nixpkgs-fmt + nix-prefetch-git + nodePackages.peerflix + pandoc + paraview + pass-wayland + pavucontrol + pay-respects + pirate-get + poppler_utils + pulsemixer + pwvucontrol + python3 + remmina + rtorrent + sioyek + steam-run + stremio + swayimg + tessen + ungoogled-chromium + wdisplays + wine + wl-clipboard + wlr-randr + wofi + yt-dlp + zathura + ] + ++ [ + chromium_discord + ]; +} diff --git a/home/nixy/home.nix b/home/nixy/home.nix new file mode 100644 index 0000000..97fbae7 --- /dev/null +++ b/home/nixy/home.nix @@ -0,0 +1,351 @@ +{ + lib, + pkgs, + ... +}: +let + qutebrowser_firejail = pkgs.writeShellScriptBin "qutebrowser" '' + firejail -- ${lib.getExe pkgs.qutebrowser} "$@" + ''; +in +{ + imports = [ + ../common/zsh.nix + ../common/i3status-rust.nix + ../common/sway.nix + ../common/i3.nix + ./home_packages.nix + ../common/whatsapp-for-linux.nix + ]; + + home.stateVersion = "22.11"; + home.username = "akill"; + home.homeDirectory = "/home/akill"; + + xdg.enable = true; + xdg.mimeApps = { + enable = true; + defaultApplications = { + "application/pdf" = "sioyek.desktop"; + "default-web-browser" = "org.qutebrowser.qutebrowser.desktop"; + "text/html" = "org.qutebrowser.qutebrowser.desktop"; + "x-scheme-handler/about" = "org.qutebrowser.qutebrowser.desktop"; + "x-scheme-handler/http" = "org.qutebrowser.qutebrowser.desktop"; + "x-scheme-handler/https" = "org.qutebrowser.qutebrowser.desktop"; + "x-scheme-handler/unknown" = "org.qutebrowser.qutebrowser.desktop"; + }; + }; + + fonts.fontconfig.enable = true; + + home.sessionVariables = rec { + BROWSER = lib.getExe qutebrowser_firejail; + DEFAULT_BROWSER = "${BROWSER}"; + EDITOR = "nvim"; + _JAVA_AWT_WM_NONREPARENTING = "1"; + MOZ_ENABLE_WAYLAND = "1"; + NIXOS_OZONE_WL = "1"; + QT_WAYLAND_DISABLE_WINDOWDECORATION = "1"; + SUDO_EDITOR = "nvim"; + WLR_RENDERER = "vulkan"; + }; + + wayland.windowManager.sway = { + enable = true; + }; + + programs = { + home-manager.enable = true; + + librewolf = { + enable = true; + package = pkgs.librewolf-wayland; + settings = { + "webgl.disable" = true; + "middlemouse.paste" = false; + }; + }; + + tmux = { + enable = true; + clock24 = true; + keyMode = "vi"; + terminal = "screen-256color"; + plugins = with pkgs.tmuxPlugins; [ + sysstat + net-speed + gruvbox + ]; + }; + + mpv = { + enable = true; + config = { + slang = "eng,en"; + alang = "eng,en"; + hwdec = "auto"; + vo = "gpu-next"; + ao = "pipewire"; + osd-bar = "no"; + border = "no"; + script-opts-set = ""; + ytdl-format = "bestvideo[height<=?1080]+bestaudio/best"; + }; + + bindings = { + WHEEL_UP = "ignore"; + WHEEL_DOWN = "ignore"; + WHEEL_LEFT = "ignore"; + WHEEL_RIGHT = "ignore"; + }; + }; + + alacritty = { + enable = true; + + settings = { + font = { + normal.family = "JetBrainsMono"; + italic.family = "JetBrainsMono"; + bold.family = "JetBrainsMono"; + bold_italic.family = "JetBrainsMono"; + size = 14.0; + }; + + selection = { + text = "0xcfcfc2"; + background = "0x232629"; + + normal = { + black = "0x1c1b19"; + red = "0xef2f27"; + green = "0x519f50"; + yellow = "0xfbb829"; + blue = "0x2c78bf"; + magenta = "0xe02c6d"; + cyan = "0x0aaeb3"; + white = "0x918175"; + }; + + bright = { + black = "0x2D2C29"; + red = "0xf75341"; + green = "0x98bc37"; + yellow = "0xfed06e"; + blue = "0x68A8E4"; + magenta = "0xff5c8f"; + cyan = "0x53fde9"; + white = "0xfce8c3"; + }; + }; + }; + }; + + rofi = { + enable = true; + theme = "gruvbox-dark"; + }; + + foot = { + enable = true; + server.enable = true; + settings = { + main = { + font = "JetBrainsMono:size=10"; + dpi-aware = "yes"; + }; + mouse = { + hide-when-typing = "yes"; + }; + }; + }; + + qutebrowser = { + enable = true; + keyBindings = { + normal = { + "j" = "scroll-px 0 25"; + "k" = "scroll-px 0 -25"; + "u" = "undo --window"; + ";v" = "hint links spawn mpv {hint-url}"; + }; + }; + + settings = { + content.notifications.enabled = false; + content.pdfjs = true; + content.webgl = false; + fonts.completion.category = "14pt monospace"; + fonts.completion.entry = "14pt monospace"; + fonts.contextmenu = "14pt monospace"; + fonts.debug_console = "14pt monospace"; + fonts.downloads = "14pt monospace"; + fonts.hints = "14pt monospace"; + fonts.keyhint = "14pt monospace"; + fonts.messages.info = "14pt monospace"; + fonts.prompts = "14pt monospace"; + fonts.statusbar = "14pt monospace"; + hints.chars = "1qaz2wsx3edc4rfv5tgb6yhn7ujm8ik9ol0p"; + tabs.last_close = "close"; + tabs.position = "left"; + tabs.show = "multiple"; + tabs.tabs_are_windows = true; + tabs.width = "12%"; + zoom.default = "125%"; + }; + }; + + git = { + enable = true; + userName = "Asmir A"; + userEmail = "asmir.abdulahovic@gmail.com"; + extraConfig = { + init.defaultBranch = "master"; + pull = { + rebase = true; + }; + credential = { + helper = "store"; + }; + }; + signing.key = "020C42B7A9ABA3E2"; + signing.signByDefault = true; + }; + + obs-studio = { + enable = true; + plugins = with pkgs.obs-studio-plugins; [ + obs-vkcapture + input-overlay + obs-multi-rtmp + obs-pipewire-audio-capture + wlrobs + obs-vaapi + ]; + }; + + i3status-rust.enable = true; + z-lua.enable = true; + zsh.enable = true; + }; + + services = { + lorri.enable = false; + mako.enable = true; + cliphist.enable = true; + gammastep = { + enable = true; + latitude = "44.53"; + longitude = "18.67"; + temperature.day = 5500; + temperature.night = 2900; + }; + + gnome-keyring.enable = true; + + gpg-agent = { + enable = true; + defaultCacheTtl = 1800; + enableSshSupport = true; + }; + + swayidle = + let + locker = pkgs.writeShellScriptBin "swaylock_fancy" '' + ALL_IMGS="" + LOCK_ARGS="" + for OUTPUT in $(${pkgs.sway}/bin/swaymsg -t get_outputs | ${lib.getExe pkgs.jq} -r '.[].name') + do + TMP_FILE=$(${pkgs.coreutils}/bin/mktemp /tmp/.swaylock_ss_XXXXXX.jpg) + ${lib.getExe pkgs.grim} -t ppm -o $OUTPUT - | \ + ${lib.getExe pkgs.ffmpeg} -y -loglevel 0 -i - -vframes 1 -vf "boxblur=10" "$TMP_FILE" + LOCK_ARGS="$LOCK_ARGS --image $OUTPUT:$TMP_FILE" + ALL_IMGS="$ALL_IMGS $TMP_FILE" + done + ${lib.getExe pkgs.swaylock} -f $LOCK_ARGS + ${pkgs.coreutils}/bin/shred $ALL_IMGS + ${pkgs.coreutils}/bin/rm $ALL_IMGS + ''; + in + /* + refresh_i3status = pkgs.writeShellScriptBin "refresh_i3status" '' + ${pkgs.coreutils}/bin/sleep 1 && ${pkgs.procps}/bin/pkill -USR1 i3status-rs + ''; + */ + { + enable = true; + events = [ + { + event = "before-sleep"; + command = "${locker}/bin/swaylock_fancy"; + } + { + event = "lock"; + command = "${locker}/bin/swaylock_fancy"; + } + /* + { + event = "after-resume"; + command = "${refresh_i3status}/bin/refresh_i3status"; + } + */ + ]; + timeouts = [ + { + timeout = 15 * 60; + command = "${locker}/bin/swaylock_fancy"; + } + ]; + }; + + kanshi = { + enable = true; + settings = [ + { + profile.name = "undocked"; + profile.outputs = [ + { + criteria = "eDP-1"; + } + ]; + } + + { + profile.name = "docked"; + profile.outputs = [ + { + criteria = "eDP-1"; + position = "0,0"; + } + { + criteria = "Philips Consumer Electronics Company PHL 272S1 UHB2347026536"; + mode = "1920x1080@74.973Hz"; + position = "1920,0"; + } + { + criteria = "Philips Consumer Electronics Company PHL 272S1 UHB2347026535"; + mode = "1920x1080@74.973Hz"; + position = "3840,0"; + } + ]; + } + ]; + }; + }; + + systemd.user = { + services = { + wayland-pipewire-idle-inhibit = { + Unit.Description = "inhibit sleep while audio output is active"; + Service = { + ExecStart = "${lib.getExe pkgs.wayland-pipewire-idle-inhibit}"; + Restart = "always"; + RestartSec = 10; + }; + Install = { + WantedBy = [ "graphical-session.target" ]; + }; + }; + }; + }; +} diff --git a/home/nixy/home_packages.nix b/home/nixy/home_packages.nix new file mode 100644 index 0000000..59dd74d --- /dev/null +++ b/home/nixy/home_packages.nix @@ -0,0 +1,183 @@ +{ + lib, + pkgs, + inputs, + system, + ... +}: +let + chromium_teams = pkgs.writeShellScriptBin "chromium_teams" '' + ${lib.getExe pkgs.ungoogled-chromium} --socket=wayland org.chromium.Chromium --app=https://teams.microsoft.com/ + ''; + chromium_discord = pkgs.writeShellScriptBin "chromium_discord" '' + ${lib.getExe pkgs.ungoogled-chromium} --socket=wayland org.chromium.Chromium --app=https://discordapp.com/channels/@me + ''; + chromium_stackfield = pkgs.writeShellScriptBin "chromium_stackfield" '' + ${lib.getExe pkgs.ungoogled-chromium} --socket=wayland org.chromium.Chromium --app=https://stackfield.com/ + ''; + nixy_switch = pkgs.writeShellScriptBin "nixy_switch" '' + ${pkgs.util-linux}/bin/ionice -c 3 -- \ + ${pkgs.coreutils}/bin/nice -n 20 -- \ + ${lib.getExe pkgs.nixos-rebuild} --flake ./#nixy switch + ''; + qcad = pkgs.writeShellScriptBin "qcad" '' + QT_QPA_PLATFORM=xcb ${lib.getExe pkgs.qcad} $@ + ''; + ssh_proxy = pkgs.writeShellScriptBin "ssh_proxy" '' + if ${pkgs.coreutils}/bin/test $# -ne 1; then + echo "Usage: $0 @" + exit + fi + PROXY_PORT="1337" + ${lib.getExe pkgs.openssh} -D "$PROXY_PORT" -q -N "$@" + ''; + wrap_sh = + let + bubblewrap = pkgs.callPackage ../../packages/bubblewrap/default.nix { }; + in + pkgs.writeShellScriptBin "wrap.sh" '' + if ${pkgs.coreutils-full}/bin/test $# -ne 1; then + echo "Usage: $0 " + exit + fi + FULL_PATH=$(${pkgs.coreutils-full}/bin/realpath "$1") + BUBBLEWRAP_DIR="$1" ${bubblewrap}/bin/bwrap \ + --bind / / \ + --dev /dev \ + --overlay-src "$FULL_PATH" \ + --tmp-overlay "$FULL_PATH" \ + "$SHELL" + ''; +in +{ + home.packages = + with pkgs; + [ + anydesk + appimage-run + arp-scan + birdtray + blackmagic + blender + btop + cached-nix-shell + caddy + cargo + cmake + compsize + kdePackages.ark + ungoogled-chromium + # cura + deluge + dfu-util + discord + dmenu-wayland + drawio + dualsensectl + ffmpeg-full + firefox + freecad + gcc + gdb + ghostscript + glab + glaxnimate + gnumake + go + grim + heimdall + hyperfine + icestorm + imagemagick + imv + inkscape + jellyfin-media-player + kdePackages.kdenlive + kicad + kodi-wayland + krita + libnotify + libreoffice-qt6-fresh + libva-utils + linuxPackages_latest.perf + lsix + lsix + mediainfo + ncdu + neovide + nextpnr + ngspice + nix-init + nixpkgs-fmt + nix-prefetch-git + nodePackages.peerflix + nom + openems + openocd + openscad + pandoc + paraview + pass-wayland + patchelf + pavucontrol + pay-respects + pirate-get + poppler_utils + powertop + pulsemixer + pwvucontrol + python3 + python3Packages.west + remmina + river + rizin + rtorrent + sbcl + screen + seer + sioyek + slurp + steam-run + stm32cubemx + swayimg + tea + teams-for-linux + tectonic + tessen + texlive.combined.scheme-full + thunderbird + typst + upx + viber + waybar + wdisplays + weechat + whatsapp-for-linux + wine + wireshark + wl-clipboard + wlr-randr + wofi + x2goclient + yewtube + yosys + yt-dlp + zapzap + zathura + # zeal-qt6 + zig + ] + ++ [ + chromium_discord + chromium_stackfield + chromium_teams + nixy_switch + qcad + ssh_proxy + wrap_sh + ] + ++ [ + inputs.swaysw.packages.${system}.swaysw + (pkgs.callPackage ../../packages/bubblewrap/default.nix { }) + ]; +} diff --git a/mediabox/configuration.nix b/mediabox/configuration.nix index 80aef0b..1bbedaf 100644 --- a/mediabox/configuration.nix +++ b/mediabox/configuration.nix @@ -44,6 +44,7 @@ in "nix-command" "flakes" ]; + trusted-users = [ "akill" "root" ]; }; }; @@ -235,6 +236,7 @@ in fwupd.enable = true; ntp.enable = true; openssh.enable = true; + openssh.settings.PermitRootLogin = "yes"; thinkfan.enable = false; xrdp = {