Introduces non-server home-manager configs
Allows home-manager configs to be done on a server/non-server basis Provides an example config by moving emacs to its own space (behind a lib.optionals so only non-server machines accept it) marks artemision and rhapsody-in-green as explicitly non-server machines Signed-off-by: ahuston-0 <aliceghuston@gmail.com>
This commit is contained in:
parent
32bd3b839f
commit
1589f59e3b
@ -159,7 +159,9 @@ rec {
|
|||||||
}@args:
|
}@args:
|
||||||
lib.nixosSystem {
|
lib.nixosSystem {
|
||||||
inherit system;
|
inherit system;
|
||||||
specialArgs = inputs;
|
specialArgs = {
|
||||||
|
inherit inputs server;
|
||||||
|
};
|
||||||
modules =
|
modules =
|
||||||
[
|
[
|
||||||
inputs.nixos-modules.nixosModule
|
inputs.nixos-modules.nixosModule
|
||||||
|
@ -1,4 +1,9 @@
|
|||||||
{ lib, sops-nix, ... }:
|
{
|
||||||
|
lib,
|
||||||
|
inputs,
|
||||||
|
server,
|
||||||
|
...
|
||||||
|
}:
|
||||||
{
|
{
|
||||||
boot.default = lib.mkDefault true;
|
boot.default = lib.mkDefault true;
|
||||||
|
|
||||||
@ -18,6 +23,11 @@
|
|||||||
home-manager = {
|
home-manager = {
|
||||||
useGlobalPkgs = true;
|
useGlobalPkgs = true;
|
||||||
useUserPackages = true;
|
useUserPackages = true;
|
||||||
sharedModules = [ sops-nix.homeManagerModules.sops ];
|
sharedModules = [ inputs.sops-nix.homeManagerModules.sops ];
|
||||||
|
extraSpecialArgs = {
|
||||||
|
machineConfig = {
|
||||||
|
inherit server;
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
home = true;
|
home = true;
|
||||||
sops = true;
|
sops = true;
|
||||||
|
server = false;
|
||||||
users = [ "alice" ];
|
users = [ "alice" ];
|
||||||
modules = [
|
modules = [
|
||||||
inputs.nixos-hardware.nixosModules.framework-16-7040-amd
|
inputs.nixos-hardware.nixosModules.framework-16-7040-amd
|
||||||
|
@ -4,5 +4,6 @@
|
|||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
home = true;
|
home = true;
|
||||||
sops = true;
|
sops = true;
|
||||||
|
server = false;
|
||||||
modules = [ inputs.nixos-hardware.nixosModules.framework-13-7040-amd ];
|
modules = [ inputs.nixos-hardware.nixosModules.framework-13-7040-amd ];
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,10 @@
|
|||||||
{ config, pkgs, ... }:
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
machineConfig,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
@ -6,7 +12,7 @@
|
|||||||
./home/doom
|
./home/doom
|
||||||
./home/gammastep.nix
|
./home/gammastep.nix
|
||||||
./home/git.nix
|
./home/git.nix
|
||||||
];
|
] ++ lib.optionals (!machineConfig.server) [ ./non-server.nix ];
|
||||||
|
|
||||||
home = {
|
home = {
|
||||||
# # Adds the 'hello' command to your environment. It prints a friendly
|
# # Adds the 'hello' command to your environment. It prints a friendly
|
||||||
@ -100,10 +106,6 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
programs = {
|
programs = {
|
||||||
emacs = {
|
|
||||||
enable = true;
|
|
||||||
package = pkgs.emacs29-pgtk;
|
|
||||||
};
|
|
||||||
|
|
||||||
starship.enable = true;
|
starship.enable = true;
|
||||||
fzf = {
|
fzf = {
|
||||||
|
8
users/alice/non-server.nix
Normal file
8
users/alice/non-server.nix
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
{ pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
programs.emacs = {
|
||||||
|
enable = true;
|
||||||
|
package = pkgs.emacs29-pgtk;
|
||||||
|
};
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user