refactor for adding new hosts
This commit is contained in:
parent
651e3a9f3b
commit
154d7b0528
40
flake.nix
40
flake.nix
|
@ -38,6 +38,7 @@
|
|||
# This is a function that generates an attribute by calling a function you
|
||||
# pass to it, with each system as an argument
|
||||
forAllSystems = nixpkgs.lib.genAttrs systems;
|
||||
specialArgs = { inherit inputs outputs; };
|
||||
in {
|
||||
# Your custom packages
|
||||
# Accessible through 'nix build', 'nix shell', etc
|
||||
|
@ -60,26 +61,37 @@
|
|||
nixosConfigurations = {
|
||||
# FIXME replace with your hostname
|
||||
nixdev = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {inherit inputs outputs;};
|
||||
inherit specialArgs;
|
||||
modules = [
|
||||
# > Our main nixos configuration file <
|
||||
./hosts/nixdev
|
||||
home-manager.nixosModules.home-manager{
|
||||
home-manager.extraSpecialArgs = specialArgs;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
# Standalone home-manager configuration entrypoint
|
||||
# Available through 'home-manager --flake .#your-username@your-hostname'
|
||||
homeConfigurations = {
|
||||
# FIXME replace with your username@hostname
|
||||
"sam@nixdev" = home-manager.lib.homeManagerConfiguration {
|
||||
pkgs = nixpkgs.legacyPackages.x86_64-linux; # Home-manager requires 'pkgs' instance
|
||||
extraSpecialArgs = {inherit inputs outputs ;};
|
||||
modules = [
|
||||
# > Our main home-manager configuration file <
|
||||
./home/sam/nixdev.nix
|
||||
];
|
||||
};
|
||||
};
|
||||
# # Standalone home-manager configuration entrypoint
|
||||
# # Available through 'home-manager --flake .#your-username@your-hostname'
|
||||
# homeConfigurations = {
|
||||
# # FIXME replace with your username@hostname
|
||||
# "sam@nixdev" = home-manager.lib.homeManagerConfiguration {
|
||||
# pkgs = nixpkgs.legacyPackages.x86_64-linux; # Home-manager requires 'pkgs' instance
|
||||
# extraSpecialArgs = {inherit inputs outputs ;};
|
||||
# modules = [
|
||||
# # > Our main home-manager configuration file <
|
||||
# ./home/nixdev.nix
|
||||
# ];
|
||||
# };
|
||||
# "admin@fileserver" = home-manager.lib.homeManagerConfiguration {
|
||||
# pkgs = nixpkgs.legacyPackages.x86_64-linux; # Home-manager requires 'pkgs' instance
|
||||
# extraSpecialArgs = {inherit inputs outputs ;};
|
||||
# modules = [
|
||||
# # > Our main home-manager configuration file <
|
||||
# ./home/nixdev.nix
|
||||
# ];
|
||||
# };
|
||||
# };
|
||||
};
|
||||
}
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
imports = [
|
||||
] ;
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
{ inputs, config, ... }:
|
||||
let
|
||||
secretsFile = ../../../../secrets.yaml;
|
||||
secretsFile = ../../../secrets.yaml;
|
||||
homeDirectory = config.home.homeDirectory;
|
||||
in
|
||||
{
|
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
./common/core
|
||||
./common/optional/sops.nix
|
||||
|
||||
# Import optional
|
||||
./common/optional/git.nix
|
||||
|
||||
# Import users
|
||||
./users/admin
|
||||
];
|
|
@ -9,6 +9,12 @@
|
|||
./common/optional/desktop/hyprland
|
||||
./common/optional/desktop/waybar.nix
|
||||
./common/optional/sops.nix
|
||||
|
||||
# Import optional
|
||||
./common/optional/git.nix
|
||||
|
||||
# Import users
|
||||
./users/sam
|
||||
];
|
||||
|
||||
# ------
|
|
@ -6,7 +6,6 @@
|
|||
home.stateVersion = "23.11";
|
||||
|
||||
imports = [
|
||||
./git.nix
|
||||
] ++ (builtins.attrValues outputs.homeManagerModules); # import all homeManagerModules?
|
||||
|
||||
home.packages = [
|
Loading…
Reference in New Issue