diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..fb2ec18 --- /dev/null +++ b/flake.lock @@ -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 +} diff --git a/flake.nix b/flake.nix index 44bb6d9..e5e547c 100644 --- a/flake.nix +++ b/flake.nix @@ -4,6 +4,10 @@ inputs = { nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable"; vscode-server.url = "github:nix-community/nixos-vscode-server"; + home-manager = { + url = "github:nix-community/home-manager"; + inputs.nixpkgs.follows = "nixpkgs"; + }; }; outputs = { self, ... }@args: @@ -15,21 +19,24 @@ { nixosConfigurations.lxc = nixosSystem { system = "x86_64-linux"; - specialArgs = { - inherit pkgs; - }; modules = [ (args.nixpkgs + "/nixos/modules/virtualisation/proxmox-lxc.nix") args.vscode-server.nixosModules.default - # ./configuration.nix ({ pkgs, ... }: { system.stateVersion = "24.11"; nix.settings.experimental-features = [ "nix-command" "flakes" ]; services.vscode-server.enable = true; + virtualisation.docker.enable = true; environment.systemPackages = with pkgs; [ git ]; }) + args.home-manager.nixosModules.home-manager + { + home-manager.useGlobalPkgs = true; + # home-manager.useUserPackages = true; + home-manager.users.root = import ./git.nix; + } ]; }; }; diff --git a/git.nix b/git.nix new file mode 100644 index 0000000..bc7723e --- /dev/null +++ b/git.nix @@ -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"; + }; +} \ No newline at end of file