Reorganise common directory with env for less duplication

This commit is contained in:
Evie Litherland-Smith 2023-04-23 14:46:59 +01:00
parent e6251069f4
commit e35a926cb6
40 changed files with 176 additions and 126 deletions

View file

@ -1,4 +1,4 @@
{ ... }: { { ... }: {
imports = [ ./common/work.nix ]; imports = [ ./ukaea-elitherl.nix ];
home.stateVersion = "22.11"; home.stateVersion = "22.11";
} }

View file

@ -1,4 +1,4 @@
{ ... }: { { ... }: {
imports = [ ./common/work.nix ]; imports = [ ./ukaea-elitherl.nix ];
home.stateVersion = "22.11"; home.stateVersion = "22.11";
} }

View file

@ -1,7 +1,6 @@
{ ... }: { { ... }: {
imports = [ imports = [
./common/personal.nix ./env/personal.nix
./env/bash.nix
./tui ./tui
]; ];
home.stateVersion = "22.11"; home.stateVersion = "22.11";

View file

@ -1,11 +1,8 @@
{ ... }: { ... }:
{ {
imports = [ imports = [
./env/bash.nix ./env/personal.nix
./env/zsh.nix
./tui ./tui
./gui/wezterm.nix
./gui/neovide.nix
]; ];
# Home Manager needs a bit of information about you and the # Home Manager needs a bit of information about you and the
# paths it should manage. # paths it should manage.

View file

@ -1,12 +1,7 @@
{ ... }: { { ... }: {
imports = [ imports = [
./common/personal.nix ./env/personal.nix
./desktop/gtk.nix
./desktop/wayland.nix
./env
./tui ./tui
./gui/firefox
./gui/kitty.nix
]; ];
home.stateVersion = "22.11"; home.stateVersion = "22.11";
} }

View file

@ -1,9 +1,8 @@
{ ... }: { { ... }: {
imports = [ imports = [
./common/personal.nix ./env/personal.nix
./desktop/gtk.nix ./desktop/gtk.nix
./desktop/wayland.nix ./desktop/wayland.nix
./env
./tui ./tui
./gui/firefox.nix ./gui/firefox.nix
./gui/cloud.nix ./gui/cloud.nix

View file

@ -1,25 +0,0 @@
{ ... }:
{
imports = [
../desktop/gtk.nix
../desktop/wayland.nix
../env
../tui
../gui/chromium-wayland.nix
../gui/neovide.nix
../gui/libreoffice.nix
../gui/cloud.nix
../gui/kitty.nix
../gui/messaging.nix
../gui/nomachine.nix
../gui/ukaea.nix
];
# Home Manager needs a bit of information about you and the
# paths it should manage.
home.username = "elitherl";
home.homeDirectory = "/home/elitherl";
programs.git = {
userEmail = "evie.litherland-smith@ukaea.uk";
};
}

52
home/env/common.nix vendored
View file

@ -1,52 +0,0 @@
{ ... }:
{
imports = [ ../common ];
programs.ssh = {
enable = true;
includes = [ "config.d/*" ];
forwardAgent = true;
serverAliveInterval = 15;
serverAliveCountMax = 3;
controlMaster = "auto";
controlPersist = "5s";
};
programs.keychain = {
enable = true;
enableBashIntegration = true;
enableZshIntegration = true;
enableFishIntegration = true;
enableXsessionIntegration = true;
extraFlags = [
"--quiet"
"--ignore-missing"
];
keys = [
"id_rsa"
"id_ed25519"
];
};
programs.git = {
enable = true;
userName = "Evie Litherland-Smith";
delta.enable = true;
extraConfig = {
pull = {
rebase = false;
};
};
};
xdg.configFile."starship.toml".source = ./config/starship.toml;
programs.starship = {
enable = true;
enableBashIntegration = true;
enableZshIntegration = true;
enableFishIntegration = true;
};
programs.direnv = {
enable = true;
#enableBashIntegration = true;
#enableZshIntegration = true;
#enableFishIntegration = true;
};
}

32
home/env/common/config/ssh vendored Normal file
View file

@ -0,0 +1,32 @@
# vim: ft=sshconfig
Host legion xenia xenia.me.uk
User xenia
HostName xenia.me.uk
Port 30
ForwardAgent yes
Host git.ccfe.ac.uk
user git
Host heimdall
HostName heimdall003.jet.uk
Host heimdall???
HostName %h.jet.uk
Host batch
User cxsbatch
HostName heimdall115.jetdata.eu
Host jdc
HostName 10.40.4.103
Host freia
HostName freia022.hpc.l
Host freia???
HostName %h.hpc.l
Host heimdall* jdc* freia* batch
User elitherl

14
home/env/common/default.nix vendored Normal file
View file

@ -0,0 +1,14 @@
{ ... }:
{
imports = [
./fonts
./shell
./direnv.nix
./git.nix
./keychain.nix
./nixpkgs.nix
./qemu.nix
./ssh.nix
./starship.nix
];
}

10
home/env/common/direnv.nix vendored Normal file
View file

@ -0,0 +1,10 @@
{...}:
{
imports = [ ./shell ];
programs.direnv = {
enable = true;
#enableBashIntegration = true;
#enableZshIntegration = true;
#enableFishIntegration = true;
};
}

7
home/env/common/fonts/default.nix vendored Normal file
View file

@ -0,0 +1,7 @@
{ ... }:
{
imports = [
./firacode.nix
./iosevka.nix
];
}

7
home/env/common/fonts/firacode.nix vendored Normal file
View file

@ -0,0 +1,7 @@
{ pkgs, ... }:
{
home.packages = with pkgs; [
fira-code
(nerdfonts.override { fonts = [ "FiraCode" ]; })
];
}

7
home/env/common/fonts/iosevka.nix vendored Normal file
View file

@ -0,0 +1,7 @@
{ pkgs, ... }:
{
home.packages = with pkgs; [
iosevka
(nerdfonts.override { fonts = [ "Iosevka" ]; })
];
}

17
home/env/common/git.nix vendored Normal file
View file

@ -0,0 +1,17 @@
{ ... }:
{
imports = [
./ssh.nix
./shell
];
programs.git = {
enable = true;
userName = "Evie Litherland-Smith";
delta.enable = true;
extraConfig = {
pull = {
rebase = false;
};
};
};
}

19
home/env/common/keychain.nix vendored Normal file
View file

@ -0,0 +1,19 @@
{ ... }:
{
imports = [ ./shell ];
programs.keychain = {
enable = true;
enableBashIntegration = true;
enableZshIntegration = true;
enableFishIntegration = true;
enableXsessionIntegration = true;
extraFlags = [
"--quiet"
"--ignore-missing"
];
keys = [
"id_rsa"
"id_ed25519"
];
};
}

View file

@ -1,5 +1,4 @@
{ ... }: { ... }:
{ {
nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfree = true;
} }

View file

@ -1,6 +1,5 @@
{ pkgs, ... }: { pkgs, ... }:
{ {
imports = [ ./common.nix ];
home.packages = with pkgs; [ qemu ]; home.packages = with pkgs; [ qemu ];
} }

View file

@ -1,7 +1,6 @@
{ ... }: { ... }:
{ {
imports = [ ./common.nix ];
programs.bash = { programs.bash = {
enable = true; enable = true;
shellAliases = { shellAliases = {

View file

@ -1,10 +1,8 @@
{ ... }: { ... }:
{ {
imports = [ imports = [
./bash.nix ./bash.nix
./zsh.nix ./zsh.nix
./fish.nix ./fish.nix
./qemu.nix
]; ];
} }

View file

@ -1,7 +1,6 @@
{ ... }: { ... }:
{ {
imports = [ ./common.nix ];
programs.fish = { programs.fish = {
enable = true; enable = true;
shellAbbrs = { shellAbbrs = {

View file

@ -1,7 +1,6 @@
{ config, ... }: { config, ... }:
{ {
imports = [ ./common.nix ];
programs.zsh = { programs.zsh = {
enable = true; enable = true;
shellAliases = { shellAliases = {

13
home/env/common/ssh.nix vendored Normal file
View file

@ -0,0 +1,13 @@
{ ... }:
{
imports = [ ./shell ];
programs.ssh = {
enable = true;
includes = [ "config.d/*" ];
forwardAgent = true;
serverAliveInterval = 15;
serverAliveCountMax = 3;
controlMaster = "auto";
controlPersist = "5s";
};
}

11
home/env/common/starship.nix vendored Normal file
View file

@ -0,0 +1,11 @@
{ ... }:
{
imports = [ ./shell ];
xdg.configFile."starship.toml".source = ./config/starship.toml;
programs.starship = {
enable = true;
enableBashIntegration = true;
enableZshIntegration = true;
enableFishIntegration = true;
};
}

View file

@ -1,5 +1,6 @@
{ ... }: { ... }:
{ {
imports = [ ./common ];
# Home Manager needs a bit of information about you and the # Home Manager needs a bit of information about you and the
# paths it should manage. # paths it should manage.
home.username = "xenia"; home.username = "xenia";

12
home/env/work.nix vendored Normal file
View file

@ -0,0 +1,12 @@
{ ... }:
{
imports = [ ./common ];
# Home Manager needs a bit of information about you and the
# paths it should manage.
home.username = "elitherl";
home.homeDirectory = "/home/elitherl";
programs.git = {
userEmail = "evie.litherland-smith@ukaea.uk";
};
}

View file

@ -1,5 +1,4 @@
{ ... }: { ... }:
{ {
imports = [ ./common.nix ];
programs.chromium.enable = true; programs.chromium.enable = true;
} }

View file

@ -1,7 +1,6 @@
{ pkgs, ... }: { pkgs, ... }:
{ {
imports = [ ./common.nix ];
#services.nextcloud-client = { #services.nextcloud-client = {
# enable = true; # enable = true;
# startInBackground = true; # startInBackground = true;

View file

@ -1,4 +0,0 @@
{ ... }:
{
imports = [ ../common ];
}

View file

@ -1,5 +1,4 @@
{ ... }: { ... }:
{ {
imports = [ ./common.nix ];
programs.firefox.enable = true; programs.firefox.enable = true;
} }

View file

@ -1,6 +1,5 @@
{ ... }: { ... }:
{ {
imports = [ ./common.nix ];
fonts.fontconfig.enable = true; fonts.fontconfig.enable = true;
programs.foot = { programs.foot = {
enable = true; enable = true;

View file

@ -1,7 +1,6 @@
{ pkgs, ... }: { pkgs, ... }:
{ {
imports = [ ./common.nix ];
home.packages = with pkgs; [ home.packages = with pkgs; [
mesa mesa
steam steam

View file

@ -1,7 +1,6 @@
{ pkgs, ... }: { pkgs, ... }:
{ {
imports = [ ./common.nix ];
programs.kitty = { programs.kitty = {
enable = true; enable = true;
font = { font = {

View file

@ -1,7 +1,6 @@
{ pkgs, ... }: { pkgs, ... }:
{ {
imports = [ ./common.nix ];
home.packages = with pkgs; [ home.packages = with pkgs; [
signal-desktop signal-desktop
element-desktop element-desktop

View file

@ -1,7 +1,5 @@
{ config, pkgs, ... }: { pkgs, ... }:
{ {
imports = [ ./common.nix ];
home.packages = with pkgs; [ home.packages = with pkgs; [
nomachine-client nomachine-client
]; ];

View file

@ -1,7 +1,5 @@
{ pkgs, ... }: { pkgs, ... }:
{ {
imports = [ ./common.nix ];
home.packages = with pkgs; [ home.packages = with pkgs; [
teams teams
zoom-us zoom-us

View file

@ -1,6 +1,6 @@
{ ... }: { ... }:
{ {
imports = [ ./common.nix ]; imports = [ ../env/fonts ];
programs.urxvt = { programs.urxvt = {
enable = true; enable = true;
fonts = [ fonts = [

View file

@ -1,7 +1,7 @@
{ pkgs, ... }: { pkgs, ... }:
{ {
imports = [ ../common ]; imports = [ ../env/fonts];
programs.neovim.defaultEditor = true; programs.neovim.defaultEditor = true;
programs.bat = { programs.bat = {
enable = true; enable = true;
@ -19,14 +19,6 @@
}; };
}; };
home.packages = with pkgs; [ home.packages = with pkgs; [
fira-code
iosevka
(nerdfonts.override {
fonts = [
"FiraCode"
"Iosevka"
];
})
file file
silver-searcher silver-searcher
lynx lynx

17
home/ukaea-elitherl.nix Normal file
View file

@ -0,0 +1,17 @@
{ ... }: {
imports = [
./desktop/gtk.nix
./desktop/wayland.nix
./env/work.nix
./tui
./gui/chromium-wayland.nix
./gui/neovide.nix
./gui/libreoffice.nix
./gui/cloud.nix
./gui/kitty.nix
./gui/messaging.nix
./gui/nomachine.nix
./gui/ukaea.nix
];
home.stateVersion = "22.11";
}