Format code with alejandra

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

View File

@ -56,15 +56,13 @@
}; };
}; };
outputs = outputs = {
{
self, self,
nixpkgs, nixpkgs,
home-manager, home-manager,
systems, systems,
... ...
}@inputs: } @ inputs: let
let
inherit (self) outputs; inherit (self) outputs;
lib = nixpkgs.lib // home-manager.lib; lib = nixpkgs.lib // home-manager.lib;
forEachSystem = f: lib.genAttrs (import systems) (system: f pkgsFor.${system}); forEachSystem = f: lib.genAttrs (import systems) (system: f pkgsFor.${system});
@ -79,8 +77,7 @@
warn-dirty = false; warn-dirty = false;
} }
); );
in in {
{
inherit lib; inherit lib;
nixosModules = import ./modules/nixos; nixosModules = import ./modules/nixos;

View File

@ -20,11 +20,9 @@
./features/suites/cli ./features/suites/cli
./features/suites/desktop ./features/suites/desktop
./features/suites/development ./features/suites/development
]; ];
hostName = "aspi"; hostName = "aspi";
is-nixos = true; is-nixos = true;
terminal = "kitty"; terminal = "kitty";
} }

View File

@ -4,9 +4,7 @@
inputs, inputs,
config, config,
... ...
}: }: {
{
home.packages = with pkgs; [alacritty]; home.packages = with pkgs; [alacritty];
home.file = { home.file = {

View File

@ -3,11 +3,9 @@
pkgs, pkgs,
inputs, inputs,
... ...
}: }: let
let
inherit (inputs.nix-colors.lib-contrib {inherit pkgs;}) gtkThemeFromScheme; inherit (inputs.nix-colors.lib-contrib {inherit pkgs;}) gtkThemeFromScheme;
in in {
{
# Do not make conditional, just toggle things on and off # Do not make conditional, just toggle things on and off
imports = [inputs.nix-colors.homeManagerModules.default]; # TODO: what does this do imports = [inputs.nix-colors.homeManagerModules.default]; # TODO: what does this do
@ -29,6 +27,5 @@ in
name = "macOS-BigSur"; name = "macOS-BigSur";
size = 24; size = 24;
}; };
}; };
} }

View File

@ -4,18 +4,13 @@
config, config,
... ...
}: }:
with lib; let
with lib;
let
doomRepoUrl = "https://github.com/doomemacs/doomemacs"; doomRepoUrl = "https://github.com/doomemacs/doomemacs";
configRepoUrl = "https://gitlab.julian-mutter.de/julian/emacs-config"; configRepoUrl = "https://gitlab.julian-mutter.de/julian/emacs-config";
in in {
{
home.sessionPath = ["/home/julian/.config/emacs/bin"]; home.sessionPath = ["/home/julian/.config/emacs/bin"];
home.packages = home.packages = with pkgs;
with pkgs;
[ [
binutils # native-comp needs 'as', provided by this binutils # native-comp needs 'as', provided by this
@ -30,7 +25,8 @@ in
## Module dependencies ## Module dependencies
(aspellWithDicts ( (aspellWithDicts (
ds: with ds; [ ds:
with ds; [
en en
en-computers en-computers
en-science en-science
@ -46,6 +42,8 @@ in
# Code formatters for use with doom emacs # Code formatters for use with doom emacs
nixfmt-rfc-style # nix nixfmt-rfc-style # nix
alejandra # nix
nixd # nix lsp nixd # nix lsp
dockfmt # docker dockfmt # docker
google-java-format # java google-java-format # java

View File

@ -3,10 +3,7 @@
pkgs, pkgs,
... ...
}: }:
with lib; {
with lib;
{
home.file = { home.file = {
".config/starship.toml".source = ./starship.toml; ".config/starship.toml".source = ./starship.toml;
".config/fish/conf.d/last-working-dir.fish".source = ./last-working-dir.fish; ".config/fish/conf.d/last-working-dir.fish".source = ./last-working-dir.fish;

View File

@ -4,10 +4,7 @@
config, config,
... ...
}: }:
with lib; {
with lib;
{
fonts.fontconfig.enable = true; # required to autoload fonts from packages fonts.fontconfig.enable = true; # required to autoload fonts from packages
home.packages = with pkgs; [ home.packages = with pkgs; [
nerd-fonts.fira-code nerd-fonts.fira-code

View File

@ -9,6 +9,5 @@
settings = { settings = {
general.adjustment-method = "wayland"; general.adjustment-method = "wayland";
}; };
}; };
} }

View File

@ -4,14 +4,12 @@
config, config,
lib, lib,
... ...
}: }: let
inherit
let (inputs.nix-colors.colorschemes.${builtins.toString config.colorscheme.name})
inherit (inputs.nix-colors.colorschemes.${builtins.toString config.colorscheme.name})
palette palette
; ;
in in {
{
imports = [ imports = [
# inputs.hyprland.homeManagerModules.default # inputs.hyprland.homeManagerModules.default
./waybar ./waybar

View File

@ -4,8 +4,7 @@
lib, lib,
outputs, outputs,
... ...
}: }: let
let
getHostname = x: lib.last (lib.splitString "@" x); getHostname = x: lib.last (lib.splitString "@" x);
# remoteColorschemes = lib.mapAttrs' (n: v: { # remoteColorschemes = lib.mapAttrs' (n: v: {
# name = getHostname n; # name = getHostname n;
@ -27,8 +26,7 @@ let
${lib.getExe pkgs.gnused} -i '/Initialized successfully/d' main.cpp ${lib.getExe pkgs.gnused} -i '/Initialized successfully/d' main.cpp
''; '';
}); });
in in {
{
wayland.windowManager.hyprland = { wayland.windowManager.hyprland = {
plugins = [hyprbars]; plugins = [hyprbars];
settings = { settings = {
@ -40,8 +38,7 @@ in
# bar_text_size = config.fontProfiles.regular.size; # bar_text_size = config.fontProfiles.regular.size;
bar_part_of_window = true; bar_part_of_window = true;
bar_precedence_over_border = true; bar_precedence_over_border = true;
hyprbars-button = hyprbars-button = let
let
closeAction = "hyprctl dispatch killactive"; closeAction = "hyprctl dispatch killactive";
isOnSpecial = ''hyprctl activewindow -j | jq -re 'select(.workspace.name == "special")' >/dev/null''; isOnSpecial = ''hyprctl activewindow -j | jq -re 'select(.workspace.name == "special")' >/dev/null'';
@ -50,8 +47,7 @@ in
minimizeAction = "${isOnSpecial} && ${moveToActive} || ${moveToSpecial}"; minimizeAction = "${isOnSpecial} && ${moveToActive} || ${moveToSpecial}";
maximizeAction = "hyprctl dispatch fullscreen 1"; maximizeAction = "hyprctl dispatch fullscreen 1";
in in [
[
# Red close button # Red close button
# "${rgb config.colorscheme.colors.red},12,,${closeAction}" # "${rgb config.colorscheme.colors.red},12,,${closeAction}"
# # Yellow "minimize" (send to special workspace) button # # Yellow "minimize" (send to special workspace) button

View File

@ -5,13 +5,12 @@
pkgs, pkgs,
inputs, inputs,
... ...
}: }: let
let inherit
inherit (inputs.nix-colors.colorschemes.${builtins.toString config.colorscheme.name}) (inputs.nix-colors.colorschemes.${builtins.toString config.colorscheme.name})
palette palette
; ;
in in {
{
programs.hyprlock.enable = true; programs.hyprlock.enable = true;
programs.hyprlock.settings = { programs.hyprlock.settings = {
general = { general = {

View File

@ -5,13 +5,12 @@
pkgs, pkgs,
inputs, inputs,
... ...
}: }: let
let inherit
inherit (inputs.nix-colors.colorschemes.${builtins.toString config.colorscheme.name}) (inputs.nix-colors.colorschemes.${builtins.toString config.colorscheme.name})
palette palette
; ;
in in {
{
home.packages = with pkgs; [libnotify]; home.packages = with pkgs; [libnotify];
services.mako = { services.mako = {

View File

@ -3,8 +3,7 @@
lib, lib,
config, config,
... ...
}: }: let
let
swaylock = "${config.programs.swaylock.package}/bin/swaylock"; swaylock = "${config.programs.swaylock.package}/bin/swaylock";
pgrep = "${pkgs.procps}/bin/pgrep"; pgrep = "${pkgs.procps}/bin/pgrep";
pactl = "${pkgs.pulseaudio}/bin/pactl"; pactl = "${pkgs.pulseaudio}/bin/pactl";
@ -15,13 +14,11 @@ let
lockTime = 4 * 60; # TODO: configurable desktop (10 min)/laptop (4 min) lockTime = 4 * 60; # TODO: configurable desktop (10 min)/laptop (4 min)
# Makes two timeouts: one for when the screen is not locked (lockTime+timeout) and one for when it is. # Makes two timeouts: one for when the screen is not locked (lockTime+timeout) and one for when it is.
afterLockTimeout = afterLockTimeout = {
{
timeout, timeout,
command, command,
resumeCommand ? null, resumeCommand ? null,
}: }: [
[
{ {
timeout = lockTime + timeout; timeout = lockTime + timeout;
inherit command resumeCommand; inherit command resumeCommand;
@ -31,8 +28,7 @@ let
inherit resumeCommand timeout; inherit resumeCommand timeout;
} }
]; ];
in in {
{
services.swayidle = { services.swayidle = {
enable = true; enable = true;
systemdTarget = "graphical-session.target"; systemdTarget = "graphical-session.target";

View File

@ -2,11 +2,9 @@
config, config,
pkgs, pkgs,
... ...
}: }: let
let
inherit (config.colorscheme) colors; inherit (config.colorscheme) colors;
in in {
{
programs.swaylock = { programs.swaylock = {
enable = true; enable = true;
settings = { settings = {

View File

@ -5,11 +5,9 @@
lib, lib,
inputs, inputs,
... ...
}: }: let
let
palette = (inputs.nix-colors.colorschemes.${builtins.toString config.colorscheme.name}).palette; palette = (inputs.nix-colors.colorschemes.${builtins.toString config.colorscheme.name}).palette;
in in {
{
programs.waybar = { programs.waybar = {
enable = true; enable = true;
systemd.enable = true; systemd.enable = true;

View File

@ -3,8 +3,7 @@
lib, lib,
config, config,
... ...
}: }: {
{
home.packages = [pkgs.waypipe]; home.packages = [pkgs.waypipe];
systemd.user.services = { systemd.user.services = {
waypipe-client = { waypipe-client = {

View File

@ -5,13 +5,12 @@
pkgs, pkgs,
inputs, inputs,
... ...
}: }: let
let inherit
inherit (inputs.nix-colors.colorschemes.${builtins.toString config.colorscheme.name}) (inputs.nix-colors.colorschemes.${builtins.toString config.colorscheme.name})
palette palette
; ;
in in {
{
home.packages = with pkgs; [wlogout]; home.packages = with pkgs; [wlogout];
# xdg.configFile."wlogout/style.css".text = '' # xdg.configFile."wlogout/style.css".text = ''

View File

@ -5,13 +5,12 @@
pkgs, pkgs,
inputs, inputs,
... ...
}: }: let
let inherit
inherit (inputs.nix-colors.colorschemes.${builtins.toString config.colorscheme.name}) (inputs.nix-colors.colorschemes.${builtins.toString config.colorscheme.name})
palette palette
; ;
in in {
{
home.packages = with pkgs; [wofi]; home.packages = with pkgs; [wofi];
xdg.configFile."wofi/config".source = ./config; xdg.configFile."wofi/config".source = ./config;

View File

@ -1,8 +1,6 @@
{ config, ... }: {config, ...}: let
let
inherit (config.colorscheme) colors; inherit (config.colorscheme) colors;
in in {
{
programs.zathura = { programs.zathura = {
enable = true; enable = true;
options = { options = {

View File

@ -3,8 +3,7 @@
pkgs, pkgs,
config, config,
... ...
}: }: {
{
imports = [../rofi]; imports = [../rofi];
services.dunst.enable = true; services.dunst.enable = true;
@ -36,7 +35,9 @@
# Overwrite default home-manager config file # Overwrite default home-manager config file
xdg.configFile."i3/config".source = lib.mkForce ( xdg.configFile."i3/config".source = lib.mkForce (
if config.hostName == "kardorf" then ./i3/config-kardorf else ./i3/config if config.hostName == "kardorf"
then ./i3/config-kardorf
else ./i3/config
); );
home.file = { home.file = {

View File

@ -3,9 +3,7 @@
pkgs, pkgs,
config, config,
... ...
}: }: {
{
programs.kitty = { programs.kitty = {
enable = true; enable = true;
shellIntegration.enableFishIntegration = true; shellIntegration.enableFishIntegration = true;

View File

@ -3,10 +3,7 @@
pkgs, pkgs,
inputs, inputs,
... ...
}: }: {
{
imports = [inputs.nixvim.homeManagerModules.nixvim]; imports = [inputs.nixvim.homeManagerModules.nixvim];
home.sessionVariables = { home.sessionVariables = {
@ -39,7 +36,6 @@
opts = { opts = {
number = false; number = false;
relativenumber = false; relativenumber = false;
}; };
clipboard.register = "unnamedplus"; # Use system clipboard clipboard.register = "unnamedplus"; # Use system clipboard
@ -157,8 +153,6 @@
lua_ls.enable = true; lua_ls.enable = true;
}; };
}; };
}; };
}; };
} }

View File

@ -2,9 +2,7 @@
lib, lib,
pkgs, pkgs,
... ...
}: }: {
{
home.sessionVariables = { home.sessionVariables = {
FLAKE = "/home/julian/.dotfiles"; FLAKE = "/home/julian/.dotfiles";
}; };

View File

@ -2,9 +2,7 @@
lib, lib,
pkgs, pkgs,
... ...
}: }: {
{
# this would need you to config rofi using home-manager # this would need you to config rofi using home-manager
# programs.rofi = { enable = true; }; # programs.rofi = { enable = true; };

View File

@ -1,9 +1,4 @@
{ {pkgs, ...}: {
pkgs,
...
}:
{
home.packages = with pkgs; [ home.packages = with pkgs; [
bat bat
du-dust # Like du tree but better du-dust # Like du tree but better

View File

@ -2,9 +2,7 @@
lib, lib,
pkgs, pkgs,
... ...
}: }: {
{
services.blueman-applet.enable = true; services.blueman-applet.enable = true;
services.nextcloud-client.enable = true; services.nextcloud-client.enable = true;
services.nextcloud-client.startInBackground = true; services.nextcloud-client.startInBackground = true;

View File

@ -1,10 +1,4 @@
{ {pkgs, ...}: {
pkgs,
...
}:
{
home.packages = with pkgs; [ home.packages = with pkgs; [
watchexec # Run command when any file in current dir changes watchexec # Run command when any file in current dir changes
android-tools # adb android-tools # adb
@ -29,7 +23,8 @@
julia-bin julia-bin
(texlive.combine { (texlive.combine {
# for rendering latex in inkscape # for rendering latex in inkscape
inherit (texlive) inherit
(texlive)
scheme-medium scheme-medium
standalone standalone
amsmath amsmath

View File

@ -7,8 +7,7 @@
misc.assume_yes = true; misc.assume_yes = true;
misc.no_retry = true; misc.no_retry = true;
pre_commands."Update flake" = pre_commands."Update flake" = "git -C /home/julian/.dotfiles checkout origin/flake-updates -- flake.lock";
"git -C /home/julian/.dotfiles checkout origin/flake-updates -- flake.lock";
linux.nix_arguments = "--flake /home/julian/.dotfiles"; linux.nix_arguments = "--flake /home/julian/.dotfiles";
linux.home_manager_arguments = [ linux.home_manager_arguments = [

View File

@ -3,9 +3,7 @@
pkgs, pkgs,
config, config,
... ...
}: }: {
{
programs.wezterm = { programs.wezterm = {
enable = true; enable = true;
extraConfig = '' extraConfig = ''

View File

@ -2,8 +2,7 @@
pkgs, pkgs,
inputs, inputs,
... ...
}: }: {
{
programs.zoxide.enable = true; programs.zoxide.enable = true;
programs.zoxide.enableFishIntegration = true; programs.zoxide.enableFishIntegration = true;

View File

@ -2,8 +2,7 @@
lib, lib,
pkgs, pkgs,
... ...
}: }: {
{
home.file = { home.file = {
".config/starship.toml".source = ./starship.toml; ".config/starship.toml".source = ./starship.toml;
}; };

View File

@ -5,13 +5,14 @@
config, config,
outputs, outputs,
... ...
}: }: {
{ imports =
imports = [ [
../features/fonts ../features/fonts
# ../features/cli # ../features/cli
# ../features/helix # ../features/helix
] ++ (builtins.attrValues outputs.homeManagerModules); ]
++ (builtins.attrValues outputs.homeManagerModules);
nix = { nix = {
package = lib.mkDefault pkgs.nix; package = lib.mkDefault pkgs.nix;
@ -51,5 +52,4 @@
# home.file = { # home.file = {
# ".colorscheme.json".text = builtins.toJSON config.colorscheme; # ".colorscheme.json".text = builtins.toJSON config.colorscheme;
# }; # };
} }

View File

@ -6,9 +6,11 @@
# inherit pkgs; # inherit pkgs;
# inherit lib; # inherit lib;
# }; # };
{
{ lib, pkgs, ... }: lib,
let pkgs,
...
}: let
package-names = with pkgs; { package-names = with pkgs; {
"x-scheme-handler/tg" = telegram-desktop; "x-scheme-handler/tg" = telegram-desktop;
"x-scheme-handler/mailto" = thunderbird; "x-scheme-handler/mailto" = thunderbird;
@ -42,4 +44,5 @@ let
in in
lib.mapAttrs (mimeType: package: [ lib.mapAttrs (mimeType: package: [
"${package}/share/applications/${package.pname}.desktop" "${package}/share/applications/${package.pname}.desktop"
]) package-names ])
package-names

View File

@ -1,9 +1,5 @@
# Only apply this to home-manager standalone # Only apply this to home-manager standalone
{ {outputs, ...}: {
outputs,
...
}:
{
# Apply overlays # Apply overlays
nixpkgs = { nixpkgs = {
overlays = builtins.attrValues outputs.overlays; overlays = builtins.attrValues outputs.overlays;
@ -43,6 +39,5 @@
]; ];
# nix.settings. # warn-dirty = false; # TODO: do I want this # nix.settings. # warn-dirty = false; # TODO: do I want this
}; };
} }

View File

@ -17,11 +17,9 @@
./features/suites/cli ./features/suites/cli
./features/suites/desktop ./features/suites/desktop
./features/suites/development ./features/suites/development
]; ];
hostName = "kardorf"; hostName = "kardorf";
is-nixos = true; is-nixos = true;
terminal = "kitty"; terminal = "kitty";
} }

View File

@ -1,8 +1,4 @@
{ {pkgs, ...}: {
pkgs,
...
}:
{
imports = [ imports = [
./global ./global
@ -34,8 +30,7 @@
# Autostart link # Autostart link
home.file = { home.file = {
".config/autostart/sheet-organizer.desktop".source = ".config/autostart/sheet-organizer.desktop".source = "${pkgs.sheet-organizer}/share/applications/sheet-organizer.desktop";
"${pkgs.sheet-organizer}/share/applications/sheet-organizer.desktop";
".config/sheet-organizer/config.toml".text = '' ".config/sheet-organizer/config.toml".text = ''
working_directory = "/home/julian/Klavier" working_directory = "/home/julian/Klavier"
''; '';

View File

@ -2,8 +2,7 @@
lib, lib,
pkgs, pkgs,
... ...
}: }: {
{
imports = [ imports = [
../global ../global

View File

@ -1,7 +1,5 @@
{pkgs, ...}: {pkgs, ...}:
with pkgs; [
with pkgs;
[
nerd-fonts.fira-code nerd-fonts.fira-code
font-awesome font-awesome
dejavu_fonts dejavu_fonts

View File

@ -1,7 +1,5 @@
{pkgs, ...}: {pkgs, ...}:
with pkgs; [
with pkgs;
[
# Rust setup # Rust setup
rustc rustc
rustfmt rustfmt

View File

@ -46,5 +46,4 @@
# Enable touchpad support # Enable touchpad support
services.libinput.enable = true; services.libinput.enable = true;
} }

View File

@ -2,9 +2,7 @@
config, config,
lib, lib,
... ...
}: }: {
{
boot.initrd.availableKernelModules = [ boot.initrd.availableKernelModules = [
"vmd" "vmd"
"xhci_pci" "xhci_pci"

View File

@ -1,9 +1,11 @@
# sudo nixos-rebuild switch --flake .#builder --target-host root@192.168.3.118 # sudo nixos-rebuild switch --flake .#builder --target-host root@192.168.3.118
# or # or
# deploy .#builder # deploy .#builder
{ config, pkgs, ... }:
{ {
config,
pkgs,
...
}: {
imports = [ imports = [
./hardware-configuration.nix ./hardware-configuration.nix
@ -209,8 +211,7 @@
}; };
virtualHosts."binarycache.julian-mutter.de" = { virtualHosts."binarycache.julian-mutter.de" = {
locations."/".proxyPass = locations."/".proxyPass = "http://${config.services.nix-serve.bindAddress}:${toString config.services.nix-serve.port}";
"http://${config.services.nix-serve.bindAddress}:${toString config.services.nix-serve.port}";
}; };
clientMaxBodySize = "2G"; clientMaxBodySize = "2G";

View File

@ -7,9 +7,7 @@
pkgs, pkgs,
modulesPath, modulesPath,
... ...
}: }: {
{
imports = [(modulesPath + "/profiles/qemu-guest.nix")]; imports = [(modulesPath + "/profiles/qemu-guest.nix")];
boot.initrd.availableKernelModules = [ boot.initrd.availableKernelModules = [

View File

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

View File

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

View File

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

View File

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

View File

@ -1,5 +1,4 @@
{ pkgs, ... }: {pkgs, ...}: {
{
# Make programs like nextcloud client access saved passwords # Make programs like nextcloud client access saved passwords
programs.seahorse.enable = true; programs.seahorse.enable = true;
services.gnome.gnome-keyring.enable = true; services.gnome.gnome-keyring.enable = true;

View File

@ -1,8 +1,4 @@
{ {pkgs, ...}: {
pkgs,
...
}:
{
services.flatpak.enable = true; services.flatpak.enable = true;
xdg.portal.enable = true; xdg.portal.enable = true;
xdg.portal.extraPortals = [pkgs.xdg-desktop-portal-gtk]; xdg.portal.extraPortals = [pkgs.xdg-desktop-portal-gtk];

View File

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

View File

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

View File

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

View File

@ -4,10 +4,7 @@
pkgs, pkgs,
inputs, inputs,
... ...
}: }: {
{
programs.hyprland.enable = true; programs.hyprland.enable = true;
programs.hyprland.package = inputs.hyprland.packages.${pkgs.system}.hyprland; # does only work with nixos-unstable programs.hyprland.package = inputs.hyprland.packages.${pkgs.system}.hyprland; # does only work with nixos-unstable
programs.hyprland.xwayland.enable = true; programs.hyprland.xwayland.enable = true;

View File

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

View File

@ -1,5 +1,4 @@
{ {
security.krb5.enable = true; security.krb5.enable = true;
security.krb5.settings = { security.krb5.settings = {
# domain_realm = { # domain_realm = {

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -3,10 +3,7 @@
lib, lib,
pkgs, pkgs,
... ...
}: }: {
{
virtualisation.virtualbox.host.enable = true; virtualisation.virtualbox.host.enable = true;
# virtualisation.virtualbox.host.enableExtensionPack = true; # virtualisation.virtualbox.host.enableExtensionPack = true;
# virtualisation.virtualbox.guest.enable = true; # virtualisation.virtualbox.guest.enable = true;

View File

@ -3,11 +3,9 @@
config, config,
lib, lib,
... ...
}: }: let
let
ifTheyExist = groups: builtins.filter (group: builtins.hasAttr group config.users.groups) groups; ifTheyExist = groups: builtins.filter (group: builtins.hasAttr group config.users.groups) groups;
in in {
{
users.mutableUsers = false; users.mutableUsers = false;
users.users.julian = { users.users.julian = {
description = "Julian"; description = "Julian";
@ -45,5 +43,4 @@ in
home-manager.users.julian = import ../../../../homes/julian/${config.networking.hostName}.nix; 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
} }

View File

@ -1,8 +1,4 @@
{ {pkgs, ...}: {
pkgs,
...
}:
{
imports = [ imports = [
./hardware-configuration.nix ./hardware-configuration.nix

View File

@ -5,9 +5,7 @@
config, config,
lib, lib,
... ...
}: }: {
{
boot.initrd.availableKernelModules = [ boot.initrd.availableKernelModules = [
"ehci_pci" "ehci_pci"
"ahci" "ahci"

View File

@ -1,15 +1,13 @@
# Edit this configuration file to define what should be installed on # Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page # your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help). # and in the NixOS manual (accessible by running nixos-help).
{ {
lib, lib,
inputs, inputs,
config, config,
pkgs, pkgs,
... ...
}: }: {
{
imports = [ imports = [
inputs.nixos-hardware.nixosModules.raspberry-pi-4 inputs.nixos-hardware.nixosModules.raspberry-pi-4

View File

@ -7,9 +7,7 @@
pkgs, pkgs,
modulesPath, modulesPath,
... ...
}: }: {
{
imports = [(modulesPath + "/installer/scan/not-detected.nix")]; imports = [(modulesPath + "/installer/scan/not-detected.nix")];
boot.initrd.availableKernelModules = ["xhci_pci"]; boot.initrd.availableKernelModules = ["xhci_pci"];

View File

@ -1,11 +1,6 @@
{ {lib, ...}: let
lib,
...
}:
let
inherit (lib) types mkOption; inherit (lib) types mkOption;
in in {
{
options.colorscheme = { options.colorscheme = {
name = mkOption { name = mkOption {
type = types.str; type = types.str;

View File

@ -2,8 +2,7 @@
lib, lib,
config, config,
... ...
}: }: let
let
mkFontOption = kind: { mkFontOption = kind: {
name = lib.mkOption { name = lib.mkOption {
type = lib.types.str; type = lib.types.str;
@ -25,8 +24,7 @@ let
}; };
}; };
cfg = config.fontProfiles; cfg = config.fontProfiles;
in in {
{
options.fontProfiles = { options.fontProfiles = {
enable = lib.mkEnableOption "Whether to enable font profiles"; enable = lib.mkEnableOption "Whether to enable font profiles";
monospace = mkFontOption "monospace"; monospace = mkFontOption "monospace";

View File

@ -1,11 +1,6 @@
{ {lib, ...}: let
lib,
...
}:
let
inherit (lib) types mkOption; inherit (lib) types mkOption;
in in {
{
options.hostName = mkOption { options.hostName = mkOption {
type = types.str; type = types.str;
}; };

View File

@ -2,11 +2,9 @@
lib, lib,
config, config,
... ...
}: }: let
let
inherit (lib) mkOption types; inherit (lib) mkOption types;
in in {
{
options.monitors = mkOption { options.monitors = mkOption {
type = types.listOf ( type = types.listOf (
types.submodule { types.submodule {

View File

@ -1,11 +1,6 @@
{ {lib, ...}: let
lib,
...
}:
let
inherit (lib) types mkOption; inherit (lib) types mkOption;
in in {
{
options.is-nixos = mkOption { options.is-nixos = mkOption {
type = types.bool; type = types.bool;
}; };

View File

@ -3,8 +3,7 @@
lib, lib,
pkgs, pkgs,
... ...
}: }: {
{
options.terminal = lib.mkOption { options.terminal = lib.mkOption {
type = lib.types.str; type = lib.types.str;
example = "alacritty"; example = "alacritty";

View File

@ -2,12 +2,9 @@
lib, lib,
config, config,
... ...
}: }: let
let
cfg = config.modules.syncthing; cfg = config.modules.syncthing;
in in {
{
options.modules.syncthing = { options.modules.syncthing = {
enable = lib.mkOption {default = false;}; enable = lib.mkOption {default = false;};
overrideSettings = lib.mkOption {default = false;}; overrideSettings = lib.mkOption {default = false;};

View File

@ -1,20 +1,19 @@
{ {inputs, ...}: {
inputs,
...
}:
{
# For every flake input, aliases 'pkgs.inputs.${flake}' to # For every flake input, aliases 'pkgs.inputs.${flake}' to
# 'inputs.${flake}.packages.${pkgs.system}' or # 'inputs.${flake}.packages.${pkgs.system}' or
# 'inputs.${flake}.legacyPackages.${pkgs.system}' # 'inputs.${flake}.legacyPackages.${pkgs.system}'
flake-inputs = final: _: { flake-inputs = final: _: {
inputs = builtins.mapAttrs ( inputs =
_: flake: builtins.mapAttrs (
let _: flake: let
legacyPackages = (flake.legacyPackages or {}).${final.system} or {}; legacyPackages = (flake.legacyPackages or {}).${final.system} or {};
packages = (flake.packages or {}).${final.system} or {}; packages = (flake.packages or {}).${final.system} or {};
in in
if legacyPackages != { } then legacyPackages else packages if legacyPackages != {}
) inputs; then legacyPackages
else packages
)
inputs;
}; };
input-flake-packages = final: prev: { input-flake-packages = final: prev: {
@ -44,5 +43,4 @@
}; };
nix-matlab = inputs.nix-matlab.overlay; nix-matlab = inputs.nix-matlab.overlay;
} }

View File

@ -2,7 +2,6 @@
writeShellApplication, writeShellApplication,
kmod, kmod,
}: }:
writeShellApplication { writeShellApplication {
name = "acer-battery-health-mode"; name = "acer-battery-health-mode";

View File

@ -3,7 +3,6 @@
yq, yq,
writeShellApplication, writeShellApplication,
}: }:
writeShellApplication { writeShellApplication {
name = "conda-direnv"; name = "conda-direnv";

View File

@ -1,8 +1,4 @@
{ {pkgs ? import <nixpkgs> {}, ...}: {
pkgs ? import <nixpkgs> { },
...
}:
{
conda-direnv = pkgs.callPackage ./conda-direnv {}; conda-direnv = pkgs.callPackage ./conda-direnv {};
deploy-to-pianopi = pkgs.callPackage ./deploy-to-pianopi {}; deploy-to-pianopi = pkgs.callPackage ./deploy-to-pianopi {};
edit-config = pkgs.callPackage ./edit-config {}; edit-config = pkgs.callPackage ./edit-config {};

View File

@ -2,7 +2,6 @@
rsync, rsync,
writeShellApplication, writeShellApplication,
}: }:
writeShellApplication { writeShellApplication {
name = "deploy-to-pianopi"; name = "deploy-to-pianopi";

View File

@ -7,7 +7,6 @@
hyprshot, hyprshot,
zenity, zenity,
}: }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "hyprshot-gui"; pname = "hyprshot-gui";
version = "2023-10-20"; version = "2023-10-20";

View File

@ -1,4 +1,8 @@
{ writeShellScriptBin, gum, ... }: {
writeShellScriptBin,
gum,
...
}:
# https://github.com/IogaMaster/dotfiles/blob/main/packages/install/default.nix # https://github.com/IogaMaster/dotfiles/blob/main/packages/install/default.nix
writeShellScriptBin "install" '' writeShellScriptBin "install" ''
${gum}/bin/gum style --border normal --margin "1" --padding "1 2" --border-foreground 212 " IogaMaster's dotfiles installer " ${gum}/bin/gum style --border normal --margin "1" --padding "1 2" --border-foreground 212 " IogaMaster's dotfiles installer "

View File

@ -1,7 +1,4 @@
{ {writeShellApplication}:
writeShellApplication,
}:
writeShellApplication { writeShellApplication {
name = "lntocp"; name = "lntocp";

View File

@ -4,7 +4,6 @@
telegram-desktop, telegram-desktop,
thunderbird, thunderbird,
}: }:
writeShellApplication { writeShellApplication {
name = "open-messaging"; name = "open-messaging";

View File

@ -5,8 +5,7 @@
fetchFromGitHub, fetchFromGitHub,
unzip, unzip,
... ...
}: }: let
let
data = stdenv.mkDerivation (finalAttrs: { data = stdenv.mkDerivation (finalAttrs: {
pname = "path-of-building-data"; pname = "path-of-building-data";
version = "dev-version"; version = "dev-version";

View File

@ -4,7 +4,6 @@
jgmenu, jgmenu,
pulseaudio, pulseaudio,
}: }:
writeShellApplication { writeShellApplication {
name = "pulseaudio-popup"; name = "pulseaudio-popup";

View File

@ -3,7 +3,6 @@
nix-output-monitor, nix-output-monitor,
jq, jq,
}: }:
writeShellApplication { writeShellApplication {
name = "sos"; name = "sos";

View File

@ -8,8 +8,7 @@
tesseract5, tesseract5,
wl-clipboard, wl-clipboard,
langs ? "eng+hun+fra+jpn+jpn_vert+kor+kor_vert+pol+ron+spa", langs ? "eng+hun+fra+jpn+jpn_vert+kor+kor_vert+pol+ron+spa",
}: }: let
let
_ = lib.getExe; _ = lib.getExe;
in in
writeShellScriptBin "wl-ocr" '' writeShellScriptBin "wl-ocr" ''

View File

@ -5,7 +5,6 @@
xdotool, xdotool,
bc, bc,
}: }:
writeShellApplication { writeShellApplication {
name = "xwacomcalibrate"; name = "xwacomcalibrate";

View File

@ -1,8 +1,4 @@
{ {pkgs ? import <nixpkgs> {}, ...}: {
pkgs ? import <nixpkgs> { },
...
}:
{
default = pkgs.mkShell { default = pkgs.mkShell {
NIX_CONFIG = "extra-experimental-features = nix-command flakes ca-derivations"; NIX_CONFIG = "extra-experimental-features = nix-command flakes ca-derivations";
nativeBuildInputs = with pkgs; [ nativeBuildInputs = with pkgs; [

View File

@ -4,11 +4,12 @@
lib, lib,
# You also have access to your flake's inputs. # You also have access to your flake's inputs.
inputs, inputs,
# All other arguments come from NixPkgs. You can use `pkgs` to pull shells or helpers # All other arguments come from NixPkgs. You can use `pkgs` to pull shells or helpers
# programmatically or you may add the named attributes as arguments here. # programmatically or you may add the named attributes as arguments here.
pkgs, stdenv, ... }: pkgs,
stdenv,
...
}:
pkgs.mkShell { pkgs.mkShell {
# Create your shell # Create your shell
} }