diff options
Diffstat (limited to 'modules')
-rw-r--r-- | modules/dev.nix | 14 | ||||
-rw-r--r-- | modules/kaysshfs.nix | 20 | ||||
-rw-r--r-- | modules/wayland.nix | 72 | ||||
-rw-r--r-- | modules/xdp.nix | 27 |
4 files changed, 133 insertions, 0 deletions
diff --git a/modules/dev.nix b/modules/dev.nix new file mode 100644 index 0000000..75e0967 --- /dev/null +++ b/modules/dev.nix @@ -0,0 +1,14 @@ +{ pkgs, ... }: + +{ + environment.systemPackages = with pkgs; [ + nodePackages.bash-language-server + nil + ccls + lua-language-server + man-pages + man-pages-posix + ]; + + documentation.dev.enable = true; +} diff --git a/modules/kaysshfs.nix b/modules/kaysshfs.nix new file mode 100644 index 0000000..c526927 --- /dev/null +++ b/modules/kaysshfs.nix @@ -0,0 +1,20 @@ +{ pkgs, ... }: + +{ + system.fsPackages = with pkgs; [ sshfs ]; + + fileSystems."/mnt/kay" = { + device = "sinansftp@sinanmohd.com:"; + fsType = "sshfs"; + options = [ + "allow_other" # for non-root access + "_netdev" # this is a network fs + "x-systemd.automount" # mount on demand + + # SSH options + "reconnect" # handle connection drops + "ServerAliveInterval=15" # keep connections alive + "IdentityFile=/var/secrets/kaysftp-key" + ]; + }; +} diff --git a/modules/wayland.nix b/modules/wayland.nix new file mode 100644 index 0000000..65eb0e0 --- /dev/null +++ b/modules/wayland.nix @@ -0,0 +1,72 @@ +{ pkgs, ... }: + +{ + # pkgs + environment.systemPackages = with pkgs; [ + dwl-sinan + zathura + pinentry-gnome + mpv + qemu + OVMFFull + element-desktop + swaylock + swayidle + swaybg + foot + grim + slurp + wl-clipboard + wmenu-sinan + mako + wayland + xdg-utils + imv + libnotify + wob + wlr-randr + tor-browser-bundle-bin + wtype + ]; + + # font + fonts = { + packages = with pkgs; [ + terminus-nerdfont + dm-sans + ]; + enableDefaultPackages = true; + fontconfig = { + hinting.style = "full"; + defaultFonts = { + monospace = [ "Terminess Nerd Font" ]; + serif = [ "DeepMind Sans" ]; + sansSerif = [ "DeepMind Sans" ]; + }; + }; + }; + + # misc + hardware.opengl.enable = true; + + services.dbus.enable = true; + programs = { + xwayland.enable = true; + gnupg.agent = { + enable = true; + pinentryFlavor = "gnome3"; + }; + firefox = { + enable = true; + preferences = { + "media.ffmpeg.vaapi.enabled" = true; + "gfx.webrender.all" = true; + }; + }; + }; + + security = { + polkit.enable = true; + pam.services.swaylock.text = "auth include login"; + }; +} diff --git a/modules/xdp.nix b/modules/xdp.nix new file mode 100644 index 0000000..a7adfa5 --- /dev/null +++ b/modules/xdp.nix @@ -0,0 +1,27 @@ +{ pkgs, ... }: + +let + # https://github.com/emersion/xdg-desktop-portal-wlr/wiki/"It-doesn't-work"-Troubleshooting-Checklist + dbus-xdp-environment = pkgs.writeTextFile { + name = "dbus-xdp-environment"; + destination = "/bin/dbus-xdp-environment"; + executable = true; + + text = '' + dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=wlroots + systemctl --user stop pipewire wireplumber xdg-desktop-portal xdg-desktop-portal-wlr + systemctl --user start pipewire wireplumber xdg-desktop-portal xdg-desktop-portal-wlr + ''; + }; +in +{ + # pkgs + environment.systemPackages = [ dbus-xdp-environment ]; + + # xdg desktop portal + xdg.portal = { + enable = true; + wlr.enable = true; + extraPortals = [ pkgs.xdg-desktop-portal-gtk ]; + }; +} |