mirror of
https://github.com/lightly-toasted/nix-config.git
synced 2026-05-07 13:36:24 +00:00
refactor: move common modules to modules/ directory
This commit is contained in:
parent
3abbd61cfa
commit
bf7e249d5b
35 changed files with 67 additions and 63 deletions
|
|
@ -7,13 +7,33 @@
|
||||||
inputs.sops-nix.nixosModules.sops
|
inputs.sops-nix.nixosModules.sops
|
||||||
inputs.lanzaboote.nixosModules.lanzaboote
|
inputs.lanzaboote.nixosModules.lanzaboote
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
] ++ (
|
] ++ [
|
||||||
let
|
../../modules/core/packages.nix
|
||||||
modulesPath = ./modules;
|
../../modules/core/time.nix
|
||||||
moduleFiles = builtins.attrNames (builtins.readDir modulesPath);
|
../../modules/core/sops.nix
|
||||||
in
|
../../modules/graphical/environment.nix
|
||||||
map (module: modulesPath + ("/" + module)) moduleFiles
|
../../modules/graphical/greetd.nix
|
||||||
);
|
../../modules/graphical/hyprland.nix
|
||||||
|
../../modules/graphical/steam.nix
|
||||||
|
../../modules/graphical/thunar.nix
|
||||||
|
../../modules/graphical/xfconf.nix
|
||||||
|
../../modules/graphical/xserver.nix
|
||||||
|
../../modules/graphical/flatpak.nix
|
||||||
|
../../modules/graphical/ratbagd.nix
|
||||||
|
../../modules/programs/nh.nix
|
||||||
|
../../modules/programs/nix-ld.nix
|
||||||
|
../../modules/programs/ssh.nix
|
||||||
|
../../modules/programs/ydotool.nix
|
||||||
|
../../modules/programs/zsh.nix
|
||||||
|
../../modules/services/tailscale.nix
|
||||||
|
../../modules/services/udisks2.nix
|
||||||
|
../../modules/services/zerotierone.nix
|
||||||
|
./modules/boot.nix
|
||||||
|
./modules/network.nix
|
||||||
|
./modules/users.nix
|
||||||
|
./modules/hardware.nix
|
||||||
|
./modules/services/restic.nix
|
||||||
|
];
|
||||||
|
|
||||||
system.stateVersion = "25.05";
|
system.stateVersion = "25.05";
|
||||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||||
|
|
|
||||||
|
|
@ -1,15 +0,0 @@
|
||||||
{ config, pkgs, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
imports = [
|
|
||||||
./zsh.nix
|
|
||||||
./hyprland.nix
|
|
||||||
./thunar.nix
|
|
||||||
./xfconf.nix
|
|
||||||
./ssh.nix
|
|
||||||
./ydotool.nix
|
|
||||||
./steam.nix
|
|
||||||
./nix-ld.nix
|
|
||||||
./nh.nix
|
|
||||||
];
|
|
||||||
}
|
|
||||||
|
|
@ -1,14 +0,0 @@
|
||||||
{ config, pkgs, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
imports = [
|
|
||||||
./xserver.nix
|
|
||||||
./greetd.nix
|
|
||||||
./tailscale.nix
|
|
||||||
./flatpak.nix
|
|
||||||
./restic.nix
|
|
||||||
./zerotierone.nix
|
|
||||||
./udisks2.nix
|
|
||||||
./ratbagd.nix
|
|
||||||
];
|
|
||||||
}
|
|
||||||
|
|
@ -3,13 +3,22 @@
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
inputs.sops-nix.nixosModules.sops
|
inputs.sops-nix.nixosModules.sops
|
||||||
] ++ (
|
../../modules/core/filesystem.nix
|
||||||
let
|
../../modules/core/sops.nix
|
||||||
modulesPath = ./modules;
|
../../modules/services/tailscale.nix
|
||||||
moduleFiles = builtins.attrNames (builtins.readDir modulesPath);
|
../../modules/services/caddy.nix
|
||||||
in
|
../../modules/services/forgejo.nix
|
||||||
map (module: modulesPath + ("/" + module)) moduleFiles
|
../../modules/services/openssh.nix
|
||||||
);
|
../../modules/services/restic-rest-server.nix
|
||||||
|
../../modules/services/trilium-server.nix
|
||||||
|
../../modules/services/vaultwarden.nix
|
||||||
|
../../modules/services/zipline.nix
|
||||||
|
./modules/boot.nix
|
||||||
|
./modules/network.nix
|
||||||
|
./modules/users.nix
|
||||||
|
./modules/tailscale.nix
|
||||||
|
./modules/services/restic.nix
|
||||||
|
];
|
||||||
|
|
||||||
system.stateVersion = "23.11";
|
system.stateVersion = "23.11";
|
||||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||||
|
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
||||||
{
|
|
||||||
imports = [
|
|
||||||
./tailscale.nix
|
|
||||||
./vaultwarden.nix
|
|
||||||
./openssh.nix
|
|
||||||
./zipline.nix
|
|
||||||
./caddy.nix
|
|
||||||
./forgejo.nix
|
|
||||||
./restic.nix
|
|
||||||
./restic-rest-server.nix
|
|
||||||
];
|
|
||||||
}
|
|
||||||
|
|
@ -1,8 +0,0 @@
|
||||||
{ rootPath, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
sops.defaultSopsFile = rootPath + /secrets/secrets.yaml;
|
|
||||||
sops.defaultSopsFormat = "yaml";
|
|
||||||
|
|
||||||
sops.age.keyFile = "/home/toast/.config/sops/age/keys.txt";
|
|
||||||
}
|
|
||||||
7
hosts/vps/modules/tailscale.nix
Normal file
7
hosts/vps/modules/tailscale.nix
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
{
|
||||||
|
services.tailscale = {
|
||||||
|
useRoutingFeatures = "both";
|
||||||
|
permitCertUid = "caddy";
|
||||||
|
extraUpFlags = [ "--ssh" ];
|
||||||
|
};
|
||||||
|
}
|
||||||
10
modules/services/tailscale.nix
Normal file
10
modules/services/tailscale.nix
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
{ config, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
sops.secrets."tailscale/authkey" = { };
|
||||||
|
|
||||||
|
services.tailscale = {
|
||||||
|
enable = true;
|
||||||
|
authKeyFile = config.sops.secrets."tailscale/authkey".path;
|
||||||
|
};
|
||||||
|
}
|
||||||
7
modules/services/trilium-server.nix
Normal file
7
modules/services/trilium-server.nix
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
{
|
||||||
|
services.trilium-server = {
|
||||||
|
enable = true;
|
||||||
|
host = "127.0.0.1";
|
||||||
|
port = 8080;
|
||||||
|
};
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue