base: move some shared configuration to shared
This commit is contained in:
parent
6fe9af56e7
commit
fe306085f4
11 changed files with 273 additions and 227 deletions
65
modules/shared/base/default.nix
Normal file
65
modules/shared/base/default.nix
Normal file
|
@ -0,0 +1,65 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./nix
|
||||
./zsh
|
||||
];
|
||||
|
||||
options.chvp = {
|
||||
cachePrefix = lib.mkOption {
|
||||
default = "";
|
||||
example = "/cache";
|
||||
};
|
||||
dataPrefix = lib.mkOption {
|
||||
default = "";
|
||||
example = "/data";
|
||||
};
|
||||
stateVersion = lib.mkOption {
|
||||
example = "20.09";
|
||||
};
|
||||
homeStateVersion = lib.mkOption {
|
||||
default = config.chvp.stateVersion;
|
||||
};
|
||||
systemStateVersion = lib.mkOption {
|
||||
default = config.chvp.stateVersion;
|
||||
};
|
||||
username = lib.mkOption {
|
||||
default = "charlotte";
|
||||
example = "charlotte.vanpetegem";
|
||||
};
|
||||
};
|
||||
|
||||
config =
|
||||
let
|
||||
username = config.chvp.username;
|
||||
in
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
coreutils
|
||||
git
|
||||
htop
|
||||
moreutils
|
||||
ncdu
|
||||
ripgrep
|
||||
unzip
|
||||
zip
|
||||
];
|
||||
|
||||
home-manager = {
|
||||
useGlobalPkgs = true;
|
||||
users = {
|
||||
"${username}" = { ... }: {
|
||||
home.stateVersion = config.chvp.homeStateVersion;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
system.stateVersion = config.chvp.systemStateVersion;
|
||||
|
||||
users.users.${username} = {
|
||||
description = "Charlotte Van Petegem";
|
||||
shell = pkgs.zsh;
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue