feat: auto import modules and simplify configs

This commit is contained in:
2026-03-07 15:59:07 +01:00
parent f9706b2958
commit 78dd75ec88
7 changed files with 40 additions and 84 deletions

View File

@@ -2,16 +2,10 @@
pkgs,
lib,
inputs,
userKeys,
...
}:
let
keys = import ../../users/matej/keys.nix;
in
{
imports = [
inputs.self.nixosModules.openssh
];
openssh.enable = true;
image.modules.iso-installer = {
@@ -41,7 +35,7 @@ in
"wheel"
"users"
];
openssh.authorizedKeys.keys = keys.sshAuthorizedKeys;
openssh.authorizedKeys.keys = userKeys.sshAuthorizedKeys or [ ];
};
};

View File

@@ -4,6 +4,7 @@
pkgs,
inputs,
options,
userKeys,
...
}:
@@ -15,31 +16,14 @@ in
imports = [
inputs.nixos-hardware.nixosModules.framework-16-amd-ai-300-series
inputs.stylix.nixosModules.stylix
inputs.self.nixosModules.yubikey
inputs.self.nixosModules.sway
inputs.self.nixosModules.openssh
inputs.self.nixosModules.desktop
inputs.self.nixosModules.printing
inputs.self.nixosModules.zsh
inputs.self.nixosModules.gnupg
inputs.self.nixosModules.tuigreet
inputs.self.nixosModules.workstation
inputs.self.nixosModules.localisation
];
yubikey.enable = true;
openssh.enable = true;
desktop.enable = true;
printing.enable = true;
zsh.enable = true;
gnupg.enable = true;
workstation.enable = true;
tuigreet = {
enable = true;
command = "sway";
};
profiles.desktop.enable = true;
sway.enable = true;
localisation = {
timeZone = "Europe/Ljubljana";
defaultLocale = "en_US.UTF-8";
};
stylix = {
enable = true;
@@ -51,12 +35,6 @@ in
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
localisation = {
enable = true;
timeZone = "Europe/Ljubljana";
defaultLocale = "en_US.UTF-8";
};
# WARN:(@janezicmatej) nix-ld for running pip-installed binaries outside nix, probably want to drop this
programs.nix-ld.enable = true;
programs.nix-ld.libraries = options.programs.nix-ld.libraries.default;

View File

@@ -4,44 +4,27 @@
pkgs,
inputs,
options,
userKeys,
...
}:
{
networking.hostName = "matej-tower";
imports = [
inputs.stylix.nixosModules.stylix
inputs.lanzaboote.nixosModules.lanzaboote
inputs.self.nixosModules.yubikey
inputs.self.nixosModules.sway
inputs.self.nixosModules.openssh
inputs.self.nixosModules.desktop
inputs.self.nixosModules.printing
inputs.self.nixosModules.zsh
inputs.self.nixosModules.gnupg
inputs.self.nixosModules.tuigreet
inputs.self.nixosModules.workstation
inputs.self.nixosModules.initrd-ssh
inputs.self.nixosModules.localisation
];
yubikey.enable = true;
openssh.enable = true;
desktop.enable = true;
printing.enable = true;
zsh.enable = true;
gnupg.enable = true;
workstation.enable = true;
tuigreet = {
enable = true;
command = "sway";
};
sway.enable = true;
profiles.desktop.enable = true;
initrd-ssh = {
enable = true;
networkModule = "r8169";
authorizedKeys = userKeys.sshAuthorizedKeys;
};
localisation = {
timeZone = "Europe/Ljubljana";
defaultLocale = "en_US.UTF-8";
};
stylix = {
@@ -60,12 +43,6 @@
pkiBundle = "/var/lib/sbctl";
};
localisation = {
enable = true;
timeZone = "Europe/Ljubljana";
defaultLocale = "en_US.UTF-8";
};
services.udisks2.enable = true;
programs._1password.enable = true;
@@ -83,6 +60,8 @@
easyeffects
];
networking.hostName = "matej-tower";
xdg.mime.defaultApplications = {
"application/pdf" = "org.pwmt.zathura.desktop";
};