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

217
flake.nix
View File

@ -56,20 +56,18 @@
};
};
outputs =
{
self,
nixpkgs,
home-manager,
systems,
...
}@inputs:
let
inherit (self) outputs;
lib = nixpkgs.lib // home-manager.lib;
forEachSystem = f: lib.genAttrs (import systems) (system: f pkgsFor.${system});
pkgsFor = lib.genAttrs (import systems) (
system:
outputs = {
self,
nixpkgs,
home-manager,
systems,
...
} @ inputs: let
inherit (self) outputs;
lib = nixpkgs.lib // home-manager.lib;
forEachSystem = f: lib.genAttrs (import systems) (system: f pkgsFor.${system});
pkgsFor = lib.genAttrs (import systems) (
system:
import nixpkgs {
inherit system;
config.allowUnfree = true;
@ -78,111 +76,110 @@
];
warn-dirty = false;
}
);
in
{
inherit lib;
);
in {
inherit lib;
nixosModules = import ./modules/nixos;
homeManagerModules = import ./modules/home-manager;
nixosModules = import ./modules/nixos;
homeManagerModules = import ./modules/home-manager;
overlays = import ./overlays { inherit inputs outputs; };
# hydraJobs = import ./hydra.nix { inherit inputs outputs; }; # TODO add hydra jobs here?
overlays = import ./overlays {inherit inputs outputs;};
# hydraJobs = import ./hydra.nix { inherit inputs outputs; }; # TODO add hydra jobs here?
packages = forEachSystem (pkgs: import ./pkgs { inherit pkgs; });
devShells = forEachSystem (pkgs: import ./shell.nix { inherit pkgs; });
formatter = forEachSystem (pkgs: pkgs.alejandra);
packages = forEachSystem (pkgs: import ./pkgs {inherit pkgs;});
devShells = forEachSystem (pkgs: import ./shell.nix {inherit pkgs;});
formatter = forEachSystem (pkgs: pkgs.alejandra);
nixosConfigurations = {
# Main laptop
aspi = lib.nixosSystem {
modules = [ ./hosts/aspi ];
specialArgs = {
inherit inputs outputs;
};
};
# Piano raspberry pi
pianonix = lib.nixosSystem {
modules = [ ./hosts/pianonix ];
specialArgs = {
inherit inputs outputs;
};
};
kardorf = lib.nixosSystem {
modules = [ ./hosts/pianonix ];
specialArgs = {
inherit inputs outputs;
};
nixosConfigurations = {
# Main laptop
aspi = lib.nixosSystem {
modules = [./hosts/aspi];
specialArgs = {
inherit inputs outputs;
};
};
# Standalone HM
homeConfigurations = {
# Main laptop
"julian@aspi" = lib.homeManagerConfiguration {
modules = [
./homes/julian/aspi.nix
./homes/julian/hm-standalone-config.nix
];
pkgs = pkgsFor.x86_64-linux;
extraSpecialArgs = {
inherit inputs outputs;
};
};
# Media server (RPi)
"julian@pianonix" = lib.homeManagerConfiguration {
modules = [
./homes/julian/pianonix.nix
./homes/julian/hm-standalone-config.nix
];
pkgs = pkgsFor.aarch64-linux;
extraSpecialArgs = {
inherit inputs outputs;
};
};
"julian@kardorf" = lib.homeManagerConfiguration {
modules = [
./homes/julian/kardorf.nix
./homes/julian/hm-standalone-config.nix
];
pkgs = pkgsFor.aarch64-linux;
extraSpecialArgs = {
inherit inputs outputs;
};
};
"julian@v3ms" = lib.homeManagerConfiguration {
modules = [
./homes/julian/v3ms
./homes/julian/hm-standalone-config.nix
];
pkgs = pkgsFor.aarch64-linux;
extraSpecialArgs = {
inherit inputs outputs;
};
# Piano raspberry pi
pianonix = lib.nixosSystem {
modules = [./hosts/pianonix];
specialArgs = {
inherit inputs outputs;
};
};
# deploy-rs node configuration
deploy.nodes = {
pianonix = {
hostname = "pianonix.local";
profiles.system = {
sshUser = "root";
user = "root";
path = inputs.deploy-rs.lib.aarch64-linux.activate.nixos self.nixosConfigurations.pianonix;
confirmTimeout = 90; # default: 30s; raspberrypi takes a little longer restarting services
};
};
builder = {
hostname = "builder.julian-mutter.de";
profiles.system = {
sshUser = "root";
user = "root";
path = inputs.deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.builder;
remoteBuild = true;
};
kardorf = lib.nixosSystem {
modules = [./hosts/pianonix];
specialArgs = {
inherit inputs outputs;
};
};
};
# Standalone HM
homeConfigurations = {
# Main laptop
"julian@aspi" = lib.homeManagerConfiguration {
modules = [
./homes/julian/aspi.nix
./homes/julian/hm-standalone-config.nix
];
pkgs = pkgsFor.x86_64-linux;
extraSpecialArgs = {
inherit inputs outputs;
};
};
# Media server (RPi)
"julian@pianonix" = lib.homeManagerConfiguration {
modules = [
./homes/julian/pianonix.nix
./homes/julian/hm-standalone-config.nix
];
pkgs = pkgsFor.aarch64-linux;
extraSpecialArgs = {
inherit inputs outputs;
};
};
"julian@kardorf" = lib.homeManagerConfiguration {
modules = [
./homes/julian/kardorf.nix
./homes/julian/hm-standalone-config.nix
];
pkgs = pkgsFor.aarch64-linux;
extraSpecialArgs = {
inherit inputs outputs;
};
};
"julian@v3ms" = lib.homeManagerConfiguration {
modules = [
./homes/julian/v3ms
./homes/julian/hm-standalone-config.nix
];
pkgs = pkgsFor.aarch64-linux;
extraSpecialArgs = {
inherit inputs outputs;
};
};
};
# deploy-rs node configuration
deploy.nodes = {
pianonix = {
hostname = "pianonix.local";
profiles.system = {
sshUser = "root";
user = "root";
path = inputs.deploy-rs.lib.aarch64-linux.activate.nixos self.nixosConfigurations.pianonix;
confirmTimeout = 90; # default: 30s; raspberrypi takes a little longer restarting services
};
};
builder = {
hostname = "builder.julian-mutter.de";
profiles.system = {
sshUser = "root";
user = "root";
path = inputs.deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.builder;
remoteBuild = true;
};
};
};
};
}

View File

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

View File

@ -4,10 +4,8 @@
inputs,
config,
...
}:
{
home.packages = with pkgs; [ alacritty ];
}: {
home.packages = with pkgs; [alacritty];
home.file = {
".config/alacritty/theme".source = "${inputs.alacritty-theme}";

View File

@ -3,13 +3,11 @@
pkgs,
inputs,
...
}:
let
inherit (inputs.nix-colors.lib-contrib { inherit pkgs; }) gtkThemeFromScheme;
in
{
}: let
inherit (inputs.nix-colors.lib-contrib {inherit pkgs;}) gtkThemeFromScheme;
in {
# 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
# home.sessionVariables.GTK_THEME = "Catppuccin-Mocha-Compact-Blue-dark";
gtk = {
@ -29,6 +27,5 @@ in
name = "macOS-BigSur";
size = 24;
};
};
}

View File

@ -4,24 +4,19 @@
config,
...
}:
with lib;
let
with lib; let
doomRepoUrl = "https://github.com/doomemacs/doomemacs";
configRepoUrl = "https://gitlab.julian-mutter.de/julian/emacs-config";
in
{
home.sessionPath = [ "/home/julian/.config/emacs/bin" ];
in {
home.sessionPath = ["/home/julian/.config/emacs/bin"];
home.packages =
with pkgs;
home.packages = with pkgs;
[
binutils # native-comp needs 'as', provided by this
## Doom dependencies
git
(ripgrep.override { withPCRE2 = true; })
(ripgrep.override {withPCRE2 = true;})
## Optional dependencies
fd # faster projectile indexing
@ -30,12 +25,13 @@ in
## Module dependencies
(aspellWithDicts (
ds: with ds; [
en
en-computers
en-science
de
]
ds:
with ds; [
en
en-computers
en-science
de
]
))
hunspell
@ -46,6 +42,8 @@ in
# Code formatters for use with doom emacs
nixfmt-rfc-style # nix
alejandra # nix
nixd # nix lsp
dockfmt # docker
google-java-format # java
@ -64,7 +62,7 @@ in
]
++ lib.optional config.is-nixos emacs;
home.activation.installDoomEmacs = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
home.activation.installDoomEmacs = lib.hm.dag.entryAfter ["writeBoundary"] ''
if [ ! -d "/home/julian/.config/emacs" ]; then
$DRY_RUN_CMD ${pkgs.git}/bin/git clone --depth=1 --single-branch "${doomRepoUrl}" "/home/julian/.config/emacs"
fi

View File

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

View File

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

View File

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

View File

@ -4,14 +4,12 @@
config,
lib,
...
}:
let
inherit (inputs.nix-colors.colorschemes.${builtins.toString config.colorscheme.name})
}: let
inherit
(inputs.nix-colors.colorschemes.${builtins.toString config.colorscheme.name})
palette
;
in
{
in {
imports = [
# inputs.hyprland.homeManagerModules.default
./waybar
@ -30,7 +28,7 @@ in
];
xdg.portal = {
extraPortals = [ pkgs.xdg-desktop-portal-wlr ];
extraPortals = [pkgs.xdg-desktop-portal-wlr];
config.hyprland = {
default = [
"wlr"
@ -147,7 +145,7 @@ in
monitor = ",preferred,auto,auto";
# Autostart
exec-once = [ "firefox" ];
exec-once = ["firefox"];
# Look and Feel
general = {
@ -356,26 +354,26 @@ in
"$mod CTRL, 0, movetoworkspacesilent, 10"
]
++
# Screen lock
(
let
swaylock = lib.getExe config.programs.swaylock.package;
in
# Screen lock
(
let
swaylock = lib.getExe config.programs.swaylock.package;
in
lib.optionals config.programs.swaylock.enable [
"$mod,TAB,exec,${swaylock} --daemonize"
]
)
)
++
# Notification manager
(
let
makoctl = lib.getExe' config.services.mako.package "makoctl";
in
# Notification manager
(
let
makoctl = lib.getExe' config.services.mako.package "makoctl";
in
lib.optionals config.services.mako.enable [
"$mod,w,exec,${makoctl} dismiss"
"$mod SHIFT,W,exec,${makoctl} restore"
]
);
);
# plugin = {
# hyprbars = {

View File

@ -4,8 +4,7 @@
lib,
outputs,
...
}:
let
}: let
getHostname = x: lib.last (lib.splitString "@" x);
# remoteColorschemes = lib.mapAttrs' (n: v: {
# name = getHostname n;
@ -19,18 +18,17 @@ let
# Make sure it's using the same hyprland package as we are
hyprland = config.wayland.windowManager.hyprland.package;
}).overrideAttrs
(old: {
# Yeet the initialization notification (I hate it)
postPatch =
(old.postPatch or "")
+ ''
${lib.getExe pkgs.gnused} -i '/Initialized successfully/d' main.cpp
'';
});
in
{
(old: {
# Yeet the initialization notification (I hate it)
postPatch =
(old.postPatch or "")
+ ''
${lib.getExe pkgs.gnused} -i '/Initialized successfully/d' main.cpp
'';
});
in {
wayland.windowManager.hyprland = {
plugins = [ hyprbars ];
plugins = [hyprbars];
settings = {
"plugin:hyprbars" = {
bar_height = 25;
@ -40,25 +38,23 @@ in
# bar_text_size = config.fontProfiles.regular.size;
bar_part_of_window = true;
bar_precedence_over_border = true;
hyprbars-button =
let
closeAction = "hyprctl dispatch killactive";
hyprbars-button = let
closeAction = "hyprctl dispatch killactive";
isOnSpecial = ''hyprctl activewindow -j | jq -re 'select(.workspace.name == "special")' >/dev/null'';
moveToSpecial = "hyprctl dispatch movetoworkspacesilent special";
moveToActive = "hyprctl dispatch movetoworkspacesilent name:$(hyprctl -j activeworkspace | jq -re '.name')";
minimizeAction = "${isOnSpecial} && ${moveToActive} || ${moveToSpecial}";
isOnSpecial = ''hyprctl activewindow -j | jq -re 'select(.workspace.name == "special")' >/dev/null'';
moveToSpecial = "hyprctl dispatch movetoworkspacesilent special";
moveToActive = "hyprctl dispatch movetoworkspacesilent name:$(hyprctl -j activeworkspace | jq -re '.name')";
minimizeAction = "${isOnSpecial} && ${moveToActive} || ${moveToSpecial}";
maximizeAction = "hyprctl dispatch fullscreen 1";
in
[
# Red close button
# "${rgb config.colorscheme.colors.red},12,,${closeAction}"
# # Yellow "minimize" (send to special workspace) button
# "${rgb config.colorscheme.colors.yellow},12,,${minimizeAction}"
# # Green "maximize" (fullscreen) button
# "${rgb config.colorscheme.colors.green},12,,${maximizeAction}"
];
maximizeAction = "hyprctl dispatch fullscreen 1";
in [
# Red close button
# "${rgb config.colorscheme.colors.red},12,,${closeAction}"
# # Yellow "minimize" (send to special workspace) button
# "${rgb config.colorscheme.colors.yellow},12,,${minimizeAction}"
# # Green "maximize" (fullscreen) button
# "${rgb config.colorscheme.colors.green},12,,${maximizeAction}"
];
};
# windowrulev2 =

View File

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

View File

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

View File

@ -3,8 +3,7 @@
lib,
config,
...
}:
let
}: let
swaylock = "${config.programs.swaylock.package}/bin/swaylock";
pgrep = "${pkgs.procps}/bin/pgrep";
pactl = "${pkgs.pulseaudio}/bin/pactl";
@ -15,24 +14,21 @@ let
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.
afterLockTimeout =
afterLockTimeout = {
timeout,
command,
resumeCommand ? null,
}: [
{
timeout,
command,
resumeCommand ? null,
}:
[
{
timeout = lockTime + timeout;
inherit command resumeCommand;
}
{
command = "${isLocked} && ${command}";
inherit resumeCommand timeout;
}
];
in
{
timeout = lockTime + timeout;
inherit command resumeCommand;
}
{
command = "${isLocked} && ${command}";
inherit resumeCommand timeout;
}
];
in {
services.swayidle = {
enable = true;
systemdTarget = "graphical-session.target";
@ -45,18 +41,18 @@ in
}
]
++
# Turn off displays (hyprland)
(lib.optionals config.wayland.windowManager.hyprland.enable (afterLockTimeout {
timeout = 300;
command = "${hyprctl} dispatch dpms off";
resumeCommand = "${hyprctl} dispatch dpms on";
}))
# Turn off displays (hyprland)
(lib.optionals config.wayland.windowManager.hyprland.enable (afterLockTimeout {
timeout = 300;
command = "${hyprctl} dispatch dpms off";
resumeCommand = "${hyprctl} dispatch dpms on";
}))
++
# Turn off displays (sway)
(lib.optionals config.wayland.windowManager.sway.enable (afterLockTimeout {
timeout = 300;
command = "${swaymsg} 'output * dpms off'";
resumeCommand = "${swaymsg} 'output * dpms on'";
}));
# Turn off displays (sway)
(lib.optionals config.wayland.windowManager.sway.enable (afterLockTimeout {
timeout = 300;
command = "${swaymsg} 'output * dpms off'";
resumeCommand = "${swaymsg} 'output * dpms on'";
}));
};
}

View File

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

View File

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

View File

@ -3,9 +3,8 @@
lib,
config,
...
}:
{
home.packages = [ pkgs.waypipe ];
}: {
home.packages = [pkgs.waypipe];
systemd.user.services = {
waypipe-client = {
Unit.Description = "Runs waypipe on startup to support SSH forwarding";
@ -14,7 +13,7 @@
ExecStart = "${lib.getExe (config.lib.nixGL.wrap pkgs.waypipe)} --socket %h/.waypipe/client.sock client";
ExecStopPost = "${lib.getExe' pkgs.coreutils "rm"} -f %h/.waypipe/client.sock";
};
Install.WantedBy = [ "graphical-session.target" ];
Install.WantedBy = ["graphical-session.target"];
};
waypipe-server = {
Unit.Description = "Runs waypipe on startup to support SSH forwarding";
@ -24,7 +23,7 @@
ExecStart = "${lib.getExe (config.lib.nixGL.wrap pkgs.waypipe)} --socket %h/.waypipe/server.sock --title-prefix '[%H] ' --login-shell --display wayland-waypipe server -- ${lib.getExe' pkgs.coreutils "sleep"} infinity";
ExecStopPost = "${lib.getExe' pkgs.coreutils "rm"} -f %h/.waypipe/server.sock %t/wayland-waypipe";
};
Install.WantedBy = [ "default.target" ];
Install.WantedBy = ["default.target"];
};
};
}

View File

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

View File

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

View File

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

View File

@ -3,9 +3,8 @@
pkgs,
config,
...
}:
{
imports = [ ../rofi ];
}: {
imports = [../rofi];
services.dunst.enable = true;
@ -32,11 +31,13 @@
package = pkgs.i3-gaps;
};
xsession.importedVariables = [ ];
xsession.importedVariables = [];
# Overwrite default home-manager config file
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 = {
@ -48,5 +49,5 @@
".config/i3status-rust/config.toml".source = ./i3status-rust/config.toml;
};
home.sessionPath = [ "/home/julian/.config/i3/scripts" ];
home.sessionPath = ["/home/julian/.config/i3/scripts"];
}

View File

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

View File

@ -3,11 +3,8 @@
pkgs,
inputs,
...
}:
{
imports = [ inputs.nixvim.homeManagerModules.nixvim ];
}: {
imports = [inputs.nixvim.homeManagerModules.nixvim];
home.sessionVariables = {
EDITOR = "nvim";
@ -39,7 +36,6 @@
opts = {
number = false;
relativenumber = false;
};
clipboard.register = "unnamedplus"; # Use system clipboard
@ -93,9 +89,9 @@
conform-nvim = {
enable = true;
settings.formatters_by_ft = with pkgs; {
lua = [ "stylua" ];
python = [ "black" ];
nix = [ "nixfmt" ];
lua = ["stylua"];
python = ["black"];
nix = ["nixfmt"];
};
# extraOptions = {
# default_format_opts.lsp_format = "fallback";
@ -107,9 +103,9 @@
enable = true;
autoEnableSources = true;
settings.sources = [
{ name = "nvim_lsp"; }
{ name = "path"; }
{ name = "buffer"; }
{name = "nvim_lsp";}
{name = "path";}
{name = "buffer";}
];
settings.mapping = {
"<Tab>" = "cmp.mapping(cmp.mapping.select_next_item(), {'i', 's'})";
@ -157,8 +153,6 @@
lua_ls.enable = true;
};
};
};
};
}

View File

@ -2,9 +2,7 @@
lib,
pkgs,
...
}:
{
}: {
home.sessionVariables = {
FLAKE = "/home/julian/.dotfiles";
};
@ -14,5 +12,5 @@
"hs" = "nh home switch";
};
home.packages = with pkgs; [ nh ];
home.packages = with pkgs; [nh];
}

View File

@ -2,13 +2,11 @@
lib,
pkgs,
...
}:
{
}: {
# this would need you to config rofi using home-manager
# programs.rofi = { enable = true; };
home.packages = with pkgs; [ rofi ];
home.packages = with pkgs; [rofi];
home.file = {
".config/rofi/config.rasi".source = ./config.rasi;

View File

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

View File

@ -2,9 +2,7 @@
lib,
pkgs,
...
}:
{
}: {
services.blueman-applet.enable = true;
services.nextcloud-client.enable = true;
services.nextcloud-client.startInBackground = true;
@ -17,7 +15,7 @@
enable = true;
extensions = [
# Tampermonkey
{ id = "dhdgffkkebhmkfjojejmpbldmpobfkfo"; }
{id = "dhdgffkkebhmkfjojejmpbldmpobfkfo";}
];
};

View File

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

View File

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

View File

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

View File

@ -2,8 +2,7 @@
pkgs,
inputs,
...
}:
{
}: {
programs.zoxide.enable = true;
programs.zoxide.enableFishIntegration = true;
@ -36,29 +35,29 @@
manager.prepend_keymap = [
# Override defaults
{
on = [ "e" ];
on = ["e"];
run = ''shell --orphan --confirm "pcmanfm &"'';
desc = "Open gui file manager";
}
{
on = [ "<C-o>" ];
on = ["<C-o>"];
run = ''shell "$SHELL" --block --confirm'';
desc = "Open shell here";
}
{
on = [ "<C-n>" ];
on = ["<C-n>"];
run = ''shell 'dragon -x -i -T "$1"' --confirm'';
desc = "Dragndrop via dragon";
}
{
on = [ "<Enter>" ];
on = ["<Enter>"];
run = "plugin --sync smart-enter";
desc = "Enter the child directory, or open the file";
}
];
input.prepend_keymap = [
{
on = [ "<Esc>" ];
on = ["<Esc>"];
run = "close";
desc = "Cancel input";
}

View File

@ -2,13 +2,12 @@
lib,
pkgs,
...
}:
{
}: {
home.file = {
".config/starship.toml".source = ./starship.toml;
};
home.packages = with pkgs; [ starship ];
home.packages = with pkgs; [starship];
programs.starship = {
enable = true;
@ -28,14 +27,14 @@
enable = true;
plugins = [
# list of plugins: https://github.com/unixorn/awesome-zsh-plugins
{ name = "agkozak/zsh-z"; }
{name = "agkozak/zsh-z";}
{
name = "zsh-users/zsh-completions";
}
# make it behave like fish
{ name = "zsh-users/zsh-autosuggestions"; }
{ name = "zsh-users/zsh-history-substring-search"; }
{name = "zsh-users/zsh-autosuggestions";}
{name = "zsh-users/zsh-history-substring-search";}
{
name = "zsh-users/zsh-syntax-highlighting";
} # must be last sourced plugin

View File

@ -5,13 +5,14 @@
config,
outputs,
...
}:
{
imports = [
../features/fonts
# ../features/cli
# ../features/helix
] ++ (builtins.attrValues outputs.homeManagerModules);
}: {
imports =
[
../features/fonts
# ../features/cli
# ../features/helix
]
++ (builtins.attrValues outputs.homeManagerModules);
nix = {
package = lib.mkDefault pkgs.nix;
@ -39,7 +40,7 @@
homeDirectory = lib.mkDefault "/home/${config.home.username}";
stateVersion = lib.mkDefault "23.11";
sessionPath = [ "$HOME/.local/bin" ];
sessionPath = ["$HOME/.local/bin"];
};
# TODO: colorscheme
@ -51,5 +52,4 @@
# home.file = {
# ".colorscheme.json".text = builtins.toJSON config.colorscheme;
# };
}

View File

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

View File

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

View File

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

View File

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

View File

@ -2,8 +2,7 @@
lib,
pkgs,
...
}:
{
}: {
imports = [
../global
@ -21,9 +20,9 @@
# terminal = "kitty";
home.packages =
lib.lists.concatMap (packages-list-file: import packages-list-file { inherit pkgs; })
[
./fonts.nix
./packages.nix
];
lib.lists.concatMap (packages-list-file: import packages-list-file {inherit pkgs;})
[
./fonts.nix
./packages.nix
];
}

View File

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

View File

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

View File

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

View File

@ -2,9 +2,7 @@
config,
lib,
...
}:
{
}: {
boot.initrd.availableKernelModules = [
"vmd"
"xhci_pci"
@ -14,11 +12,11 @@
"usbhid"
"sd_mod"
];
boot.initrd.kernelModules = [ "dm-snapshot" ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
boot.blacklistedKernelModules = [ "pcspkr" ]; # Disables "beep"
boot.binfmt.emulatedSystems = [ "aarch64-linux" ];
boot.initrd.kernelModules = ["dm-snapshot"];
boot.kernelModules = ["kvm-intel"];
boot.extraModulePackages = [];
boot.blacklistedKernelModules = ["pcspkr"]; # Disables "beep"
boot.binfmt.emulatedSystems = ["aarch64-linux"];
boot.initrd.luks.devices = {
root = {
@ -62,7 +60,7 @@
};
swapDevices = [
{ device = "/dev/disk/by-uuid/26140b4a-0579-406d-a484-35aa31b32e80"; }
{device = "/dev/disk/by-uuid/26140b4a-0579-406d-a484-35aa31b32e80";}
];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking

View File

@ -1,9 +1,11 @@
# sudo nixos-rebuild switch --flake .#builder --target-host root@192.168.3.118
# or
# deploy .#builder
{ config, pkgs, ... }:
{
config,
pkgs,
...
}: {
imports = [
./hardware-configuration.nix
@ -31,7 +33,7 @@
boot.loader.grub.device = "/dev/sda";
# Emulated systems used as alternative to cross-compiling
boot.binfmt.emulatedSystems = [ "aarch64-linux" ];
boot.binfmt.emulatedSystems = ["aarch64-linux"];
networking.hostName = "builder";
@ -61,16 +63,16 @@
"https://nix-community.cachix.org"
"https://cache.nixos.org/"
];
trusted-public-keys = [ "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" ];
trusted-public-keys = ["nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="];
trusted-users = [ "nix" ];
trusted-users = ["nix"];
max-jobs = "auto";
cores = 0;
};
# optimize store by hardlinking store files
nix.optimise.automatic = true;
nix.optimise.dates = [ "03:15" ];
nix.optimise.dates = ["03:15"];
# nix.gc.automatic = true;
# nix.gc.dates = "daily";
@ -209,8 +211,7 @@
};
virtualHosts."binarycache.julian-mutter.de" = {
locations."/".proxyPass =
"http://${config.services.nix-serve.bindAddress}:${toString config.services.nix-serve.port}";
locations."/".proxyPass = "http://${config.services.nix-serve.bindAddress}:${toString config.services.nix-serve.port}";
};
clientMaxBodySize = "2G";
@ -225,7 +226,7 @@
url = "https://gitlab.julian-mutter.de";
name = "builder";
tokenFile = config.sops.secrets."gitea_token".path;
labels = [ ]; # use default labels
labels = []; # use default labels
};
virtualisation.docker.enable = true;
@ -257,7 +258,7 @@
settings = {
listen = "[::]:8080";
jwt = { };
jwt = {};
# Data chunking
#

View File

@ -7,10 +7,8 @@
pkgs,
modulesPath,
...
}:
{
imports = [ (modulesPath + "/profiles/qemu-guest.nix") ];
}: {
imports = [(modulesPath + "/profiles/qemu-guest.nix")];
boot.initrd.availableKernelModules = [
"ata_piix"
@ -21,8 +19,8 @@
"sr_mod"
];
# boot.initrd.kernelModules = [ "amdgpu" ]; # GPU support
boot.kernelModules = [ ];
boot.extraModulePackages = [ ];
boot.kernelModules = [];
boot.extraModulePackages = [];
fileSystems."/" = {
device = "/dev/disk/by-uuid/f088fe8e-bf3d-4a89-98bd-ead9852d381f";

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
}

View File

@ -1,8 +1,4 @@
{
pkgs,
...
}:
{
{pkgs, ...}: {
imports = [
./hardware-configuration.nix
@ -24,12 +20,12 @@
networking.hostName = "kardorf";
system.stateVersion = "22.11";
services.xserver.videoDrivers = [ "nvidia" ];
services.xserver.videoDrivers = ["nvidia"];
programs.kdeconnect.enable = true;
# Enable CUPS to print documents.
services.printing.enable = true;
services.printing.browsing = true;
services.printing.drivers = with pkgs; [ gutenprint ];
services.printing.drivers = with pkgs; [gutenprint];
}

View File

@ -5,9 +5,7 @@
config,
lib,
...
}:
{
}: {
boot.initrd.availableKernelModules = [
"ehci_pci"
"ahci"
@ -17,9 +15,9 @@
"sd_mod"
"sr_mod"
];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ ];
boot.extraModulePackages = [ ];
boot.initrd.kernelModules = [];
boot.kernelModules = [];
boot.extraModulePackages = [];
boot.loader.efi.efiSysMountPoint = "/boot/efi";
fileSystems."/" = {

View File

@ -1,15 +1,13 @@
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help).
{
lib,
inputs,
config,
pkgs,
...
}:
{
}: {
imports = [
inputs.nixos-hardware.nixosModules.raspberry-pi-4
@ -47,9 +45,9 @@
sopsFile = ./vnc-passwd;
format = "binary";
};
sops.secrets."wifi/pianonix" = { };
sops.secrets."syncthing/pianonix/key" = { };
sops.secrets."syncthing/pianonix/cert" = { };
sops.secrets."wifi/pianonix" = {};
sops.secrets."syncthing/pianonix/key" = {};
sops.secrets."syncthing/pianonix/cert" = {};
# sops.secrets."syncthing/public-keys/aspi-nix" = { };
# sops.secrets."syncthing/public-keys/pianonix" = { };
@ -69,8 +67,8 @@
systemd.services.x11vnc = {
description = "Run x11vnc server";
after = [ "display-manager.service" ];
wantedBy = [ "multi-user.target" ];
after = ["display-manager.service"];
wantedBy = ["multi-user.target"];
serviceConfig = {
ExecStart = "${pkgs.x11vnc}/bin/x11vnc -rfbauth ${
config.sops.secrets."vnc-passwd".path

View File

@ -7,22 +7,20 @@
pkgs,
modulesPath,
...
}:
}: {
imports = [(modulesPath + "/installer/scan/not-detected.nix")];
{
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
boot.initrd.availableKernelModules = [ "xhci_pci" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ ];
boot.extraModulePackages = [ ];
boot.initrd.availableKernelModules = ["xhci_pci"];
boot.initrd.kernelModules = [];
boot.kernelModules = [];
boot.extraModulePackages = [];
fileSystems."/" = {
device = "/dev/disk/by-uuid/44444444-4444-4444-8888-888888888888";
fsType = "ext4";
};
swapDevices = [ ];
swapDevices = [];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's

View File

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

View File

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

View File

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

View File

@ -2,11 +2,9 @@
lib,
config,
...
}:
let
}: let
inherit (lib) mkOption types;
in
{
in {
options.monitors = mkOption {
type = types.listOf (
types.submodule {
@ -46,7 +44,7 @@ in
};
}
);
default = [ ];
default = [];
};
config = {
assertions = [

View File

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

View File

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

View File

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

View File

@ -1,20 +1,19 @@
{
inputs,
...
}:
{
{inputs, ...}: {
# For every flake input, aliases 'pkgs.inputs.${flake}' to
# 'inputs.${flake}.packages.${pkgs.system}' or
# 'inputs.${flake}.legacyPackages.${pkgs.system}'
flake-inputs = final: _: {
inputs = builtins.mapAttrs (
_: flake:
let
legacyPackages = (flake.legacyPackages or { }).${final.system} or { };
packages = (flake.packages or { }).${final.system} or { };
in
if legacyPackages != { } then legacyPackages else packages
) inputs;
inputs =
builtins.mapAttrs (
_: flake: let
legacyPackages = (flake.legacyPackages or {}).${final.system} or {};
packages = (flake.packages or {}).${final.system} or {};
in
if legacyPackages != {}
then legacyPackages
else packages
)
inputs;
};
input-flake-packages = final: prev: {
@ -23,7 +22,7 @@
};
# Adds my custom packages, available as pkgs.frajul.xyz
my-pkgs = final: prev: { frajul = import ../pkgs { pkgs = final; }; };
my-pkgs = final: prev: {frajul = import ../pkgs {pkgs = final;};};
nixpkgs-stable-unstable = final: prev: {
unstable = import inputs.nixpkgs {
@ -39,10 +38,9 @@
# Makes gparted actually open
gparted-xhost = final: prev: {
gparted-xhost = prev.gparted.overrideAttrs (oldAttrs: {
configureFlags = oldAttrs.configureFlags ++ [ "--enable-xhost-root" ];
configureFlags = oldAttrs.configureFlags ++ ["--enable-xhost-root"];
});
};
nix-matlab = inputs.nix-matlab.overlay;
}

View File

@ -2,11 +2,10 @@
writeShellApplication,
kmod,
}:
writeShellApplication {
name = "acer-battery-health-mode";
runtimeInputs = [ kmod ]; # contains insmod
runtimeInputs = [kmod]; # contains insmod
text = ''
#/usr/bin/env sh

View File

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

View File

@ -1,19 +1,15 @@
{
pkgs ? import <nixpkgs> { },
...
}:
{
conda-direnv = pkgs.callPackage ./conda-direnv { };
deploy-to-pianopi = pkgs.callPackage ./deploy-to-pianopi { };
edit-config = pkgs.callPackage ./edit-config { };
hyprshot-gui = pkgs.callPackage ./hyprshot-gui { };
install = pkgs.callPackage ./install { };
lntocp = pkgs.callPackage ./lntocp { };
open-messaging = pkgs.callPackage ./open-messaging { };
pulseaudio-popup = pkgs.callPackage ./pulseaudio-popup { };
sos = pkgs.callPackage ./sos { };
xwacomcalibrate = pkgs.callPackage ./xwacomcalibrate { };
acer-battery-health-mode = pkgs.callPackage ./acer-battery-health-mode { };
pob2 = pkgs.callPackage ./pob2 { };
wl-ocr = pkgs.callPackage ./wl-ocr { };
{pkgs ? import <nixpkgs> {}, ...}: {
conda-direnv = pkgs.callPackage ./conda-direnv {};
deploy-to-pianopi = pkgs.callPackage ./deploy-to-pianopi {};
edit-config = pkgs.callPackage ./edit-config {};
hyprshot-gui = pkgs.callPackage ./hyprshot-gui {};
install = pkgs.callPackage ./install {};
lntocp = pkgs.callPackage ./lntocp {};
open-messaging = pkgs.callPackage ./open-messaging {};
pulseaudio-popup = pkgs.callPackage ./pulseaudio-popup {};
sos = pkgs.callPackage ./sos {};
xwacomcalibrate = pkgs.callPackage ./xwacomcalibrate {};
acer-battery-health-mode = pkgs.callPackage ./acer-battery-health-mode {};
pob2 = pkgs.callPackage ./pob2 {};
wl-ocr = pkgs.callPackage ./wl-ocr {};
}

View File

@ -2,11 +2,10 @@
rsync,
writeShellApplication,
}:
writeShellApplication {
name = "deploy-to-pianopi";
runtimeInputs = [ rsync ];
runtimeInputs = [rsync];
text = ''
set -e

View File

@ -7,7 +7,6 @@
hyprshot,
zenity,
}:
stdenv.mkDerivation rec {
pname = "hyprshot-gui";
version = "2023-10-20";
@ -19,7 +18,7 @@ stdenv.mkDerivation rec {
sha256 = "sha256-XUy6+mFbNL+3zDfS4tWva4DiJeLnRM9S8ECRayTcPfI=";
};
nativeBuildInputs = [ makeWrapper ];
nativeBuildInputs = [makeWrapper];
buildInputs = [
bash

View File

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

View File

@ -1,11 +1,8 @@
{
writeShellApplication,
}:
{writeShellApplication}:
writeShellApplication {
name = "lntocp";
runtimeInputs = [ ];
runtimeInputs = [];
text = ''
#!/bin/bash

View File

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

View File

@ -5,8 +5,7 @@
fetchFromGitHub,
unzip,
...
}:
let
}: let
data = stdenv.mkDerivation (finalAttrs: {
pname = "path-of-building-data";
version = "dev-version";
@ -18,7 +17,7 @@ let
hash = "sha256-hRS4k2V9Ze6dc7BMA0iZxjCOZgqPa3Cu7gRZiVLrFR4=";
};
nativeBuildInputs = [ unzip ];
nativeBuildInputs = [unzip];
buildCommand = ''
# I have absolutely no idea how this file is generated
@ -38,52 +37,52 @@ let
'';
});
in
stdenv.mkDerivation {
pname = "path-of-building-2";
version = "${data.version}-unstable-2023-04-09";
stdenv.mkDerivation {
pname = "path-of-building-2";
version = "${data.version}-unstable-2023-04-09";
src = fetchFromGitHub {
owner = "ernstp";
repo = "pobfrontend";
rev = "9faa19aa362f975737169824c1578d5011487c18";
hash = "sha256-zhw2PZ6ZNMgZ2hG+a6AcYBkeg7kbBHNc2eSt4if17Wk=";
};
src = fetchFromGitHub {
owner = "ernstp";
repo = "pobfrontend";
rev = "9faa19aa362f975737169824c1578d5011487c18";
hash = "sha256-zhw2PZ6ZNMgZ2hG+a6AcYBkeg7kbBHNc2eSt4if17Wk=";
};
nativeBuildInputs = with pkgs; [
meson
ninja
pkg-config
kdePackages.qttools
kdePackages.wrapQtAppsHook
];
buildInputs = with pkgs; [
kdePackages.qtbase
luajit
luajit.pkgs.lua-curl
];
nativeBuildInputs = with pkgs; [
meson
ninja
pkg-config
kdePackages.qttools
kdePackages.wrapQtAppsHook
];
buildInputs = with pkgs; [
kdePackages.qtbase
luajit
luajit.pkgs.lua-curl
];
installPhase = ''
runHook preInstall
install -Dm555 pobfrontend $out/bin/pobfrontend
runHook postInstall
'';
installPhase = ''
runHook preInstall
install -Dm555 pobfrontend $out/bin/pobfrontend
runHook postInstall
'';
preFixup = ''
qtWrapperArgs+=(
--set LUA_PATH "$LUA_PATH"
--set LUA_CPATH "$LUA_CPATH"
--chdir "${data}"
)
'';
preFixup = ''
qtWrapperArgs+=(
--set LUA_PATH "$LUA_PATH"
--set LUA_CPATH "$LUA_CPATH"
--chdir "${data}"
)
'';
passthru.data = data;
passthru.data = data;
meta = {
description = "Offline build planner for Path of Exile";
homepage = "https://pathofbuilding.community/";
license = lib.licenses.mit;
maintainers = [ lib.maintainers.k900 ];
mainProgram = "pobfrontend";
broken = stdenv.isDarwin; # doesn't find uic6 for some reason
};
}
meta = {
description = "Offline build planner for Path of Exile";
homepage = "https://pathofbuilding.community/";
license = lib.licenses.mit;
maintainers = [lib.maintainers.k900];
mainProgram = "pobfrontend";
broken = stdenv.isDarwin; # doesn't find uic6 for some reason
};
}

View File

@ -4,7 +4,6 @@
jgmenu,
pulseaudio,
}:
writeShellApplication {
name = "pulseaudio-popup";
@ -15,7 +14,7 @@ writeShellApplication {
];
# Do not insert e.g. pipefail
bashOptions = [ ];
bashOptions = [];
text = ''
HDMI_SINK="alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__hw_sofhdadsp_3__sink"

View File

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

View File

@ -8,12 +8,11 @@
tesseract5,
wl-clipboard,
langs ? "eng+hun+fra+jpn+jpn_vert+kor+kor_vert+pol+ron+spa",
}:
let
}: let
_ = lib.getExe;
in
writeShellScriptBin "wl-ocr" ''
${_ grim} -g "$(${_ slurp})" -t ppm - | ${_ tesseract5} -l ${langs} - - | ${wl-clipboard}/bin/wl-copy
echo "$(${wl-clipboard}/bin/wl-paste)"
${_ libnotify} -- "$(${wl-clipboard}/bin/wl-paste)"
''
writeShellScriptBin "wl-ocr" ''
${_ grim} -g "$(${_ slurp})" -t ppm - | ${_ tesseract5} -l ${langs} - - | ${wl-clipboard}/bin/wl-copy
echo "$(${wl-clipboard}/bin/wl-paste)"
${_ libnotify} -- "$(${wl-clipboard}/bin/wl-paste)"
''

View File

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

View File

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

View File

@ -1,14 +1,15 @@
{
# Snowfall Lib provides a customized `lib` instance with access to your flake's library
# as well as the libraries available from your flake's inputs.
lib,
# You also have access to your flake's inputs.
inputs,
# 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.
pkgs, stdenv, ... }:
# Snowfall Lib provides a customized `lib` instance with access to your flake's library
# as well as the libraries available from your flake's inputs.
lib,
# You also have access to your flake's inputs.
inputs,
# 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.
pkgs,
stdenv,
...
}:
pkgs.mkShell {
# Create your shell
}