modified: flake.nix
new file: home.nix
This commit is contained in:
@@ -6,15 +6,27 @@
|
|||||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||||
flake-utils.url = "github:numtide/flake-utils";
|
flake-utils.url = "github:numtide/flake-utils";
|
||||||
nixos-generators.url = "github:nix-community/nixos-generators";
|
nixos-generators.url = "github:nix-community/nixos-generators";
|
||||||
|
home-manager.url = "github:nix-community/home-manager";
|
||||||
|
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { self, nixpkgs, flake-utils, nixos-generators, ... }:
|
outputs = { self, nixpkgs, flake-utils, nixos-generators, home-manager, ... }:
|
||||||
flake-utils.lib.eachDefaultSystem (system:
|
flake-utils.lib.eachDefaultSystem (system:
|
||||||
let
|
let
|
||||||
iso = nixos-generators.nixosGenerate {
|
iso = nixos-generators.nixosGenerate {
|
||||||
inherit system;
|
inherit system;
|
||||||
format = "install-iso";
|
format = "install-iso";
|
||||||
modules = [ ./installer.nix ];
|
modules = [
|
||||||
|
./installer.nix
|
||||||
|
home-manager.nixosModules.home-manager
|
||||||
|
|
||||||
|
# Configure home-manager for nixos user
|
||||||
|
{
|
||||||
|
home-manager.useUserPackages = true;
|
||||||
|
home-manager.useGlobalPkgs = true;
|
||||||
|
home-manager.users.nixos = import ./home.nix;
|
||||||
|
}
|
||||||
|
];
|
||||||
};
|
};
|
||||||
in {
|
in {
|
||||||
packages.default = iso;
|
packages.default = iso;
|
||||||
|
|||||||
@@ -0,0 +1,55 @@
|
|||||||
|
{ 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;
|
||||||
|
# };
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user