Files
panoptes-nix/flake.nix
John Lancaster 50bb31a670 authorized_keys
2024-12-08 13:30:58 -06:00

61 lines
1.7 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";
};
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}.openssh.authorizedKeys.keyFiles = [ "/root/.ssh/authorized_keys" ];
})
];
};
};
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 ];
};
};
};
}