nixos-dotfiles

nixos-dotfiles

https://git.tonybtw.com/nixos-dotfiles.git git://git.tonybtw.com/nixos-dotfiles.git

added sandbox user with hot rl workflow

Commit
27ea2958eccccd0bb362582ec56a21cc4b9588a5
Parent
b035bd6
Author
tonybtw <tonybtw@tonybtw.com>
Date
2025-11-23 06:36:51

Diff

diff --git a/configuration.nix b/configuration.nix
index aefeffe..532e8c3 100644
--- a/configuration.nix
+++ b/configuration.nix
@@ -93,6 +93,11 @@ in {
     ];
   };
 
+  users.users.sandbox = {
+    isNormalUser = true;
+    extraGroups = ["wheel" "video" "audio"];
+  };
+
   # programs.hyprland = {
   #   enable = true;
   #   xwayland.enable = true;
diff --git a/flake.nix b/flake.nix
index 7961c14..53f7ee9 100644
--- a/flake.nix
+++ b/flake.nix
@@ -82,6 +82,7 @@
             useGlobalPkgs = true;
             useUserPackages = true;
             users.tony = import ./home.nix;
+            users.sandbox = import ./home-sandbox.nix;
             backupFileExtension = "backup";
             extraSpecialArgs = {inherit unstable_pkgs;};
           };
diff --git a/home-sandbox.nix b/home-sandbox.nix
new file mode 100644
index 0000000..fc0c7b8
--- /dev/null
+++ b/home-sandbox.nix
@@ -0,0 +1,78 @@
+{
+  config,
+  pkgs,
+  ...
+}: let
+  dotfiles = "/home/tony/nixos-dotfiles/config";
+  create_symlink = path: config.lib.file.mkOutOfStoreSymlink path;
+in {
+  imports = [
+    ./modules/neovim.nix
+    ./modules/other.nix
+    ./modules/doom-emacs.nix
+    ./modules/work.nix
+    ./modules/themes.nix
+    ./modules/suckless.nix
+    ./modules/wayland.nix
+    ./modules/unstable.nix
+  ];
+
+  home.username = "sandbox";
+  home.homeDirectory = "/home/sandbox";
+  home.stateVersion = "25.05";
+
+  programs.git = {
+    enable = true;
+    extraConfig = {
+      credential.helper = "store";
+      user.name = "tonybtw";
+      user.email = "tonybtw@tonybtw.com";
+      clone.defaultRemoteName = "tony";
+    };
+  };
+
+  xdg.configFile = {
+    qtile.source = create_symlink "${dotfiles}/qtile";
+    nvim.source = create_symlink "${dotfiles}/nvim";
+    alacritty.source = create_symlink "${dotfiles}/alacritty";
+    rofi.source = create_symlink "${dotfiles}/rofi";
+    picom.source = create_symlink "${dotfiles}/picom";
+    doom.source = create_symlink "${dotfiles}/doom";
+    tmux.source = create_symlink "${dotfiles}/tmux";
+    foot.source = create_symlink "${dotfiles}/foot";
+    sway.source = create_symlink "${dotfiles}/sway";
+    quickshell.source = create_symlink "${dotfiles}/quickshell";
+    hypr.source = create_symlink "${dotfiles}/hypr";
+    waybar.source = create_symlink "${dotfiles}/waybar";
+    mango.source = create_symlink "${dotfiles}/mango";
+    oxwm.source = create_symlink "${dotfiles}/oxwm";
+  };
+
+  home.file.".bashrc".source = create_symlink "${dotfiles}/bashrc/bashrc";
+
+  home.packages = with pkgs; [
+    rustc
+    cargo
+    distrobox
+    podman
+    rofi
+    fastfetch
+    xwallpaper
+    pcmanfm
+    tldr
+    xclip
+    maim
+    pfetch-rs
+    lxappearance
+    jq
+    eza
+    acpi
+    tmux
+    gh
+    gimp
+    libreoffice
+    xorg.xclock
+    direnv
+    qbittorrent
+  ];
+}
diff --git a/home.nix b/home.nix
index d6c02bb..59cb54a 100644
--- a/home.nix
+++ b/home.nix
@@ -2,26 +2,7 @@
   config,
   pkgs,
   ...
-}: let
-  dotfiles = "${config.home.homeDirectory}/nixos-dotfiles/config";
-  create_symlink = path: config.lib.file.mkOutOfStoreSymlink path;
-  configs = {
-    qtile = "qtile";
-    nvim = "nvim";
-    alacritty = "alacritty";
-    rofi = "rofi";
-    picom = "picom";
-    doom = "doom";
-    tmux = "tmux";
-    foot = "foot";
-    sway = "sway";
-    quickshell = "quickshell";
-    hypr = "hypr";
-    waybar = "waybar";
-    mango = "mango";
-    oxwm = "oxwm";
-  };
-in {
+}: {
   imports = [
     ./modules/neovim.nix
     ./modules/other.nix
@@ -47,13 +28,22 @@ in {
     };
   };
 
-  xdg.configFile =
-    builtins.mapAttrs
-    (name: subpath: {
-      source = create_symlink "${dotfiles}/${subpath}";
-      recursive = true;
-    })
-    configs;
+  xdg.configFile = {
+    qtile.source = ./config/qtile;
+    nvim.source = ./config/nvim;
+    alacritty.source = ./config/alacritty;
+    rofi.source = ./config/rofi;
+    picom.source = ./config/picom;
+    doom.source = ./config/doom;
+    tmux.source = ./config/tmux;
+    foot.source = ./config/foot;
+    sway.source = ./config/sway;
+    quickshell.source = ./config/quickshell;
+    hypr.source = ./config/hypr;
+    waybar.source = ./config/waybar;
+    mango.source = ./config/mango;
+    oxwm.source = ./config/oxwm;
+  };
 
   home.file.".bashrc".source = ./config/bashrc/bashrc;