Files
panoptes-nix/flake.nix
John Lancaster 9334d2cc7f trying to fix git
2024-12-08 15:25:55 -06:00

73 lines
2.0 KiB
Nix

{
description = "Loki flake config";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
nixpkgs-stable.url = "github:NixOS/nixpkgs/nixos-24.11";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
# vscode-server.url = "path:./nixos/vscode";
vscode-server.url = "github:nix-community/nixos-vscode-server";
};
outputs = {
self,
nixpkgs,
nixpkgs-stable,
home-manager,
...
} @ inputs:
let
inherit (self) outputs;
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
stateVersion = "24.05";
# userSettings = rec {
# username = "shahvirb"; # username on the system
# name = "Shahvir"; # name/identifier on the system
# email = "shahvirb@gmail.com";
# gitUserName = "shahvirb";
# gitUserEmail = "shahvirb@gmail.com";
# };
timeZone = "America/Chicago";
hostname = "panoptes-nix";
user = "panoptes";
in
{
nixosConfigurations = {
${hostname} = nixpkgs.lib.nixosSystem {
specialArgs = {inherit inputs outputs;};
modules = [
./configuration.nix # > Our main nixos configuration file <
"${nixpkgs}/nixos/modules/virtualisation/proxmox-lxc.nix"
({ ... }: {
nixpkgs.hostPlatform = "${system}";
system.stateVersion = "${stateVersion}";
time.timeZone = "${timeZone}";
users.users.${user} = {
extraGroups = [ "wheel" ];
isNormalUser = true;
openssh.authorizedKeys.keyFiles = [ /root/.ssh/authorized_keys ];
};
services.vscode-server.enable = true;
})
inputs.vscode-server.nixosModules.default
];
};
};
homeConfigurations = {
useGlobalPkgs = true;
user = home-manager.lib.homeManagerConfiguration {
inherit pkgs;
extraSpecialArgs = {inherit inputs outputs pkgs;};
modules = [ ./homeManagerModules/home.nix ];
};
};
};
}