325 current 1970-01-01 01:00:00 23.11.20240518.e7cc617 6.6.30-rt30 *

This commit is contained in:
Max Känner 2024-05-20 19:58:09 +02:00
parent 01275a4785
commit d712b4d00d
4 changed files with 187 additions and 136 deletions

View File

@ -14,6 +14,11 @@
inputs.home-manager.nixosModules.default
];
music.enable = true;
greetd.enable = true;
wifi.enable = true;
wifi.tray = true;
hardware.opengl = {
enable = true;
extraPackages = with pkgs; [
@ -26,8 +31,6 @@
];
};
hardware.spacenavd.enable = true;
# Bootloader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;

View File

@ -1,8 +1,3 @@
{...}: {
imports = [./greetd.nix ./rebuild.nix ./sops.nix ./sway.nix ./wifi.nix ./music.nix];
config = {
music.enable = true;
greetd.enable = true;
};
}

View File

@ -1,4 +1,15 @@
{sops, ...}: {
{
lib,
config,
...
}: let
cfg = config.secrets;
in {
options = {
secrets.enable = lib.mkEnableOption "sops, an secrets manager";
};
config = lib.mkIf cfg.enable {
sops = {
age.keyFile = /home/max/.config/sops/age/keys.txt;
secrets = {
@ -31,4 +42,5 @@
};
};
};
};
}

View File

@ -1,9 +1,63 @@
{
lib,
config,
pkgs,
...
}: {
sops.templates = let
}: let
cfg = config.wifi;
in {
options = {
wifi.enable = lib.mkEnableOption "wifi";
wifi.tray = lib.mkEnableOption "nm tray entry";
};
config = lib.mkIf cfg.enable {
environment.etc = let
template = config.sops.templates;
base = "NetworkManager/system-connections";
in {
"${base}/home.nmconnection".source = template."home.nmconnection".path;
"${base}/parents.nmconnection".source = template."parents.nmconnection".path;
"${base}/eduroam.nmconnection".source = template."eduroam.nmconnection".path;
"${base}/luhbots.nmconnection".source = template."luhbots.nmconnection".path;
"${base}/luhbots5.nmconnection".source = template."luhbots5.nmconnection".path;
};
networking.networkmanager.enable = true;
environment.systemPackages = lib.optional cfg.tray pkgs.nm-tray;
secrets.enable = true;
sops = {
secrets = {
"home/ssid" = {
sopsFile = ../../secrets/wifi.yaml;
};
"home/psk" = {
sopsFile = ../../secrets/wifi.yaml;
};
"parents/ssid" = {
sopsFile = ../../secrets/wifi.yaml;
};
"parents/psk" = {
sopsFile = ../../secrets/wifi.yaml;
};
"eduroam/ident" = {
sopsFile = ../../secrets/wifi.yaml;
};
"eduroam/psk" = {
sopsFile = ../../secrets/wifi.yaml;
};
"luhbots/ssid" = {
sopsFile = ../../secrets/wifi.yaml;
};
"luhbots/ssid5" = {
sopsFile = ../../secrets/wifi.yaml;
};
"luhbots/psk" = {
sopsFile = ../../secrets/wifi.yaml;
};
};
templates = let
placeholder = config.sops.placeholder;
in {
"home.nmconnection".content = ''
@ -88,19 +142,6 @@
psk=${placeholder."luhbots/psk"}
'';
};
environment.etc = let
template = config.sops.templates;
base = "NetworkManager/system-connections";
in {
"${base}/home.nmconnection".source = template."home.nmconnection".path;
"${base}/parents.nmconnection".source = template."parents.nmconnection".path;
"${base}/eduroam.nmconnection".source = template."eduroam.nmconnection".path;
"${base}/luhbots.nmconnection".source = template."luhbots.nmconnection".path;
"${base}/luhbots5.nmconnection".source = template."luhbots5.nmconnection".path;
};
networking.networkmanager.enable = true;
environment.systemPackages = with pkgs; [
nm-tray
];
};
}