feat: use modules instead of including all files in flake.nix
This commit is contained in:
parent
d3ffbbed5e
commit
6b4f5d8e57
139
flake.nix
139
flake.nix
@ -43,104 +43,30 @@
|
||||
{
|
||||
nixosConfigurations."desktop" = nixpkgs.lib.nixosSystem
|
||||
{
|
||||
specialArgs = { inherit username; inherit inputs; };
|
||||
specialArgs = {
|
||||
inherit username;
|
||||
inherit inputs;
|
||||
};
|
||||
pkgs = nixpkgs_x86_64_linux;
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
# Home Manager Modules
|
||||
home-manager.nixosModules.home-manager
|
||||
{
|
||||
home-manager.extraSpecialArgs = {
|
||||
inherit username;
|
||||
inherit inputs;
|
||||
pkgs = nixpkgs_x86_64_linux;
|
||||
};
|
||||
home-manager.users.${username}.imports = [
|
||||
./homes/common/java.nix
|
||||
./homes/common/ssh
|
||||
./homes/common/amfora.nix
|
||||
./homes/common/btop.nix
|
||||
./homes/common/eza.nix
|
||||
./homes/common/fetch.nix
|
||||
./homes/common/git.nix
|
||||
./homes/common/helix.nix
|
||||
./homes/common/htop.nix
|
||||
./homes/common/kakoune
|
||||
./homes/common/latex.nix
|
||||
./homes/common/lf
|
||||
./homes/common/media-tools.nix
|
||||
./homes/common/python.nix
|
||||
./homes/common/rust.nix
|
||||
./homes/common/shell.nix
|
||||
./homes/common/starship.nix
|
||||
./homes/common/tmux.nix
|
||||
./homes/common/wezterm.nix
|
||||
./homes/common/xdg.nix
|
||||
./homes/common/zsh.nix
|
||||
./homes/common/radicle.nix
|
||||
|
||||
./homes/desktop/alacritty.nix
|
||||
./homes/desktop/anyrun.nix
|
||||
./homes/desktop/audio.nix
|
||||
./homes/desktop/chromium.nix
|
||||
./homes/desktop/cider.nix
|
||||
./homes/desktop/cursor.nix
|
||||
./homes/desktop/discord.nix
|
||||
./homes/desktop/element.nix
|
||||
./homes/desktop/games.nix
|
||||
./homes/desktop/gtk.nix
|
||||
./homes/desktop/home.nix
|
||||
./homes/desktop/hyprland.nix
|
||||
./homes/desktop/hyprlock.nix
|
||||
./homes/desktop/hyprpaper.nix
|
||||
./homes/desktop/kdeconnect.nix
|
||||
./homes/desktop/kitty.nix
|
||||
./homes/desktop/librewolf.nix
|
||||
./homes/desktop/minecraft.nix
|
||||
./homes/desktop/mpv.nix
|
||||
./homes/desktop/ncdu.nix
|
||||
./homes/desktop/steam.nix
|
||||
./homes/desktop/syncplay.nix
|
||||
./homes/desktop/terminals.nix
|
||||
./homes/desktop/tor-browser.nix
|
||||
./homes/desktop/uxplay.nix
|
||||
./homes/desktop/waybar.nix
|
||||
./homes/desktop/wine.nix
|
||||
./homes/desktop/wlogout.nix
|
||||
./homes/desktop/xdg.nix
|
||||
./homes/desktop/xorg.nix
|
||||
./homes/desktop/zathura.nix
|
||||
|
||||
./homes/common
|
||||
./homes/desktop
|
||||
inputs.anyrun.homeManagerModules.default
|
||||
];
|
||||
home-manager.extraSpecialArgs = { inherit username; inherit inputs; pkgs = nixpkgs_x86_64_linux; };
|
||||
}
|
||||
|
||||
./systems/desktop/audio.nix
|
||||
./systems/desktop/avahi.nix
|
||||
./systems/desktop/bluetooth.nix
|
||||
./systems/desktop/boot.nix
|
||||
./systems/desktop/clicks-tailscale.nix
|
||||
./systems/desktop/cpu.nix
|
||||
./systems/desktop/doas.nix
|
||||
./systems/desktop/firewall.nix
|
||||
./systems/desktop/fonts.nix
|
||||
./systems/desktop/gpg.nix
|
||||
./systems/desktop/hardware.nix
|
||||
./systems/desktop/hyprland.nix
|
||||
./systems/desktop/hyprlock.nix
|
||||
./systems/desktop/locale.nix
|
||||
./systems/desktop/ly.nix
|
||||
./systems/desktop/man.nix
|
||||
./systems/desktop/networking.nix
|
||||
./systems/desktop/nix-ld.nix
|
||||
./systems/desktop/nix.nix
|
||||
./systems/desktop/nixos.nix
|
||||
./systems/desktop/nvidia.nix
|
||||
./systems/desktop/packages.nix
|
||||
./systems/desktop/security.nix
|
||||
./systems/desktop/ssh.nix
|
||||
./systems/desktop/systemd.nix
|
||||
./systems/desktop/tailscale.nix
|
||||
./systems/desktop/users.nix
|
||||
./systems/desktop/xdg.nix
|
||||
./systems/desktop/xorg.nix
|
||||
./systems/desktop/yubikey.nix
|
||||
./systems/desktop/zsh.nix
|
||||
# NixOS Modules
|
||||
./systems/desktop
|
||||
];
|
||||
};
|
||||
|
||||
@ -160,42 +86,17 @@
|
||||
pkgs = nixpkgs_aarch64_darwin;
|
||||
};
|
||||
home-manager.users.${username}.imports = [
|
||||
./homes/laptop/home.nix
|
||||
./homes/laptop/ssh.nix
|
||||
./homes/laptop/shell.nix
|
||||
./homes/common/ssh
|
||||
./homes/common/amfora.nix
|
||||
./homes/common/btop.nix
|
||||
./homes/common/eza.nix
|
||||
./homes/common/fetch.nix
|
||||
./homes/common/git.nix
|
||||
./homes/common/helix.nix
|
||||
./homes/common/htop.nix
|
||||
./homes/common/kakoune
|
||||
./homes/common/latex.nix
|
||||
./homes/common/lf
|
||||
./homes/common/media-tools.nix
|
||||
./homes/common/python.nix
|
||||
./homes/common/rust.nix
|
||||
./homes/common/shell.nix
|
||||
./homes/common/starship.nix
|
||||
./homes/common/tmux.nix
|
||||
./homes/common/wezterm.nix
|
||||
./homes/common/xdg.nix
|
||||
./homes/common/zsh.nix
|
||||
./homes/common/radicle.nix
|
||||
./homes/laptop
|
||||
./homes/common
|
||||
];
|
||||
}
|
||||
|
||||
# Nix Darwin Modules
|
||||
./systems/laptop/fonts.nix
|
||||
./systems/laptop/gpg.nix
|
||||
./systems/laptop/nix.nix
|
||||
./systems/laptop/packages.nix
|
||||
./systems/laptop/ssh.nix
|
||||
./systems/laptop/sudo.nix
|
||||
./systems/laptop/zsh.nix
|
||||
./systems/laptop
|
||||
];
|
||||
};
|
||||
|
||||
formatter.aarch64-darwin = nixpkgs_aarch64_darwin.legacyPackages.aarch64-darwin.nixpkgs-fmt;
|
||||
formatter.x86_64-linux = nixpkgs_x86_64_linux.legacyPackages.x86_64-linux.nixpkgs-fmt;
|
||||
};
|
||||
}
|
||||
|
25
homes/common/default.nix
Normal file
25
homes/common/default.nix
Normal file
@ -0,0 +1,25 @@
|
||||
{
|
||||
imports = [
|
||||
./ssh
|
||||
./amfora.nix
|
||||
./btop.nix
|
||||
./eza.nix
|
||||
./fetch.nix
|
||||
./git.nix
|
||||
./helix.nix
|
||||
./htop.nix
|
||||
./kakoune
|
||||
./latex.nix
|
||||
./lf
|
||||
./media-tools.nix
|
||||
./python.nix
|
||||
./rust.nix
|
||||
./shell.nix
|
||||
./starship.nix
|
||||
./tmux.nix
|
||||
./wezterm.nix
|
||||
./xdg.nix
|
||||
./zsh.nix
|
||||
./radicle.nix
|
||||
];
|
||||
}
|
35
homes/desktop/default.nix
Normal file
35
homes/desktop/default.nix
Normal file
@ -0,0 +1,35 @@
|
||||
{
|
||||
import = [
|
||||
./alacritty.nix
|
||||
./anyrun.nix
|
||||
./audio.nix
|
||||
./chromium.nix
|
||||
./cider.nix
|
||||
./cursor.nix
|
||||
./discord.nix
|
||||
./element.nix
|
||||
./games.nix
|
||||
./gtk.nix
|
||||
./home.nix
|
||||
./hyprland.nix
|
||||
./hyprlock.nix
|
||||
./hyprpaper.nix
|
||||
./kdeconnect.nix
|
||||
./kitty.nix
|
||||
./librewolf.nix
|
||||
./minecraft.nix
|
||||
./mpv.nix
|
||||
./ncdu.nix
|
||||
./steam.nix
|
||||
./syncplay.nix
|
||||
./terminals.nix
|
||||
./tor-browser.nix
|
||||
./uxplay.nix
|
||||
./waybar.nix
|
||||
./wine.nix
|
||||
./wlogout.nix
|
||||
./xdg.nix
|
||||
./xorg.nix
|
||||
./zathura.nix
|
||||
];
|
||||
}
|
7
homes/laptop/default.nix
Normal file
7
homes/laptop/default.nix
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
imports = [
|
||||
./home.nix
|
||||
./shell.nix
|
||||
./ssh.nix
|
||||
];
|
||||
}
|
35
systems/desktop/default.nix
Normal file
35
systems/desktop/default.nix
Normal file
@ -0,0 +1,35 @@
|
||||
{
|
||||
imports = [
|
||||
./audio.nix
|
||||
./avahi.nix
|
||||
./bluetooth.nix
|
||||
./boot.nix
|
||||
./clicks-tailscale.nix
|
||||
./cpu.nix
|
||||
./doas.nix
|
||||
./firewall.nix
|
||||
./fonts.nix
|
||||
./gpg.nix
|
||||
./hardware.nix
|
||||
./hyprland.nix
|
||||
./hyprlock.nix
|
||||
./locale.nix
|
||||
./ly.nix
|
||||
./man.nix
|
||||
./networking.nix
|
||||
./nix-ld.nix
|
||||
./nix.nix
|
||||
./nixos.nix
|
||||
./nvidia.nix
|
||||
./packages.nix
|
||||
./security.nix
|
||||
./ssh.nix
|
||||
./systemd.nix
|
||||
./tailscale.nix
|
||||
./users.nix
|
||||
./xdg.nix
|
||||
./xorg.nix
|
||||
./yubikey.nix
|
||||
./zsh.nix
|
||||
];
|
||||
}
|
11
systems/laptop/default.nix
Normal file
11
systems/laptop/default.nix
Normal file
@ -0,0 +1,11 @@
|
||||
{
|
||||
imports = [
|
||||
./gpg.nix
|
||||
./nix.nix
|
||||
./ssh.nix
|
||||
./zsh.nix
|
||||
./sudo.nix
|
||||
./fonts.nix
|
||||
./packages.nix
|
||||
];
|
||||
}
|
Loading…
Reference in New Issue
Block a user