Files
loki-nix/flake.nix
John Lancaster add8fca4b0 vscode fix?
2024-12-08 14:03:07 -06:00

68 lines
1.9 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";
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;
};
})
vscode-server.nixosModules.default
];
};
};
homeConfigurations = {
useGlobalPkgs = true;
"root@${hostname}" = home-manager.lib.homeManagerConfiguration {
extraSpecialArgs = {inherit inputs outputs pkgs;};
modules = [ ./home-manager/git.nix ];
};
"${user}@${hostname}" = home-manager.lib.homeManagerConfiguration {
extraSpecialArgs = {inherit inputs outputs pkgs;};
modules = [ ./home-manager/home.nix ];
};
};
};
}