From 8e26fc2520f9e1b272c32747ea0fb4c34e0470d3 Mon Sep 17 00:00:00 2001 From: asnev Date: Sat, 27 Jun 2026 09:17:40 +0700 Subject: [PATCH] nix-flatpak --- configuration.nix | 15 ++++++++------- flake.lock | 23 ++++++++++++++++++++--- flake.nix | 21 +++++++++++++++------ users/coyote/default.nix | 12 +++++++----- users/coyote/flatpak.nix | 12 ++++++++++++ users/coyote/home.nix | 27 ++++++++++++--------------- 6 files changed, 74 insertions(+), 36 deletions(-) create mode 100644 users/coyote/flatpak.nix diff --git a/configuration.nix b/configuration.nix index 0d4c8d7..ff02b18 100644 --- a/configuration.nix +++ b/configuration.nix @@ -34,6 +34,7 @@ alsa.support32Bit = false; # temporarily set to 'false' to fix openblas issue pulse.enable = true; }; + flatpak.enable = true; }; security = {rtkit.enable = true;}; @@ -84,10 +85,6 @@ ripgrep fzf eza - # "fun" utils - lolcat - cowsay - fortune-kind ]; shellAliases = { l = "eza --long --all"; @@ -129,7 +126,7 @@ set -g pane-base-index 1 set-window-option -g pane-base-index 1 set-option -g renumber-windows on - set-option -g status-right "\"#W\" %Y-%m-%d %a %H:%M:%S" + set-option -g status-right "\"#W\"" set -ga terminal-overrides ",*:RGB" set -g mouse on set -g set-clipboard on @@ -155,8 +152,6 @@ unifont_upper unifont-csur # monospace fonts - iosevka - nerd-fonts.iosevka nerd-fonts.bigblue-terminal ]; fontconfig = { @@ -164,4 +159,10 @@ subpixel.rgba = "rgb"; }; }; + + xdg.portal = { + enable = true; + config.common.default = ["gtk"]; + extraPortals = with pkgs; [xdg-desktop-portal-wlr]; + }; } diff --git a/flake.lock b/flake.lock index 92ff2eb..dd0fc2f 100644 --- a/flake.lock +++ b/flake.lock @@ -21,13 +21,29 @@ "type": "github" } }, + "nix-flatpak": { + "locked": { + "lastModified": 1767983141, + "narHash": "sha256-7ZCulYUD9RmJIDULTRkGLSW1faMpDlPKcbWJLYHoXcs=", + "owner": "gmodena", + "repo": "nix-flatpak", + "rev": "440818969ac2cbd77bfe025e884d0aa528991374", + "type": "github" + }, + "original": { + "owner": "gmodena", + "ref": "latest", + "repo": "nix-flatpak", + "type": "github" + } + }, "nixpkgs": { "locked": { - "lastModified": 1782233679, - "narHash": "sha256-QyuGP5+QOtmXpy4i2X4DhBVBaySBdDKQEhqKcphcp34=", + "lastModified": 1782375420, + "narHash": "sha256-wiPYmEuHbJvleW489n6+lamL7JSJg3pcKUYwURU9CkI=", "owner": "nixos", "repo": "nixpkgs", - "rev": "667d5cf1c59585031d743c78b394b0a647537c35", + "rev": "4062d36ebeae843c750011eef6b61ec9a9dbc9a9", "type": "github" }, "original": { @@ -40,6 +56,7 @@ "root": { "inputs": { "home-manager": "home-manager", + "nix-flatpak": "nix-flatpak", "nixpkgs": "nixpkgs" } } diff --git a/flake.nix b/flake.nix index 6c8c421..d3d4182 100644 --- a/flake.nix +++ b/flake.nix @@ -9,16 +9,20 @@ url = "github:nix-community/home-manager/release-26.05"; inputs.nixpkgs.follows = "nixpkgs"; }; + nix-flatpak = { + url = "github:gmodena/nix-flatpak/?ref=latest"; + }; }; outputs = inputs @ { self, nixpkgs, home-manager, + nix-flatpak, ... }: let - system = "x86_64-linux"; - in { + system = "x86_64-linux"; + in { nixosConfigurations = { phostron = nixpkgs.lib.nixosSystem { inherit system; @@ -33,12 +37,14 @@ useGlobalPkgs = true; useUserPackages = true; extraSpecialArgs = {inherit inputs;}; - users.coyote = ./users/coyote/home.nix; + users.coyote.imports = [ + ./users/coyote/home.nix + nix-flatpak.homeManagerModules.nix-flatpak + ]; }; } ]; }; - }; devShells.${system}.default = let pkgs = import nixpkgs { @@ -52,8 +58,11 @@ }) ]; }; - in pkgs.mkShell { - buildInputs = with pkgs; [ openblas ]; + in { + pkgs.mkShell = { + buildInputs = with pkgs; [openblas]; + }; + }; }; }; } diff --git a/users/coyote/default.nix b/users/coyote/default.nix index a755ae5..d084307 100644 --- a/users/coyote/default.nix +++ b/users/coyote/default.nix @@ -1,9 +1,11 @@ -{pkgs, config, ...}: -let +{ + pkgs, + config, + ... +}: let USER_ID = 1000; KEY_FILE = "id_ed25519"; -in -{ +in { users = { users.coyote = { isNormalUser = true; @@ -36,7 +38,7 @@ in font = "BigBlueTermPlus Nerd Font:size=8"; font-bold = "BigBlueTermPlus Nerd Font:size=8"; }; - theme = "solarized"; + theme = "gruvbox"; }; starship = { transientPrompt.enable = true; diff --git a/users/coyote/flatpak.nix b/users/coyote/flatpak.nix new file mode 100644 index 0000000..37a82ff --- /dev/null +++ b/users/coyote/flatpak.nix @@ -0,0 +1,12 @@ +{...}: { + services.flatpak = { + update.auto.enable = false; + uninstallUnmanaged = false; + packages = [ + "org.audacityteam.Audacity" + "com.usebottles.bottles" + "org.zotero.Zotero" + "org.nickvision.tubeconverter" + ]; + }; +} diff --git a/users/coyote/home.nix b/users/coyote/home.nix index 6267d26..178584f 100644 --- a/users/coyote/home.nix +++ b/users/coyote/home.nix @@ -10,10 +10,7 @@ libreoffice karp keepassxc - zotero - mendeley # multimedia - audacity obs-studio furnace corrscope @@ -22,8 +19,6 @@ kdePackages.kdenlive subtitlecomposer kid3 - # emulation - (bottles.override {removeWarningPopup = true;}) # Internet ungoogled-chromium # games @@ -52,7 +47,7 @@ lsp.display-messages = true; cursorline = true; }; - theme = "solarized_dark"; + theme = "gruvbox"; }; }; fastfetch = { @@ -165,14 +160,16 @@ "browser.discovery.containers.enabled" = false; }; }; - yt-dlp = { - enable = true; - extraConfig = ""; - settings = {}; - }; - vscodium = { - enable = true; - package = pkgs.vscodium-fhs; - }; + }; + + services.flatpak = { + update.auto.enable = false; + update.onActivation = true; + uninstallUnmanaged = false; + packages = [ + "org.audacityteam.Audacity" + "com.usebottles.bottles" + "org.nickvision.tubeconverter" + ]; }; }