reorg
This commit is contained in:
37
flake.nix
37
flake.nix
@@ -24,10 +24,8 @@
|
|||||||
pkgs = nixpkgs.legacyPackages.${system};
|
pkgs = nixpkgs.legacyPackages.${system};
|
||||||
stateVersion = "24.05";
|
stateVersion = "24.05";
|
||||||
timeZone = "America/Chicago";
|
timeZone = "America/Chicago";
|
||||||
hostname = "loki";
|
hostname = "panoptes-nix";
|
||||||
lokiPort = 3100;
|
user = "panoptes";
|
||||||
lokiUser = "loki";
|
|
||||||
lokiPath = "/srv/loki";
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
@@ -42,42 +40,31 @@
|
|||||||
time.timeZone = "${timeZone}";
|
time.timeZone = "${timeZone}";
|
||||||
environment.systemPackages = [
|
environment.systemPackages = [
|
||||||
(pkgs.writeShellScriptBin "nfs" ''
|
(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;
|
# homeManagerModules.default = ./homeManagerModules;
|
||||||
nixosModules.default = ./nixosModules;
|
# nixosModules.default = ./nixosModules;
|
||||||
|
|
||||||
# Standalone home-manager configuration entrypoint
|
# Standalone home-manager configuration entrypoint
|
||||||
# Available through 'home-manager --flake .#your-username@your-hostname'
|
# Available through 'home-manager --flake .#your-username@your-hostname'
|
||||||
homeConfigurations = {
|
homeConfigurations = {
|
||||||
useGlobalPkgs = true;
|
useGlobalPkgs = true;
|
||||||
"root@${hostname}" = home-manager.lib.homeManagerConfiguration {
|
"root@${hostname}" = home-manager.lib.homeManagerConfiguration {
|
||||||
pkgs = nixpkgs.legacyPackages.${system};
|
# pkgs = nixpkgs.legacyPackages.${system};
|
||||||
extraSpecialArgs = {inherit inputs outputs;};
|
extraSpecialArgs = {inherit inputs outputs pkgs;};
|
||||||
modules = [(import ./home-manager/git.nix { repoPath = "${lokiPath}"; })];
|
modules = [ ./home-manager/git.nix ];
|
||||||
};
|
};
|
||||||
|
|
||||||
# FIXME replace with your username@hostname
|
"${user}@${hostname}" = home-manager.lib.homeManagerConfiguration {
|
||||||
"${lokiUser}@${hostname}" = home-manager.lib.homeManagerConfiguration {
|
# pkgs = nixpkgs.legacyPackages.${system};
|
||||||
pkgs = nixpkgs.legacyPackages.${system};
|
extraSpecialArgs = {inherit inputs outputs pkgs;};
|
||||||
extraSpecialArgs = {inherit inputs outputs;};
|
modules = [ ./home-manager/home.nix ];
|
||||||
# > Our main home-manager configuration file <
|
|
||||||
modules = [
|
|
||||||
(import ./home-manager/home.nix { user = "${lokiUser}"; repoPath = "${lokiPath}"; })
|
|
||||||
(import ./home-manager/git.nix { repoPath = "${lokiPath}"; })
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,9 +0,0 @@
|
|||||||
{ user, repoPath, ... }:
|
|
||||||
{
|
|
||||||
programs.home-manager.enable = true;
|
|
||||||
home = {
|
|
||||||
stateVersion = "24.05";
|
|
||||||
username = "${user}";
|
|
||||||
homeDirectory = "${repoPath}";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
{ user, repoPath, ... }:
|
|
||||||
{
|
|
||||||
programs.home-manager.enable = true;
|
|
||||||
home = {
|
|
||||||
stateVersion = "24.05";
|
|
||||||
username = "${user}";
|
|
||||||
homeDirectory = "${repoPath}";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,8 +1,7 @@
|
|||||||
{ repoPath, ... }:
|
{ ... }:
|
||||||
{
|
{
|
||||||
programs.git = {
|
programs.git = {
|
||||||
enable = true;
|
enable = true;
|
||||||
extraConfig.safe.directory = "${repoPath}";
|
|
||||||
extraConfig.credential.helper = "store --file ~/.git-credentials";
|
extraConfig.credential.helper = "store --file ~/.git-credentials";
|
||||||
userName = "John Lancaster";
|
userName = "John Lancaster";
|
||||||
userEmail = "32917998+jsl12@users.noreply.github.com";
|
userEmail = "32917998+jsl12@users.noreply.github.com";
|
||||||
24
homeManagerModules/home.nix
Normal file
24
homeManagerModules/home.nix
Normal 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";
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user