a bit of reorg
This commit is contained in:
113
flake.nix
113
flake.nix
@@ -1,68 +1,63 @@
|
||||
{
|
||||
description = "Panoptes flake config";
|
||||
|
||||
outputs = { self, ... }@args:
|
||||
let
|
||||
inherit (self) outputs;
|
||||
nixosSystem = args.nixpkgs.lib.nixosSystem;
|
||||
|
||||
userSettings = {
|
||||
username = "panoptes";
|
||||
gitUserName = "John Lancaster";
|
||||
gitUserEmail = "32917998+jsl12@users.noreply.github.com";
|
||||
};
|
||||
|
||||
systemSettings = {
|
||||
hostName = "panoptes-nix";
|
||||
stateVersion = "24.11";
|
||||
system = "x86_64-linux";
|
||||
timeZone = "America/Chicago";
|
||||
locale = "en_US.UTF-8";
|
||||
};
|
||||
|
||||
pkgs = args.nixpkgs.legacyPackages.${systemSettings.system};
|
||||
pkgs-stable = args.nixpkgs-stable.legacyPackages.${systemSettings.system};
|
||||
|
||||
in
|
||||
{
|
||||
nixosModules.default = ./nixosModules;
|
||||
|
||||
nixosConfigurations.${systemSettings.hostName} = nixosSystem {
|
||||
system = systemSettings.system;
|
||||
specialArgs = {
|
||||
inherit systemSettings;
|
||||
inherit userSettings;
|
||||
};
|
||||
modules = [
|
||||
(args.nixpkgs + "/nixos/modules/virtualisation/proxmox-lxc.nix")
|
||||
# ./configuration.nix # > Our main nixos configuration file <
|
||||
outputs.nixosModules.default
|
||||
args.home-manager.nixosModules.default
|
||||
args.vscode-server.nixosModules.default
|
||||
({ ... }: { services.vscode-server.enable = true; })
|
||||
];
|
||||
};
|
||||
|
||||
homeConfigurations = {
|
||||
useGlobalPkgs = true;
|
||||
${userSettings.username} = args.home-manager.lib.homeManagerConfiguration {
|
||||
inherit pkgs;
|
||||
extraSpecialArgs = {
|
||||
inherit systemSettings;
|
||||
inherit userSettings;
|
||||
};
|
||||
modules = [ ./home.nix ];
|
||||
};
|
||||
};
|
||||
};
|
||||
description = "A very basic flake";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
nixpkgs-stable.url = "github:NixOS/nixpkgs/nixos-24.11";
|
||||
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
|
||||
vscode-server = {
|
||||
url = "github:nix-community/nixos-vscode-server";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
vscode-server.url = "github:nix-community/nixos-vscode-server";
|
||||
sops-nix = {
|
||||
url = "github:Mic92/sops-nix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
|
||||
outputs = { self, ... }@args:
|
||||
let
|
||||
inherit (self) outputs;
|
||||
systemSettings = {
|
||||
hostName = "panoptes-nix";
|
||||
system = "x86_64-linux";
|
||||
timeZone = "America/Chicago";
|
||||
locale = "en_US.UTF-8";
|
||||
};
|
||||
userSettings = {
|
||||
username = "root";
|
||||
};
|
||||
nixosSystem = args.nixpkgs.lib.nixosSystem;
|
||||
pkgs = args.nixpkgs.legacyPackages.${systemSettings.system};
|
||||
|
||||
in
|
||||
{
|
||||
nixosConfigurations.${systemSettings.hostName} = nixosSystem {
|
||||
system = systemSettings.system;
|
||||
specialArgs = {
|
||||
inherit systemSettings userSettings;
|
||||
};
|
||||
modules = [
|
||||
(args.nixpkgs + "/nixos/modules/virtualisation/proxmox-lxc.nix")
|
||||
args.home-manager.nixosModules.default
|
||||
args.sops-nix.nixosModules.sops
|
||||
args.vscode-server.nixosModules.default
|
||||
./nixosModules
|
||||
./scripts
|
||||
({ pkgs, systemSettings, ... }: {
|
||||
networking.hostName = systemSettings.hostName;
|
||||
system.stateVersion = "24.11";
|
||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||
time.timeZone = "${systemSettings.timeZone}";
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
services.vscode-server.enable = true;
|
||||
programs.nix-ld.enable = true;
|
||||
environment.systemPackages = with pkgs; [ git ];
|
||||
})
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user