From 2a63264f1eb8a125a8819dc349a78f069a68aef5 Mon Sep 17 00:00:00 2001 From: xenia Date: Wed, 3 Jul 2024 18:59:55 +0200 Subject: [PATCH] mount foxshare in nixos --- flake.nix | 2 +- nixos/base.nix | 2 ++ nixos/graphical.nix | 1 + nixos/machines/foxhut/boot.nix | 10 +++++++++- 4 files changed, 13 insertions(+), 2 deletions(-) diff --git a/flake.nix b/flake.nix index 3b689dc3..ed66eec3 100644 --- a/flake.nix +++ b/flake.nix @@ -204,7 +204,7 @@ modules = [ nixos-apple-silicon.nixosModules.apple-silicon-support ./nixos/machines/foxhut/hardware.nix - (import ./nixos/machines/foxhut/boot.nix { inherit asahi-firmware; }) + (import ./nixos/machines/foxhut/boot.nix { inherit pkgs asahi-firmware; }) base networking graphical diff --git a/nixos/base.nix b/nixos/base.nix index 9d558dcc..4c78e3c8 100644 --- a/nixos/base.nix +++ b/nixos/base.nix @@ -48,6 +48,7 @@ isNormalUser = true; extraGroups = [ "wheel" "docker" ]; shell = pkgs.zsh; + uid = 1000; }; users.users.guest = { @@ -55,6 +56,7 @@ extraGroups = [ ]; home = "/home/guest"; shell = pkgs.zsh; + uid = 1001; }; security.sudo.wheelNeedsPassword = false; diff --git a/nixos/graphical.nix b/nixos/graphical.nix index 32a68851..5cc47474 100644 --- a/nixos/graphical.nix +++ b/nixos/graphical.nix @@ -48,6 +48,7 @@ in isNormalUser = true; extraGroups = [ "wheel" "docker" ]; shell = pkgs.zsh; + uid = 1002; }; environment.systemPackages = with pkgs; [ diff --git a/nixos/machines/foxhut/boot.nix b/nixos/machines/foxhut/boot.nix index 053a3689..d6340969 100644 --- a/nixos/machines/foxhut/boot.nix +++ b/nixos/machines/foxhut/boot.nix @@ -2,7 +2,8 @@ # your system. Help is available in the configuration.nix(5) man page, on # https://search.nixos.org/options and in the NixOS manual (`nixos-help`). -{ asahi-firmware, ... }: +{ pkgs, asahi-firmware, ... }: +{ config, ... }: { # Use the systemd-boot EFI boot loader. @@ -15,5 +16,12 @@ hardware.asahi.useExperimentalGPUDriver = true; hardware.asahi.experimentalGPUInstallMode = "replace"; + + fileSystems.foxshare = { + fsType = "exfat"; + device = "/dev/disk/by-label/foxshare"; + mountPoint = "/home/xenia/foxshare"; + options = ["uid=${builtins.toString config.users.users.xenia.uid}" "nofail"]; + }; }