initial commit
This commit is contained in:
78
hosts/marpa/configuration.nix
Normal file
78
hosts/marpa/configuration.nix
Normal file
@@ -0,0 +1,78 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
inputs.sops-nix.nixosModules.sops
|
||||
./system/hardware-configuration.nix
|
||||
./services.nix
|
||||
../../modules/system.nix
|
||||
../../modules/sops.nix
|
||||
../../modules/opentablet.nix
|
||||
../../programs/flatpak.nix
|
||||
../../programs/steam.nix
|
||||
];
|
||||
|
||||
sops.secrets.extraHosts = {
|
||||
inherit (config.users.users.root) group;
|
||||
owner = config.users.users.phundrak.name;
|
||||
mode = "0440";
|
||||
};
|
||||
|
||||
security.polkit.enable = true;
|
||||
|
||||
fileSystems."/games" = {
|
||||
device = "/dev/disk/by-uuid/77d32db8-2e85-4593-b6b8-55d4f9d14e1a";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
system = {
|
||||
amdgpu.enable = true;
|
||||
boot.plymouth.enable = true;
|
||||
docker = {
|
||||
enable = true;
|
||||
podman.enable = true;
|
||||
autoprune.enable = true;
|
||||
};
|
||||
networking = {
|
||||
hostname = "marpa";
|
||||
id = "7EA4A111";
|
||||
hostFiles = [config.sops.secrets.extraHosts.path];
|
||||
firewall.openPortRanges = [
|
||||
{
|
||||
# Sunshine
|
||||
from = 1714;
|
||||
to = 1764;
|
||||
}
|
||||
];
|
||||
};
|
||||
sound = {
|
||||
enable = true;
|
||||
jack = true;
|
||||
};
|
||||
};
|
||||
|
||||
security.rtkit.enable = true;
|
||||
|
||||
nix.settings.trusted-users = ["root" "phundrak"];
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
clinfo # AMD
|
||||
curl
|
||||
openssl
|
||||
wget
|
||||
];
|
||||
|
||||
programs.nix-ld.enable = true;
|
||||
|
||||
# This value determines the NixOS release from which the default
|
||||
# settings for stateful data, like file locations and database versions
|
||||
# on your system were taken. It‘s perfectly fine and recommended to leave
|
||||
# this value at the release version of the first install of this system.
|
||||
# Before changing this value read the documentation for this option
|
||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||
system.stateVersion = "23.11"; # Did you read the comment?
|
||||
}
|
||||
23
hosts/marpa/services.nix
Normal file
23
hosts/marpa/services.nix
Normal file
@@ -0,0 +1,23 @@
|
||||
{
|
||||
imports = [
|
||||
../../modules/ssh.nix
|
||||
../../modules/sunshine.nix
|
||||
../../modules/xserver.nix
|
||||
];
|
||||
|
||||
modules = {
|
||||
xserver = {
|
||||
amdgpu.enable = true;
|
||||
de = "gnome";
|
||||
};
|
||||
sunshine = {
|
||||
enable = true;
|
||||
autostart = true;
|
||||
};
|
||||
};
|
||||
services = {
|
||||
printing.enable = true;
|
||||
openssh.enable = true;
|
||||
fwupd.enable = true;
|
||||
};
|
||||
}
|
||||
11
hosts/marpa/services/gnome.nix
Normal file
11
hosts/marpa/services/gnome.nix
Normal file
@@ -0,0 +1,11 @@
|
||||
{
|
||||
services.xserver = {
|
||||
enable = true;
|
||||
displayManager.gdm.enable = true;
|
||||
desktopManager.gnome.enable = true;
|
||||
xkb = {
|
||||
layout = "fr";
|
||||
variant = "bepo_afnor";
|
||||
};
|
||||
};
|
||||
}
|
||||
50
hosts/marpa/system/hardware-configuration.nix
Normal file
50
hosts/marpa/system/hardware-configuration.nix
Normal file
@@ -0,0 +1,50 @@
|
||||
# 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,
|
||||
modulesPath,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot = {
|
||||
initrd.availableKernelModules = ["nvme" "xhci_pci" "ahci" "thunderbolt" "usb_storage" "usbhid" "sd_mod"];
|
||||
initrd.kernelModules = [];
|
||||
kernelModules = ["kvm-amd"];
|
||||
extraModulePackages = [];
|
||||
};
|
||||
|
||||
fileSystems = {
|
||||
"/" = {
|
||||
device = "/dev/disk/by-uuid/3738e245-f6aa-4ed8-a97b-c7bf199a7810";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
"/boot" = {
|
||||
device = "/dev/disk/by-uuid/A2C1-2147";
|
||||
fsType = "vfat";
|
||||
options = ["fmask=0077" "dmask=0077"];
|
||||
};
|
||||
|
||||
"/home" = {
|
||||
device = "/dev/disk/by-uuid/532f1e53-2cd7-4345-82ec-7309f816cfb8";
|
||||
fsType = "btrfs";
|
||||
};
|
||||
};
|
||||
|
||||
swapDevices = [{device = "/dev/disk/by-uuid/acdf872f-274c-4316-aeed-11bb1bbde6b8";}];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||
# still possible to use this option, but it's recommended to use it in conjunction
|
||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.wlp17s0u9.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
Reference in New Issue
Block a user