Rename module directories

This commit is contained in:
SebastianStork 2024-06-30 22:47:18 +02:00
parent 4c0ce1f479
commit 83638c33e2
36 changed files with 2 additions and 2 deletions

View file

@ -1,13 +0,0 @@
{ config, lib, ... }:
{
options.myConfig.auto-gc.enable = lib.mkEnableOption "";
config = lib.mkIf config.myConfig.auto-gc.enable {
programs.nh.enable = true;
programs.nh.clean = {
enable = true;
dates = "daily";
extraArgs = "--keep 10 --keep-since 3d";
};
};
}

View file

@ -1,13 +0,0 @@
{ config, lib, ... }:
{
options.myConfig.bluetooth.enable = lib.mkEnableOption "";
config = lib.mkIf config.myConfig.bluetooth.enable {
hardware.bluetooth = {
enable = true;
powerOnBoot = true;
};
services.blueman.enable = true;
hardware.logitech.wireless.enable = true;
};
}

View file

@ -1,38 +0,0 @@
{ config, lib, ... }:
{
options.myConfig.boot = {
loader.systemd-boot.enable = lib.mkEnableOption "";
silent = lib.mkEnableOption "";
};
config = lib.mkMerge [
(lib.mkIf config.myConfig.boot.loader.systemd-boot.enable {
boot.tmp.cleanOnBoot = true;
boot.loader = {
systemd-boot = {
enable = true;
editor = false;
configurationLimit = 20;
};
efi.canTouchEfiVariables = true;
timeout = 0;
};
systemd.watchdog.rebootTime = "10";
})
(lib.mkIf config.myConfig.boot.silent {
boot = {
kernelParams = [
"quiet"
"rd.systemd.show_status=false"
"rd.udev.log_level=3"
"udev.log_priority=3"
];
consoleLogLevel = 3;
initrd.verbose = false;
initrd.systemd.enable = true;
plymouth.enable = true;
};
})
];
}

View file

@ -1,20 +0,0 @@
{
inputs,
config,
lib,
...
}:
let
cfg = config.myConfig.comma;
in
{
imports = [ inputs.nix-index-database.nixosModules.nix-index ];
options.myConfig.comma.enable = lib.mkEnableOption "";
config = {
programs.command-not-found.enable = !cfg.enable;
programs.nix-index.enable = cfg.enable;
programs.nix-index-database.comma.enable = cfg.enable;
};
}

View file

@ -1,22 +0,0 @@
{
config,
pkgs,
lib,
...
}:
{
options.myConfig.de.hyprland.enable = lib.mkEnableOption "";
config = lib.mkIf config.myConfig.de.hyprland.enable {
programs.hyprland.enable = true;
environment.sessionVariables.NIXOS_OZONE_WL = "1";
xdg.portal = {
enable = true;
extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
};
services.gvfs.enable = true;
};
}

View file

@ -1,20 +0,0 @@
{
imports = [
./flatpak.nix
./virtualisation.nix
./wlan.nix
./comma.nix
./sops.nix
./bluetooth.nix
./de.nix
./dm.nix
./sound.nix
./boot.nix
./printing.nix
./syncthing.nix
./nix-helper.nix
./auto-gc.nix
./geoclue.nix
./tailscale.nix
];
}

View file

@ -1,36 +0,0 @@
{
config,
pkgs,
lib,
...
}:
let
cfg = config.myConfig.dm;
in
{
options.myConfig.dm = {
gdm.enable = lib.mkEnableOption "";
tuigreet.enable = lib.mkEnableOption "";
};
config = {
services.xserver = lib.mkIf cfg.gdm.enable {
enable = true;
displayManager.gdm.enable = true;
};
services.greetd = lib.mkIf cfg.tuigreet.enable {
enable = true;
settings = {
default_session =
let
base = config.services.xserver.displayManager.sessionData.desktops;
in
{
command = "${lib.getExe pkgs.greetd.tuigreet} --time --asterisks --remember --remember-user-session --sessions ${base}/share/wayland-sessions:${base}/share/xsessions";
user = "greeter";
};
};
};
};
}

View file

@ -1,6 +0,0 @@
{ config, lib, ... }:
{
options.myConfig.flatpak.enable = lib.mkEnableOption "";
config = lib.mkIf config.myConfig.flatpak.enable { services.flatpak.enable = true; };
}

View file

@ -1,28 +0,0 @@
{ config, lib, ... }:
{
options.myConfig.geoclue.enable = lib.mkEnableOption "";
config = lib.mkIf config.myConfig.geoclue.enable {
sops = {
secrets.geolocation-api-key = { };
templates."geoclue-location-service.conf" = {
owner = "geoclue";
path = "/etc/geoclue/conf.d/location-service.conf";
content = ''
[wifi]
url=https://www.googleapis.com/geolocation/v1/geolocate?key=${config.sops.placeholder.geolocation-api-key}
'';
};
};
services.geoclue2 = {
enable = true;
appConfig.gammastep = {
isAllowed = true;
isSystem = false;
};
};
};
}

View file

@ -1,20 +0,0 @@
{ config, lib, ... }:
{
options.myConfig.nix-helper.enable = lib.mkEnableOption "";
config = lib.mkIf config.myConfig.nix-helper.enable {
environment.sessionVariables.FLAKE = "/home/seb/Projects/nixos/my-config";
programs.nh.enable = true;
environment.shellAliases =
let
rebuild = "sudo -v && nh os";
in
{
nrs = "${rebuild} switch";
nrt = "${rebuild} test";
nrb = "${rebuild} boot";
nrrb = "nrb && reboot";
};
};
}

