From 216f457e093e6979adfe495c526651d686df01e9 Mon Sep 17 00:00:00 2001 From: marc Date: Mon, 15 Dec 2025 19:46:13 +0100 Subject: [PATCH] automount that works --- 1 | 18 --------------- hosts/laptop/hardware-configuration.nix | 4 ++++ modules/home/dconf/default.nix | 17 +++++++++++++++ modules/home/udiskie/default.nix | 10 +++++++++ profiles/laptop/packages.nix | 3 +++ users/marc/home.nix | 29 ++++++++++++------------- 6 files changed, 48 insertions(+), 33 deletions(-) delete mode 100644 1 create mode 100644 modules/home/dconf/default.nix create mode 100644 modules/home/udiskie/default.nix diff --git a/1 b/1 deleted file mode 100644 index 293216d..0000000 --- a/1 +++ /dev/null @@ -1,18 +0,0 @@ -[core] - editor = "nvim" - pager = "/nix/store/hfsr8bqqa9gaqwcsq5sjdfiqix7m8kqh-delta-0.18.2/bin/delta" - -[credential "https://gist.github.com"] - helper = "" - helper = "/nix/store/y12yx7z4g4a3jbzh28h6yrpvcf6px5kl-gh-2.83.1/bin/gh auth git-credential" - -[credential "https://github.com"] - helper = "" - helper = "/nix/store/y12yx7z4g4a3jbzh28h6yrpvcf6px5kl-gh-2.83.1/bin/gh auth git-credential" - -[interactive] - diffFilter = "/nix/store/hfsr8bqqa9gaqwcsq5sjdfiqix7m8kqh-delta-0.18.2/bin/delta --color-only" - -[user] - mail = "marc@marcpartensky.com" - name = "marc" diff --git a/hosts/laptop/hardware-configuration.nix b/hosts/laptop/hardware-configuration.nix index d963d05..0afc0e4 100644 --- a/hosts/laptop/hardware-configuration.nix +++ b/hosts/laptop/hardware-configuration.nix @@ -19,6 +19,10 @@ hardware.enableAllFirmware = true; services.xserver.videoDrivers = [ "intel" ]; + boot.supportedFilesystems = [ "exfat" ]; + services.udisks2.enable = true; + services.gvfs.enable = true; + hardware.graphics = { enable = true; # driSupport = true; diff --git a/modules/home/dconf/default.nix b/modules/home/dconf/default.nix new file mode 100644 index 0000000..353dc35 --- /dev/null +++ b/modules/home/dconf/default.nix @@ -0,0 +1,17 @@ +{ pkgs, ... }: +{ + dconf.enable = true; + dconf.settings = { + "org/gnome/desktop/media-handling" = { + automount = true; + automount-open = true; + }; + "org/gnome/nautilus/preferences" = { + default-folder-viewer = "'list-view'"; + }; + "org/gnome/nautilus/list-view" = { + sort-column = "'modified'"; + sort-order = "'descending'"; + }; + }; +} diff --git a/modules/home/udiskie/default.nix b/modules/home/udiskie/default.nix new file mode 100644 index 0000000..a7d8f4e --- /dev/null +++ b/modules/home/udiskie/default.nix @@ -0,0 +1,10 @@ +{ pkgs, ... }: +{ + services.udiskie = { + enable = true; + automount = true; + notify = true; + # settings = {}; + tray = "always"; + }; +} diff --git a/profiles/laptop/packages.nix b/profiles/laptop/packages.nix index 838628a..cb8cbb1 100644 --- a/profiles/laptop/packages.nix +++ b/profiles/laptop/packages.nix @@ -98,6 +98,9 @@ let nautilus less yq + gsettings-desktop-schemas + glib + exfatprogs ]; unfree = with pkgs; [ diff --git a/users/marc/home.nix b/users/marc/home.nix index 78d732e..77b1d7d 100644 --- a/users/marc/home.nix +++ b/users/marc/home.nix @@ -51,6 +51,9 @@ let dconf playerctl nushell + # glib + # gsettings-desktop-schemas + udiskie ]; # ------------------------------- @@ -143,10 +146,12 @@ in ../../modules/home/pgcli ../../modules/home/gpg ../../modules/home/wofi - # ../../modules/home/waybar - # ../../modules/home/mako + ../../modules/home/dconf + # ../../modules/home/waybar (incompatible hyprpanel) + # ../../modules/home/mako (incompatible hyprpanel) ../../modules/home/hyprpanel ../../modules/home/gammastep + ../../modules/home/udiskie # ../../modules/home/virt-manager # ../../modules/home/polkit # ../../modules/home/ipython @@ -160,6 +165,13 @@ in # ../../modules/home/tor ]; + home.sessionVariables = { + GSETTINGS_SCHEMA_DIR = + "${pkgs.gsettings-desktop-schemas}/share/gsettings-schemas/${pkgs.gsettings-desktop-schemas.name}"; + DBUS_SESSION_BUS_ADDRESS = "${builtins.getEnv "DBUS_SESSION_BUS_ADDRESS"}"; + }; + + home = { username = "marc"; homeDirectory = "/home/marc"; @@ -187,19 +199,6 @@ in programs.topgrade.enable = true; - # Configuration DConf pour Nautilus - dconf.settings = { - "org/gnome/nautilus/preferences" = { - default-folder-viewer = "'list-view'"; - }; - "org/gnome/nautilus/list-view" = { - sort-column = "'modified'"; - sort-order = "'descending'"; - }; - }; - - # programs.dconf.enable = true; - # systemd.user.services = { # evolution-data-server = { # Unit.Description = "Evolution Data Server";