feat: rearrange configs
This commit is contained in:
parent
c60e8df3e3
commit
21ce06c82d
7 changed files with 54 additions and 40 deletions
15
configs/client.nix
Normal file
15
configs/client.nix
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
{pkgs, ...}: {
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
nil
|
||||||
|
ffmpeg
|
||||||
|
yt-dlp
|
||||||
|
hyfetch
|
||||||
|
];
|
||||||
|
|
||||||
|
hm.programs.keychain = {
|
||||||
|
enable = true;
|
||||||
|
agents = ["ssh"];
|
||||||
|
inheritType = "any";
|
||||||
|
keys = ["id_ed25519"];
|
||||||
|
};
|
||||||
|
}
|
|
@ -43,10 +43,6 @@ in {
|
||||||
git
|
git
|
||||||
curl
|
curl
|
||||||
wget
|
wget
|
||||||
nil
|
|
||||||
ffmpeg
|
|
||||||
yt-dlp
|
|
||||||
hyfetch
|
|
||||||
htop
|
htop
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -55,16 +51,7 @@ in {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
hm = {
|
hm.home = {inherit stateVersion;};
|
||||||
home = {inherit stateVersion;};
|
|
||||||
|
|
||||||
programs.keychain = {
|
|
||||||
enable = true;
|
|
||||||
agents = ["ssh"];
|
|
||||||
inheritType = "any";
|
|
||||||
keys = ["id_ed25519"];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
home-manager = {
|
home-manager = {
|
||||||
useGlobalPkgs = true;
|
useGlobalPkgs = true;
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
{
|
{
|
||||||
lib,
|
|
||||||
pkgs,
|
pkgs,
|
||||||
config,
|
config,
|
||||||
catppuccin,
|
catppuccin,
|
||||||
|
@ -10,20 +9,8 @@
|
||||||
boot = {
|
boot = {
|
||||||
extraModulePackages = with config.boot.kernelPackages; [v4l2loopback];
|
extraModulePackages = with config.boot.kernelPackages; [v4l2loopback];
|
||||||
kernelModules = ["v4l2loopback"];
|
kernelModules = ["v4l2loopback"];
|
||||||
|
|
||||||
loader = {
|
|
||||||
systemd-boot.enable = lib.mkForce false;
|
|
||||||
efi.canTouchEfiVariables = true;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
lanzaboote = {
|
|
||||||
enable = true;
|
|
||||||
pkiBundle = "/etc/secureboot";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [sbctl];
|
|
||||||
|
|
||||||
fonts = {
|
fonts = {
|
||||||
packages = with pkgs; [
|
packages = with pkgs; [
|
||||||
iosevka
|
iosevka
|
||||||
|
@ -76,8 +63,6 @@
|
||||||
(vesktop.override {withSystemVencord = false;})
|
(vesktop.override {withSystemVencord = false;})
|
||||||
wine-discord-ipc-bridge
|
wine-discord-ipc-bridge
|
||||||
];
|
];
|
||||||
|
|
||||||
stateVersion = "23.11";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
services = {
|
services = {
|
||||||
|
|
19
configs/physical-computer.nix
Normal file
19
configs/physical-computer.nix
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
{
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
boot = {
|
||||||
|
loader = {
|
||||||
|
systemd-boot.enable = lib.mkForce false;
|
||||||
|
efi.canTouchEfiVariables = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
lanzaboote = {
|
||||||
|
enable = true;
|
||||||
|
pkiBundle = "/etc/secureboot";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [sbctl];
|
||||||
|
}
|
3
configs/server.nix
Normal file
3
configs/server.nix
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
services.tailscale.extraUpFlags = ["--advertise-exit-node"];
|
||||||
|
}
|
|
@ -23,20 +23,29 @@
|
||||||
|
|
||||||
mapNixOS = lib.mapAttrs (toSystem inputs.nixpkgs.lib.nixosSystem);
|
mapNixOS = lib.mapAttrs (toSystem inputs.nixpkgs.lib.nixosSystem);
|
||||||
|
|
||||||
nixos = with inputs; [
|
_common = with inputs; [
|
||||||
../configs/common.nix
|
../configs/common.nix
|
||||||
agenix.nixosModules.default
|
agenix.nixosModules.default
|
||||||
home-manager.nixosModules.home-manager
|
home-manager.nixosModules.home-manager
|
||||||
vscode-server.nixosModules.default
|
vscode-server.nixosModules.default
|
||||||
];
|
];
|
||||||
|
|
||||||
|
physical-computer = with inputs; [
|
||||||
|
../configs/physical-computer.nix
|
||||||
|
lanzaboote.nixosModules.lanzaboote
|
||||||
|
];
|
||||||
|
|
||||||
|
client = [../configs/client.nix] ++ _common;
|
||||||
|
|
||||||
|
server = [../configs/server.nix] ++ _common;
|
||||||
|
|
||||||
desktop = with inputs;
|
desktop = with inputs;
|
||||||
[
|
[
|
||||||
../configs/desktop.nix
|
../configs/desktop.nix
|
||||||
lanzaboote.nixosModules.lanzaboote
|
|
||||||
catppuccin.nixosModules.catppuccin
|
catppuccin.nixosModules.catppuccin
|
||||||
]
|
]
|
||||||
++ nixos;
|
++ physical-computer
|
||||||
|
++ client;
|
||||||
in {
|
in {
|
||||||
flake.nixosConfigurations = mapNixOS {
|
flake.nixosConfigurations = mapNixOS {
|
||||||
fuji = {
|
fuji = {
|
||||||
|
@ -47,7 +56,7 @@ in {
|
||||||
fuji-wsl = {
|
fuji-wsl = {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
modules =
|
modules =
|
||||||
nixos
|
client
|
||||||
++ (with inputs; [
|
++ (with inputs; [
|
||||||
nixos-wsl.nixosModules.default
|
nixos-wsl.nixosModules.default
|
||||||
]);
|
]);
|
||||||
|
@ -61,7 +70,8 @@ in {
|
||||||
etna = {
|
etna = {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
modules =
|
modules =
|
||||||
nixos
|
server
|
||||||
|
++ physical-computer
|
||||||
++ (with inputs; [
|
++ (with inputs; [
|
||||||
api-rs.nixosModules.default
|
api-rs.nixosModules.default
|
||||||
ukubot-rs.nixosModules.default
|
ukubot-rs.nixosModules.default
|
||||||
|
|
|
@ -32,16 +32,11 @@ in {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
boot = {
|
boot.kernelPackages = lib.mkForce pkgs.linuxPackages_6_1;
|
||||||
loader.systemd-boot.enable = true;
|
|
||||||
kernelPackages = lib.mkForce pkgs.linuxPackages_6_1;
|
|
||||||
};
|
|
||||||
|
|
||||||
services = {
|
services = {
|
||||||
openssh.openFirewall = true;
|
openssh.openFirewall = true;
|
||||||
|
|
||||||
tailscale.extraUpFlags = ["--advertise-exit-node"];
|
|
||||||
|
|
||||||
cloudflared = {
|
cloudflared = {
|
||||||
enable = true;
|
enable = true;
|
||||||
tunnels.${tunnelId} = {
|
tunnels.${tunnelId} = {
|
||||||
|
|
Loading…
Reference in a new issue