View file

@ -1,13 +0,0 @@
{ config, lib, ... }:
{
options.myConfig.printing.enable = lib.mkEnableOption "";
config = lib.mkIf config.myConfig.printing.enable {
services.printing.enable = true;
services.avahi = {
enable = true;
nssmdns4 = true;
openFirewall = true;
};
};
}

View file

@ -1,19 +0,0 @@
{
self,
inputs,
config,
lib,
...
}:
{
imports = [ inputs.sops-nix.nixosModules.sops ];
options.myConfig.sops.enable = lib.mkEnableOption "";
config = lib.mkIf config.myConfig.sops.enable {
sops = {
age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
defaultSopsFile = "${self}/hosts/${config.networking.hostName}/secrets.yaml";
};
};
}

View file

@ -1,16 +0,0 @@
{ config, lib, ... }:
{
options.myConfig.sound.enable = lib.mkEnableOption "";
config = lib.mkIf config.myConfig.sound.enable {
security.rtkit.enable = true;
hardware.pulseaudio.enable = false;
services.pipewire = {
enable = true;
wireplumber.enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
};
};
}

View file

@ -1,76 +0,0 @@
{ config, lib, ... }:
{
options.myConfig.syncthing.enable = lib.mkEnableOption "";
config = lib.mkIf config.myConfig.syncthing.enable {
services.syncthing = {
enable = true;
user = "seb";
group = "users";
dataDir = "/home/seb";
overrideDevices = true;
overrideFolders = true;
settings = {
devices = {
north.id = "ROS2S76-ULQWVFC-7KNQQ6Q-MNIWNKT-2QOPPHY-FFQZNVM-GUJRTHE-NZBM3QY";
inspiron.id = "GUXHL6J-J2HWYNN-7JZJ5CN-6LPYGJD-H7GYRLQ-ORZ4PJJ-5K4WT7I-MELMIQO";
};
folders =
let
allDevices = [
"north"
"inspiron"
];
staggeredVersioning = {
type = "staggered";
params = {
cleanInterval = "3600"; # 1 hour in seconds
maxAge = "15552000"; # 180 days in seconds
};
};
in
{
Documents = {
path = "/home/seb/Documents";
devices = allDevices;
versioning = staggeredVersioning;
ignorePerms = false;
};
Downloads = {
path = "/home/seb/Downloads";
devices = allDevices;
versioning = staggeredVersioning;
ignorePerms = false;
};
Pictures = {
path = "/home/seb/Pictures";
devices = allDevices;
versioning = staggeredVersioning;
ignorePerms = false;
};
Music = {
path = "/home/seb/Music";
devices = allDevices;
versioning = staggeredVersioning;
ignorePerms = false;
};
Videos = {
path = "/home/seb/Videos";
devices = allDevices;
versioning = staggeredVersioning;
ignorePerms = false;
};
Projects = {
path = "/home/seb/Projects";
devices = allDevices;
ignorePerms = false;
};
};
};
};
};
}

View file

@ -1,28 +0,0 @@
{ config, lib, ... }:
let
cfg = config.myConfig.tailscale;
in
{
options.myConfig.tailscale = {
enable = lib.mkEnableOption "";
ssh.enable = lib.mkEnableOption "";
exitNode.enable = lib.mkEnableOption "";
};
config = lib.mkIf cfg.enable {
sops.secrets.tailscale-auth-key.restartUnits = [ "tailscaled-autoconnect.service" ];
services.tailscale = {
enable = true;
authKeyFile = config.sops.secrets.tailscale-auth-key.path;
openFirewall = true;
useRoutingFeatures = if cfg.exitNode.enable then "server" else "client";
extraUpFlags = [
(lib.mkIf cfg.ssh.enable "--ssh")
(lib.mkIf cfg.exitNode.enable "--advertise-exit-node")
];
};
};
}

View file

@ -1,19 +0,0 @@
{
config,
pkgs,
lib,
...
}:
{
options.myConfig.virtualisation.enable = lib.mkEnableOption "";
config = lib.mkIf config.myConfig.virtualisation.enable {
virtualisation.libvirtd.enable = true;
programs.virt-manager.enable = true;
environment.systemPackages = [
pkgs.quickemu
pkgs.quickgui
];
};
}

View file

@ -1,49 +0,0 @@
{
config,
pkgs,
lib,
...
}:
{
options.myConfig.wlan.enable = lib.mkEnableOption "";
config = lib.mkIf config.myConfig.wlan.enable {
sops = {
secrets = {
"wlan/WLAN-233151/key" = { };
"wlan/Fairphone4/key" = { };
};
templates =
let
makePskFile = name: ''
[Security]
Passphrase=${config.sops.placeholder."wlan/${name}/key"}
'';
in
{
"iwd/WLAN-233151.psk".content = makePskFile "WLAN-233151";
"iwd/Fairphone4.psk".content = makePskFile "Fairphone4";
};
};
networking.wireless.iwd = {
enable = true;
settings = {
General.EnableNetworkConfiguration = true;
Settings.AutoConnect = true;
Network.NameResolvingService = "resolvconf";
};
};
systemd.tmpfiles.rules = [
"C /var/lib/iwd/WLAN-233151.psk 0600 root root - ${
config.sops.templates."iwd/WLAN-233151.psk".path
}"
"C /var/lib/iwd/Fairphone4.psk 0600 root root - ${config.sops.templates."iwd/Fairphone4.psk".path}"
];
environment.systemPackages = [ pkgs.iwgtk ];
};
}