Compare commits
12 Commits
c81ca5ee4c
...
thancred
| Author | SHA1 | Date | |
|---|---|---|---|
| a3ef9fa59e | |||
| f2ee981953 | |||
| eb666f6a01 | |||
| b8db103e08 | |||
| 08adc255d6 | |||
| ad7f01e41e | |||
| c452ebff3c | |||
| a1e71488d8 | |||
| 45c8f7ec27 | |||
| 67fda15ca9 | |||
| 769ab6f72d | |||
| 1769e583d8 |
25
flake.nix
25
flake.nix
@@ -162,6 +162,31 @@
|
|||||||
# ];
|
# ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
nixosConfigurations."thancred" = nixpkgs.lib.nixosSystem {
|
||||||
|
system = "x86_64-linux";
|
||||||
|
specialArgs = {
|
||||||
|
inherit userName userEmail vintage-story;
|
||||||
|
hostname = "thancred";
|
||||||
|
role = "server";
|
||||||
|
};
|
||||||
|
modules = [
|
||||||
|
myOverlays
|
||||||
|
./modules/common
|
||||||
|
./modules/machine/thancred
|
||||||
|
|
||||||
|
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";
|
||||||
|
|||||||
BIN
home/packages/.linux.nix.swp
Normal file
BIN
home/packages/.linux.nix.swp
Normal file
Binary file not shown.
@@ -31,7 +31,6 @@
|
|||||||
fzf
|
fzf
|
||||||
aria2
|
aria2
|
||||||
gnupg
|
gnupg
|
||||||
inetutils
|
|
||||||
|
|
||||||
# misc
|
# misc
|
||||||
file
|
file
|
||||||
|
|||||||
@@ -3,15 +3,5 @@ lib.mkIf pkgs.stdenv.isLinux {
|
|||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
imv
|
imv
|
||||||
xdg-utils
|
xdg-utils
|
||||||
] ++ lib.optionals isNixOS [
|
|
||||||
betterdiscordctl
|
|
||||||
vesktop
|
|
||||||
xfce.thunar
|
|
||||||
pavucontrol
|
|
||||||
godot
|
|
||||||
aseprite
|
|
||||||
zathura
|
|
||||||
gpu-screen-recorder
|
|
||||||
gpu-screen-recorder-gtk
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
83
modules/machine/thancred/configuration.nix
Normal file
83
modules/machine/thancred/configuration.nix
Normal file
@@ -0,0 +1,83 @@
|
|||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
userName,
|
||||||
|
vintage-story,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
imports = [
|
||||||
|
../../pwrMgmt
|
||||||
|
../../networking/core.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;
|
||||||
|
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;
|
||||||
|
};
|
||||||
|
|
||||||
|
network = {
|
||||||
|
firewall = {
|
||||||
|
enable = true;
|
||||||
|
tcpPorts = {
|
||||||
|
allowedPorts = [ 42420 ];
|
||||||
|
};
|
||||||
|
udpPorts = {
|
||||||
|
allowedPorts = [ 42420 ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
networkManager.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
environment.systemPackages = [
|
||||||
|
vintage-story.packages.${pkgs.system}.default
|
||||||
|
];
|
||||||
|
|
||||||
|
# Podman module (see ../../virtualization/podman.nix)
|
||||||
|
# podman = {
|
||||||
|
# enable = true;
|
||||||
|
# extraPackages = with pkgs; [
|
||||||
|
# docker-credential-helpers
|
||||||
|
# toolbox
|
||||||
|
# cosign
|
||||||
|
# crane
|
||||||
|
# podman-tui
|
||||||
|
# podman-desktop
|
||||||
|
# ];
|
||||||
|
# };
|
||||||
|
|
||||||
|
# Add username to groups "wheel" and "video" - more may be added here later
|
||||||
|
users.users.${userName}.extraGroups = ["wheel" "podman" "network"];
|
||||||
|
|
||||||
|
system.stateVersion = "24.11";
|
||||||
|
}
|
||||||
6
modules/machine/thancred/default.nix
Normal file
6
modules/machine/thancred/default.nix
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
{ ... }: {
|
||||||
|
imports = [
|
||||||
|
./configuration.nix
|
||||||
|
./hardware-configuration.nix
|
||||||
|
];
|
||||||
|
}
|
||||||
32
modules/machine/thancred/hardware-configuration.nix
Normal file
32
modules/machine/thancred/hardware-configuration.nix
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||||
|
# and may be overwritten by future invocations. Please make changes
|
||||||
|
# to /etc/nixos/configuration.nix instead.
|
||||||
|
{ config, lib, pkgs, modulesPath, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports =
|
||||||
|
[ (modulesPath + "/profiles/qemu-guest.nix")
|
||||||
|
];
|
||||||
|
|
||||||
|
boot.initrd.availableKernelModules = [ "ahci" "xhci_pci" "virtio_pci" "virtio_scsi" "sr_mod" "virtio_blk" ];
|
||||||
|
boot.initrd.kernelModules = [ ];
|
||||||
|
boot.kernelModules = [ "kvm-intel" ];
|
||||||
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
|
fileSystems."/" =
|
||||||
|
{ device = "/dev/disk/by-uuid/e2e621c1-0090-472a-99d9-61c6a87bd068";
|
||||||
|
fsType = "ext4";
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/boot" =
|
||||||
|
{ device = "/dev/disk/by-uuid/663E-15C0";
|
||||||
|
fsType = "vfat";
|
||||||
|
options = [ "fmask=0022" "dmask=0022" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
swapDevices =
|
||||||
|
[ { device = "/dev/disk/by-uuid/60104b1a-4285-4dd1-be5e-3c3dee24515a"; }
|
||||||
|
];
|
||||||
|
|
||||||
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user