wip: yshtola build in progress
This commit is contained in:
25
flake.nix
25
flake.nix
@@ -162,6 +162,31 @@
|
|||||||
# ];
|
# ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
nixosConfigurations."yshtola" = nixpkgs.lib.nixosSystem {
|
||||||
|
system = "x86_64-linux";
|
||||||
|
specialArgs = {
|
||||||
|
inherit userName userEmail;
|
||||||
|
hostname = "yshtola";
|
||||||
|
role = "server";
|
||||||
|
};
|
||||||
|
modules = [
|
||||||
|
myOverlays
|
||||||
|
./modules/common
|
||||||
|
./modules/machine/yshtola
|
||||||
|
|
||||||
|
home-manager.nixosModules.home-manager
|
||||||
|
{
|
||||||
|
home-manager.useGlobalPkgs = true;
|
||||||
|
home-manager.useUserPackages = true;
|
||||||
|
home-manager.extraSpecialArgs = extraSpecialArgs // { isNixOS = true; role = "server"; };
|
||||||
|
home-manager.backupFileExtension = "bak";
|
||||||
|
home-manager.users.${userName}.imports = [
|
||||||
|
./home
|
||||||
|
];
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
# generic non-NixOS Linux machine
|
# generic non-NixOS Linux machine
|
||||||
homeConfigurations."generic" = let
|
homeConfigurations."generic" = let
|
||||||
hostname = builtins.getEnv "HOSTNAME";
|
hostname = builtins.getEnv "HOSTNAME";
|
||||||
|
|||||||
93
modules/machine/yshtola/configuration.nix
Normal file
93
modules/machine/yshtola/configuration.nix
Normal file
@@ -0,0 +1,93 @@
|
|||||||
|
|
||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
userName,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
imports = [
|
||||||
|
../../pwrMgmt
|
||||||
|
../../networking/core.nix
|
||||||
|
../../networking/dns.nix
|
||||||
|
../../virtualization/podman.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
# Enable flakes for NixOS
|
||||||
|
nix.settings.experimental-features = ["nix-command" "flakes"];
|
||||||
|
|
||||||
|
# Custom kernel/boot stuff
|
||||||
|
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||||
|
boot.loader.systemd-boot.enable = true; # TODO: check on this
|
||||||
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
|
|
||||||
|
# Set your timezone
|
||||||
|
time.timeZone = "America/Detroit";
|
||||||
|
|
||||||
|
# Enable OpenSSH
|
||||||
|
services.openssh.enable = true;
|
||||||
|
|
||||||
|
# Enable keyring
|
||||||
|
services.gnome.gnome-keyring.enable = true;
|
||||||
|
|
||||||
|
# Enable GnuPG
|
||||||
|
programs.gnupg.agent = {
|
||||||
|
enable = true;
|
||||||
|
enableSSHSupport = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Enable SUID wrappers (some programs need them)
|
||||||
|
programs.mtr.enable = true;
|
||||||
|
|
||||||
|
# Enable Polkit
|
||||||
|
security.polkit.enable = true;
|
||||||
|
|
||||||
|
# Power management (see ../../pwrMgmt/default.nix)
|
||||||
|
pwrMgmt = {
|
||||||
|
enable = true;
|
||||||
|
cpuFreqGovernor = "performance";
|
||||||
|
powertop.enable = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Podman module (see ../../virtualization/podman.nix)
|
||||||
|
# podman = {
|
||||||
|
# enable = true;
|
||||||
|
# extraPackages = with pkgs; [
|
||||||
|
# docker-credential-helpers
|
||||||
|
# toolbox
|
||||||
|
# cosign
|
||||||
|
# crane
|
||||||
|
# podman-tui
|
||||||
|
# podman-desktop
|
||||||
|
# ];
|
||||||
|
# };
|
||||||
|
|
||||||
|
# Core networking module (see ../../networking/core.nix)
|
||||||
|
network = {
|
||||||
|
firewall.enable = true;
|
||||||
|
networkManager.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Add username to groups "wheel" and "video" - more may be added here later
|
||||||
|
users.users.${userName}.extraGroups = ["wheel" "video" "network"];
|
||||||
|
|
||||||
|
# fail2ban
|
||||||
|
services.fail2ban = {
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
# Matrix server
|
||||||
|
services.matrix-tuwunel = {
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
# LiveKit (MatrixRTC)
|
||||||
|
services.livekit = {
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
# TURN/STUN server
|
||||||
|
services.coturn = {
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
system.stateVersion = "25.11";
|
||||||
|
}
|
||||||
6
modules/machine/yshtola/default.nix
Normal file
6
modules/machine/yshtola/default.nix
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
{ ... }: {
|
||||||
|
imports = [
|
||||||
|
./configuration.nix
|
||||||
|
./hardware-configuration.nix
|
||||||
|
];
|
||||||
|
}
|
||||||
0
modules/machine/yshtola/hardware-configuration.nix
Normal file
0
modules/machine/yshtola/hardware-configuration.nix
Normal file
Reference in New Issue
Block a user