first working build of rewrite
This commit is contained in:
commit
44a3f420c6
29 changed files with 1261 additions and 0 deletions
5
modules/system/default.nix
Normal file
5
modules/system/default.nix
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{config,...}:{
|
||||
imports = [
|
||||
./desktop-environments
|
||||
];
|
||||
}
|
||||
15
modules/system/desktop-environments/budgie.nix
Normal file
15
modules/system/desktop-environments/budgie.nix
Normal 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;
|
||||
};
|
||||
};
|
||||
}
|
||||
12
modules/system/desktop-environments/default.nix
Normal file
12
modules/system/desktop-environments/default.nix
Normal 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;
|
||||
}
|
||||
57
modules/system/desktop-environments/gnome.nix
Normal file
57
modules/system/desktop-environments/gnome.nix
Normal 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";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
113
modules/system/desktop-environments/hyprland.nix
Normal file
113
modules/system/desktop-environments/hyprland.nix
Normal 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";
|
||||
# };
|
||||
# };
|
||||
};
|
||||
}
|
||||
45
modules/system/desktop-environments/tuigreet.nix
Normal file
45
modules/system/desktop-environments/tuigreet.nix
Normal 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} - -"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
9
modules/system/services/default.nix
Normal file
9
modules/system/services/default.nix
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
{pkgs,config,...}:{
|
||||
imports = [
|
||||
./tailscale.nix
|
||||
./pipewire.nix
|
||||
];
|
||||
|
||||
speccon18.tailscale.enable = true;
|
||||
speccon18.sound.pipewire.enable = true;
|
||||
}
|
||||
23
modules/system/services/pipewire.nix
Normal file
23
modules/system/services/pipewire.nix
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
# https://nixos.wiki/wiki/PipeWire
|
||||
{pkgs,config,lib, ...}:
|
||||
{
|
||||
options.speccon18.sound.pipewire.enable = lib.mkEnableOption "enable pipewire with jack integrations";
|
||||
|
||||
config = lib.mkIf config.speccon18.sound.pipewire.enable {
|
||||
environment.systemPackages = with pkgs; [
|
||||
pipewire
|
||||
wireplumber
|
||||
];
|
||||
# rtkit is optional but recommended
|
||||
security.rtkit.enable = true;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa = {
|
||||
enable = true;
|
||||
support32Bit = true;
|
||||
};
|
||||
pulse.enable = true;
|
||||
jack.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
13
modules/system/services/tailscale.nix
Normal file
13
modules/system/services/tailscale.nix
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
{ pkgs, config, lib, ... }: {
|
||||
|
||||
options.speccon18.tailscale.enable = lib.mkEnableOption "enables the tailscale service and sets the package to use";
|
||||
|
||||
config = lib.mkIf config.speccon18.tailscale.enable {
|
||||
# make the tailscale command usable to users
|
||||
environment.systemPackages = with pkgs;[
|
||||
pkgs.tailscale
|
||||
];
|
||||
# enable the tailscale service
|
||||
services.tailscale.enable = true;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue