added git stuff

This commit is contained in:
John Lancaster
2025-05-26 17:08:09 +00:00
parent 7ecb6a67fb
commit 732ef13b69
3 changed files with 136 additions and 4 deletions

115
flake.lock generated Normal file
View File

@@ -0,0 +1,115 @@
{
"nodes": {
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1681202837,
"narHash": "sha256-H+Rh19JDwRtpVPAWp64F+rlEtxUWBAQW28eAi3SRSzg=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "cfacdce06f30d2b68473a46042957675eebb3401",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"home-manager": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1748227609,
"narHash": "sha256-SaSdslyo6UGDpPUlmrPA4dWOEuxCy2ihRN9K6BnqYsA=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "d23d20f55d49d8818ac1f1b2783671e8a6725022",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "home-manager",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1748026106,
"narHash": "sha256-6m1Y3/4pVw1RWTsrkAK2VMYSzG4MMIj7sqUy7o8th1o=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "063f43f2dbdef86376cc29ad646c45c46e93234c",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1682134069,
"narHash": "sha256-TnI/ZXSmRxQDt2sjRYK/8j8iha4B4zP2cnQCZZ3vp7k=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "fd901ef4bf93499374c5af385b2943f5801c0833",
"type": "github"
},
"original": {
"id": "nixpkgs",
"type": "indirect"
}
},
"root": {
"inputs": {
"home-manager": "home-manager",
"nixpkgs": "nixpkgs",
"vscode-server": "vscode-server"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"vscode-server": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs_2"
},
"locked": {
"lastModified": 1729422940,
"narHash": "sha256-DlvJv33ml5UTKgu4b0HauOfFIoDx6QXtbqUF3vWeRCY=",
"owner": "nix-community",
"repo": "nixos-vscode-server",
"rev": "8b6db451de46ecf9b4ab3d01ef76e59957ff549f",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nixos-vscode-server",
"type": "github"
}
}
},
"root": "root",
"version": 7
}

View File

@@ -4,6 +4,10 @@
inputs = { inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable"; nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
vscode-server.url = "github:nix-community/nixos-vscode-server"; vscode-server.url = "github:nix-community/nixos-vscode-server";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
}; };
outputs = { self, ... }@args: outputs = { self, ... }@args:
@@ -15,21 +19,24 @@
{ {
nixosConfigurations.lxc = nixosSystem { nixosConfigurations.lxc = nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";
specialArgs = {
inherit pkgs;
};
modules = [ modules = [
(args.nixpkgs + "/nixos/modules/virtualisation/proxmox-lxc.nix") (args.nixpkgs + "/nixos/modules/virtualisation/proxmox-lxc.nix")
args.vscode-server.nixosModules.default args.vscode-server.nixosModules.default
# ./configuration.nix
({ pkgs, ... }: { ({ pkgs, ... }: {
system.stateVersion = "24.11"; system.stateVersion = "24.11";
nix.settings.experimental-features = [ "nix-command" "flakes" ]; nix.settings.experimental-features = [ "nix-command" "flakes" ];
services.vscode-server.enable = true; services.vscode-server.enable = true;
virtualisation.docker.enable = true;
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
git git
]; ];
}) })
args.home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
# home-manager.useUserPackages = true;
home-manager.users.root = import ./git.nix;
}
]; ];
}; };
}; };

10
git.nix Normal file
View File

@@ -0,0 +1,10 @@
{ ... }:
{
home.stateVersion = "24.11";
programs.git = {
enable = true;
extraConfig.credential.helper = "store --file ~/.git-credentials";
userName = "John Lancaster";
userEmail = "32917998+jsl12@users.noreply.github.com";
};
}