From e75946419bda4f1ace59b97ed6688f74cd2ff9d1 Mon Sep 17 00:00:00 2001 From: beatzaplenty Date: Mon, 21 Jul 2025 17:48:38 +1000 Subject: [PATCH] deleted: home.nix modified: installer.nix --- home.nix | 56 --------------------------------------------------- installer.nix | 18 +++++++++++++++++ 2 files changed, 18 insertions(+), 56 deletions(-) delete mode 100644 home.nix diff --git a/home.nix b/home.nix deleted file mode 100644 index 0ed1bef..0000000 --- a/home.nix +++ /dev/null @@ -1,56 +0,0 @@ -{ config, pkgs, lib, ... }: - -let - remote = "root@proxmox-ip:/var/lib/vz/template/iso"; - localMount = "${config.home.homeDirectory}/proxmox-iso"; - -in { - - # imports = [ - # ./aliases.nix - # ]; - - home.username = "nixos"; # your actual username - home.homeDirectory = "/home/nixos"; - home.stateVersion = "25.05"; # match your NixOS stateVersion - -# programs.home-manager.enable = true; # mandatory to activate HM - -programs.bash.enable = true; - - home.file = { - ".config/nix/nix.conf".text = '' - access-tokens = github.com=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 - ''; - }; - - # Optional: packages - home.packages = with pkgs; [ - git - vim - tmux - nano - sshfs - ]; - - # Optional: set environment vars - home.sessionVariables = { - EDITOR = "nano"; - }; - - home.file.".bashrc".text = '' - if [ -n "$PS1" ] && [ ! -e ~/.auto_install_ran ]; then - sudo /etc/auto-install.sh - touch ~/.auto_install_ran - fi - ''; - - # Optional: enable bash (or zsh, fish...) -# programs.bash.enable = true; - - # Optional: manage dotfiles via symlinks -# home.file = { -# ".tmux.conf".source = ./dotfiles/tmux.conf; -# ".config/nvim/init.vim".source = ./dotfiles/init.vim; -# }; -} diff --git a/installer.nix b/installer.nix index 53984db..414673b 100644 --- a/installer.nix +++ b/installer.nix @@ -95,4 +95,22 @@ users.users.root = { # fi # ''; # environment.etc."home/nixos/.bashrc".mode = "0644"; + + # Write .bashrc into the user's home directory + environment.etc."bashrc-nixos".source = pkgs.writeText "bashrc-nixos" '' + if [ -n "$PS1" ] && [ ! -e ~/.auto_install_ran ]; then + sudo /etc/auto-install.sh + touch ~/.auto_install_ran + fi + ''; + + system.activationScripts.installBashrc = { + text = '' + mkdir -p /home/nixos + cp -f ${config.environment.etc."bashrc-nixos".source} /home/nixos/.bashrc + chown nixos:nixos /home/nixos/.bashrc + chmod 644 /home/nixos/.bashrc + ''; + }; + }