summaryrefslogtreecommitdiff
path: root/modules/nixos
diff options
context:
space:
mode:
Diffstat (limited to 'modules/nixos')
-rw-r--r--modules/nixos/hyprland.nix86
-rw-r--r--modules/nixos/services.nix5
-rw-r--r--modules/nixos/sway.nix26
3 files changed, 99 insertions, 18 deletions
diff --git a/modules/nixos/hyprland.nix b/modules/nixos/hyprland.nix
index c754eae..c5872da 100644
--- a/modules/nixos/hyprland.nix
+++ b/modules/nixos/hyprland.nix
@@ -1,3 +1,85 @@
-{ config, lib, ...}: {
- programs.hyprland.enable = true;
+{ pkgs, hyprland, ...}: {
+ xdg.portal = {
+ enable = true;
+ wlr.enable = true;
+ extraPortals = with pkgs; [
+ xdg-desktop-portal-wlr
+ ];
+ };
+
+ environment.pathsToLink = ["/libexec"]; # links /libexec from derivations to /run/current-system/sw
+ services = {
+ gvfs.enable = true; # Mount, trash, and other fucntionalities
+ tumbler.enable = true; # thumbnail support for images
+ xserver = {
+ enable = true;
+
+ desktopManager = {
+ xterm.enable = false;
+ };
+
+ displayManager = {
+ defaultSession = "hyprland";
+ lightdm.enable = false;
+ # gdm = {
+ # enable = true;
+ # wayland = true;
+ # };
+ };
+ };
+ };
+ programs = {
+ hyprland = {
+ enable = true;
+
+ xwayland = {
+ enable = true;
+ hidpi = true;
+ };
+
+ # nvidiaPatches = true;
+ };
+
+ # monitor backlight control
+ light.enable = true;
+
+ # # thunar file manager(part of xfce) related options
+ # thunar.plugins = with pkgs.xfce; [
+ # thunar-archive-plugin
+ # thunar-volman
+ # ];
+ };
+
+ # List packages installed in system profile. To search, run:
+ # $ nix search wget
+ environment.systemPackages = with pkgs; [
+ waybar # the status bar
+ swaybg # the wallpaper
+ swayidle # the idle timeout
+ swaylock # locking the screen
+ wlogout # logout menu
+ wl-clipboard # copying and pasting
+ hyprpicker # color picker
+
+ wf-recorder # screen recording
+ grim # taking screenshots
+ slurp # selecting a region to screenshot
+ # TODO replace by 'flameshot gui --raw | wl-copy'
+
+ mako # the notification daemon, the same as dunst
+
+ yad # a fork of zenity, for creating dialogs
+
+ # audio
+ alsa-utils # provides amixer/alsamixer/...
+ mpd # for playing system sounds
+ mpc-cli # command-line pmd client
+ ncmpcpp # a mpd client with a UI
+ networkmanagerapplet # provide GUI app: nm-connection-editor
+
+ xfce.thunar # sfce4's file manager
+ ];
+
+ # fix https://github.com/ryan4yin/nix-config/issues/10
+ security.pam.services.swaylock = {};
} \ No newline at end of file
diff --git a/modules/nixos/services.nix b/modules/nixos/services.nix
index 336d132..c0cd4e8 100644
--- a/modules/nixos/services.nix
+++ b/modules/nixos/services.nix
@@ -8,9 +8,6 @@
};
spotifyd.enable = true;
- #FOR: sway
- dbus.enable = true;
-
#FROM: configuration.nix
# localtimed.enable = true;
xserver = {
@@ -28,7 +25,7 @@
desktopManager.plasma5.enable = true;
displayManager = {
sddm.enable = true;
- defaultSession = "plasmawayland";
+ # defaultSession = "plasmawayland";
};
};
diff --git a/modules/nixos/sway.nix b/modules/nixos/sway.nix
index 8d4d664..f2f616c 100644
--- a/modules/nixos/sway.nix
+++ b/modules/nixos/sway.nix
@@ -3,18 +3,18 @@
environment.systemPackages = with pkgs; [
];
- # xdg-desktop-portal works by exposing a series of D-Bus interfaces
- # known as portals under a well-known name
- # (org.freedesktop.portal.Desktop) and object path
- # (/org/freedesktop/portal/desktop).
- # The portal interfaces include APIs for file access, opening URIs,
- # printing and others.
- xdg.portal = {
- enable = true;
- wlr.enable = true;
- # gtk portal needed to make gtk apps happy
- extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
- };
+ # xdg-desktop-portal works by exposing a series of D-Bus interfaces
+ # known as portals under a well-known name
+ # (org.freedesktop.portal.Desktop) and object path
+ # (/org/freedesktop/portal/desktop).
+ # The portal interfaces include APIs for file access, opening URIs,
+ # printing and others.
+ xdg.portal = {
+ enable = true;
+ wlr.enable = true;
+ # gtk portal needed to make gtk apps happy
+ extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
+ };
# enable sway window manager
programs.sway = {
@@ -22,6 +22,8 @@
wrapperFeatures.gtk = true;
};
+ services.dbus.enable = true;
+
# kanshi systemd service
systemd.user.services.kanshi = {
description = "kanshi daemon";