This commit is contained in:
John Lancaster
2024-12-08 13:04:18 -06:00
parent 36cf352c67
commit 6bf90e6b24
5 changed files with 37 additions and 45 deletions

View File

@@ -24,10 +24,8 @@
pkgs = nixpkgs.legacyPackages.${system};
stateVersion = "24.05";
timeZone = "America/Chicago";
hostname = "loki";
lokiPort = 3100;
lokiUser = "loki";
lokiPath = "/srv/loki";
hostname = "panoptes-nix";
user = "panoptes";
in
{
nixosConfigurations = {
@@ -42,42 +40,31 @@
time.timeZone = "${timeZone}";
environment.systemPackages = [
(pkgs.writeShellScriptBin "nfs" ''
sudo nixos-rebuild switch --flake git+file://${lokiPath}#${hostname}
sudo nixos-rebuild switch --flake git+file:///etc/nixos#${hostname}
'')
];
})
(import ./nixosModules/services/loki.nix {
inherit pkgs;
inherit lokiPort;
inherit lokiUser;
inherit lokiPath;
})
];
};
};
homeManagerModules.default = ./homeManagerModules;
nixosModules.default = ./nixosModules;
# homeManagerModules.default = ./homeManagerModules;
# nixosModules.default = ./nixosModules;
# 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 ./home-manager/git.nix { repoPath = "${lokiPath}"; })];
# pkgs = nixpkgs.legacyPackages.${system};
extraSpecialArgs = {inherit inputs outputs pkgs;};
modules = [ ./home-manager/git.nix ];
};
# 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-manager/home.nix { user = "${lokiUser}"; repoPath = "${lokiPath}"; })
(import ./home-manager/git.nix { repoPath = "${lokiPath}"; })
];
"${user}@${hostname}" = home-manager.lib.homeManagerConfiguration {
# pkgs = nixpkgs.legacyPackages.${system};
extraSpecialArgs = {inherit inputs outputs pkgs;};
modules = [ ./home-manager/home.nix ];
};
};
};

View File

@@ -1,9 +0,0 @@
{ user, repoPath, ... }:
{
programs.home-manager.enable = true;
home = {
stateVersion = "24.05";
username = "${user}";
homeDirectory = "${repoPath}";
};
}

View File

@@ -1,9 +0,0 @@
{ user, repoPath, ... }:
{
programs.home-manager.enable = true;
home = {
stateVersion = "24.05";
username = "${user}";
homeDirectory = "${repoPath}";
};
}

View File

@@ -1,8 +1,7 @@
{ repoPath, ... }:
{ ... }:
{
programs.git = {
enable = true;
extraConfig.safe.directory = "${repoPath}";
extraConfig.credential.helper = "store --file ~/.git-credentials";
userName = "John Lancaster";
userEmail = "32917998+jsl12@users.noreply.github.com";

View File

@@ -0,0 +1,24 @@
{
inputs,
lib,
config,
pkgs,
...
}:
let
homePath = "/srv/panoptes";
in
{
imports = [ ./git.nix ];
programs.git.extraConfig.safe.directory = "${homePath}";
programs.home-manager.enable = true;
home = {
stateVersion = "24.05";
username = "${user}";
homeDirectory = "${homePath}";
};
systemd.user.startServices = "sd-switch";
}