We add declarative flatpak file

This commit is contained in:
2026-04-05 12:36:40 +02:00
parent d31e21ac67
commit 6bd07b8f7e
10 changed files with 60 additions and 67 deletions
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 MiB

+2 -2
View File
@@ -48,8 +48,8 @@ with lib.hm.gvariant;
"org/gnome/desktop/background" = {
picture-options = "zoom";
picture-uri = "file://" + ./WhiteHair.jpg;
picture-uri-dark = "file://" + ./WhiteHair.jpg;
picture-uri = "file://" + ./walls.jpg;
picture-uri-dark = "file://" + ./walls.jpg;
};
"org/gnome/shell/extensions/dash-to-panel" = {
Binary file not shown.

After

Width:  |  Height:  |  Size: 526 KiB

-22
View File
@@ -1,22 +0,0 @@
{ ... }:
{
xdg = {
userDirs = {
enable = true;
createDirectories = true;
};
desktopEntries = {
rust-rover = {
name = "RustRover";
comment = "Rust IDE from JetBrains";
genericName = "Rust IDE from JetBrains";
exec = "rust-rover";
terminal = false;
icon = "rustrover";
type = "Application";
categories = [ "Development" ];
};
};
};
}
-3
View File
@@ -22,9 +22,6 @@
home.env.nix.enable = true;
home.ide.zed.enable = true;
# Markdown Editor
home.md.obsidian.enable = true;
# The state version is required and should stay at the version you
# originally installed.
home.stateVersion = "25.11";
@@ -14,18 +14,18 @@
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/5a30ecb8-36f4-4cc3-aa59-a7d93a57fef7";
{ device = "/dev/disk/by-uuid/cced5eee-e333-4441-b8d5-860b81a34971";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/D3A5-C679";
{ device = "/dev/disk/by-uuid/3A15-DA11";
fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ];
};
swapDevices =
[ { device = "/dev/disk/by-uuid/ad944d25-c53a-4cef-b336-a89cf3110b8c"; }
[ { device = "/dev/disk/by-uuid/e33a91c3-76d2-4b33-9f37-a5a27cf5ac7f"; }
];
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
+3
View File
@@ -26,6 +26,9 @@
os.virtualisation.cuda.enable = true;
os.virtualisation.podman.enable = true;
# Flatpak
os.flatpak.apps.enable = true;
# Ssh
programs.ssh.enableAskPassword = false; # No-window git push fix
-22
View File
@@ -1,22 +0,0 @@
{
lib,
pkgs,
config,
...
}:
with lib;
let
cfg = config.home.md.obsidian;
in
{
options.home.md.obsidian = {
enable = mkEnableOption "Obsidian options";
};
config = mkIf cfg.enable {
home.packages = with pkgs; [
obsidian
];
};
}
+49
View File
@@ -0,0 +1,49 @@
{
lib,
pkgs,
config,
...
}:
with lib;
let
grep = pkgs.gnugrep;
cfg = config.os.flatpak.apps;
flatpaks = [
"com.usebottles.bottles"
"io.github.flattool.Warehouse"
];
in
{
options.os.flatpak.apps = {
enable = mkEnableOption "System gnome apps service";
};
config = mkIf cfg.enable {
services.flatpak.enable = true;
system.userActivationScripts.flatpakManagement = {
text = ''
${pkgs.flatpak}/bin/flatpak remote-add --if-not-exists fedora oci+https://registry.fedoraproject.org
installedFlatpaks=$(${pkgs.flatpak}/bin/flatpak list --app --columns=application)
for installed in $installedFlatpaks; do
if ! echo ${toString flatpaks} | ${grep}/bin/grep -q $installed; then
echo "Suppression de $installed car il n'est pas dans la liste desiredFlatpaks."
${pkgs.flatpak}/bin/flatpak uninstall -y --noninteractive $installed
fi
done
for app in ${toString flatpaks}; do
echo "Vérification que $app est installé."
${pkgs.flatpak}/bin/flatpak install -y flathub $app
done
${pkgs.flatpak}/bin/flatpak uninstall --unused -y
${pkgs.flatpak}/bin/flatpak update -y
'';
};
};
}
+3 -15
View File
@@ -15,21 +15,9 @@ in
config = mkIf cfg.enable {
environment = {
systemPackages =
with pkgs;
[
# Gnome media apps
loupe
papers
celluloid
resources
gnome-logs
]
++ [
# Gnome files explorer
nautilus
];
systemPackages = with pkgs; [
nautilus # Gnome files explorer
];
};
services.gvfs.enable = true; # SMB, FTP, ... access