user rename
This commit is contained in:
parent
1b9e61f630
commit
82631191ea
33 changed files with 36 additions and 36 deletions
48
nixosConfigurations/muede-pc2/default.nix
Normal file
48
nixosConfigurations/muede-pc2/default.nix
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
{ pkgs, self, ... }:
|
||||
{
|
||||
imports = [
|
||||
./hardware.nix
|
||||
./vscode-server.nix
|
||||
./hass.nix
|
||||
|
||||
self.nixosModules.user-muede
|
||||
self.nixosModules.gnome
|
||||
self.nixosModules.wine-gaming
|
||||
self.nixosModules.steam
|
||||
self.nixosModules.podman
|
||||
self.nixosModules.muede-desktop-settings
|
||||
self.nixosModules.amd-graphics
|
||||
self.nixosModules.secure-boot
|
||||
];
|
||||
|
||||
config = {
|
||||
nix.settings.extra-platforms = [
|
||||
"aarch64-linux"
|
||||
"i686-linux"
|
||||
];
|
||||
|
||||
services.xserver.xkb = {
|
||||
# Configure keymap in X11
|
||||
layout = "de";
|
||||
variant = "";
|
||||
};
|
||||
|
||||
# Configure console keymap
|
||||
console.keyMap = "de";
|
||||
|
||||
users.users.muede.openssh.authorizedKeys.keys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINrY6tcgnoC/xbgL7vxSjddEY9MBxRXe9n2cAHt88/TT home roaming"
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFCJUpbpB3KEKVoKWsKoar9J4RNah8gmQoSH6jQEw5dY pixel-JuiceSSH"
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPDNpLDmctyqGpow/ElQvdhY4BLBPS/sigDJ1QEcC7wC lpt2-roaming"
|
||||
];
|
||||
|
||||
environment.systemPackages = with pkgs; [ lact ];
|
||||
|
||||
networking.firewall.allowedUDPPorts = [
|
||||
# Factorio
|
||||
34197
|
||||
];
|
||||
|
||||
users.users.muede.home = "/home/vinzenz";
|
||||
};
|
||||
}
|
||||
37
nixosConfigurations/muede-pc2/fstab.nix
Normal file
37
nixosConfigurations/muede-pc2/fstab.nix
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
{
|
||||
"/" = {
|
||||
device = "/dev/disk/by-uuid/0e9c983a-e733-447e-8181-f41d6670c4b8";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=@" ];
|
||||
};
|
||||
|
||||
"/home" = {
|
||||
device = "/dev/disk/by-uuid/0e9c983a-e733-447e-8181-f41d6670c4b8";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=@home" ];
|
||||
};
|
||||
|
||||
"/games" = {
|
||||
device = "/dev/disk/by-uuid/0e9c983a-e733-447e-8181-f41d6670c4b8";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=@games" ];
|
||||
};
|
||||
|
||||
"/boot" = {
|
||||
device = "/dev/disk/by-uuid/AF67-8F16";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
#"/mnt/nixos_btrfs_root" = {
|
||||
# # subvolume with id 5 is always the root volume
|
||||
# # this is convenient for managing the flat subvolume hierarchy
|
||||
# device = "/dev/disk/by-uuid/0e9c983a-e733-447e-8181-f41d6670c4b8";
|
||||
# fsType = "btrfs";
|
||||
# options = [ "subvolid=5" ];
|
||||
#};
|
||||
|
||||
"/mnt/ssd2" = {
|
||||
device = "/dev/disk/by-uuid/6b2a647d-c68e-4c07-85bf-c9bfc5db7e8a";
|
||||
fsType = "ext4";
|
||||
};
|
||||
}
|
||||
30
nixosConfigurations/muede-pc2/hardware.nix
Normal file
30
nixosConfigurations/muede-pc2/hardware.nix
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
{ pkgs, lib, ... }:
|
||||
{
|
||||
# amd cpu
|
||||
boot.kernelModules = [ "kvm-amd" ];
|
||||
|
||||
boot = {
|
||||
initrd.availableKernelModules = [
|
||||
"nvme"
|
||||
"xhci_pci"
|
||||
"ahci"
|
||||
"usbhid"
|
||||
"sd_mod"
|
||||
]; # "usb_storage"
|
||||
kernelPackages = pkgs.linuxPackages_zen;
|
||||
supportedFilesystems = [ "btrfs" ];
|
||||
initrd.supportedFilesystems = [ "btrfs" ];
|
||||
loader.efi.efiSysMountPoint = "/boot";
|
||||
};
|
||||
|
||||
fileSystems = import ./fstab.nix;
|
||||
swapDevices = [ ];
|
||||
|
||||
networking = {
|
||||
networkmanager.enable = true;
|
||||
useDHCP = lib.mkDefault true;
|
||||
interfaces.eno1.wakeOnLan.enable = true;
|
||||
};
|
||||
|
||||
hardware.bluetooth.enable = true;
|
||||
}
|
||||
62
nixosConfigurations/muede-pc2/hass.nix
Normal file
62
nixosConfigurations/muede-pc2/hass.nix
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
{ pkgs, ... }:
|
||||
let
|
||||
hass-image = "ghcr.io/home-assistant/home-assistant:stable";
|
||||
hass-service = "podman-homeassistant";
|
||||
in
|
||||
{
|
||||
virtualisation.oci-containers = {
|
||||
backend = "podman";
|
||||
containers.homeassistant = {
|
||||
image = hass-image;
|
||||
hostname = "hass.lan";
|
||||
serviceName = hass-service;
|
||||
volumes = [ "home-assistant:/config" ];
|
||||
environment.TZ = "Europe/Berlin";
|
||||
extraOptions = [ "--network=host" ];
|
||||
};
|
||||
};
|
||||
|
||||
systemd = {
|
||||
timers.update-hass = {
|
||||
timerConfig = {
|
||||
Unit = "update-hass.service";
|
||||
OnCalendar = "Sun 02:00";
|
||||
};
|
||||
wantedBy = [ "timers.target" ];
|
||||
};
|
||||
|
||||
services.update-hass = {
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
ExecStart = pkgs.writeShellScriptBin "update-hass" ''
|
||||
podman pull ${hass-image};
|
||||
systemctl restart ${hass-service};
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
services = {
|
||||
mosquitto = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
nginx = {
|
||||
enable = true;
|
||||
|
||||
recommendedProxySettings = true;
|
||||
recommendedTlsSettings = true;
|
||||
recommendedGzipSettings = true;
|
||||
recommendedOptimisation = true;
|
||||
|
||||
# TODO: add ssl
|
||||
# TODO: add pam auth
|
||||
|
||||
virtualHosts."hass.lan" = {
|
||||
locations."/" = {
|
||||
proxyPass = "localhost:8123";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
26
nixosConfigurations/muede-pc2/vscode-server.nix
Normal file
26
nixosConfigurations/muede-pc2/vscode-server.nix
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
services.openvscode-server = {
|
||||
enable = false;
|
||||
package = pkgs.unstable.openvscode-server;
|
||||
telemetryLevel = "off";
|
||||
port = 8542;
|
||||
host = "127.0.0.1";
|
||||
withoutConnectionToken = true;
|
||||
extraPackages = with pkgs; [
|
||||
nodejs
|
||||
git
|
||||
gh
|
||||
direnv
|
||||
];
|
||||
};
|
||||
|
||||
networking.firewall.allowedTCPPorts = [
|
||||
8542
|
||||
8543
|
||||
8544
|
||||
80
|
||||
1313
|
||||
5201
|
||||
];
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue