reorganize "hosts/" into "users/"
the plan here is a user owns one or multiple machines: users/ +-- chloe/ | +-- home.nix # apply to all | +-- sandwich/ | | +-- configuration.nix # per machine | | +-- home.nix | +-- paperback/ | ... +-- natalie/ ...
This commit is contained in:
parent
8cf0abc715
commit
24d8eeb413
11 changed files with 61 additions and 4 deletions
BIN
.DS_Store
vendored
BIN
.DS_Store
vendored
Binary file not shown.
|
@ -120,7 +120,7 @@
|
||||||
# natalie's desktop computer
|
# natalie's desktop computer
|
||||||
nixosConfigurations.nixos = mkSystem "nixos" {
|
nixosConfigurations.nixos = mkSystem "nixos" {
|
||||||
userSettings = users.nmarks;
|
userSettings = users.nmarks;
|
||||||
configDir = ./hosts/desktop;
|
configDir = ./hosts/natalie/desktop;
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
extraModules = [
|
extraModules = [
|
||||||
nixos-cosmic.nixosModules.default
|
nixos-cosmic.nixosModules.default
|
||||||
|
@ -129,20 +129,20 @@
|
||||||
# natalie's laptop
|
# natalie's laptop
|
||||||
darwinConfigurations."Natalies-MacBook-Air" = mkSystem "Natalies-MacBook-Air" {
|
darwinConfigurations."Natalies-MacBook-Air" = mkSystem "Natalies-MacBook-Air" {
|
||||||
userSettings = users.nmarks;
|
userSettings = users.nmarks;
|
||||||
configDir = ./hosts/laptop;
|
configDir = ./hosts/natalie/laptop;
|
||||||
system = "aarch64-darwin";
|
system = "aarch64-darwin";
|
||||||
};
|
};
|
||||||
|
|
||||||
# chloe's mac studio "sandwich"
|
# chloe's mac studio "sandwich"
|
||||||
darwinConfigurations.sandwich = mkSystem "sandwich" {
|
darwinConfigurations.sandwich = mkSystem "sandwich" {
|
||||||
userSettings = users.paper_clover;
|
userSettings = users.paper_clover;
|
||||||
configDir = ./hosts/laptop;
|
configDir = ./hosts/chloe;
|
||||||
system = "aarch64-darwin";
|
system = "aarch64-darwin";
|
||||||
};
|
};
|
||||||
# chloe's macbook air "paperback"
|
# chloe's macbook air "paperback"
|
||||||
darwinConfigurations.paperback = mkSystem "paperback" {
|
darwinConfigurations.paperback = mkSystem "paperback" {
|
||||||
userSettings = users.paper_clover;
|
userSettings = users.paper_clover;
|
||||||
configDir = ./hosts/laptop;
|
configDir = ./hosts/chloe;
|
||||||
system = "aarch64-darwin";
|
system = "aarch64-darwin";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
BIN
hosts/.DS_Store
vendored
BIN
hosts/.DS_Store
vendored
Binary file not shown.
BIN
hosts/laptop/.DS_Store
vendored
BIN
hosts/laptop/.DS_Store
vendored
Binary file not shown.
28
users/natalie/laptop/configuration.nix
Normal file
28
users/natalie/laptop/configuration.nix
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
userSettings,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
neovim
|
||||||
|
pinentry_mac
|
||||||
|
signal-desktop-bin
|
||||||
|
];
|
||||||
|
|
||||||
|
# Create /etc/zshrc that loads the nix-darwin environment.
|
||||||
|
programs = {
|
||||||
|
gnupg.agent.enable = true;
|
||||||
|
zsh.enable = true; # default shell on catalina
|
||||||
|
};
|
||||||
|
|
||||||
|
# When opening an interactive shell that isnt fish move into fish
|
||||||
|
programs.zsh = {
|
||||||
|
interactiveShellInit = ''
|
||||||
|
if [[ $(${pkgs.procps}/bin/ps -p $PPID -o comm) != "fish" && -z ''${ZSH_EXUCTION_STRING} ]]
|
||||||
|
then
|
||||||
|
[[ -o login ]] && LOGIN_OPTION='--login' || LOGIN_OPTION=""
|
||||||
|
exec ${pkgs.fish}/bin/fish $LOGIN_OPTION
|
||||||
|
fi
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
29
users/natalie/laptop/home.nix
Normal file
29
users/natalie/laptop/home.nix
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
{
|
||||||
|
inputs,
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
userSettings,
|
||||||
|
systemSettings,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
imports = [
|
||||||
|
inputs.nixvim.homeManagerModules.nixvim
|
||||||
|
#set up nixvim
|
||||||
|
# ../../modules/nixvim
|
||||||
|
];
|
||||||
|
programs = import ../../modules/shared/homeManagerPrograms.nix {inherit inputs config pkgs lib userSettings systemSettings;};
|
||||||
|
|
||||||
|
home = {
|
||||||
|
inherit (userSettings) username;
|
||||||
|
# homeDirectory = systemSettings.homeConfig;
|
||||||
|
# shell = pkgs.fish;
|
||||||
|
stateVersion = "23.05"; # Please read the comment before changing.
|
||||||
|
|
||||||
|
packages = pkgs.callPackage ../../modules/shared/packages.nix {inherit systemSettings;};
|
||||||
|
|
||||||
|
sessionPath = [
|
||||||
|
"$HOME/.emacs.d/bin"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in a new issue