From e1fb6158a0d3cb282a2cf4d7373a614da625202b Mon Sep 17 00:00:00 2001 From: Kat Inskip Date: Fri, 18 Jul 2025 16:30:54 -0700 Subject: [PATCH] meep --- flake.lock | 40 +++++++++++++++++++++++++++- flake.nix | 7 +++++ home/environments/niri/niri.nix | 3 ++- home/environments/niri/xdg.nix | 7 ++++- home/profiles/gaming/flatpak.nix | 0 home/profiles/shell/zsh.nix | 3 ++- nixos/profiles/gaming/bottles.nix | 8 ++++++ nixos/profiles/gaming/lutris.nix | 1 - nixos/profiles/graphical/flatpak.nix | 20 ++++++++++++++ tree.nix | 2 ++ 10 files changed, 86 insertions(+), 5 deletions(-) create mode 100644 home/profiles/gaming/flatpak.nix create mode 100644 nixos/profiles/gaming/bottles.nix create mode 100644 nixos/profiles/graphical/flatpak.nix diff --git a/flake.lock b/flake.lock index 1437f0e9..25abeacf 100644 --- a/flake.lock +++ b/flake.lock @@ -857,6 +857,22 @@ "type": "github" } }, + "nix-flatpak": { + "locked": { + "lastModified": 1739444422, + "narHash": "sha256-iAVVHi7X3kWORftY+LVbRiStRnQEob2TULWyjMS6dWg=", + "owner": "gmodena", + "repo": "nix-flatpak", + "rev": "5e54c3ca05a7c7d968ae1ddeabe01d2a9bc1e177", + "type": "github" + }, + "original": { + "owner": "gmodena", + "ref": "latest", + "repo": "nix-flatpak", + "type": "github" + } + }, "nix-gaming": { "inputs": { "flake-parts": [ @@ -1273,6 +1289,7 @@ "neorg-overlay": "neorg-overlay", "nh": "nh", "niri": "niri", + "nix-flatpak": "nix-flatpak", "nix-gaming": "nix-gaming", "nix-index-database": "nix-index-database", "nix-std": "nix-std_2", @@ -1296,7 +1313,8 @@ "systems": "systems", "tree": "tree", "treefmt-nix": "treefmt-nix", - "wezterm": "wezterm" + "wezterm": "wezterm", + "zen-browser": "zen-browser" } }, "rust": { @@ -1581,6 +1599,26 @@ "type": "github" } }, + "zen-browser": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1727721329, + "narHash": "sha256-QYlWZwUSwrM7BuO+dXclZIwoPvBIuJr6GpFKv9XKFPI=", + "owner": "MarceColl", + "repo": "zen-browser-flake", + "rev": "e6ab73f405e9a2896cce5956c549a9cc359e5fcc", + "type": "github" + }, + "original": { + "owner": "MarceColl", + "repo": "zen-browser-flake", + "type": "github" + } + }, "zlib": { "flake": false, "locked": { diff --git a/flake.nix b/flake.nix index 70d43e7c..dfd8a313 100644 --- a/flake.nix +++ b/flake.nix @@ -8,6 +8,9 @@ nixpkgs.follows = "nixpkgs"; }; }; + nix-flatpak = { + url = "github:gmodena/nix-flatpak/?ref=latest"; + }; rust = { url = "github:arcnmx/nixexprs-rust"; inputs = { @@ -76,6 +79,10 @@ nixpkgs.follows = "nixpkgs"; }; }; + zen-browser = { + url = "github:MarceColl/zen-browser-flake"; + inputs.nixpkgs.follows = "nixpkgs"; + }; nixpkgs-xr = { url = "github:nix-community/nixpkgs-xr"; inputs = { diff --git a/home/environments/niri/niri.nix b/home/environments/niri/niri.nix index bf736121..4f90138e 100644 --- a/home/environments/niri/niri.nix +++ b/home/environments/niri/niri.nix @@ -15,6 +15,7 @@ in { grim pavucontrol brightnessctl + nautilus playerctl glib pcmanfm @@ -85,7 +86,7 @@ in { environment = { MOZ_ENABLE_WAYLAND = "1"; XDG_CURRENT_DESKTOP = "niri"; - GDK_BACKEND = "wayland,x11"; + GDK_BACKEND = "wayland"; CLUTTER_BACKEND = "wayland"; }; xwayland-satellite = { diff --git a/home/environments/niri/xdg.nix b/home/environments/niri/xdg.nix index 5af3ec31..ab50336d 100644 --- a/home/environments/niri/xdg.nix +++ b/home/environments/niri/xdg.nix @@ -1,8 +1,13 @@ -_: { +{ pkgs, ... }: { xdg = { enable = true; autostart.enable = true; mime.enable = true; + portal.extraPortals = with pkgs; [ + xdg-desktop-portal-gnome + xdg-desktop-portal-gtk + gnome-keyring + ]; mimeApps = { enable = true; diff --git a/home/profiles/gaming/flatpak.nix b/home/profiles/gaming/flatpak.nix new file mode 100644 index 00000000..e69de29b diff --git a/home/profiles/shell/zsh.nix b/home/profiles/shell/zsh.nix index 1d45fbcf..97824051 100644 --- a/home/profiles/shell/zsh.nix +++ b/home/profiles/shell/zsh.nix @@ -14,7 +14,8 @@ in { # programs.zsh.enableAutosuggestions only includes nix-zsh-autocompletions zsh-completions fortune - neofetch + hyfetch + fastfetch ponysay ]; diff --git a/nixos/profiles/gaming/bottles.nix b/nixos/profiles/gaming/bottles.nix new file mode 100644 index 00000000..260e29bc --- /dev/null +++ b/nixos/profiles/gaming/bottles.nix @@ -0,0 +1,8 @@ +_: { + services.flatpak.packages = [ + { + appId = "com.usebottles.bottles"; + origin = "flathub"; + } + ]; +} diff --git a/nixos/profiles/gaming/lutris.nix b/nixos/profiles/gaming/lutris.nix index b39844c7..91a88b2a 100644 --- a/nixos/profiles/gaming/lutris.nix +++ b/nixos/profiles/gaming/lutris.nix @@ -5,7 +5,6 @@ driversi686Linux.mesa ]; }; - services.flatpak.enable = true; programs.gamescope = { enable = true; package = pkgs.gamescope; diff --git a/nixos/profiles/graphical/flatpak.nix b/nixos/profiles/graphical/flatpak.nix new file mode 100644 index 00000000..a72e191f --- /dev/null +++ b/nixos/profiles/graphical/flatpak.nix @@ -0,0 +1,20 @@ +_: { + home-manager.sharedModules = [ + ({ config, ... }: { + xdg.systemDirs.data = [ + "/var/lib/flatpak/exports/share" + "/home/${config.home.username}/.local/share/flatpak/exports/share/" + ]; + }) + ]; + services.flatpak = { + enable = true; + update.auto = { + enable = true; + onCalendar = "weekly"; + }; + remotes = [ + { name = "flathub"; location = "https://dl.flathub.org/repo/flathub.flatpakrepo"; } + ]; + }; +} diff --git a/tree.nix b/tree.nix index 5c79d770..191a1fcb 100644 --- a/tree.nix +++ b/tree.nix @@ -92,6 +92,7 @@ inputs.niri.nixosModules.niri inputs.lix-module.nixosModules.default inputs.nixos-cli.nixosModules.nixos-cli + inputs.nix-flatpak.nixosModules.nix-flatpak ]; }; }; @@ -115,6 +116,7 @@ chaotic.homeManagerModules.default spicetify-nix.homeManagerModules.spicetify inputs.moonlight.homeModules.default + inputs.nix-flatpak.homeManagerModules.nix-flatpak ] ++ (with (import (inputs.arcexprs + "/modules")).home-manager; [ i3gopher