Rearrange again to reduce complexity

Move collections to use default.nix in relevant directories
Combine GUI elements into gui directory
This commit is contained in:
Evie Litherland-Smith 2023-05-15 11:12:17 +01:00
parent 816b839ab4
commit 8c7f8dba52
31 changed files with 69 additions and 140 deletions

View file

@ -27,7 +27,6 @@
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGAcvAQ8W71Bn8pdMYst1hoVCmVJ+0h4HBlJzu1C6dwy xenia@Northstar"
];
# Define a user account. Don't forget to set a password with passwd.
users.users.xenia = {
isNormalUser = true;
description = "Evie Litherland-Smith";
@ -39,10 +38,9 @@
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGAcvAQ8W71Bn8pdMYst1hoVCmVJ+0h4HBlJzu1C6dwy xenia@Northstar"
];
};
home-manager.users.xenia = { ... }: {
imports = [ ./home/collections/personal ];
# Home Manager needs a bit of information about you and the
# paths it should manage.
imports = [ ./home/personal.nix ];
home.username = "xenia";
home.homeDirectory = "/home/xenia";
home.stateVersion = "22.11";

View file

@ -8,17 +8,7 @@
home-manager.useUserPackages = true;
home-manager.useGlobalPkgs = true;
home-manager.users.root = { ... }: {
imports = [
./home/env/bash.nix
./home/env/fish.nix
./home/env/bat.nix
./home/env/starship.nix
./home/tui/neovim.nix
./home/tui/lazygit.nix
./home/git/personal.nix
];
# Home Manager needs a bit of information about you and the
# paths it should manage.
imports = [ ./home/env ./home/tui ./home/git/personal.nix ./home/ssh/personal.nix ];
home.username = "root";
home.homeDirectory = "/root";
home.stateVersion = "22.11";
@ -30,11 +20,7 @@
# Enable power-profiles
services.power-profiles-daemon.enable = true;
environment.systemPackages = with pkgs; [
dig
gnumake
home-manager
];
environment.systemPackages = with pkgs; [ home-manager ];
programs.nix-ld = {
enable = true;

View file

@ -1,11 +0,0 @@
{ ... }: {
imports = [
./env/xenia.nix
./tui
];
# Home Manager needs a bit of information about you and the
# paths it should manage.
home.username = "xenia";
home.homeDirectory = "/home/xenia";
home.stateVersion = "22.11";
}

View file

@ -1,25 +1,12 @@
{ pkgs, ... }:
{ ... }:
{
imports = [
./git/personal.nix
./env/zsh.nix
./env/fish.nix
./env/bat.nix
./env/direnv.nix
./env/keychain.nix
./env/starship.nix
./ssh/personal.nix
./terminal/wezterm.nix
./tui/neovim.nix
./tui/lazygit.nix
];
imports = [ ./personal.nix ];
# Home Manager needs a bit of information about you and the
# paths it should manage.
home.username = "tux";
home.homeDirectory = "/Users/tux";
home.stateVersion = "22.11";
home.packages = with pkgs; [ silver-searcher ];
services.syncthing.enable = true;
programs.zsh.shellAliases.update = "home-manager switch";

View file

@ -1,12 +0,0 @@
{ ... }: {
imports = [
./env
./env/git/personal.nix
./tui
];
# Home Manager needs a bit of information about you and the
# paths it should manage.
home.username = "xenia";
home.homeDirectory = "/home/xenia";
home.stateVersion = "22.11";
}

View file

@ -1,4 +0,0 @@
{ ... }:
{
programs.chromium.enable = true;
}

View file

@ -1,8 +0,0 @@
{ ... }:
{
imports = [ ./chromium.nix ];
programs.chromium.commandLineArgs = [
"--enable-features=UseOzonePlatform"
"--ozone-platform=wayland"
];
}

View file

@ -1,4 +0,0 @@
{ ... }:
{
programs.firefox.enable = true;
}

View file

@ -1,4 +0,0 @@
{ ... }:
{
programs.librewolf.enable = true;
}

View file

@ -1,26 +0,0 @@
{ pkgs, ... }:
{
imports = [
../../browser/librewolf.nix
../../desktop/wayland/hyprland.nix
../../env/bash.nix
../../env/fish.nix
../../env/bat.nix
../../env/direnv.nix
../../env/keychain.nix
../../env/nix-index.nix
../../env/pypoetry.nix
../../env/starship.nix
../../terminal/wezterm.nix
../../tui/neovim.nix
../../tui/lazygit.nix
];
home.packages = with pkgs; [
bitwarden
file
marktext
silver-searcher
signal-desktop
zotero
];
}

View file

@ -2,6 +2,4 @@
let
home-manager = builtins.fetchTarball "https://github.com/nix-community/home-manager/archive/master.tar.gz";
in
{
imports = [ (import "${home-manager}/nixos") ];
}
{ imports = [ (import "${home-manager}/nixos") ]; }

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

@ -0,0 +1,14 @@
{ pkgs, ... }:
{
imports = [
./bash.nix
./bat.nix
./direnv.nix
./fish.nix
./keychain.nix
./nix-index.nix
./readline.nix
./starship.nix
];
home.packages = with pkgs; [ dig file gnumake silver-searcher ];
}

View file

@ -1,4 +0,0 @@
{ ... }:
{
xdg.configFile."pypoetry".source = ./config/pypoetry;
}

View file

@ -1,8 +0,0 @@
{ pkgs, ... }:
{
services.syncthing = {
enable = true;
tray.enable = true;
};
home.packages = with pkgs; [ syncthing-cli ];
}

12
home/gui/default.nix Normal file
View file

@ -0,0 +1,12 @@
{ pkgs, ... }:
{
imports = [ ./wezterm.nix ];
programs.firefox.enable = true;
programs.librewolf.enable = true;
home.packages = with pkgs; [
bitwarden
marktext
signal-desktop
zotero
];
}

13
home/gui/wezterm.nix Normal file
View file

@ -0,0 +1,13 @@
{ ... }:
{
programs.wezterm = {
enable = true;
extraConfig = builtins.readFile ./config/wezterm/wezterm.lua;
};
xdg.configFile = {
"wezterm/tab_bar_style.lua".source = ./config/wezterm/tab_bar_style.lua;
"wezterm/navigator.lua".source = ./config/wezterm/navigator.lua;
"wezterm/keys.lua".source = ./config/wezterm/keys.lua;
"wezterm/key_tables.lua".source = ./config/wezterm/key_tables.lua;
};
}

View file

@ -1,9 +1,11 @@
{ pkgs, ... }:
{
imports = [
../common/desktop.nix
../../git/personal.nix
../../ssh/personal.nix
./env
./gui
./tui
./git/personal.nix
./ssh/personal.nix
];
home.packages = with pkgs; [
discord

View file

@ -1,16 +1,11 @@
{ ... }:
{ lib, ... }:
{
imports = [ ./common.nix ];
programs.ssh.matchBlocks = {
"legion xenia xenia.me.uk" = {
"legion" = { port = 30; };
"vanguard" = { hostname = "192.168.1.166"; port = 22; };
"legion vanguard xenia.me.uk" = lib.hm.dag.entryAfter [ "legion" "vanguard" ] {
user = "root";
hostname = "xenia.me.uk";
port = 30;
forwardAgent = true;
};
"vanguard" = {
user = "root";
hostname = "192.168.1.166";
forwardAgent = true;
};
};

View file

@ -1,5 +0,0 @@
{ ... }:
{
programs.wezterm.enable = true;
xdg.configFile."wezterm".source = ./config/wezterm;
}

7
home/tui/default.nix Normal file
View file

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

View file

@ -4,6 +4,7 @@
programs.neovim = {
enable = true;
defaultEditor = true;
extraLuaConfig = builtins.readFile ./config/nvim/init.lua;
viAlias = true;
vimAlias = true;
vimdiffAlias = true;
@ -40,5 +41,5 @@
];
};
home.packages = with pkgs; [ tree-sitter ];
xdg.configFile."nvim".source = ./config/nvim;
xdg.configFile."nvim/lua".source = ./config/nvim/lua;
}

View file

@ -1,9 +1,11 @@
{ pkgs, ... }:
{
imports = [
../common/desktop.nix
../../git/work.nix
../../ssh/work.nix
./env
./gui
./tui
./git/work.nix
./ssh/work.nix
];
home.packages = with pkgs; [
libreoffice-fresh