hosts
This commit is contained in:
parent
95ea2899ea
commit
9e441e1aaf
11 changed files with 172 additions and 1 deletions
10
system/audio.nix
Normal file
10
system/audio.nix
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
{...}: {
|
||||
security.rtkit.enable = true;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
# jack.enable = true;
|
||||
};
|
||||
}
|
||||
3
system/bluetooth.nix
Normal file
3
system/bluetooth.nix
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
{...}: {
|
||||
hardware.bluetooth.enable = true;
|
||||
}
|
||||
6
system/boot.nix
Normal file
6
system/boot.nix
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
{pkgs, ...}: {
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
}
|
||||
10
system/btrfs.nix
Normal file
10
system/btrfs.nix
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
{...}: {
|
||||
services.btrfs.autoScrub = {
|
||||
enable = true;
|
||||
interval = "Fri 07:00";
|
||||
fileSystems = [
|
||||
"/persistent"
|
||||
"/nix"
|
||||
];
|
||||
};
|
||||
}
|
||||
6
system/env.nix
Normal file
6
system/env.nix
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
{...}: {
|
||||
environment.variables = {
|
||||
EDITOR = "hx";
|
||||
VISUAL = "hx";
|
||||
};
|
||||
}
|
||||
5
system/fonts.nix
Normal file
5
system/fonts.nix
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{pkgs, ...}: {
|
||||
fonts.packages = with pkgs; [
|
||||
(nerdfonts.override {fonts = ["JetBrainsMono"];})
|
||||
];
|
||||
}
|
||||
26
system/networking.nix
Normal file
26
system/networking.nix
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
{conf, ...}: {
|
||||
networking.hostName = conf.hostname;
|
||||
networking.networkmanager = {
|
||||
enable = true;
|
||||
wifi.macAddress = "random";
|
||||
ethernet.macAddress = "random";
|
||||
};
|
||||
|
||||
networking.firewall = {
|
||||
enable = true;
|
||||
|
||||
allowedTCPPorts = [
|
||||
22 # ssh
|
||||
22000 # syncthing
|
||||
];
|
||||
|
||||
extraCommands = ''
|
||||
ip46tables -t mangle -I nixos-fw-rpfilter -p udp -m udp --sport 51820 -j RETURN
|
||||
ip46tables -t mangle -I nixos-fw-rpfilter -p udp -m udp --dport 51820 -j RETURN
|
||||
'';
|
||||
extraStopCommands = ''
|
||||
ip46tables -t mangle -D nixos-fw-rpfilter -p udp -m udp --sport 51820 -j RETURN || true
|
||||
ip46tables -t mangle -D nixos-fw-rpfilter -p udp -m udp --dport 51820 -j RETURN || true
|
||||
'';
|
||||
};
|
||||
}
|
||||
15
system/nix.nix
Normal file
15
system/nix.nix
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
{nixpkgs, ...}: {
|
||||
nixPath = ["nixpkgs=${nixpkgs}"];
|
||||
gc = {
|
||||
automatic = true;
|
||||
dates = "05:30";
|
||||
options = "--delete-older-than 7d";
|
||||
|
||||
settings = {
|
||||
keep-outputs = true;
|
||||
auto-optimise-store = true;
|
||||
experimental-features = ["nix-command" "flakes"];
|
||||
trusted-users = ["root" "@wheel"];
|
||||
};
|
||||
};
|
||||
}
|
||||
39
system/persistence.nix
Normal file
39
system/persistence.nix
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
{
|
||||
conf,
|
||||
impermanence,
|
||||
...
|
||||
}: {
|
||||
imports = [impermanence.nixosModule];
|
||||
|
||||
environment.persistence."/persist/data" = {
|
||||
hideMounts = true;
|
||||
directories = [
|
||||
"/etc/NetworkManager/system-connections"
|
||||
"/var/log"
|
||||
"/var/lib/bluetooth"
|
||||
"/var/lib/nixos"
|
||||
"/var/lib/systemd/coredump"
|
||||
"/var/lib/bluetooth"
|
||||
];
|
||||
files = [];
|
||||
|
||||
users.${conf.user} = (import ../home/persistence.nix).data;
|
||||
};
|
||||
|
||||
environment.persistence."/persist/cache" = {
|
||||
hideMounts = true;
|
||||
directories = [
|
||||
"/root/.cache/nix"
|
||||
"/var/lib/btrfs"
|
||||
"/var/lib/nixos"
|
||||
"/var/lib/systemd/backlight"
|
||||
"/var/lib/systemd/timers"
|
||||
"/var/log"
|
||||
];
|
||||
files = [
|
||||
"/etc/machine-id"
|
||||
];
|
||||
|
||||
users.${conf.user} = (import ../home/persistence.nix).cache;
|
||||
};
|
||||
}
|
||||
14
system/steam.nix
Normal file
14
system/steam.nix
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
options.gaming.enable = lib.mkEnableOption "Enable gaming";
|
||||
|
||||
config = lib.mkIf config.gaming.enable {
|
||||
programs.steam = {
|
||||
enable = true;
|
||||
remotePlay.openFirewall = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue