mirror of
https://github.com/alyraffauf/nixcfg.git
synced 2024-11-24 16:51:54 -05:00
moved flatpak config to desktop/default.nix
This commit is contained in:
parent
c5e42be682
commit
7f02443960
|
@ -1,7 +1,7 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
# Enable the X11 windowing system.
|
||||
## Enable the X11 windowing system.
|
||||
services.xserver.enable = true;
|
||||
services.xserver.excludePackages = with pkgs; [
|
||||
xterm
|
||||
|
@ -12,4 +12,39 @@
|
|||
layout = "us";
|
||||
xkbVariant = "";
|
||||
};
|
||||
|
||||
## Needed for Flatpaks
|
||||
xdg.portal.enable = true;
|
||||
|
||||
services.flatpak.enable = true;
|
||||
services.flatpak.packages = [
|
||||
"org.mozilla.firefox"
|
||||
];
|
||||
# services.flatpak.overrides = {
|
||||
# sockets = [
|
||||
# "gpg-agent" # Expose GPG agent
|
||||
# "pcsc" # Expose smart cards (i.e. YubiKey)
|
||||
# ];
|
||||
# "org.onlyoffice.desktopeditors".Context.sockets = ["x11"]; # No Wayland support
|
||||
# };
|
||||
|
||||
fonts.fontDir.enable = true;
|
||||
|
||||
system.fsPackages = [ pkgs.bindfs ];
|
||||
fileSystems = let
|
||||
mkRoSymBind = path: {
|
||||
device = path;
|
||||
fsType = "fuse.bindfs";
|
||||
options = [ "ro" "resolve-symlinks" "x-gvfs-hide" ];
|
||||
};
|
||||
aggregatedFonts = pkgs.buildEnv {
|
||||
name = "system-fonts";
|
||||
paths = config.fonts.packages;
|
||||
pathsToLink = [ "/share/fonts" ];
|
||||
};
|
||||
in {
|
||||
# Create an FHS mount to support flatpak host icons/fonts
|
||||
"/usr/share/icons" = mkRoSymBind (config.system.path + "/share/icons");
|
||||
"/usr/share/fonts" = mkRoSymBind (aggregatedFonts + "/share/fonts");
|
||||
};
|
||||
}
|
||||
|
|
22
flake.nix
22
flake.nix
|
@ -27,22 +27,21 @@
|
|||
./hosts/rustboro
|
||||
./system
|
||||
./users/aly.nix
|
||||
./flatpak
|
||||
./desktop/gnome
|
||||
./programs/podman
|
||||
./programs/steam
|
||||
./programs/via-qmk
|
||||
|
||||
# Add managed flatpak module.
|
||||
nix-flatpak.nixosModules.nix-flatpak
|
||||
# make home-manager as a module of nixos
|
||||
# so that home-manager configuration will be deployed automatically when executing `nixos-rebuild switch`
|
||||
home-manager.nixosModules.home-manager
|
||||
{
|
||||
|
||||
# Add home-manager nixos module so home-manager config deploys on nixos-rebuild.
|
||||
home-manager.nixosModules.home-manager {
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.users.aly = import ./home/aly;
|
||||
# Optionally, use home-manager.extraSpecialArgs to pass arguments to home.nix
|
||||
}
|
||||
|
||||
# nixos-hardware configuration for t440p
|
||||
nixos-hardware.nixosModules.lenovo-thinkpad-t440p
|
||||
];
|
||||
|
@ -55,23 +54,20 @@
|
|||
./hosts/petalburg
|
||||
./system
|
||||
./users/aly.nix
|
||||
./flatpak
|
||||
./desktop/gnome
|
||||
./programs/podman
|
||||
./programs/steam
|
||||
./programs/via-qmk
|
||||
|
||||
# Add managed flatpak module.
|
||||
nix-flatpak.nixosModules.nix-flatpak
|
||||
# make home-manager as a module of nixos
|
||||
# so that home-manager configuration will be deployed automatically when executing `nixos-rebuild switch`
|
||||
home-manager.nixosModules.home-manager
|
||||
{
|
||||
|
||||
# Add home-manager nixos module so home-manager config deploys on nixos-rebuild.
|
||||
home-manager.nixosModules.home-manager {
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.users.aly = import ./home/aly;
|
||||
# Optionally, use home-manager.extraSpecialArgs to pass arguments to home.nix
|
||||
}
|
||||
|
||||
];
|
||||
};
|
||||
};
|
||||
|
|
|
@ -1,39 +0,0 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
xdg.portal.enable = true;
|
||||
|
||||
services.flatpak.enable = true;
|
||||
services.flatpak.packages = [
|
||||
"org.mozilla.firefox"
|
||||
];
|
||||
services.flatpak.overrides = {
|
||||
sockets = [
|
||||
"gpg-agent" # Expose GPG agent
|
||||
"pcsc" # Expose smart cards (i.e. YubiKey)
|
||||
];
|
||||
};
|
||||
|
||||
"org.onlyoffice.desktopeditors".Context.sockets = ["x11"]; # No Wayland support
|
||||
};
|
||||
|
||||
fonts.fontDir.enable = true;
|
||||
|
||||
system.fsPackages = [ pkgs.bindfs ];
|
||||
fileSystems = let
|
||||
mkRoSymBind = path: {
|
||||
device = path;
|
||||
fsType = "fuse.bindfs";
|
||||
options = [ "ro" "resolve-symlinks" "x-gvfs-hide" ];
|
||||
};
|
||||
aggregatedFonts = pkgs.buildEnv {
|
||||
name = "system-fonts";
|
||||
paths = config.fonts.packages;
|
||||
pathsToLink = [ "/share/fonts" ];
|
||||
};
|
||||
in {
|
||||
# Create an FHS mount to support flatpak host icons/fonts
|
||||
"/usr/share/icons" = mkRoSymBind (config.system.path + "/share/icons");
|
||||
"/usr/share/fonts" = mkRoSymBind (aggregatedFonts + "/share/fonts");
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue