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";
}

View file

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

View file

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

View file

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

View file

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

View file

@ -1,9 +1,8 @@
{ ... }: {
imports = [
./common/personal.nix
./env/personal.nix
./desktop/gtk.nix
./desktop/wayland.nix
./env
./tui
./gui/firefox.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;
}

View file

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

View file

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

View file

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

View file

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

View file

@ -1,7 +1,6 @@
{ config, ... }:
{
imports = [ ./common.nix ];
programs.zsh = {
enable = true;
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
# paths it should manage.
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;
}

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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