From 0df212398ffe8524913ead8431eee6b87850c3dc Mon Sep 17 00:00:00 2001 From: LavaDesu Date: Mon, 8 Jul 2024 18:16:56 +1000 Subject: [PATCH] system/greetd,users/rin: split into xorg and wayland --- hosts/anemone/default.nix | 2 +- hosts/hyacinth/default.nix | 2 +- .../system/{greetd.nix => greetd_wayland.nix} | 0 modules/system/greetd_xorg.nix | 16 ++++++ users/rin/{default.nix => wayland.nix} | 0 users/rin/xorg.nix | 57 +++++++++++++++++++ 6 files changed, 75 insertions(+), 2 deletions(-) rename modules/system/{greetd.nix => greetd_wayland.nix} (100%) create mode 100644 modules/system/greetd_xorg.nix rename users/rin/{default.nix => wayland.nix} (100%) create mode 100644 users/rin/xorg.nix diff --git a/hosts/anemone/default.nix b/hosts/anemone/default.nix index 9bdb7ae..a813f3f 100644 --- a/hosts/anemone/default.nix +++ b/hosts/anemone/default.nix @@ -32,7 +32,7 @@ ./kernel.nix ./networking.nix - ../../users/rin + ../../users/rin/wayland.nix ]; programs.hyprland.enable = true; diff --git a/hosts/hyacinth/default.nix b/hosts/hyacinth/default.nix index 33e98ee..d88e2fe 100644 --- a/hosts/hyacinth/default.nix +++ b/hosts/hyacinth/default.nix @@ -36,7 +36,7 @@ ./kernel.nix ./networking.nix - ../../users/rin + ../../users/rin/xorg.nix ]; services.postgresql.ensureDatabases = [ "barista" "barista-dev" ]; programs.hyprland.enable = true; diff --git a/modules/system/greetd.nix b/modules/system/greetd_wayland.nix similarity index 100% rename from modules/system/greetd.nix rename to modules/system/greetd_wayland.nix diff --git a/modules/system/greetd_xorg.nix b/modules/system/greetd_xorg.nix new file mode 100644 index 0000000..2958926 --- /dev/null +++ b/modules/system/greetd_xorg.nix @@ -0,0 +1,16 @@ +{ pkgs, lib, ... }: { + services.greetd = { + enable = true; + settings = { + default_session = { + command = "${pkgs.greetd.tuigreet}/bin/tuigreet --remember --asterisks --time --cmd 'zsh -c \"source $HOME/.config/zsh/.zshrc && startx\"'"; + user = "greeter"; + }; + }; + }; + + services.xserver = { + autorun = false; + displayManager.startx.enable = true; + }; +} diff --git a/users/rin/default.nix b/users/rin/wayland.nix similarity index 100% rename from users/rin/default.nix rename to users/rin/wayland.nix diff --git a/users/rin/xorg.nix b/users/rin/xorg.nix new file mode 100644 index 0000000..d940f7b --- /dev/null +++ b/users/rin/xorg.nix @@ -0,0 +1,57 @@ +{ config, lib, modules, pkgs, ... }: { + programs.zsh.enable = true; + users.users.rin = { + isNormalUser = true; + extraGroups = [ "adbusers" "audio" "corectrl" "libvirtd" "networkmanager" "video" "wheel" ]; + shell = pkgs.zsh; + uid = 1001; + passwordFile = config.age.secrets.passwd.path; + }; + home-manager.users.rin = { config, enableGUI, lib, pkgs, ... }: { + home = { + username = "rin"; + homeDirectory = "/home/rin"; + stateVersion = "21.05"; + keyboard = null; # see https://github.com/nix-community/home-manager/issues/2219 + }; + + imports = with modules.user; [ + ./packages.nix + sessionVariables + + direnv + git + gpg + neovim + npm + pass + zsh + ] ++ lib.optionals enableGUI [ + theming + xdg + + kitty + mpv + obs + rofi + + picom + bspwm + sxhkd + xorg + dunst + eww + ]; + + services.mpris-proxy.enable = true; + + home.file.".local/bin/ipc-bridge.exe".source = builtins.fetchurl { + url = "https://github.com/0e4ef622/wine-discord-ipc-bridge/releases/download/v0.0.1/winediscordipcbridge.exe"; + sha256 = "1swn9spxpq6blm74kjmfz4ipq6a8qjzccvb2msb25pf5b1z7jnns"; + }; + home.file.".local/bin/osu" = { + executable = true; + source = ../../scripts/osu; + }; + }; +}