Skip to content

Commit a460f6e

Browse files
committed
feat: move from flatpak to nix-software-center
1 parent d8babcc commit a460f6e

File tree

2 files changed

+26
-82
lines changed

2 files changed

+26
-82
lines changed

flake.nix

+2-62
Original file line numberDiff line numberDiff line change
@@ -3,35 +3,20 @@
33

44
inputs = {
55
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
6-
nix-flatpak.url = "github:gmodena/nix-flatpak";
76
nix-software-center = {
87
url = "github:batonac/nix-software-center";
98
inputs.nixpkgs.follows = "nixpkgs";
109
};
1110
};
1211

13-
outputs = { self, nixpkgs, nix-flatpak, nix-software-center, ... }:
12+
outputs = { self, nixpkgs, nix-software-center, ... }:
1413
let
1514
lib = nixpkgs.lib;
1615
in
1716
{
1817
nixosModules.microDesktop = { config, lib, pkgs, ... }:
1918
with lib;
20-
let
21-
cfg = config.microdesktop;
22-
flatpakEnabled = cfg.variant == "flatpak";
23-
in
2419
{
25-
options.microdesktop = {
26-
variant = mkOption {
27-
type = types.enum [ "native" "flatpak" ];
28-
default = "native";
29-
description = "Select the variant: 'native' installs nix-software-center and disables flatpak while 'flatpak' enables flatpak with gnome-software.";
30-
};
31-
};
32-
33-
imports = optional flatpakEnabled nix-flatpak.nixosModules.nix-flatpak;
34-
3520
config = {
3621
nixpkgs.overlays = [
3722
(self: super: {
@@ -388,59 +373,14 @@
388373
gst_all_1.gstreamer
389374
gtk3.out
390375
nautilus
376+
nix-software-center.packages.${pkgs.system}.nix-software-center
391377
podman-compose
392378
sushi
393379
uutils-coreutils-noprefix
394380
wpa_supplicant
395381
xdg-user-dirs
396382
]
397-
(if flatpakEnabled
398-
then [ gnome-software ]
399-
else [ nix-software-center.packages.${pkgs.system}.nix-software-center ]
400-
)
401383
];
402-
403-
services.flatpak = mkMerge [
404-
{ enable = mkDefault false; } # Default to disabled
405-
(mkIf flatpakEnabled {
406-
enable = true;
407-
overrides = {
408-
global = {
409-
Context = {
410-
sockets = [
411-
"wayland"
412-
"!fallback-x11"
413-
"!x11"
414-
];
415-
filesystems = [
416-
"/run/current-system/sw/share/X11/fonts:ro;/nix/store:ro;/run/dbus/system_bus_socket:rw"
417-
];
418-
};
419-
Environment = {
420-
XCURSOR_PATH = "/run/host/user-share/icons:/run/host/share/icons";
421-
};
422-
};
423-
"com.synology.SynologyDrive".Context.sockets = [ "x11" ];
424-
"net.xmind.XMind".Context.sockets = [ "x11" ];
425-
"net.xmind.XMind8".Context.sockets = [ "x11" ];
426-
"org.onlyoffice.desktopeditors".Context.sockets = [ "x11" ];
427-
"com.logseq.Logseq".Context.sockets = [ "x11" ];
428-
};
429-
packages = mkDefault [
430-
"io.missioncenter.MissionCenter"
431-
"org.freedesktop.Platform.ffmpeg-full/x86_64/24.08"
432-
"org.freedesktop.Platform.GStreamer.gstreamer-vaapi/x86_64/23.08"
433-
"org.gnome.Loupe"
434-
"org.gnome.Papers"
435-
"org.gnome.Platform/x86_64/47"
436-
"org.gnome.Showtime"
437-
"org.gtk.Gtk3theme.adw-gtk3-dark"
438-
"org.gtk.Gtk3theme.adw-gtk3"
439-
];
440-
update.auto.enable = mkDefault true;
441-
update.auto.onCalendar = mkDefault "daily";
442-
})
443-
];
444384
};
445385
};
446386
};

readme.md

+24-20
Original file line numberDiff line numberDiff line change
@@ -8,49 +8,53 @@ If you really care about declarative systems, you probably want to use Nix direc
88

99
## Features
1010

11-
- Latest kernel for optimal hardware support
12-
- GNOME desktop environment with essential applications
13-
- Network Manager with VPN support
14-
- Flatpak integration for easy application management
15-
- Optimized audio setup with PipeWire
16-
- Printer and scanner support out of the box
17-
- Automatic system maintenance (TRIM, BTRFS scrubbing)
18-
- And much more!
11+
* Latest kernel for optimal hardware support
12+
* GNOME desktop environment with essential applications
13+
* Network Manager with VPN support
14+
* ~~Flatpak integration for easy application management~~ Update: Moved to [nix-software-center](https://github.com/snowfallorg/nix-software-center)
15+
* Optimized audio setup with PipeWire
16+
* Printer and scanner support out of the box
17+
* Automatic system maintenance (TRIM, BTRFS scrubbing)
18+
* And much more!
1919

2020
## Installation
2121

2222
Follow these steps to install NixOS Micro Desktop:
2323

24-
1. **Install NixOS with BTRFS root**
25-
- Download the latest NixOS ISO
26-
- During installation, ensure you set up your root partition as BTRFS
2724

25+
1. **Install NixOS with BTRFS root**
26+
* Download the latest NixOS ISO
27+
* During installation, ensure you set up your root partition as BTRFS
2828
2. **Download and customize the sample flake**
29-
- Once your system is up and running, download the sample flake to `/etc/nixos/`:
29+
* Once your system is up and running, download the sample flake to `/etc/nixos/`:
30+
3031
```
3132
sudo curl -o /etc/nixos/flake.nix https://raw.githubusercontent.com/Avunu/nixos-micro-desktop/main/local-flake.nix
3233
```
33-
- Customize the flake according to your needs:
34+
* Customize the flake according to your needs:
35+
3436
```
3537
sudo nano /etc/nixos/flake.nix
3638
```
37-
- Update the flake:
39+
* Update the flake:
40+
3841
```
3942
sudo nix flake update /etc/nixos --extra-experimental-features nix-command flakes
4043
```
41-
4244
3. **Delete the old configuration.nix**
43-
- Remove the old configuration file:
45+
* Remove the old configuration file:
46+
4447
```
4548
sudo rm /etc/nixos/configuration.nix
4649
```
47-
4850
4. **Rebuild and reboot**
49-
- Rebuild your system using the new flake:
51+
* Rebuild your system using the new flake:
52+
5053
```
5154
sudo nixos-rebuild switch --flake /etc/nixos#default
5255
```
53-
- Reboot your system to apply all changes:
56+
* Reboot your system to apply all changes:
57+
5458
```
5559
sudo reboot
5660
```
@@ -67,4 +71,4 @@ We welcome contributions! If you have improvements or bug fixes, please open a p
6771
6872
If you need help or have questions, please open an issue on our GitHub repository or join our community chat.
6973
70-
Enjoy your sleek, efficient, and customizable NixOS Micro Desktop!
74+
Enjoy your sleek, efficient, and customizable NixOS Micro Desktop!

0 commit comments

Comments
 (0)