Switch to nixpkgs-fmt formatter

This commit is contained in:
Filippo Berto 2023-02-24 09:24:21 +01:00
parent 36f6903639
commit ca59cb8f3c
Signed by: bertof
GPG key ID: 9DBF7E6A1D2CE9ED
45 changed files with 695 additions and 606 deletions

View file

@ -82,13 +82,15 @@ with lib; {
recommendedOptimisation = true; recommendedOptimisation = true;
recommendedGzipSettings = true; recommendedGzipSettings = true;
recommendedTlsSettings = true; recommendedTlsSettings = true;
virtualHosts = let virtualHosts =
let
ssl = { ssl = {
enableACME = true; enableACME = true;
forceSSL = true; forceSSL = true;
}; };
loki = "172.23.254.55"; loki = "172.23.254.55";
in { in
{
"unimi.bertof.net" = ssl // { "unimi.bertof.net" = ssl // {
locations."/".extraConfig = locations."/".extraConfig =
"rewrite ^/(.*)$ https://homes.di.unimi.it/berto/$1 redirect ;"; "rewrite ^/(.*)$ https://homes.di.unimi.it/berto/$1 redirect ;";

View file

@ -1,5 +1,10 @@
{ writeShellScriptBin, lib, xclip, coreutils, terminal-command ? "kitty sh -c" { writeShellScriptBin
, editor-command ? "hx" }: , lib
, xclip
, coreutils
, terminal-command ? "kitty sh -c"
, editor-command ? "hx"
}:
# 64 │ function clipcopy() { xclip -in -selection clipboard < "${1:-/dev/stdin}"; } # 64 │ function clipcopy() { xclip -in -selection clipboard < "${1:-/dev/stdin}"; }
# 65 │ function clippaste() { xclip -out -selection clipboard; } clip # 65 │ function clippaste() { xclip -out -selection clipboard; } clip
writeShellScriptBin "clipedit" '' writeShellScriptBin "clipedit" ''

View file

@ -9,4 +9,5 @@ let
update-background = pkgs.callPackage ./update-background { }; update-background = pkgs.callPackage ./update-background { };
vital-synth = pkgs.callPackage ./vital-synth { }; vital-synth = pkgs.callPackage ./vital-synth { };
}; };
in self in
self

View file

@ -1,7 +1,15 @@
{ lib, rice, roboto, i3lock-color, writeScriptBin, font ? { { lib
, rice
, roboto
, i3lock-color
, writeScriptBin
, font ? {
package = roboto; package = roboto;
name = "Roboto"; name = "Roboto";
}, palette ? rice.palette.palette { }, ... }: }
, palette ? rice.palette.palette { }
, ...
}:
let strPalette = lib.nix-rice.palette.toRGBAHex palette; let strPalette = lib.nix-rice.palette.toRGBAHex palette;
in writeScriptBin "lockscreen" '' in writeScriptBin "lockscreen" ''
# Using font package ${font.package} # Using font package ${font.package}

View file

@ -1,10 +1,17 @@
{ feh, glib, findutils, gnugrep, coreutils, writeScriptBin { feh
, backgrounds_directory ? "$HOME/Immagini/Sfondi" }: , glib
, findutils
, gnugrep
, coreutils
, writeScriptBin
, backgrounds_directory ? "$HOME/Immagini/Sfondi"
}:
let let
find = "${findutils}/bin/find"; find = "${findutils}/bin/find";
grep = "${gnugrep}/bin/grep"; grep = "${gnugrep}/bin/grep";
shuf = "${coreutils}/bin/shuf"; shuf = "${coreutils}/bin/shuf";
in writeScriptBin "update-background" '' in
writeScriptBin "update-background" ''
#!/bin/sh #!/bin/sh
if [ $# -eq 0 ]; then if [ $# -eq 0 ]; then
image=`${find} ${backgrounds_directory} -type f | ${grep} -v "/\." | ${shuf} -n 1` image=`${find} ${backgrounds_directory} -type f | ${grep} -v "/\." | ${shuf} -n 1`

View file

@ -43,9 +43,20 @@
}; };
}; };
outputs = { self, nixpkgs, nixpkgs-u, home-manager, agenix, deploy-rs outputs =
, flake-utils, nixos-generators, nixos-hardware, nix-rice, pre-commit-hooks { self
, tex2nix }: , nixpkgs
, nixpkgs-u
, home-manager
, agenix
, deploy-rs
, flake-utils
, nixos-generators
, nixos-hardware
, nix-rice
, pre-commit-hooks
, tex2nix
}:
let let
config = { config = {
allowUnfree = true; allowUnfree = true;
@ -98,16 +109,14 @@
eachDefaultSystem (system: eachDefaultSystem (system:
let pkgs = import nixpkgs { inherit system config overlays; }; let pkgs = import nixpkgs { inherit system config overlays; };
in { in {
formatter = pkgs.writeShellScriptBin "formatter" '' formatter = pkgs.nixpkgs-fmt;
${pkgs.findutils}/bin/find . -name '*.nix' -exec ${pkgs.nixfmt}/bin/nixfmt {} \+
'';
checks = { checks = {
pre-commit-check = pre-commit-hooks.lib.${system}.run { pre-commit-check = pre-commit-hooks.lib.${system}.run {
src = ./.; src = ./.;
hooks = { hooks = {
deadnix.enable = true; deadnix.enable = true;
nixfmt.enable = true; nixpkgs-fmt.enable = true;
statix.enable = true; statix.enable = true;
}; };
}; };
@ -235,7 +244,8 @@
}; };
odinConfig = { odinConfig = {
nixosConfigurations = let nixosConfigurations =
let
odinCommonModules = [ odinCommonModules = [
nixos-hardware.nixosModules.common-cpu-intel nixos-hardware.nixosModules.common-cpu-intel
nixos-hardware.nixosModules.common-pc-laptop nixos-hardware.nixosModules.common-pc-laptop
@ -251,7 +261,8 @@
{ home-manager.users.bertof = import ./odin/hm.nix; } { home-manager.users.bertof = import ./odin/hm.nix; }
]; ];
in rec { in
rec {
odin-nvidia = nixpkgs.lib.nixosSystem { odin-nvidia = nixpkgs.lib.nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";
modules = commonModules ++ odinCommonModules modules = commonModules ++ odinCommonModules
@ -380,7 +391,8 @@
}; };
}); });
in builtins.foldl' nixpkgs.lib.recursiveUpdate { } [ in
builtins.foldl' nixpkgs.lib.recursiveUpdate { } [
basic basic
thorConfig thorConfig
odinConfig odinConfig

View file

@ -21,7 +21,8 @@ let
}; };
}; };
}; };
in { in
{
# Include fonts packages # Include fonts packages
home.packages = [ pkgs.rice.font.monospace.package ]; home.packages = [ pkgs.rice.font.monospace.package ];
programs.alacritty = { programs.alacritty = {

View file

@ -1,14 +1,16 @@
{ {
programs.autorandr = { programs.autorandr = {
enable = true; enable = true;
profiles = let profiles =
let
dell-laptop = { dell-laptop = {
dpi = 96; dpi = 96;
fingerprint = fingerprint =
"00ffffffffffff0030e43f0500000000001a010495221378eaa1c59459578f27205054000000010101010101010101010101010101012e3680a070381f403020350058c21000001a5c2b80a070381f403020350058c21000001a000000fe0034584b3133803135365746360a000000000000413196001000000a010a202000c5"; "00ffffffffffff0030e43f0500000000001a010495221378eaa1c59459578f27205054000000010101010101010101010101010101012e3680a070381f403020350058c21000001a5c2b80a070381f403020350058c21000001a000000fe0034584b3133803135365746360a000000000000413196001000000a010a202000c5";
mode = "1920x1080"; mode = "1920x1080";
}; };
in { in
{
odin-nvidia = { odin-nvidia = {
fingerprint = { "eDP-1-1" = dell-laptop.fingerprint; }; fingerprint = { "eDP-1-1" = dell-laptop.fingerprint; };
config = { config = {

View file

@ -13,7 +13,8 @@ let
systemctl --user restart kdeconnect-indicator # Restart polybar systemctl --user restart kdeconnect-indicator # Restart polybar
''; '';
strPalette = palette.toRGBHex pkgs.rice.colorPalette; strPalette = palette.toRGBHex pkgs.rice.colorPalette;
in { in
{
xsession.windowManager.bspwm = { xsession.windowManager.bspwm = {
enable = true; enable = true;
settings = { settings = {

View file

@ -2,7 +2,8 @@
let let
strPalette = pkgs.lib.nix-rice.palette.toRgbHex pkgs.rice.colorPalette; strPalette = pkgs.lib.nix-rice.palette.toRgbHex pkgs.rice.colorPalette;
fmtString = str: "'${str}'"; fmtString = str: "'${str}'";
in { in
{
home.packages = [ pkgs.cava ]; home.packages = [ pkgs.cava ];
xdg.configFile."cava/config".text = lib.generators.toINI { } { xdg.configFile."cava/config".text = lib.generators.toINI { } {

View file

@ -1,6 +1,7 @@
{ pkgs, config, lib, ... }: { { pkgs, config, lib, ... }: {
home.packages = home.packages =
lib.optionals config.programs.helix.enable builtins.attrValues { lib.optionals config.programs.helix.enable builtins.attrValues
{
inherit (pkgs) clang-tools cmake-language-server; inherit (pkgs) clang-tools cmake-language-server;
} ++ lib.optionals config.programs.kakoune.enable builtins.attrValues { } ++ lib.optionals config.programs.kakoune.enable builtins.attrValues {
inherit (pkgs) clang-tools cmake-language-server; inherit (pkgs) clang-tools cmake-language-server;

View file

@ -1,6 +1,7 @@
{ config, pkgs, lib, ... }: { { config, pkgs, lib, ... }: {
home.packages = home.packages =
lib.optionals config.programs.helix.enable builtins.attrValues { lib.optionals config.programs.helix.enable builtins.attrValues
{
inherit (pkgs) yaml-language-server taplo-cli; inherit (pkgs) yaml-language-server taplo-cli;
inherit (pkgs.nodePackages) vscode-langservers-extracted; inherit (pkgs.nodePackages) vscode-langservers-extracted;
} ++ lib.optionals config.programs.kakoune.enable builtins.attrValues { } ++ lib.optionals config.programs.kakoune.enable builtins.attrValues {

View file

@ -1,6 +1,7 @@
{ pkgs, lib, config, ... }: { { pkgs, lib, config, ... }: {
home.packages = home.packages =
lib.optionals config.programs.helix.enable builtins.attrValues { lib.optionals config.programs.helix.enable builtins.attrValues
{
inherit (pkgs.nodePackages) typescript-language-server; inherit (pkgs.nodePackages) typescript-language-server;
} ++ lib.optionals config.programs.kakoune.enable builtins.attrValues { } ++ lib.optionals config.programs.kakoune.enable builtins.attrValues {
inherit (pkgs.nodePackages) typescript-language-server; inherit (pkgs.nodePackages) typescript-language-server;

View file

@ -1,5 +1,6 @@
{ pkgs, config, lib, ... }: { { pkgs, config, lib, ... }: {
home.packages = builtins.attrValues { home.packages = builtins.attrValues
{
inherit (pkgs) nixpkgs-fmt nixfmt nix-prefetch-scripts nix-review nix-tree; inherit (pkgs) nixpkgs-fmt nixfmt nix-prefetch-scripts nix-review nix-tree;
} ++ lib.optionals config.programs.helix.enable [ pkgs.nil ] } ++ lib.optionals config.programs.helix.enable [ pkgs.nil ]
++ lib.optionals config.programs.kakoune.enable [ pkgs.rnix-lsp ]; ++ lib.optionals config.programs.kakoune.enable [ pkgs.rnix-lsp ];

View file

@ -1,5 +1,6 @@
{ pkgs, lib, config, ... }: { { pkgs, lib, config, ... }: {
home.packages = builtins.attrValues { home.packages = builtins.attrValues
{
inherit (pkgs) inherit (pkgs)
bacon cargo cargo-audit cargo-criterion cargo-deadlinks cargo-expand bacon cargo cargo-audit cargo-criterion cargo-deadlinks cargo-expand
cargo-flamegraph cargo-fuzz cargo-hack cargo-hakari cargo-inspect cargo-flamegraph cargo-fuzz cargo-hack cargo-hakari cargo-inspect

View file

@ -5,4 +5,5 @@ let
theme = themes.ironhand; theme = themes.ironhand;
enableFPS = true; enableFPS = true;
}; };
in { home.packages = [ package ]; } in
{ home.packages = [ package ]; }

View file

@ -87,7 +87,8 @@ let
"gup" = "git pull --rebase"; "gup" = "git pull --rebase";
"gupv" = "git pull --rebase -v"; "gupv" = "git pull --rebase -v";
}; };
in { in
{
programs.git = { programs.git = {
enable = true; enable = true;
userName = "Filippo Berto"; userName = "Filippo Berto";

View file

@ -28,4 +28,5 @@ let
user-themes user-themes
# vitals # vitals
]; ];
in { home.packages = [ pkgs.gnome.gnome-tweaks ] ++ gnomeExtensions; } in
{ home.packages = [ pkgs.gnome.gnome-tweaks ] ++ gnomeExtensions; }

View file

@ -26,7 +26,8 @@ let
"text/x-c++" "text/x-c++"
]; ];
}; };
in { in
{
programs.bash.shellAliases = { x = "hx"; }; programs.bash.shellAliases = { x = "hx"; };
programs.zsh.shellAliases = { x = "hx"; }; programs.zsh.shellAliases = { x = "hx"; };
home.sessionVariables = { home.sessionVariables = {
@ -40,20 +41,25 @@ in {
programs.helix = { programs.helix = {
enable = true; enable = true;
package = pkgs.unstable_pkgs.helix; package = pkgs.unstable_pkgs.helix;
languages = [ ]; languages = [{
name = "nix";
formatter = { command = "nixpkgs-fmt"; };
# config = { nil = { formatting = { command = "nixpkgs-fmt"; }; }; };
}];
settings = { settings = {
theme = "ayu_mirage"; theme = "ayu_mirage";
editor.lsp.display-messages = true; editor.lsp.display-messages = true;
editor.scrolloff = 5; editor.scrolloff = 5;
editor.true-color = true; editor.true-color = true;
editor.soft-wrap.enable = true; # editor.soft-wrap.enable = true;
keys.normal = { keys.normal = {
"C-A-l" = ":format"; "C-A-l" = ":format";
"C-A-r" = ":reload"; "C-A-r" = ":reload";
"C-A-S-r" = ":reload-all"; "C-A-S-r" = ":reload-all";
}; };
}; };
themes = let themes =
let
transparent = "none"; transparent = "none";
gray = "#665c54"; gray = "#665c54";
dark-gray = "#3c3836"; dark-gray = "#3c3836";
@ -66,7 +72,8 @@ in {
blue = "#83a598"; blue = "#83a598";
magenta = "#d3869b"; magenta = "#d3869b";
cyan = "#8ec07c"; cyan = "#8ec07c";
in { in
{
base16 = { base16 = {
"ui.menu" = transparent; "ui.menu" = transparent;
"ui.menu.selected" = { modifiers = [ "reversed" ]; }; "ui.menu.selected" = { modifiers = [ "reversed" ]; };

View file

@ -61,7 +61,8 @@ let
inherit desktopItem; inherit desktopItem;
}; };
in { in
{
programs.bash.shellAliases = { k = "kak"; }; programs.bash.shellAliases = { k = "kak"; };
programs.zsh.shellAliases = { k = "kak"; }; programs.zsh.shellAliases = { k = "kak"; };
home.packages = packages; home.packages = packages;

View file

@ -5,7 +5,8 @@ let
background foreground color0 color1 color2 color3 color4 color5 color6 background foreground color0 color1 color2 color3 color4 color5 color6
color7 color8 color9 color10 color11 color12 color13 color14 color15; color7 color8 color9 color10 color11 color12 color13 color14 color15;
}; };
in { in
{
programs.kitty = { programs.kitty = {
enable = true; enable = true;
settings = { settings = {

View file

@ -17,7 +17,8 @@ let
${pkgs.pistol}/bin/pistol "$file" ${pkgs.pistol}/bin/pistol "$file"
''; '';
in { in
{
programs.lf = { programs.lf = {
enable = true; enable = true;
settings = { settings = {

View file

@ -2,7 +2,8 @@
let let
libinputGesturesCmd = "${pkgs.libinput-gestures}/bin/libinput-gestures"; libinputGesturesCmd = "${pkgs.libinput-gestures}/bin/libinput-gestures";
xdotool = "${pkgs.xdotool}/bin/xdotool"; xdotool = "${pkgs.xdotool}/bin/xdotool";
in { in
{
systemd.user.services."libinput-gestures" = { systemd.user.services."libinput-gestures" = {
Unit = { Unit = {
Description = "Touchpad gestures"; Description = "Touchpad gestures";

View file

@ -109,7 +109,8 @@ let
}; };
ramp = [ "" "" "" "" "" "" ]; ramp = [ "" "" "" "" "" "" ];
in { in
{
home.packages = builtins.attrValues { home.packages = builtins.attrValues {
inherit (pkgs) noto-fonts material-design-icons noto-fonts-cjk-sans; inherit (pkgs) noto-fonts material-design-icons noto-fonts-cjk-sans;
# emojione # emojione
@ -190,13 +191,15 @@ in {
type = "internal/bspwm"; type = "internal/bspwm";
format = "<label-state>"; format = "<label-state>";
label = let label =
let
common = { common = {
padding = 1; padding = 1;
# separator = " "; # separator = " ";
text = "%name%"; text = "%name%";
}; };
in { in
{
focused = recursiveUpdate common colors.selected; focused = recursiveUpdate common colors.selected;
occupied = recursiveUpdate common colors.active; occupied = recursiveUpdate common colors.active;
urgent = recursiveUpdate (recursiveUpdate common colors.active) { urgent = recursiveUpdate (recursiveUpdate common colors.active) {
@ -298,7 +301,8 @@ in {
open = recursiveUpdate colors.normal { text = ""; }; open = recursiveUpdate colors.normal { text = ""; };
close = recursiveUpdate colors.normal { text = ""; }; close = recursiveUpdate colors.normal { text = ""; };
}; };
menu = [[ menu = [
[
{ {
text = ""; text = "";
exec = confirm_command { exec = confirm_command {
@ -331,7 +335,8 @@ in {
text = "Do you want to shutdown?"; text = "Do you want to shutdown?";
}; };
} }
]]; ]
];
}; };
"module/notifications" = { "module/notifications" = {

View file

@ -13,7 +13,8 @@ let
VST_PATH = "$HOME/.vst:${userLibFolder}/vst:${systemLibFolder}/vst"; VST_PATH = "$HOME/.vst:${userLibFolder}/vst:${systemLibFolder}/vst";
VST3_PATH = "$HOME/.vst3:${userLibFolder}/vst3:${systemLibFolder}/vst3"; VST3_PATH = "$HOME/.vst3:${userLibFolder}/vst3:${systemLibFolder}/vst3";
}; };
in { in
{
home.packages = builtins.attrValues { home.packages = builtins.attrValues {
inherit (pkgs) inherit (pkgs)
carla rnnoise ardour carla rnnoise ardour

View file

@ -8,7 +8,8 @@
# bc # bc
bsp-layout clipedit lockscreen terminator; # required by bsp-layout bsp-layout clipedit lockscreen terminator; # required by bsp-layout
}; };
services.sxhkd = let services.sxhkd =
let
primaryTerminal = "kitty"; primaryTerminal = "kitty";
secondaryTerminal = "terminator"; secondaryTerminal = "terminator";
fileManager = "nautilus"; fileManager = "nautilus";
@ -34,7 +35,8 @@
level=`printf "%.0f" $(${xbacklight} -get)` level=`printf "%.0f" $(${xbacklight} -get)`
${notify} -r 2 -h "int:value:$level" "Luminosità $level" ${notify} -r 2 -h "int:value:$level" "Luminosità $level"
''; '';
in { in
{
enable = true; enable = true;
keybindings = { keybindings = {
"alt + Tab" = "rofi -show window"; "alt + Tab" = "rofi -show window";

View file

@ -26,7 +26,8 @@ let
bright.cyan bright.cyan
bright.white bright.white
]; ];
in { in
{
home.packages = [ pkgs.terminator ]; home.packages = [ pkgs.terminator ];
xdg.configFile."terminator/config".text = with strPalette; '' xdg.configFile."terminator/config".text = with strPalette; ''

View file

@ -3,7 +3,8 @@ with pkgs.lib.nix-rice;
let let
strPalette = palette.toRGBHex pkgs.rice.colorPalette; strPalette = palette.toRGBHex pkgs.rice.colorPalette;
font = pkgs.rice.font.normal; font = pkgs.rice.font.normal;
in { in
{
services.twmn = { services.twmn = {
enable = true; enable = true;
text = { text = {

View file

@ -75,11 +75,17 @@ let
categories = [ "AudioVideo" ]; categories = [ "AudioVideo" ];
} }
]; ];
webAppBuilder = { desktopName webAppBuilder =
, name ? builtins.replaceStrings [ " " ] [ "_" ] desktopName, link { desktopName
, icon ? lib.toLower name, comment ? null, categories ? [ "Network" ] }: , name ? builtins.replaceStrings [ " " ] [ "_" ] desktopName
, link
, icon ? lib.toLower name
, comment ? null
, categories ? [ "Network" ]
}:
pkgs.makeDesktopItem { pkgs.makeDesktopItem {
inherit name icon desktopName comment categories; inherit name icon desktopName comment categories;
exec = cmd link; exec = cmd link;
}; };
in { home.packages = map webAppBuilder links; } in
{ home.packages = map webAppBuilder links; }

View file

@ -19,7 +19,8 @@ let
shutDownScreens = pkgs.writeShellScript "shutdown_screens" '' shutDownScreens = pkgs.writeShellScript "shutdown_screens" ''
${xsetCmd} dpms force off ${xsetCmd} dpms force off
''; '';
in { in
{
services.xidlehook = { services.xidlehook = {
enable = true; enable = true;
package = pkgs.writeScriptBin "xidlehook" '' package = pkgs.writeScriptBin "xidlehook" ''

View file

@ -132,7 +132,8 @@ with lib; {
load printers = no load printers = no
smb encrypt = required smb encrypt = required
''; '';
shares = let shares =
let
common = { common = {
"public" = "no"; "public" = "no";
"writeable" = "yes"; "writeable" = "yes";
@ -143,7 +144,8 @@ with lib; {
"read only" = "no"; "read only" = "no";
"force group" = "users"; "force group" = "users";
}; };
in { in
{
bertof = recursiveUpdate common { bertof = recursiveUpdate common {
path = "/home/bertof/"; path = "/home/bertof/";
comment = "Bertof samba share"; comment = "Bertof samba share";
@ -239,12 +241,14 @@ with lib; {
}; };
services.snapper = { services.snapper = {
configs = let configs =
let
commonExtraConfig = '' commonExtraConfig = ''
TIMELINE_CREATE=yes TIMELINE_CREATE=yes
TIMELINE_CLEANUP=yes TIMELINE_CLEANUP=yes
''; '';
in { in
{
bertof_raid0 = { bertof_raid0 = {
subvolume = "/home/bertof/raid0"; subvolume = "/home/bertof/raid0";
extraConfig = '' extraConfig = ''

View file

@ -77,7 +77,8 @@ let
STOP STOP
''; '';
}; };
in { in
{
networking = { networking = {
hosts = { "127.0.0.1" = [ "ds.my.engine" "kdc.my.engine" "my.engine" ]; }; hosts = { "127.0.0.1" = [ "ds.my.engine" "kdc.my.engine" "my.engine" ]; };

View file

@ -6,7 +6,8 @@ let
filterAttrs (_k: v: v.fsType == "btrfs") config.fileSystems; filterAttrs (_k: v: v.fsType == "btrfs") config.fileSystems;
btrfsDevices = btrfsDevices =
unique (attrValues (mapAttrs (_: v: v.device) btrfsFileSystems)); unique (attrValues (mapAttrs (_: v: v.device) btrfsFileSystems));
in { in
{
services.btrfs.autoScrub = { services.btrfs.autoScrub = {
enable = btrfsDevices != [ ]; enable = btrfsDevices != [ ];
fileSystems = btrfsDevices; fileSystems = btrfsDevices;

View file

@ -4,7 +4,8 @@ let
url = url =
"https://github.com/notracking/hosts-blocklists/raw/master/dnsmasq/dnsmasq.blacklist.txt"; "https://github.com/notracking/hosts-blocklists/raw/master/dnsmasq/dnsmasq.blacklist.txt";
}; };
in { in
{
networking.firewall.allowedTCPPorts = [ 53 ]; networking.firewall.allowedTCPPorts = [ 53 ];
networking.firewall.allowedUDPPorts = [ 53 ]; networking.firewall.allowedUDPPorts = [ 53 ];

View file

@ -4,7 +4,8 @@ let
user_keys = user: user_keys = user:
lib.optionals (builtins.hasAttr "bertof" config.users.users) lib.optionals (builtins.hasAttr "bertof" config.users.users)
config.users.users.${user}.openssh.authorizedKeys.keys; config.users.users.${user}.openssh.authorizedKeys.keys;
in { in
{
# nix.buildMachines # nix.buildMachines
nix.distributedBuilds = true; nix.distributedBuilds = true;

View file

@ -171,14 +171,16 @@ with lib; {
services.smartd.enable = true; services.smartd.enable = true;
services.snapper = { services.snapper = {
configs = let configs =
let
bertofExtraConfig = '' bertofExtraConfig = ''
ALLOW_USERS="bertof" ALLOW_USERS="bertof"
TIMELINE_CREATE=yes TIMELINE_CREATE=yes
TIMELINE_CLEANUP=yes TIMELINE_CLEANUP=yes
''; '';
common = { extraConfig = bertofExtraConfig; }; common = { extraConfig = bertofExtraConfig; };
in { in
{
bertof_home = recursiveUpdate common { subvolume = "/home/bertof"; }; bertof_home = recursiveUpdate common { subvolume = "/home/bertof"; };
bertof_music = bertof_music =
recursiveUpdate common { subvolume = "/home/bertof/Musica"; }; recursiveUpdate common { subvolume = "/home/bertof/Musica"; };

View file

@ -18,7 +18,8 @@ let
loki = loki =
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICeomEH/27XFlOjQ/GTO2mo8qPMHTbzLIsX0dloxXfhb"; "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICeomEH/27XFlOjQ/GTO2mo8qPMHTbzLIsX0dloxXfhb";
systems = [ odin thor baldur loki ]; systems = [ odin thor baldur loki ];
in { in
{
# "oauth_proxy_client_credentials.age".publicKeys = users ++ systems; # "oauth_proxy_client_credentials.age".publicKeys = users ++ systems;
"spotify_password.age".publicKeys = users ++ systems; "spotify_password.age".publicKeys = users ++ systems;
} }

View file

@ -122,7 +122,8 @@ with lib; {
power-profiles-daemon.enable = true; power-profiles-daemon.enable = true;
smartd.enable = true; smartd.enable = true;
snapper = { snapper = {
configs = let configs =
let
common = { common = {
extraConfig = '' extraConfig = ''
ALLOW_USERS="bertof" ALLOW_USERS="bertof"
@ -130,7 +131,8 @@ with lib; {
TIMELINE_CLEANUP=yes TIMELINE_CLEANUP=yes
''; '';
}; };
in { in
{
bertof_home = recursiveUpdate common { subvolume = "/home/bertof"; }; bertof_home = recursiveUpdate common { subvolume = "/home/bertof"; };
}; };
}; };