{ 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 = "github:nix-community/nixos-vscode-server"; }; outputs = { self, nixpkgs, nixpkgs-stable, home-manager, vscode-server, ... } @ inputs: let inherit (self) outputs; system = "x86_64-linux"; stateVersion = "24.05"; timeZone = "America/Chicago"; hostname = "loki"; lokiUser = "loki"; lokiPath = "/srv/loki"; in { nixosConfigurations = { # FIXME replace with your hostname ${hostname} = nixpkgs.lib.nixosSystem { inherit system; specialArgs = {inherit inputs outputs;}; # pkgs = import nixpkgs { system = "x86_64-linux"; }; modules = [ ./configuration.nix # > Our main nixos configuration file < "${nixpkgs}/nixos/modules/virtualisation/proxmox-lxc.nix" ({ ... }: { system.stateVersion = "${stateVersion}"; time.timeZone = "${timeZone}"; }) vscode-server.nixosModules.default ({ config, pkgs, ... }: {services.vscode-server.enable = true;}) (import ./loki.nix { pkgs = nixpkgs.legacyPackages.${system}; userName = "${lokiUser}";}) ]; }; }; # Standalone home-manager configuration entrypoint # Available through 'home-manager --flake .#your-username@your-hostname' homeConfigurations = { useGlobalPkgs = true; "root@${hostname}" = home-manager.lib.homeManagerConfiguration { pkgs = nixpkgs.legacyPackages.${system}; extraSpecialArgs = {inherit inputs outputs;}; modules = [(import ./git.nix { repoPath = "${lokiPath}"; })]; }; # FIXME replace with your username@hostname "${lokiUser}@${hostname}" = home-manager.lib.homeManagerConfiguration { pkgs = nixpkgs.legacyPackages.${system}; extraSpecialArgs = {inherit inputs outputs;}; # > Our main home-manager configuration file < modules = [ (import ./home.nix { user = "${lokiUser}"; repoPath = "${lokiPath}"; }) (import ./git.nix { repoPath = "${lokiPath}"; }) ]; }; }; }; }