nix formating, sops secrets migration, vps-init auto update
This commit is contained in:
parent
db022df80b
commit
fcee389f8e
17 changed files with 950 additions and 818 deletions
|
|
@ -1,34 +1,106 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
{
|
||||
imports = [ ../common.nix ./hardware.nix ];
|
||||
{ config, pkgs, ... }: {
|
||||
boot.kernelParams = [ "hibernate.compressor=lz4" ];
|
||||
environment.systemPackages = with pkgs; [ qemu binwalk android-tools ];
|
||||
programs = {
|
||||
niri.enable = true;
|
||||
virt-manager.enable = true;
|
||||
};
|
||||
environment.systemPackages = with pkgs; [
|
||||
android-tools
|
||||
binwalk
|
||||
qemu
|
||||
];
|
||||
hardware = {
|
||||
bluetooth.enable = true;
|
||||
graphics.enable32Bit = true;
|
||||
};
|
||||
users.users.bogale = {
|
||||
uid = 1551;
|
||||
isNormalUser = true;
|
||||
extraGroups = [ "wheel" "libvirtd" "networkmanager" ];
|
||||
users.users.root.hashedPasswordFile = sops.secrets.bogale-passwd.path;
|
||||
imports = [
|
||||
../common.nix
|
||||
./hardware.nix
|
||||
];
|
||||
networking = {
|
||||
firewall.allowedTCPPorts = [ 8000 ];
|
||||
hostName = "nixos-desktop";
|
||||
networkmanager.ensureProfiles.profiles = {
|
||||
dhcp-eth.connection = {
|
||||
id = "dhcp-eth";
|
||||
type = "ethernet";
|
||||
};
|
||||
home-wifi = {
|
||||
ipv4.addresses = "10.1.0.3/16";
|
||||
ipv6.addresses = "fc01::3/64";
|
||||
wifi-security.psk = "$BOGALE_5_PSK";
|
||||
wifi.ssid = "bogale_5";
|
||||
};
|
||||
phone-wifi = {
|
||||
connection = {
|
||||
id = "phone-wifi";
|
||||
type = "wifi";
|
||||
};
|
||||
wifi-security = {
|
||||
key-mgmt = "sae";
|
||||
psk = "$HELLO_WORLD_PSK";
|
||||
};
|
||||
wifi.ssid = "Hello world";
|
||||
};
|
||||
};
|
||||
wg-quick.interfaces.awg0 = {
|
||||
address = [
|
||||
"10.0.0.3/32"
|
||||
"fc00::3/128"
|
||||
];
|
||||
configFile = config.sops.templates.awg2-conf.path;
|
||||
};
|
||||
};
|
||||
programs = {
|
||||
niri.enable = true;
|
||||
virt-manager.enable = true;
|
||||
};
|
||||
services = {
|
||||
displayManager.noctalia-greeter = {
|
||||
cursorTheme = {
|
||||
name = "Bibata-Modern-Amber";
|
||||
package = pkgs.bibata-cursors;
|
||||
};
|
||||
enable = true;
|
||||
passwordlessSyncUsers = [ "bogale" ];
|
||||
settings.cursor.size = 24;
|
||||
};
|
||||
greetd = {
|
||||
enable = true;
|
||||
settings.default_session = {
|
||||
command = "${pkgs.noctalia-greeter}/bin/noctalia-greeter-session";
|
||||
user = "greeter";
|
||||
};
|
||||
};
|
||||
pipewire = {
|
||||
enable = true;
|
||||
pulse.enable = true;
|
||||
};
|
||||
tuned.enable = true;
|
||||
upower = {
|
||||
allowRiskyCriticalPowerAction = true;
|
||||
criticalPowerAction = "Suspend";
|
||||
enable = true;
|
||||
percentageCritical = 10;
|
||||
};
|
||||
};
|
||||
sops = {
|
||||
secrets = {
|
||||
awg2-spec = {};
|
||||
bogale-passwd = {};
|
||||
awg2-spec = { };
|
||||
bogale-passwd = { };
|
||||
};
|
||||
templates.awg2-conf.content = ''
|
||||
${config.sops.placeholder.awg-obf}
|
||||
${config.sops.placeholder.awg2-spec}
|
||||
'';
|
||||
};
|
||||
users.users.bogale = {
|
||||
extraGroups = [
|
||||
"libvirtd"
|
||||
"networkmanager"
|
||||
"wheel"
|
||||
];
|
||||
hashedPasswordFile = config.sops.secrets.bogale-passwd.path;
|
||||
isNormalUser = true;
|
||||
uid = 1551;
|
||||
};
|
||||
virtualisation = {
|
||||
spiceUSBRedirection.enable = true;
|
||||
libvirtd = {
|
||||
enable = true;
|
||||
qemu = {
|
||||
|
|
@ -36,65 +108,6 @@
|
|||
vhostUserPackages = [ pkgs.virtiofsd ];
|
||||
};
|
||||
};
|
||||
};
|
||||
networking = {
|
||||
hostName = "nixos-desktop";
|
||||
firewall.allowedTCPPorts = [ 8000 ];
|
||||
wg-quick.interfaces.awg0 = {
|
||||
address = [ "10.0.0.3/32" "fc00::3/128" ];
|
||||
configFile = config.sops.templates.awg2-conf.path;
|
||||
};
|
||||
networkmanager.ensureProfiles.profiles = {
|
||||
dhcp-eth.connection = {
|
||||
id = "dhcp-eth";
|
||||
type = "ethernet";
|
||||
};
|
||||
home-wifi = {
|
||||
wifi.ssid = "bogale_5";
|
||||
ipv6.addresses = "fc01::3/64";
|
||||
ipv4.addresses = "10.1.0.3/16";
|
||||
wifi-security.psk = "$BOGALE_5_PSK";
|
||||
};
|
||||
phone-wifi = {
|
||||
wifi.ssid = "Hello world";
|
||||
connection = {
|
||||
type = "wifi";
|
||||
id = "phone-wifi";
|
||||
};
|
||||
wifi-security = {
|
||||
key-mgmt = "sae";
|
||||
psk = "$HELLO_WORLD_PSK";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
services = {
|
||||
tuned.enable = true;
|
||||
pipewire = {
|
||||
enable = true;
|
||||
pulse.enable = true;
|
||||
};
|
||||
upower = {
|
||||
enable = true;
|
||||
percentageCritical = 10;
|
||||
criticalPowerAction = "Suspend";
|
||||
allowRiskyCriticalPowerAction = true;
|
||||
};
|
||||
greetd = {
|
||||
enable = true;
|
||||
settings.default_session = {
|
||||
user = "greeter";
|
||||
command = "${pkgs.noctalia-greeter}/bin/noctalia-greeter-session";
|
||||
};
|
||||
};
|
||||
displayManager.noctalia-greeter = {
|
||||
enable = true;
|
||||
settings.cursor.size = 24;
|
||||
passwordlessSyncUsers = [ "bogale" ];
|
||||
cursorTheme = {
|
||||
name = "Bibata-Modern-Amber";
|
||||
package = pkgs.bibata-cursors;
|
||||
};
|
||||
};
|
||||
spiceUSBRedirection.enable = true;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,25 +1,45 @@
|
|||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
{
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
config,
|
||||
lib,
|
||||
modulesPath,
|
||||
...
|
||||
}:
|
||||
{
|
||||
boot = {
|
||||
initrd = {
|
||||
availableKernelModules = [
|
||||
"nvme"
|
||||
"rtsx_usb_sdmmc"
|
||||
"sd_mod"
|
||||
"usb_storage"
|
||||
"xhci_pci"
|
||||
];
|
||||
luks.devices.root.device = "/dev/disk/by-uuid/70ac6613-2e6c-4817-a0ce-43a97efb8bab";
|
||||
};
|
||||
kernelModules = [ "kvm-amd" ];
|
||||
kernelParams = [ "ttm.pages_limit=3014656" ];
|
||||
initrd = {
|
||||
luks.devices.root.device = "/dev/disk/by-uuid/70ac6613-2e6c-4817-a0ce-43a97efb8bab";
|
||||
availableKernelModules = [ "nvme" "xhci_pci" "usb_storage" "sd_mod" "rtsx_usb_sdmmc" ];
|
||||
};
|
||||
};
|
||||
fileSystems = {
|
||||
"/" = {
|
||||
fsType = "ext4";
|
||||
device = "/dev/mapper/root";
|
||||
fsType = "ext4";
|
||||
};
|
||||
"/boot" = {
|
||||
fsType = "vfat";
|
||||
device = "/dev/disk/by-uuid/2610-A769";
|
||||
options = [ "fmask=0077" "dmask=0077" ];
|
||||
fsType = "vfat";
|
||||
options = [
|
||||
"dmask=0077"
|
||||
"fmask=0077"
|
||||
];
|
||||
};
|
||||
};
|
||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
swapDevices = [
|
||||
{
|
||||
device = "/var/lib/swapfile";
|
||||
size = 15 * 1024;
|
||||
}
|
||||
];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue