first working build of rewrite

This commit is contained in:
Steven Carpenter 2024-04-13 03:58:29 -04:00
commit 44a3f420c6
29 changed files with 1261 additions and 0 deletions

View file

@ -0,0 +1,15 @@
{ config, pkgs, lib, ... }:
let
cfg = config.speccon18.desktop.budgie;
in {
options.speccon18.desktop.budgie = {
enable = lib.mkEnableOption "enables specs custom budgie setup";
};
config = lib.mkIf cfg.enable {
services.xserver = {
enable = true;
desktopManager.budgie.enable = true;
displayManager.lightdm.enable = true;
};
};
}

View file

@ -0,0 +1,12 @@
{config,...}:{
imports = [
./budgie.nix
./gnome.nix
./hyprland.nix
./tuigreet.nix
];
speccon18.desktop.budgie.enable = true;
speccon18.desktop.gnome.enable = false;
speccon18.desktop.hyprland.enable = false;
speccon18.desktop.tuigreet.enable = false;
}

View file

@ -0,0 +1,57 @@
{ config, pkgs, lib, ... }:
{
options.speccon18.desktop.gnome.enable = lib.mkEnableOption "enables specs custom gnome setup";
config = lib.mkIf config.speccon18.desktop.gnome.enable {
# Dconf settings for home manager
# dconf = {
# enable = true;
# settings = {
# "org/gnome/mutter" = {
# attach-modal-dialogs = true;
# dynamic-workspaces = true;
# edge-tiling = false;
# experimental-features = [ "scale-monitor-framebuffer" ];
# focus-change-on-pointer-rest = true;
# workspaces-only-on-primary = true;
# };
# };
# };
# Gnome extensions
environment.systemPackages = with pkgs; [ ];
services = {
gnome = {
core-utilities.enable = false;
gnome-keyring.enable = true;
};
xserver = {
enable = true;
layout = "us";
xkbVariant = "";
displayManager = {
gdm = {
enable = true;
wayland = true;
};
defaultSession = lib.mkDefault "budgie-desktop";
};
desktopManager = {
xterm.enable = false;
gnome.enable = false;
};
};
};
programs = {
xwayland.enable = lib.mkDefault true;
};
xdg = {
portal = { enable = lib.mkDefault true; };
mime.defaultApplications = {
"text/markdown" = "hx";
};
};
};
}

View file

@ -0,0 +1,113 @@
{ config, pkgs, lib, ...}:
{
options.speccon18.desktop.hyprland.enable = lib.mkEnableOption "enables specs custom hyprland setup";
config = lib.mkIf config.speccon18.desktop.hyprland.enable {
programs.hyprland = {
enable = true;
nvidiaPatches = true;
xwayland.enable = true;
};
environment = {
systemPackages = with pkgs; [
# libsForQt5.polkit-kde-agent
libsForQt5.qt5.qtwayland
qt6.full
qt6.qtwayland
waybar
swww
pw-volume
rofi-wayland
libnotify
mako
hyprland
font-awesome
brightnessctl
grim
slurp
wl-clipboard
];
sessionVariables = {
#Enable Wayland
WLR_NO_HARDWARE_CURSORS = "1";
NIXOS_OZONE_WL = "1";
MOZ_ENABLE_WAYLAND = "1";
GTK_USE_PORTAL = "1";
NIXOS_XDG_OPEN_USE_PORTAL = "1";
SDL_VIDEODRIVER = "wayland";
# XDG_Config
XDG_CURRENT_DESKTOP = "Hyprland";
XDG_SESSION_DESKTOP = "Hyprland";
XDG_SESSION_TYPE = "wayland";
XDG_CACHE_HOME = "\${HOME}/.cache";
XDG_CONFIG_HOME = "\${HOME}/.config";
XDG_BIN_HOME = "\${HOME}/.local/bin";
XDG_DATA_HOME = "\${HOME}/.local/share";
#Default Applications
BROWSER = "firefox";
TERMINAL = "alacritty";
};
};
xdg.portal = {
enable = true;
extraPortals = [
pkgs.xdg-desktop-portal-gtk
pkgs.xdg-desktop-portal-hyprland
];
};
hardware = {
opengl.enable = true;
nvidia.modesetting.enable = true;
};
# wayland.windowManager.hyprland = {
# # systemdIntegration = true;
# enable = true;
# extraConfig = ''
# $mainMod = SUPER
# # Application Lauch Keybinds
# bind = $mainMod, Return, exec, alacritty
# bind = $mainMod, W, exec, firefox
# bind = $mainMod, R, exec, rofi -show drun
# # Switch workspaces with mainMod + [0-9]
# bind = $mainMod, 1, workspace, 1
# bind = $mainMod, 2, workspace, 2
# bind = $mainMod, 3, workspace, 3
# bind = $mainMod, 4, workspace, 4
# bind = $mainMod, 5, workspace, 5
# bind = $mainMod, 6, workspace, 6
# bind = $mainMod, 7, workspace, 7
# bind = $mainMod, 8, workspace, 8
# bind = $mainMod, 9, workspace, 9
# bind = $mainMod, 0, workspace, 10
# # Move active window to a workspace with mainMod + SHIFT + [0-9]
# bind = $mainMod SHIFT, 1, movetoworkspace, 1
# bind = $mainMod SHIFT, 2, movetoworkspace, 2
# bind = $mainMod SHIFT, 3, movetoworkspace, 3
# bind = $mainMod SHIFT, 4, movetoworkspace, 4
# bind = $mainMod SHIFT, 5, movetoworkspace, 5
# bind = $mainMod SHIFT, 6, movetoworkspace, 6
# bind = $mainMod SHIFT, 7, movetoworkspace, 7
# bind = $mainMod SHIFT, 8, movetoworkspace, 8
# bind = $mainMod SHIFT, 9, movetoworkspace, 9
# bind = $mainMod SHIFT, 0, movetoworkspace, 10
# bind = $mainMod, Print, exec, grim -o /home/speccon18/Pictures/$(date +'%s_grim.png') -g "$(slurp)" -t png
# # Startup Runners
# exec-once=systemctl --user start waybar.service
# exec-once=dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
# exec-once=mako
# exec-once = swww init
# monitor=,highres,auto,1
# '';
# };
# options.speccon18.home_manager.rofi.enable = lib.mkEnableOption "enable specs custom rofi config for hyprland";
# config = lib.mkIf config.speccon18.home_manager.rofi.enable {
# programs.rofi = {
# enable = true;
# theme = "android_notification";
# location = "top-left";
# };
# };
};
}

View file

@ -0,0 +1,45 @@
{config,lib,pkgs,...}:
let
inherit (lib) mkEnableOption mkOption optionalString mkIf types;
dmcfg = config.services.xserver.displayManager;
cfg = config.speccon18.desktop.tuigreet;
gduser = config.services.greetd.settings.default_session.user;
in {
options.speccon18.desktop.tuigreet = {
enable = mkEnableOption "enables tuigreet";
args = mkOption {
default = "--time --asterisks --remember -s ${dmcfg.sessionData.desktops}/share/wayland-sessions:${dmcfg.sessionData.desktops}/share/xsessions";
type = types.str;
};
};
config = mkIf cfg.enable {
services.greetd = {
enable = true;
settings = {
default_session = {
command = "${pkgs.greetd.tuigreet}/bin/tuigreet ${cfg.args}";
user = "greeter";
};
};
};
# this is a life saver.
# literally no documentation about this anywhere.
# might be good to write about this...
# https://www.reddit.com/r/NixOS/comments/u0cdpi/tuigreet_with_xmonad_how/
systemd = {
services.greetd.serviceConfig = {
Type = "idle";
StandardInput = "tty";
StandardOutput = "tty";
StandardError = "journal"; # Without this errors will spam on screen
# Without these bootlogs will spam on screen
TTYReset = true;
TTYVHangup = true;
TTYVTDisallocate = true;
};
tmpfiles.rules = [
"d /var/cache/tuigreet/ 0755 greeter ${gduser} - -"
];
};
};
}