Add NixOS home manager config and fix flake warnings
- Add hosts/nixos/home-default.nix with nvim, ssh, and other modules - Add hosts/nixos/hs/home.nix importing home-default - Fix nixpkgs.config conflict by moving allowUnfree to system level - Fix root user password conflicts by explicitly clearing all options - Add home-manager integration to hs system configuration - Update hostId from placeholder to actual value (8425e349) - Add claude-code support for x86_64-linux architecture 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
70485c0bc4
commit
aafa5da904
4 changed files with 83 additions and 2 deletions
|
|
@ -42,6 +42,7 @@
|
||||||
./hosts/nixos/hs/system.nix
|
./hosts/nixos/hs/system.nix
|
||||||
./hosts/nixos/hs/disk-config.nix
|
./hosts/nixos/hs/disk-config.nix
|
||||||
];
|
];
|
||||||
|
specialArgs = { inherit home-manager nixvim claude-code; };
|
||||||
};
|
};
|
||||||
|
|
||||||
nixosConfigurations."hs-iso" = nixpkgs.lib.nixosSystem {
|
nixosConfigurations."hs-iso" = nixpkgs.lib.nixosSystem {
|
||||||
|
|
@ -64,6 +65,12 @@
|
||||||
modules = [ ./hosts/darwin/mba/home.nix ];
|
modules = [ ./hosts/darwin/mba/home.nix ];
|
||||||
extraSpecialArgs = { inherit claude-code nixvim firefox-addons; };
|
extraSpecialArgs = { inherit claude-code nixvim firefox-addons; };
|
||||||
};
|
};
|
||||||
|
|
||||||
|
"yanlin@hs" = home-manager.lib.homeManagerConfiguration {
|
||||||
|
pkgs = nixpkgs.legacyPackages.x86_64-linux;
|
||||||
|
modules = [ ./hosts/nixos/hs/home.nix ];
|
||||||
|
extraSpecialArgs = { inherit claude-code nixvim; };
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
45
hosts/nixos/home-default.nix
Normal file
45
hosts/nixos/home-default.nix
Normal file
|
|
@ -0,0 +1,45 @@
|
||||||
|
{ config, pkgs, nixvim, claude-code, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
nixvim.homeModules.nixvim
|
||||||
|
../../modules/nvim.nix
|
||||||
|
../../modules/tmux.nix
|
||||||
|
../../modules/zsh.nix
|
||||||
|
../../modules/ssh.nix
|
||||||
|
../../modules/git.nix
|
||||||
|
../../modules/lazygit.nix
|
||||||
|
../../modules/termscp.nix
|
||||||
|
../../modules/rsync.nix
|
||||||
|
../../modules/btop.nix
|
||||||
|
../../config/fonts.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
home.username = "yanlin";
|
||||||
|
home.homeDirectory = "/home/yanlin";
|
||||||
|
home.stateVersion = "24.05";
|
||||||
|
|
||||||
|
programs.home-manager.enable = true;
|
||||||
|
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
# Network and file transfer
|
||||||
|
lftp
|
||||||
|
httpie
|
||||||
|
openssh
|
||||||
|
gnumake
|
||||||
|
|
||||||
|
# Command-line utilities
|
||||||
|
ncdu
|
||||||
|
git-credential-oauth
|
||||||
|
zoxide
|
||||||
|
delta
|
||||||
|
fastfetch
|
||||||
|
|
||||||
|
# Development and build tools
|
||||||
|
python312
|
||||||
|
uv
|
||||||
|
claude-code.packages.x86_64-linux.claude-code
|
||||||
|
lazysql
|
||||||
|
sqlite
|
||||||
|
];
|
||||||
|
}
|
||||||
11
hosts/nixos/hs/home.nix
Normal file
11
hosts/nixos/hs/home.nix
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
../home-default.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
# hs-specific home configuration
|
||||||
|
# Example: Server-specific tools, monitoring utilities, etc.
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -1,7 +1,8 @@
|
||||||
{ config, pkgs, ... }: {
|
{ config, pkgs, home-manager, nixvim, claude-code, ... }: {
|
||||||
imports = [
|
imports = [
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
./disk-config.nix
|
./disk-config.nix
|
||||||
|
home-manager.nixosModules.home-manager
|
||||||
];
|
];
|
||||||
|
|
||||||
# GRUB bootloader with ZFS support
|
# GRUB bootloader with ZFS support
|
||||||
|
|
@ -24,7 +25,7 @@
|
||||||
# Network configuration
|
# Network configuration
|
||||||
networking = {
|
networking = {
|
||||||
hostName = "hs";
|
hostName = "hs";
|
||||||
hostId = "12345678"; # Required for ZFS, good practice for any system
|
hostId = "8425e349"; # Required for ZFS, good practice for any system
|
||||||
networkmanager.enable = true;
|
networkmanager.enable = true;
|
||||||
firewall.enable = false;
|
firewall.enable = false;
|
||||||
# firewall.allowedTCPPorts = [ 22 ]; # SSH
|
# firewall.allowedTCPPorts = [ 22 ]; # SSH
|
||||||
|
|
@ -49,6 +50,12 @@
|
||||||
|
|
||||||
# Define a user account
|
# Define a user account
|
||||||
users.users.root = {
|
users.users.root = {
|
||||||
|
# Clear any inherited password settings
|
||||||
|
hashedPassword = null;
|
||||||
|
hashedPasswordFile = null;
|
||||||
|
password = null;
|
||||||
|
initialHashedPassword = null;
|
||||||
|
initialPassword = null;
|
||||||
openssh.authorizedKeys.keys = [
|
openssh.authorizedKeys.keys = [
|
||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIG35m0DgTrEOAM+1wAlYZ8mvLelNTcx65cFccGPQcxmo yanlin@imac"
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIG35m0DgTrEOAM+1wAlYZ8mvLelNTcx65cFccGPQcxmo yanlin@imac"
|
||||||
];
|
];
|
||||||
|
|
@ -110,6 +117,17 @@
|
||||||
autodetect = true;
|
autodetect = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Allow unfree packages globally
|
||||||
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
|
||||||
|
# Home Manager configuration
|
||||||
|
home-manager = {
|
||||||
|
useGlobalPkgs = true;
|
||||||
|
useUserPackages = true;
|
||||||
|
users.yanlin = import ./home.nix;
|
||||||
|
extraSpecialArgs = { inherit claude-code nixvim; };
|
||||||
|
};
|
||||||
|
|
||||||
# This value determines the NixOS release from which the default
|
# This value determines the NixOS release from which the default
|
||||||
# settings for stateful data, like file locations and database versions
|
# settings for stateful data, like file locations and database versions
|
||||||
# on your system were taken. It's perfectly fine and recommended to leave
|
# on your system were taken. It's perfectly fine and recommended to leave
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue