diff --git a/flake.nix b/flake.nix index b978baf..eec8da6 100644 --- a/flake.nix +++ b/flake.nix @@ -85,9 +85,6 @@ # Stylix my beloved stylix.url = "github:danth/stylix"; - # Aylur's gtk shell. Nice but I hate JS. - ags.url = "github:Aylur/ags"; - quickshell = { url = "git+https://git.outfoxxed.me/outfoxxed/quickshell"; inputs.nixpkgs.follows = "nixpkgs"; diff --git a/hosts/vali/temperance/configuration.nix b/hosts/vali/temperance/configuration.nix index 2b58d6d..caa2959 100644 --- a/hosts/vali/temperance/configuration.nix +++ b/hosts/vali/temperance/configuration.nix @@ -23,7 +23,7 @@ programs.kdeconnect.enable = true; programs.dconf.enable = true; virtualisation.docker.enable = true; - boot.kernelPackages = pkgs.linuxPackages_xanmod_latest; + boot.kernelPackages = pkgs.linuxPackages_latest; modules = { system = { programs = { diff --git a/modules/gui/default.nix b/modules/gui/default.nix index c888fcb..aa9fabb 100644 --- a/modules/gui/default.nix +++ b/modules/gui/default.nix @@ -1,10 +1,8 @@ _: { imports = [ ./vesktop.nix - ./gtk.nix ./foot.nix ./mpv.nix - ./qt.nix ./zathura.nix ./spicetify.nix ./kitty.nix diff --git a/modules/gui/schizofox/default.nix b/modules/gui/schizofox/default.nix index 5751225..518b30b 100644 --- a/modules/gui/schizofox/default.nix +++ b/modules/gui/schizofox/default.nix @@ -161,7 +161,7 @@ in { security = { sanitizeOnShutdown = false; - sandbox = true; + sandbox = false; noSessionRestore = false; userAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:106.0) Gecko/20100101 Firefox/106.0"; }; @@ -173,14 +173,14 @@ in { # taken from diniamo settings = { - # "gfx.webrender.all" = true; - # "media.ffmpeg.vaapi.enabled" = true; + "gfx.webrender.all" = true; + "media.ffmpeg.vaapi.enabled" = true; # "media.rdd-ffmpeg.enabled" = true; # "media.av1.enabled" = true; # "gfx.x11-egl.force-enabled" = true; # "widget.dmabuf.force-enabled" = true; - # "layers.acceleration.force-enabled" = true; + "layers.acceleration.force-enabled" = true; "browser.ctrlTab.sortByRecentlyUsed" = true; # This makes websites prefer a dark theme (in theory) diff --git a/modules/gui/steam.nix b/modules/gui/steam.nix index 04d9112..a8cee5d 100644 --- a/modules/gui/steam.nix +++ b/modules/gui/steam.nix @@ -5,7 +5,6 @@ ... }: with lib; let - inherit (config.modules.other.system) username; cfg = config.modules.programs.steam; in { options.modules.programs.steam = { @@ -16,15 +15,13 @@ in { config = mkIf cfg.enable { programs.steam = { enable = true; - remotePlay.openFirewall = true; - dedicatedServer.openFirewall = true; + # remotePlay.openFirewall = true; + # dedicatedServer.openFirewall = true; gamescopeSession.enable = mkIf cfg.gamescope true; extraCompatPackages = with pkgs; [proton-ge-bin]; }; + # See + # https://wiki.nixos.org/wiki/GameMode programs.gamemode.enable = true; - # environment.systemPackages = [pkgs.protonup-ng]; - environment.sessionVariables = { - STEAM_EXTRA_COMPAT_TOOLS_PATHS = "/home/${username}/.steam/root/compatibilitytoolds.d"; - }; }; } diff --git a/modules/styling/ags.nix b/modules/styling/ags.nix deleted file mode 100644 index 97e6117..0000000 --- a/modules/styling/ags.nix +++ /dev/null @@ -1,42 +0,0 @@ -{ - inputs, - lib, - config, - pkgs, - ... -} -: let - inherit (config.modules.other.system) username; - inherit (lib) mkIf mkEnableOption; - cfg = config.modules.programs.ags; -in { - options.modules.programs.ags.enable = mkEnableOption "ags"; - - config = mkIf cfg.enable { - environment.systemPackages = with pkgs; [ - ags - bun - ddcutil - brightnessctl - gtksourceview - webkitgtk - gtksourceview4 - ollama - python311Packages.material-color-utilities - python311Packages.pywayland - pywal - sassc - webp-pixbuf-loader - ydotool - accountsservice - ]; - - home-manager.users.${username} = { - imports = [inputs.ags.homeManagerModules.default]; - programs.ags = { - enable = true; - configDir = ./config; - }; - }; - }; -} diff --git a/modules/styling/config.bak/config.js b/modules/styling/config.bak/config.js deleted file mode 100644 index e137af5..0000000 --- a/modules/styling/config.bak/config.js +++ /dev/null @@ -1,21 +0,0 @@ -const main = "/tmp/ags/main.js"; - -try { - await Utils.execAsync([ - "bun", - "build", - `${App.configDir}/main.ts`, - "--outfile", - main, - "--external", - "resource://*", - "--external", - "gi://*", - "--external", - "file://*", - ]); - await import(`file://${main}`); -} catch (error) { - console.error(error); - App.quit(); -} diff --git a/modules/styling/config.bak/main.ts b/modules/styling/config.bak/main.ts deleted file mode 100644 index 4c0a30b..0000000 --- a/modules/styling/config.bak/main.ts +++ /dev/null @@ -1,219 +0,0 @@ -const hyprland = await Service.import("hyprland") -const notifications = await Service.import("notifications") -const mpris = await Service.import("mpris") -const audio = await Service.import("audio") -const battery = await Service.import("battery") -const systemtray = await Service.import("systemtray") - -const date = Variable("", { - poll: [1000, 'date "+%H:%M:%S %b %e."'], -}) - -// widgets can be only assigned as a child in one container -// so to make a reuseable widget, make it a function -// then you can simply instantiate one by calling it - -function Workspaces() { - const activeId = hyprland.active.workspace.bind("id") - const workspaces = hyprland.bind("workspaces") - .as(ws => ws.map(({ id }) => Widget.Button({ - on_clicked: () => hyprland.messageAsync(`dispatch workspace ${id}`), - child: Widget.Label(`${id}`), - class_name: activeId.as(i => `${i === id ? "focused" : ""}`), - }))) - - return Widget.Box({ - class_name: "workspaces", - children: workspaces, - }) -} - - -function ClientTitle() { - return Widget.Label({ - class_name: "client-title", - label: hyprland.active.client.bind("title"), - }) -} - - -function Clock() { - return Widget.Label({ - class_name: "clock", - label: date.bind(), - }) -} - - -// we don't need dunst or any other notification daemon -// because the Notifications module is a notification daemon itself -function Notification() { - const popups = notifications.bind("popups") - return Widget.Box({ - class_name: "notification", - visible: popups.as(p => p.length > 0), - children: [ - Widget.Icon({ - icon: "preferences-system-notifications-symbolic", - }), - Widget.Label({ - label: popups.as(p => p[0]?.summary || ""), - }), - ], - }) -} - - -function Media() { - const label = Utils.watch("", mpris, "player-changed", () => { - if (mpris.players[0]) { - const { track_artists, track_title } = mpris.players[0] - return `${track_artists.join(", ")} - ${track_title}` - } else { - return "Nothing is playing" - } - }) - - return Widget.Button({ - class_name: "media", - on_primary_click: () => mpris.getPlayer("")?.playPause(), - on_scroll_up: () => mpris.getPlayer("")?.next(), - on_scroll_down: () => mpris.getPlayer("")?.previous(), - child: Widget.Label({ label }), - }) -} - - -function Volume() { - const icons = { - 101: "overamplified", - 67: "high", - 34: "medium", - 1: "low", - 0: "muted", - } - - function getIcon() { - const icon = audio.speaker.is_muted ? 0 : [101, 67, 34, 1, 0].find( - threshold => threshold <= audio.speaker.volume * 100) - - return `audio-volume-${icons[icon]}-symbolic` - } - - const icon = Widget.Icon({ - icon: Utils.watch(getIcon(), audio.speaker, getIcon), - }) - - const slider = Widget.Slider({ - hexpand: true, - draw_value: false, - on_change: ({ value }) => audio.speaker.volume = value, - setup: self => self.hook(audio.speaker, () => { - self.value = audio.speaker.volume || 0 - }), - }) - - return Widget.Box({ - class_name: "volume", - css: "min-width: 180px", - children: [icon, slider], - }) -} - - -function BatteryLabel() { - const value = battery.bind("percent").as(p => p > 0 ? p / 100 : 0) - const icon = battery.bind("percent").as(p => - `battery-level-${Math.floor(p / 10) * 10}-symbolic`) - - return Widget.Box({ - class_name: "battery", - visible: battery.bind("available"), - children: [ - Widget.Icon({ icon }), - Widget.LevelBar({ - widthRequest: 140, - vpack: "center", - value, - }), - ], - }) -} - - -function SysTray() { - const items = systemtray.bind("items") - .as(items => items.map(item => Widget.Button({ - child: Widget.Icon({ icon: item.bind("icon") }), - on_primary_click: (_, event) => item.activate(event), - on_secondary_click: (_, event) => item.openMenu(event), - tooltip_markup: item.bind("tooltip_markup"), - }))) - - return Widget.Box({ - children: items, - }) -} - - -// layout of the bar -function Left() { - return Widget.Box({ - spacing: 8, - children: [ - Workspaces(), - ClientTitle(), - ], - }) -} - -function Center() { - return Widget.Box({ - spacing: 8, - children: [ - Media(), - Notification(), - ], - }) -} - -function Right() { - return Widget.Box({ - hpack: "end", - spacing: 8, - children: [ - Volume(), - BatteryLabel(), - Clock(), - SysTray(), - ], - }) -} - -function Bar(monitor = 0) { - return Widget.Window({ - name: `bar-${monitor}`, // name has to be unique - class_name: "bar", - monitor, - anchor: ["top", "left", "right"], - exclusivity: "exclusive", - child: Widget.CenterBox({ - start_widget: Left(), - center_widget: Center(), - end_widget: Right(), - }), - }) -} - -App.config({ - style: "./style.css", - windows: [ - Bar(), - - // you can call it, for each monitor - // Bar(0), - // Bar(1) - ], -}) - -export { } diff --git a/modules/styling/config.bak/style.css b/modules/styling/config.bak/style.css deleted file mode 100644 index 29f8fdd..0000000 --- a/modules/styling/config.bak/style.css +++ /dev/null @@ -1,40 +0,0 @@ -window.bar { - background-color: @theme_bg_color; - color: @theme_fg_color; -} - -button { - min-width: 0; - padding-top: 0; - padding-bottom: 0; - background-color: transparent; -} - -button:active { - background-color: @theme_selected_bg_color; -} - -button:hover { - border-bottom: 3px solid @theme_fg_color; -} - -label { - font-weight: bold; -} - -.workspaces button.focused { - border-bottom: 3px solid @theme_selected_bg_color; -} - -.client-title { - color: @theme_selected_bg_color; -} - -.notification { - color: yellow; -} - -levelbar block, -highlight { - min-height: 10px; -} diff --git a/modules/styling/config/main.js b/modules/styling/config/main.js deleted file mode 100644 index e69de29..0000000 diff --git a/modules/styling/default.nix b/modules/styling/default.nix index eee4ccd..93f546f 100644 --- a/modules/styling/default.nix +++ b/modules/styling/default.nix @@ -1,7 +1,8 @@ _: { imports = [ - ./ags.nix ./stylix.nix ./quickshell + ./qt.nix + ./gtk.nix ]; } diff --git a/modules/gui/gtk.nix b/modules/styling/gtk.nix similarity index 100% rename from modules/gui/gtk.nix rename to modules/styling/gtk.nix diff --git a/modules/gui/qt.nix b/modules/styling/qt.nix similarity index 100% rename from modules/gui/qt.nix rename to modules/styling/qt.nix diff --git a/options/common/gpu/nvidia.nix b/options/common/gpu/nvidia.nix index b414b67..1213b8b 100644 --- a/options/common/gpu/nvidia.nix +++ b/options/common/gpu/nvidia.nix @@ -1,14 +1,17 @@ {config, ...}: { services.xserver.videoDrivers = ["nvidia"]; - hardware.graphics = { - enable = true; - }; - hardware.nvidia = { - modesetting.enable = true; - open = false; - powerManagement.enable = true; - powerManagement.finegrained = false; - nvidiaSettings = false; - package = config.boot.kernelPackages.nvidiaPackages.stable; + hardware = { + opengl.enable = true; + graphics = { + enable = true; + }; + nvidia = { + modesetting.enable = true; + open = false; + powerManagement.enable = true; + powerManagement.finegrained = false; + nvidiaSettings = false; + package = config.boot.kernelPackages.nvidiaPackages.stable; + }; }; }