Format code with alejandra

This commit is contained in:
2025-04-28 22:17:11 +02:00
parent 7d17c52192
commit 68da077c72
90 changed files with 502 additions and 691 deletions

View File

@ -1,11 +1,9 @@
# Common config for all hosts
{
inputs,
outputs,
...
}:
{
}: {
imports =
[
./fish.nix # fish for admin
@ -34,5 +32,4 @@
home-manager.extraSpecialArgs = {
inherit inputs outputs;
};
}

View File

@ -2,9 +2,7 @@
lib,
outputs,
...
}:
{
}: {
# Apply overlays
nixpkgs = {
# TODO: apply this to hm and nixos without duplicate code
@ -61,5 +59,4 @@
# Add each flake input as a registry and nix_path
# registry = lib.mapAttrs (_: flake: { inherit flake; }) flakeInputs;
# nixPath = lib.mapAttrsToList (n: _: "${n}=flake:${n}") flakeInputs;
}

View File

@ -1,6 +1,4 @@
{ pkgs, ... }:
{
{pkgs, ...}: {
# Packages needed as root
environment.systemPackages = with pkgs; [
vim

View File

@ -2,14 +2,12 @@
inputs,
config,
...
}:
let
}: let
isEd25519 = k: k.type == "ed25519";
getKeyPath = k: k.path;
keys = builtins.filter isEd25519 config.services.openssh.hostKeys;
in
{
imports = [ inputs.sops-nix.nixosModules.sops ];
in {
imports = [inputs.sops-nix.nixosModules.sops];
sops.age = {
sshKeyPaths = map getKeyPath keys;
@ -18,7 +16,6 @@ in
keyFile = "/home/julian/.config/sops/age/keys.txt";
# Generate key if none of the above worked. With this, building will still work, just without secrets
generateKey = true;
};
sops.defaultSopsFile = ../secrets.yaml;

View File

@ -1,5 +1,4 @@
{ pkgs, ... }:
{
{pkgs, ...}: {
# Make programs like nextcloud client access saved passwords
programs.seahorse.enable = true;
services.gnome.gnome-keyring.enable = true;
@ -9,9 +8,9 @@
systemd = {
user.services.polkit-gnome-authentication-agent-1 = {
description = "polkit-gnome-authentication-agent-1";
wantedBy = [ "graphical-session.target" ];
wants = [ "graphical-session.target" ];
after = [ "graphical-session.target" ];
wantedBy = ["graphical-session.target"];
wants = ["graphical-session.target"];
after = ["graphical-session.target"];
serviceConfig = {
Type = "simple";
ExecStart = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1";

View File

@ -1,10 +1,6 @@
{
pkgs,
...
}:
{
{pkgs, ...}: {
services.flatpak.enable = true;
xdg.portal.enable = true;
xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
xdg.portal.extraPortals = [pkgs.xdg-desktop-portal-gtk];
xdg.portal.config.common.default = "*"; # Use first portal implementation found
}

View File

@ -1,6 +1,4 @@
{ pkgs, ... }:
{
{pkgs, ...}: {
programs.gamemode = {
enable = true;
settings = {
@ -20,5 +18,4 @@
};
};
};
}

View File

@ -3,10 +3,7 @@
lib,
pkgs,
...
}:
{
}: {
services.xserver.displayManager.gdm = {
enable = true;
};

View File

@ -3,26 +3,22 @@
lib,
config,
...
}:
let
}: let
homeCfgs = config.home-manager.users;
homeSharePaths = lib.mapAttrsToList (_: v: "${v.home.path}/share") homeCfgs;
vars = ''XDG_DATA_DIRS="$XDG_DATA_DIRS:${lib.concatStringsSep ":" homeSharePaths}" GTK_USE_PORTAL=0'';
julianCfg = homeCfgs.julian;
sway-kiosk =
command:
"${lib.getExe pkgs.sway} --unsupported-gpu --config ${pkgs.writeText "kiosk.config" ''
output * bg #000000 solid_color
xwayland disable
input "type:touchpad" {
tap enabled
}
exec '${vars} ${command}; ${pkgs.sway}/bin/swaymsg exit'
''}";
in
{
sway-kiosk = command: "${lib.getExe pkgs.sway} --unsupported-gpu --config ${pkgs.writeText "kiosk.config" ''
output * bg #000000 solid_color
xwayland disable
input "type:touchpad" {
tap enabled
}
exec '${vars} ${command}; ${pkgs.sway}/bin/swaymsg exit'
''}";
in {
users.extraUsers.greeter = {
# For caching and such
home = "/tmp/greeter-home";

View File

@ -4,13 +4,10 @@
pkgs,
inputs,
...
}:
{
}: {
programs.hyprland.enable = true;
programs.hyprland.package = inputs.hyprland.packages.${pkgs.system}.hyprland; # does only work with nixos-unstable
programs.hyprland.xwayland.enable = true;
security.pam.services.hyprlock = { };
security.pam.services.hyprlock = {};
services.displayManager.defaultSession = "hyprland";
}

View File

@ -3,8 +3,7 @@
lib,
pkgs,
...
}:
{
}: {
services.xserver.windowManager.i3.enable = true;
services.xserver.windowManager.i3.package = pkgs.i3-gaps;
services.displayManager.defaultSession = "none+i3";

View File

@ -1,5 +1,4 @@
{
security.krb5.enable = true;
security.krb5.settings = {
# domain_realm = {
@ -15,7 +14,7 @@
};
realms = {
"julian-mutter.de" = {
kdc = [ "kerberos.julian-mutter.de" ];
kdc = ["kerberos.julian-mutter.de"];
admin_server = "kerberos-admin.julian-mutter.de";
default_domain = "julian-mutter.de";
};

View File

@ -3,11 +3,9 @@
lib,
config,
...
}:
let
}: let
hosts = lib.attrNames outputs.nixosConfigurations;
in
{
in {
services.openssh = {
enable = true;
settings = {
@ -48,5 +46,4 @@ in
# ]);
# });
# };
}

View File

@ -1,8 +1,4 @@
{
pkgs,
...
}:
{
{pkgs, ...}: {
environment.systemPackages = with pkgs; [
shared-mime-info # extended mimetype support
lxde.lxmenu-data # open with "Installed Applications"

View File

@ -1,8 +1,6 @@
{ config, ... }:
let
{config, ...}: let
dockerEnabled = config.virtualisation.docker.enable;
in
{
in {
virtualisation.podman = {
enable = true;
dockerCompat = !dockerEnabled;

View File

@ -3,10 +3,7 @@
lib,
pkgs,
...
}:
{
}: {
# Set location used by redshift
location.provider = "manual";
location.latitude = 47.92;

View File

@ -19,7 +19,7 @@
"big-parallel"
"kvm"
];
mandatoryFeatures = [ ];
mandatoryFeatures = [];
}
# {
# hostName = "localhost";

View File

@ -3,10 +3,7 @@
lib,
pkgs,
...
}:
{
}: {
programs.thunar.enable = true;
programs.xfconf.enable = true; # Persist saved preferences
programs.thunar.plugins = with pkgs.xfce; [

View File

@ -3,13 +3,10 @@
lib,
pkgs,
...
}:
{
}: {
virtualisation.virtualbox.host.enable = true;
# virtualisation.virtualbox.host.enableExtensionPack = true;
# virtualisation.virtualbox.guest.enable = true;
# virtualisation.virtualbox.guest.x11 = true;
users.extraGroups.vboxusers.members = [ "julian" ];
users.extraGroups.vboxusers.members = ["julian"];
}

View File

@ -3,11 +3,9 @@
config,
lib,
...
}:
let
}: let
ifTheyExist = groups: builtins.filter (group: builtins.hasAttr group config.users.groups) groups;
in
{
in {
users.mutableUsers = false;
users.users.julian = {
description = "Julian";
@ -31,7 +29,7 @@ in
builtins.readFile ../../../../homes/julian/ssh.pub
);
hashedPasswordFile = config.sops.secrets.julian-password.path;
packages = [ pkgs.home-manager ];
packages = [pkgs.home-manager];
};
users.groups.julian = {
gid = 1000;
@ -44,6 +42,5 @@ in
home-manager.users.julian = import ../../../../homes/julian/${config.networking.hostName}.nix;
security.pam.services.swaylock = { }; # Make swaylock unlocking work
security.pam.services.swaylock = {}; # Make swaylock unlocking work
}