Move users directory up

This commit is contained in:
Tibo De Peuter 2023-10-20 20:29:11 +02:00
parent 4166a54600
commit 5386ed5ba3
10 changed files with 17 additions and 18 deletions

View file

@ -9,8 +9,8 @@ The directory structure is organized as follows:
- [`flake.nix`](./flake.nix): Main entrypoint for the configuration.
- [hosts/*hostname*](./hosts): Host-specific configuration by setting options. Each host has its own folder.
- [modules](./modules): Declarations of configuration options.
- [modules/users/*username*](./modules/users): User-specific configuration. Users are defined as modules, as they are dependent on a host machine.
- [overlays](./overlays): Attribute overrides for Nix Packages.
- [secrets](./secrets): Encrypted files that store sensitive information, such as SSH private keys.
- [users/*username*](./modules/users): User-specific configuration. Users are defined as modules, so they can be enabled or disabled on a host machine.
[Modules](https://nixos.wiki/wiki/NixOS_modules) are a key component of NixOS. They encapsulate various configuration options, which should make it easy for you to integrate it into your specific configuration.

View file

@ -58,8 +58,7 @@
home-manager.nixosModule
sops-nix.nixosModules.sops
./modules
./modules-old # Wordt stilaan weggewerkt
./users
];
};

View file

@ -4,6 +4,7 @@
imports = [
./hardware-configuration.nix
../../modules-old/hardware/nvidia.nix
../../modules-old
];
sisyphus = {

View file

@ -2,7 +2,6 @@
imports = [
./programs
./services
./users
./virtualisation
];
}

View file

@ -10,33 +10,33 @@ in {
home = {
file = {
".config/alacritty" = lib.mkIf (builtins.elem pkgs.alacritty installedPkgs) {
source = ../../../../stow/alacritty/.config/alacritty;
source = ../../../stow/alacritty/.config/alacritty;
};
".config/git" = {
enable = (builtins.elem pkgs.git installedPkgs);
source = ../../../../stow/git/.config/git;
source = ../../../stow/git/.config/git;
recursive = true;
};
".config/kitty" = {
enable = builtins.elem pkgs.kitty installedPkgs;
source = ../../../../stow/kitty/.config/kitty;
source = ../../../stow/kitty/.config/kitty;
recursive = true;
};
".config/mpv" = {
enable = (builtins.elem pkgs-unstable.mpv installedPkgs);
source = ../../../../stow/mpv/.config/mpv;
source = ../../../stow/mpv/.config/mpv;
};
".ssh/config" = lib.mkIf config.sisyphus.programs.ssh.enable {
source = ../../../../stow/ssh/.ssh/config;
source = ../../../stow/ssh/.ssh/config;
};
".config/vifm" = {
enable = (builtins.elem pkgs.vifm installedPkgs);
source = ../../../../stow/vifm/.config/vifm;
source = ../../../stow/vifm/.config/vifm;
recursive = true;
};
".config/zellij" = {
enable = (builtins.elem pkgs.zellij installedPkgs);
source = ../../../../stow/zellij/.config/zellij;
source = ../../../stow/zellij/.config/zellij;
};
".oh-my-zsh" = {
enable = (builtins.elem pkgs.zsh installedPkgs);
@ -45,11 +45,11 @@ in {
};
".oh-my-zsh/themes/tdpeuter.zsh-theme" = {
enable = (builtins.elem pkgs.zsh installedPkgs);
source = ../../../../stow/zsh/.oh-my-zsh/themes/tdpeuter.zsh-theme;
source = ../../../stow/zsh/.oh-my-zsh/themes/tdpeuter.zsh-theme;
};
".vim" = {
enable = (builtins.elem pkgs.vim installedPkgs);
source = ../../../../stow/vim/.vim;
source = ../../../stow/vim/.vim;
recursive = true;
};
".vim/autoload/plug.vim" = {
@ -58,11 +58,11 @@ in {
};
".vimrc" = {
enable = (builtins.elem pkgs.vim installedPkgs);
source = ../../../../stow/vim/.vimrc;
source = ../../../stow/vim/.vimrc;
};
".zshrc" = {
enable = (config.users.users.tdpeuter.shell == pkgs.zsh);
source = ../../../../stow/zsh/.zshrc;
source = ../../../stow/zsh/.zshrc;
};
".zsh/plugins/cmdtime/cmdtime.plugin.zsh" = {
enable = (builtins.elem pkgs.cmdtime installedPkgs);

View file

@ -9,12 +9,12 @@ in {
let
Hugo = {
format = "yaml";
sopsFile = ../../../secrets/Hugo.yaml;
sopsFile = ../../secrets/Hugo.yaml;
owner = user;
};
UGent = {
format = "yaml";
sopsFile = ../../../secrets/UGent.yaml;
sopsFile = ../../secrets/UGent.yaml;
owner = user;
};
in {
@ -23,7 +23,7 @@ in {
"GitHub/ssh" = {
format = "yaml";
sopsFile = ../../../secrets/GitHub.yaml;
sopsFile = ../../secrets/GitHub.yaml;
owner = user;
};
"Hugo/Gitea/ssh" = Hugo;