nix-home updates

This commit is contained in:
John Lancaster
2025-06-25 04:20:58 +00:00
parent f0aa65cc24
commit 5ee997aae4
3 changed files with 67 additions and 41 deletions

View File

@@ -8,21 +8,26 @@
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
nix-home = {
url = "git+https://gitea.john-stream.com/john/nix-home";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { self, ... }@args:
outputs = { self, ... }@inputs:
let
inherit (self) outputs;
nixosSystem = args.nixpkgs.lib.nixosSystem;
pkgs = args.nixpkgs.legacyPackages.x86_64-linux;
nixosSystem = inputs.nixpkgs.lib.nixosSystem;
pkgs = inputs.nixpkgs.legacyPackages.x86_64-linux;
in
{
nixosConfigurations.lxc = nixosSystem {
system = "x86_64-linux";
modules = [
(args.nixpkgs + "/nixos/modules/virtualisation/proxmox-lxc.nix")
args.vscode-server.nixosModules.default
({ config, pkgs, ... }: {
(inputs.nixpkgs + "/nixos/modules/virtualisation/proxmox-lxc.nix")
inputs.nix-home.nixosModules.default { user = "john"; }
inputs.vscode-server.nixosModules.default
({ pkgs, ... }: {
system.stateVersion = "24.11";
nix.settings.experimental-features = [ "nix-command" "flakes" ];
services.vscode-server.enable = true;
@@ -30,25 +35,12 @@
environment.systemPackages = with pkgs; [
git
devenv
(pkgs.writeShellScriptBin "nfs" ''
sudo nixos-rebuild switch --flake $(readlink -f /etc/nixos)#lxc --impure
'')
(pkgs.writeShellScriptBin "nfsu" ''
FLAKE=$(readlink -f /etc/nixos)
nix flake update --flake $FLAKE --impure
git -C /etc/nixos add $FLAKE/flake.lock > /dev/null 2>&1
sudo nixos-rebuild switch --flake $FLAKE#lxc --impure
'')
];
})
args.home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.users.root = {
home.stateVersion = "24.11";
imports = [ ./git.nix ];
};
}
inputs.home-manager.nixosModules.home-manager {
home-manager.useGlobalPkgs = true;
home-manager.users.root.home.stateVersion = "24.11";
}
];
};
};