Skip to content

Commit

Permalink
feat: rearrange configs
Browse files Browse the repository at this point in the history
  • Loading branch information
uku3lig committed May 12, 2024
1 parent c60e8df commit 21ce06c
Show file tree
Hide file tree
Showing 7 changed files with 54 additions and 40 deletions.
15 changes: 15 additions & 0 deletions configs/client.nix
Original file line number Diff line number Diff line change
@@ -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"];
};
}
15 changes: 1 addition & 14 deletions configs/common.nix
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,6 @@ in {
git
curl
wget
nil
ffmpeg
yt-dlp
hyfetch
htop
];

Expand All @@ -55,16 +51,7 @@ in {
};
};

hm = {
home = {inherit stateVersion;};

programs.keychain = {
enable = true;
agents = ["ssh"];
inheritType = "any";
keys = ["id_ed25519"];
};
};
hm.home = {inherit stateVersion;};

home-manager = {
useGlobalPkgs = true;
Expand Down
15 changes: 0 additions & 15 deletions configs/desktop.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
lib,
pkgs,
config,
catppuccin,
Expand All @@ -10,20 +9,8 @@
boot = {
extraModulePackages = with config.boot.kernelPackages; [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 = {
packages = with pkgs; [
iosevka
Expand Down Expand Up @@ -76,8 +63,6 @@
(vesktop.override {withSystemVencord = false;})
wine-discord-ipc-bridge
];

stateVersion = "23.11";
};

services = {
Expand Down
19 changes: 19 additions & 0 deletions configs/physical-computer.nix
Original file line number Diff line number Diff line change
@@ -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 changes: 3 additions & 0 deletions configs/server.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
services.tailscale.extraUpFlags = ["--advertise-exit-node"];
}
20 changes: 15 additions & 5 deletions systems/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,29 @@

mapNixOS = lib.mapAttrs (toSystem inputs.nixpkgs.lib.nixosSystem);

nixos = with inputs; [
_common = with inputs; [
../configs/common.nix
agenix.nixosModules.default
home-manager.nixosModules.home-manager
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;
[
../configs/desktop.nix
lanzaboote.nixosModules.lanzaboote
catppuccin.nixosModules.catppuccin
]
++ nixos;
++ physical-computer
++ client;
in {
flake.nixosConfigurations = mapNixOS {
fuji = {
Expand All @@ -47,7 +56,7 @@ in {
fuji-wsl = {
system = "x86_64-linux";
modules =
nixos
client
++ (with inputs; [
nixos-wsl.nixosModules.default
]);
Expand All @@ -61,7 +70,8 @@ in {
etna = {
system = "x86_64-linux";
modules =
nixos
server
++ physical-computer
++ (with inputs; [
api-rs.nixosModules.default
ukubot-rs.nixosModules.default
Expand Down
7 changes: 1 addition & 6 deletions systems/etna/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,11 @@ in {
};
};

boot = {
loader.systemd-boot.enable = true;
kernelPackages = lib.mkForce pkgs.linuxPackages_6_1;
};
boot.kernelPackages = lib.mkForce pkgs.linuxPackages_6_1;

services = {
openssh.openFirewall = true;

tailscale.extraUpFlags = ["--advertise-exit-node"];

cloudflared = {
enable = true;
tunnels.${tunnelId} = {
Expand Down

0 comments on commit 21ce06c

Please sign in to comment.