add flatpaks

This commit is contained in:
RingOfStorms (Joshua Bell) 2025-06-15 11:56:52 -05:00
parent 37e662fb55
commit b9cdbd90c5
7 changed files with 125 additions and 63 deletions

View file

@ -22,7 +22,7 @@ in
}; };
stateVersion = lib.mkOption { stateVersion = lib.mkOption {
type = lib.types.str; type = lib.types.str;
default = "23.11"; default = "25.05";
description = "Home manager state version"; description = "Home manager state version";
}; };
}; };

View file

@ -8,7 +8,7 @@
defaultKeymap = "emacs"; defaultKeymap = "emacs";
initExtra = '' initContent = ''
# Set editor to neovim, TODO only do this if mod.neovim is enabled # Set editor to neovim, TODO only do this if mod.neovim is enabled
export EDITOR=nvim export EDITOR=nvim
export VISUAL=nvim export VISUAL=nvim

View file

@ -2,6 +2,7 @@
inputs = { inputs = {
home-manager.url = "github:rycee/home-manager/release-25.05"; home-manager.url = "github:rycee/home-manager/release-25.05";
ragenix.url = "github:yaxitech/ragenix"; ragenix.url = "github:yaxitech/ragenix";
nix-flatpak.url = "github:gmodena/nix-flatpak/?ref=latest";
# hyprland.url = "github:hyprwm/Hyprland"; # hyprland.url = "github:hyprwm/Hyprland";
# cosmic.url = "github:lilyinstarlight/nixos-cosmic"; # cosmic.url = "github:lilyinstarlight/nixos-cosmic";
@ -11,6 +12,7 @@
{ {
home-manager, home-manager,
ragenix, ragenix,
nix-flatpak,
... ...
}: }:
{ {
@ -25,6 +27,7 @@
imports = [ imports = [
home-manager.nixosModules.home-manager home-manager.nixosModules.home-manager
ragenix.nixosModules.age ragenix.nixosModules.age
nix-flatpak.nixosModules.nix-flatpak
./_home_manager ./_home_manager
./options.nix ./options.nix
./general ./general
@ -37,6 +40,7 @@
config = { config = {
_module.args = { _module.args = {
inherit ragenix; inherit ragenix;
inherit nix-flatpak;
}; };
}; };
}; };

View file

@ -13,6 +13,7 @@ in
./docker.nix ./docker.nix
./podman.nix ./podman.nix
./incus.nix ./incus.nix
./flatpaks.nix
]; ];
config = { config = {
assertions = [ assertions = [

View file

@ -0,0 +1,58 @@
{
config,
lib,
...
}:
let
ccfg = import ../config.nix;
cfg_path = [
ccfg.custom_config_key
"programs"
"flatpaks"
];
cfg = lib.attrsets.getAttrFromPath cfg_path config;
in
{
options =
{ }
// lib.attrsets.setAttrByPath cfg_path {
enable = lib.mkEnableOption "flatpaks";
packages = lib.mkOption {
type = lib.types.listOf lib.types.str;
default = [ ];
description = "List of Flatpak package names to install.";
};
};
config = lib.mkIf cfg.enable {
services.flatpak = {
enable = true;
packages = cfg.packages;
overrides = {
global = {
Context.sockets = [
"wayland"
"x11"
];
Environment = {
XCURSOR_PATH = "/run/host/user-share/icons:/run/host/share/icons";
GTK_THEME = "Adwaita:dark";
# Force wayland as much as possible.
ELECTRON_OZONE_PLATFORM_HINT = "wayland"; # or 'auto'
};
};
"org.signal.Signal" = {
Environment = {
SIGNAL_PASSWORD_STORE = "gnome-libsecret";
};
Context = {
sockets = [
"xfg-settings"
];
};
};
};
};
};
}

84
hosts/lio/flake.lock generated
View file

@ -28,22 +28,18 @@
"common": { "common": {
"inputs": { "inputs": {
"home-manager": "home-manager", "home-manager": "home-manager",
"nixpkgs": "nixpkgs_2", "nix-flatpak": "nix-flatpak",
"ragenix": "ragenix" "ragenix": "ragenix"
}, },
"locked": { "locked": {
"lastModified": 1749562551, "path": "../../common",
"narHash": "sha256-xZVEYv9N8kSxM1cR0E5vNp2cn70pfC7cDlmZS4N4BV4=", "type": "path"
"ref": "refs/heads/master",
"rev": "ee3fd2dcbba3268188f5d8460b4169e571eed5ae",
"revCount": 468,
"type": "git",
"url": "https://git.joshuabell.xyz/ringofstorms/dotfiles"
}, },
"original": { "original": {
"type": "git", "path": "../../common",
"url": "https://git.joshuabell.xyz/ringofstorms/dotfiles" "type": "path"
} },
"parent": []
}, },
"crane": { "crane": {
"locked": { "locked": {
@ -107,16 +103,16 @@
"nixpkgs": "nixpkgs" "nixpkgs": "nixpkgs"
}, },
"locked": { "locked": {
"lastModified": 1747688870, "lastModified": 1748487945,
"narHash": "sha256-ypL9WAZfmJr5V70jEVzqGjjQzF0uCkz+AFQF7n9NmNc=", "narHash": "sha256-e9zc/rHdoH9i+sFFhhQiKoF6IuD+T2rB/nUyPaO7CCg=",
"owner": "rycee", "owner": "rycee",
"repo": "home-manager", "repo": "home-manager",
"rev": "d5f1f641b289553927b3801580598d200a501863", "rev": "0d13ea58d565d3c1c1468ddae1f623316dc395d9",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "rycee", "owner": "rycee",
"ref": "release-24.11", "ref": "release-25.05",
"repo": "home-manager", "repo": "home-manager",
"type": "github" "type": "github"
} }
@ -144,39 +140,39 @@
"type": "github" "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"
}
},
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1746055187, "lastModified": 1748302896,
"narHash": "sha256-3dqArYSMP9hM7Qpy5YWhnSjiqniSaT2uc5h2Po7tmg0=", "narHash": "sha256-ixMT0a8mM091vSswlTORZj93WQAJsRNmEvqLL+qwTFM=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "3e362ce63e16b9572d8c2297c04f7c19ab6725a5", "rev": "7848cd8c982f7740edf76ddb3b43d234cb80fc4d",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "NixOS", "owner": "NixOS",
"ref": "nixos-24.11", "ref": "nixos-25.05",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": {
"lastModified": 1748190013,
"narHash": "sha256-R5HJFflOfsP5FBtk+zE8FpL8uqE7n62jqOsADvVshhE=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "62b852f6c6742134ade1abdd2a21685fd617a291",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_3": {
"locked": { "locked": {
"lastModified": 1741379970, "lastModified": 1741379970,
"narHash": "sha256-Wh7esNh7G24qYleLvgOSY/7HlDUzWaL/n4qzlBePpiw=", "narHash": "sha256-Wh7esNh7G24qYleLvgOSY/7HlDUzWaL/n4qzlBePpiw=",
@ -192,7 +188,7 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_4": { "nixpkgs_3": {
"locked": { "locked": {
"lastModified": 1748302896, "lastModified": 1748302896,
"narHash": "sha256-ixMT0a8mM091vSswlTORZj93WQAJsRNmEvqLL+qwTFM=", "narHash": "sha256-ixMT0a8mM091vSswlTORZj93WQAJsRNmEvqLL+qwTFM=",
@ -208,7 +204,7 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_5": { "nixpkgs_4": {
"locked": { "locked": {
"lastModified": 1749553941, "lastModified": 1749553941,
"narHash": "sha256-FBEOaw/L33Ld39Q5I7ENVlT0qqH1CSU1q/zlZKrJKs0=", "narHash": "sha256-FBEOaw/L33Ld39Q5I7ENVlT0qqH1CSU1q/zlZKrJKs0=",
@ -1124,7 +1120,7 @@
"agenix": "agenix", "agenix": "agenix",
"crane": "crane", "crane": "crane",
"flake-utils": "flake-utils", "flake-utils": "flake-utils",
"nixpkgs": "nixpkgs_3", "nixpkgs": "nixpkgs_2",
"rust-overlay": "rust-overlay" "rust-overlay": "rust-overlay"
}, },
"locked": { "locked": {
@ -1144,13 +1140,13 @@
"root": { "root": {
"inputs": { "inputs": {
"common": "common", "common": "common",
"nixpkgs": "nixpkgs_4", "nixpkgs": "nixpkgs_3",
"ros_neovim": "ros_neovim" "ros_neovim": "ros_neovim"
} }
}, },
"ros_neovim": { "ros_neovim": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs_5", "nixpkgs": "nixpkgs_4",
"nvim_plugin-Almo7aya/openingh.nvim": "nvim_plugin-Almo7aya/openingh.nvim", "nvim_plugin-Almo7aya/openingh.nvim": "nvim_plugin-Almo7aya/openingh.nvim",
"nvim_plugin-CopilotC-Nvim/CopilotChat.nvim": "nvim_plugin-CopilotC-Nvim/CopilotChat.nvim", "nvim_plugin-CopilotC-Nvim/CopilotChat.nvim": "nvim_plugin-CopilotC-Nvim/CopilotChat.nvim",
"nvim_plugin-JoosepAlviste/nvim-ts-context-commentstring": "nvim_plugin-JoosepAlviste/nvim-ts-context-commentstring", "nvim_plugin-JoosepAlviste/nvim-ts-context-commentstring": "nvim_plugin-JoosepAlviste/nvim-ts-context-commentstring",
@ -1210,11 +1206,11 @@
"rust-overlay": "rust-overlay_2" "rust-overlay": "rust-overlay_2"
}, },
"locked": { "locked": {
"lastModified": 1749563667, "lastModified": 1749563872,
"narHash": "sha256-0Dylc2IzymWjqovXfK224h2xRA0Z8hJPmdlfXWI5T+Q=", "narHash": "sha256-ba60Ejo5WoZ9GMmqbw4QqLLn5d3VKHXMotgT0NPnvTg=",
"ref": "refs/heads/master", "ref": "refs/heads/master",
"rev": "19e2019f2f9868bb08d377ef921dd65fb749268f", "rev": "ff863bc6bbfdfdbe0b7773ba4495163f46335e97",
"revCount": 286, "revCount": 287,
"type": "git", "type": "git",
"url": "https://git.joshuabell.xyz/ringofstorms/nvim" "url": "https://git.joshuabell.xyz/ringofstorms/nvim"
}, },

View file

@ -4,8 +4,8 @@
# nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; # nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
# Use relative to get current version for testing # Use relative to get current version for testing
# common.url = "path:../../common"; common.url = "path:../../common";
common.url = "git+https://git.joshuabell.xyz/ringofstorms/dotfiles"; # common.url = "git+https://git.joshuabell.xyz/ringofstorms/dotfiles";
ros_neovim.url = "git+https://git.joshuabell.xyz/ringofstorms/nvim"; ros_neovim.url = "git+https://git.joshuabell.xyz/ringofstorms/nvim";
}; };
@ -44,9 +44,6 @@
steam steam
ffmpeg-full ffmpeg-full
appimage-run appimage-run
rustdesk-flutter
element-desktop
obsidian
]; ];
# Also allow this key to work for root user, this will let us use this as a remote builder easier # Also allow this key to work for root user, this will let us use this as a remote builder easier
@ -72,6 +69,22 @@
tailnet.enableExitNode = true; tailnet.enableExitNode = true;
ssh.enable = true; ssh.enable = true;
docker.enable = true; docker.enable = true;
flatpaks = {
enable = true;
packages = [
"org.signal.Signal"
"com.discordapp.Discord"
"md.obsidian.Obsidian"
"com.spotify.Client"
"org.videolan.VLC"
"com.bitwarden.desktop"
"org.openscad.OpenSCAD"
"org.blender.Blender"
"im.riot.Riot"
"com.rustdesk.RustDesk"
"com.google.Chrome"
];
};
}; };
users = { users = {
# Users are all normal users and default password is password1 # Users are all normal users and default password is password1
@ -87,18 +100,8 @@
"input" "input"
]; ];
shell = pkgs.zsh; shell = pkgs.zsh;
packages = with pkgs; [ # packages = with pkgs; [
signal-desktop # ];
spotify
blender
google-chrome
discord
firefox-esr
openscad
vlc
bitwarden
vaultwarden
];
}; };
}; };
}; };