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 ];
};
};
};