generated from john/nix-docker
71 lines
2.2 KiB
Nix
71 lines
2.2 KiB
Nix
{
|
|
description = "Loki flake config";
|
|
|
|
inputs = {
|
|
# nixos.url = "github:NixOS/nixpkgs/nixos";
|
|
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,
|
|
nixos,
|
|
nixpkgs,
|
|
nixpkgs-stable,
|
|
home-manager,
|
|
vscode-server,
|
|
...
|
|
} @ inputs:
|
|
let
|
|
inherit (self) outputs;
|
|
system = "x86_64-linux";
|
|
timeZone = "America/Chicago";
|
|
hostname = "loki";
|
|
lokiUser = "loki";
|
|
lokiPath = "/srv/loki";
|
|
in
|
|
{
|
|
nixosConfigurations = {
|
|
# FIXME replace with your hostname
|
|
${hostname} = nixpkgs.lib.nixosSystem {
|
|
stateVersion = "24.05";
|
|
system = "${system}";
|
|
timeZone = "${timeZone}";
|
|
specialArgs = {inherit inputs outputs;};
|
|
modules = [
|
|
./configuration.nix # > Our main nixos configuration file <
|
|
"${nixpkgs}/nixos/modules/virtualisation/proxmox-lxc.nix"
|
|
vscode-server.nixosModules.default
|
|
({ config, pkgs, ... }: {services.vscode-server.enable = true;})
|
|
];
|
|
};
|
|
};
|
|
|
|
# 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}"; })
|
|
];
|
|
};
|
|
};
|
|
};
|
|
} |