Start refactoring

- remove emacs
- remove inputs
- trying to speed up evaluation
- update inputs
This commit is contained in:
Andrea Ciceri 2024-09-19 14:34:37 +02:00
parent 0ab8805aa5
commit 2d3e4844b7
Signed by: aciceri
SSH key fingerprint: SHA256:/AagBweyV4Hlfg9u092n8hbHwD5fcB6A3qhDiDA65Rg
39 changed files with 808 additions and 1452 deletions

View file

@ -1,24 +0,0 @@
{inputs, ...}: {
imports = [
inputs.hercules-ci-effects.flakeModule
];
herculesCI.ciSystems = [
"x86_64-linux"
"aarch64-linux"
];
hercules-ci.flake-update = {
enable = true;
updateBranch = "updated-flake-lock";
createPullRequest = true;
autoMergeMethod = "rebase";
baseMerge = {
enable = true;
method = "rebase";
};
when = {
minute = 45;
hour = 13;
dayOfWeek = ["Mon" "Tue" "Wed" "Thu" "Fri" "Sat" "Sun"];
};
};
}

1044
flake.lock generated

File diff suppressed because it is too large Load diff

View file

@ -4,56 +4,42 @@
inputs = {
flakeParts.url = "github:hercules-ci/flake-parts";
# FIXME remove constraint
nixpkgsUnstable.url = "github:NixOS/nixpkgs/2893f56de08021cffd9b6b6dfc70fd9ccd51eb60";
nixpkgsUnstableForSisko.url = "github:NixOS/nixpkgs/0e74ca98a74bc7270d28838369593635a5db3260";
nixpkgsStable.url = "github:NixOS/nixpkgs/nixos-23.11";
nixpkgs.url = "github:NixOS/nixpkgs";
# nixpkgsForSisko.url = "github:NixOS/nixpkgs/0e74ca98a74bc7270d28838369593635a5db3260";
nixosHardware.url = "github:NixOS/nixos-hardware";
homeManager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgsUnstable";
inputs.nixpkgs.follows = "nixpkgs";
};
# TODO: remove after https://github.com/nix-community/home-manager/pull/3811
homeManagerGitWorkspace = {
url = "github:aciceri/home-manager/git-workspace";
inputs.nixpkgs.follows = "nixpkgsUnstable";
inputs.nixpkgs.follows = "nixpkgs";
};
disko = {
url = "github:nix-community/disko";
inputs.nixpkgs.follows = "nixpkgsUnstable";
inputs.nixpkgs.follows = "nixpkgs";
};
pre-commit-hooks = {
url = "github:cachix/pre-commit-hooks.nix";
inputs = {
nixpkgs.follows = "nixpkgsUnstable";
nixpkgs-stable.follows = "nixpkgsStable";
};
inputs.nixpkgs.follows = "nixpkgs";
};
# FIXME go back to master after nltch's repository is re-added
nur.url = "github:nix-community/NUR/324a5f3b9fbfdb77336dc9fa1c0a02f33a6acf6d";
agenix.url = "github:ryantm/agenix";
rock5b.url = "github:aciceri/rock5b-nixos";
ccrEmacs.url = "git+https://git.aciceri.dev/aciceri/emacs.git";
treefmt-nix = {
url = "github:numtide/treefmt-nix";
inputs.nixpkgs.follows = "nixpkgsUnstable";
inputs.nixpkgs.follows = "nixpkgs";
};
hercules-ci-effects.url = "github:hercules-ci/hercules-ci-effects";
dream2nix.url = "github:nix-community/dream2nix";
hercules-ci-agent.url = "github:hercules-ci/hercules-ci-agent";
nix-fast-build = {
url = "github:Mic92/nix-fast-build";
inputs.nixpkgs.follows = "nixpkgsUnstable";
};
nixThePlanet = {
url = "github:aciceri/NixThePlanet/nix-in-darwin";
inputs.nixpkgs.follows = "nixpkgsUnstable";
inputs.nixpkgs.follows = "nixpkgs";
};
nixDarwin = {
url = "github:LnL7/nix-darwin";
inputs.nixpkgs.follows = "nixpkgsUnstable";
inputs.nixpkgs.follows = "nixpkgs";
};
nix-on-droid.url = "github:nix-community/nix-on-droid";
nixd.url = "github:nix-community/nixd";
lix = {
url = "git+https://git@git.lix.systems/lix-project/lix";
flake = false;
@ -61,14 +47,14 @@
lix-module = {
url = "git+https://git.lix.systems/lix-project/nixos-module";
inputs.lix.follows = "lix";
inputs.nixpkgs.follows = "nixpkgsUnstable";
inputs.nixpkgs.follows = "nixpkgs";
};
mobile-nixos = {
url = "github:NixOS/mobile-nixos";
flake = false;
};
arion.url = "github:hercules-ci/arion";
impermanence.url = "github:nix-community/impermanence";
vscode-server.url = "github:nix-community/nixos-vscode-server";
};
outputs = inputs @ {flakeParts, ...}:
@ -81,7 +67,6 @@
./packages
./shell
./checks
./ci
];
systems = ["x86_64-linux" "aarch64-linux"];
};

View file

@ -1,3 +1,28 @@
{pkgs, ...}: {
home.packages = [pkgs.cura];
home.packages = [
(let
cura5 = pkgs.appimageTools.wrapType2 rec {
name = "cura5";
version = "5.8.0";
src = pkgs.fetchurl {
url = "https://github.com/Ultimaker/Cura/releases/download/${version}/UltiMaker-Cura-${version}-linux-X64.AppImage";
hash = "sha256-EojVAe+o43W80ES5BY3QgGRTxztwS+B6kIOfJOtULOg=";
};
};
in
pkgs.writeScriptBin "cura" ''
#! ${pkgs.bash}/bin/bash
# AppImage version of Cura loses current working directory and treats all paths relateive to $HOME.
# So we convert each of the files passed as argument to an absolute path.
# This fixes use cases like `cd /path/to/my/files; cura mymodel.stl anothermodel.stl`.
args=()
for a in "$@"; do
if [ -e "$a" ]; then
a="$(realpath "$a")"
fi
args+=("$a")
done
QT_QPA_PLATFORM=xcb exec "${cura5}/bin/cura5" "''${args[@]}"
'')
];
}

View file

@ -5,13 +5,183 @@
}: {
programs.mbsync.enable = true;
programs.msmtp.enable = true;
programs.notmuch = {
enable = true;
hooks.preNew = "mbsync --all";
};
services.mbsync.enable = true;
home.file.".config/aerc/stylesets" = let
catppuccin-aerc = pkgs.fetchFromGitHub {
owner = "catppuccin";
repo = "aerc";
rev = "ca404a9f2d125ef12db40db663d43c9d94116a05";
hash = "sha256-OWIkHsKFts/zkrDUtbBPXHVSrHL/F0v3LB1rnlFAKmE=";
};
in {
source = "${catppuccin-aerc}/dist";
recursive = true;
};
programs.aerc = {
enable = true;
extraBinds = {
global = {
"<C-p>" = ":prev-tab<Enter>";
"<C-n>" = ":next-tab<Enter>";
"?" = ":help keys<Enter>";
};
messages = {
"h" = ":prev-tab<Enter>";
"l" = ":next-tab<Enter>";
"j" = ":next<Enter>";
"<Down>" = ":next<Enter>";
"<C-d>" = ":next 50%<Enter>";
"<C-f>" = ":next 100%<Enter>";
"<PgDn>" = ":next 100%<Enter>";
"k" = ":prev<Enter>";
"<Up>" = ":prev<Enter>";
"<C-u>" = ":prev 50%<Enter>";
"<C-b>" = ":prev 100%<Enter>";
"<PgUp>" = ":prev 100%<Enter>";
"g" = ":select 0<Enter>";
"G" = ":select -1<Enter>";
"J" = ":next-folder<Enter>";
"K" = ":prev-folder<Enter>";
"H" = ":collapse-folder<Enter>";
"L" = ":expand-folder<Enter>";
"v" = ":mark -t<Enter>";
"x" = ":mark -t<Enter>:next<Enter>";
"V" = ":mark -v<Enter>";
"T" = ":toggle-threads<Enter>";
"<Enter>" = ":view<Enter>";
"d" = ":prompt 'Really delete this message?' 'delete-message'<Enter>";
"D" = ":delete<Enter>";
"A" = ":archive flat<Enter>";
"C" = ":compose<Enter>";
"rr" = ":reply -a<Enter>";
"rq" = ":reply -aq<Enter>";
"Rr" = ":reply<Enter>";
"Rq" = ":reply -q<Enter>";
"c" = ":cf<space>";
"$" = ":term<space>";
"!" = ":term<space>";
"|" = ":pipe<space>";
"/" = ":search<space>";
"\\" = ":filter<space>";
"n" = ":next-result<Enter>";
"N" = ":prev-result<Enter>";
"<Esc>" = ":clear<Enter>";
};
"messages:folder=Drafts" = {"<Enter>" = ":recall<Enter>";};
view = {
"/" = ":toggle-key-passthrough<Enter>/";
"q" = ":close<Enter>";
"O" = ":open<Enter>";
"S" = ":save<space>";
"|" = ":pipe<space>";
"D" = ":delete<Enter>";
"A" = ":archive flat<Enter>";
"<C-l>" = ":open-link <space>";
"f" = ":forward<Enter>";
"rr" = ":reply -a<Enter>";
"rq" = ":reply -aq<Enter>";
"Rr" = ":reply<Enter>";
"Rq" = ":reply -q<Enter>";
"H" = ":toggle-headers<Enter>";
"<C-k>" = ":prev-part<Enter>";
"<C-j>" = ":next-part<Enter>";
"J" = ":next<Enter>";
"K" = ":prev<Enter>";
};
"view::passthrough" = {
"$noinherit" = true;
"$ex" = "<C-x>";
"<Esc>" = ":toggle-key-passthrough<Enter>";
};
compose = {
"$noinherit" = "true";
"$ex" = "<C-x>";
"<C-k>" = ":prev-field<Enter>";
"<C-j>" = ":next-field<Enter>";
"<A-p>" = ":switch-account -p<Enter>";
"<A-n>" = ":switch-account -n<Enter>";
"<tab>" = ":next-field<Enter>";
"<C-p>" = ":prev-tab<Enter>";
"<C-n>" = ":next-tab<Enter>";
};
"compose::editor" = {
"$noinherit" = "true";
"$ex" = "<C-x>";
"<C-k>" = ":prev-field<Enter>";
"<C-j>" = ":next-field<Enter>";
"<C-p>" = ":prev-tab<Enter>";
"<C-n>" = ":next-tab<Enter>";
};
"compose::review" = {
"y" = ":send<Enter>";
"n" = ":abort<Enter>";
"p" = ":postpone<Enter>";
"q" = ":choose -o d discard abort -o p postpone postpone<Enter>";
"e" = ":edit<Enter>";
"a" = ":attach<space>";
"d" = ":detach<space>";
};
terminal = {
"$noinherit" = "true";
"$ex" = "<C-x>";
"<C-p>" = ":prev-tab<Enter>";
"<C-n>" = ":next-tab<Enter>";
};
};
extraConfig = {
general.unsafe-accounts-conf = true;
ui = {
styleset-name = "catppuccin-mocha";
this-day-time-format = ''" 15:04"'';
this-year-time-format = "Mon Jan 02 15:04";
timestamp-format = "2006-01-02 15:04";
spinner = "[ ],[ ],[ ],[ ],[ ],[ ],[ ],[ ]";
border-char-vertical = "";
border-char-horizontal = "";
};
viewer = {always-show-mime = true;};
compose = {no-attachment-warning = "^[^>]*attach(ed|ment)";};
triggers = {
email-received = ''exec notify-send "New email from %n" "%s"'';
};
filters = {
"text/plain" = "colorize";
"text/html" = "html";
"text/calendar" = "calendar";
"message/delivery-status" = "colorize";
"message/rfc822" = "colorize";
"image/*" = "${pkgs.catimg}/bin/catimg -";
};
};
};
accounts.email = {
accounts.autistici = {
aerc.enable = true;
address = "andrea.ciceri@autistici.org";
gpg = {
key = "7A66EEA1E6C598D07D361287A1FC89532D1C565";

View file

@ -12,11 +12,6 @@
nativeMessagingHosts = [pkgs.tridactyl-native];
};
profiles.${username} = {
extensions = with pkgs.nur.repos.rycee.firefox-addons; [
privacy-badger
ublock-origin
tridactyl
];
settings = {
"browser.startup.homepage" = "https://google.it";
"browser.search.region" = "IT";

View file

@ -1,40 +1,71 @@
{
lib,
pkgs,
config,
...
}: {
programs.foot = let
catppuccin = pkgs.fetchFromGitHub {
owner = "catppuccin";
repo = "foot";
rev = "307611230661b7b1787feb7f9d122e851bae97e9";
hash = "sha256-mkPYHDJtfdfDnqLr1YOjaBpn4lCceok36LrnkUkNIE4=";
};
in {
enable = true;
server.enable = true;
settings = {
main = {
term = "xterm-256color";
login-shell = "yes";
# Using dpi-aware = "yes" font size is too small on my external monitor
# Scaling that output in sway is inefficient and make XWayland apps blurred
dpi-aware = "no";
horizontal-letter-offset = "1";
include = "${catppuccin}/themes/catppuccin-mocha.ini";
font = let
size = "13";
in
lib.concatStringsSep ", " [
"Iosevka Comfy:size=${size}"
"Symbols Nerd Font:size=${size}"
"JoyPixels:size=${size}"
];
}:
lib.mkMerge [
{
programs.foot = let
catppuccin = pkgs.fetchFromGitHub {
owner = "catppuccin";
repo = "foot";
rev = "307611230661b7b1787feb7f9d122e851bae97e9";
hash = "sha256-mkPYHDJtfdfDnqLr1YOjaBpn4lCceok36LrnkUkNIE4=";
};
in {
enable = true;
server.enable = true;
settings = {
main = {
term = "xterm-256color";
login-shell = "yes";
dpi-aware = "no";
horizontal-letter-offset = "1";
include = "${catppuccin}/themes/catppuccin-mocha.ini";
font = let
size = "13";
in
lib.concatStringsSep ", " [
"Iosevka Comfy:size=${size}"
"Symbols Nerd Font:size=${size}"
"JoyPixels:size=${size}"
];
};
cursor = {
blink = true;
};
tweak = {
overflowing-glyphs = true;
};
mouse = {
hide-when-typing = "yes";
key-bindings = {
scrollback-up-page = "Control+Shift+k";
scrollback-down-page = "Control+Shift+j";
search-start = "Control+Shift+s";
pipe-command-output = ''[sh -c "f=$(mktemp); cat - > $f; footclient hx $f; rm $f"] Control+Shift+g'';
};
mouse = {
hide-when-typing = "yes";
};
};
};
};
}
}
(lib.mkIf config.programs.fish.enable {
programs.fish.functions = {
mark_prompt_start = {
body = ''echo -en "\e]133;A\e\\"'';
onEvent = "fish_prompt";
};
foot_cmd_start = {
body = ''echo -en "\e]133;C\e\\"'';
onEvent = "fish_preexec";
};
foot_cmd_end = {
body = ''echo -en "\e]133;D\e\\'';
onEvent = "fish_postexec";
};
};
})
]

View file

@ -1,6 +1,7 @@
{
programs.helix = {
enable = true;
defaultEditor = true;
settings = {
theme = "catppuccin_mocha";
editor = {
@ -11,6 +12,10 @@
select = "underline";
};
true-color = true; # to make colors coherent when in ssh
# inline-diagnostic = {
# cursor-line = "hint";
# other-lines = "error";
# };
};
};
languages = {
@ -19,13 +24,26 @@
name = "nix";
language-servers = ["nixd"];
}
];
language-servers = [
{
name = "nixd";
command = "nixd";
name = "markdown";
language-servers = ["zk"];
}
{
name = "typescript";
language-servers = ["vtsls"];
}
];
language-server = {
nixd.command = "nixd";
vtsls = {
command = "vtsls";
args = ["--stdio"];
};
zk = {
command = "zk";
args = ["lsp"];
};
};
};
};
}

View file

@ -50,8 +50,18 @@ in {
font.name = "Sans,Symbols Nerd Font";
iconTheme = {
name = "Adwaita";
package = pkgs.gnome.adwaita-icon-theme;
package = pkgs.adwaita-icon-theme;
};
cursorTheme = {
name = "catppuccin-mocha-sapphire";
package = pkgs.catppuccin-cursors;
size = 48;
};
};
qt = {
enable = true;
platformTheme.name = "gtk3";
};
# services.kanshi = {
@ -81,126 +91,140 @@ in {
# };
# };
home.file.".icons/catppuccin-mocha-sapphire" = {
source = "${pkgs.catppuccin-cursors.mochaSapphire}/share/icons/catppuccin-mocha-sapphire-cursors";
recursive = true;
};
wayland.windowManager.hyprland = {
enable = true;
extraConfig = ''
$mod = SUPER
cursor {
hide_on_key_press = true
enable_hyprcursor = true
zoom_rigid = true
}
input {
touchpad {
disable_while_typing = true # set to true while playing
}
}
env = HYPRCURSOR_THEME,catppuccin-mocha-sapphire
env = HYPRCURSOR_SIZE,48
env = XCURSOR_THEME,catppuccin-mocha-sapphire
env = XCURSOR_SIZE,48
monitor = HDMI-A-1, 2560x1440, 0x0, 1 # picard
monitor = eDP-1, 1920x1080, 0x0, 1 # kirk
$mod = SUPER
bindl=,switch:off:Lid Switch,exec,${switchMonitorScript} open
bindl=,switch:on:Lid Switch,exec,${switchMonitorScript} close
input {
touchpad {
disable_while_typing = true # set to true while playing
}
}
exec-once = ${pkgs.hyprpaper}/bin/hyprpaper
monitor = HDMI-A-1, 2560x1440, 0x0, 1 # picard
monitor = eDP-1, 1920x1080, 0x0, 1 # kirk
windowrulev2 = tile, class:^(Spotify)$
windowrulev2 = workspace 9, class:^(Spotify)$
windowrulev2 = tile, class:^(fluffychat)$
windowrulev2 = workspace 8, class:^(fluffychat)$
windowrulev2 = tile, class:^(WhatsApp for Linux)$
windowrulev2 = workspace 7, class:^(WhatsApp for Linux)$
windowrulev2 = float, title:^(floating)$
bindl=,switch:off:Lid Switch,exec,${switchMonitorScript} open
bindl=,switch:on:Lid Switch,exec,${switchMonitorScript} close
bind = $mod, b, exec, firefox
bind = $mod, t, exec, foot
bind = $mod, RETURN, exec, emacsclient -c --eval "(ccr/start-eshell)"
bind = $mod, x, exec, emacsclient -c
bind = $mod SHIFT, n, exec, emacsclient --eval '(ccr/org-capture "n")' -c -F '((name . "floating"))'
bind = $mod SHIFT, w, exec, emacsclient --eval '(ccr/org-capture "j")' -c -F '((name . "floating"))'
bind = $mod, y, exec, ${pkgs.waypipe}/bin/waypipe --compress lz4=10 ssh picard.fleet emacsclient -c
bind = $mod, d, exec, ${pkgs.fuzzel}/bin/fuzzel --background-color=253559cc --border-radius=5 --border-width=0
bind = $mod, s, exec, ${screenshotScript}
bind = , XF86MonBrightnessUp, exec, ${pkgs.brightnessctl}/bin/brightnessctl s +5%
bind = , XF86MonBrightnessDown, exec, ${pkgs.brightnessctl}/bin/brightnessctl s 5%-
bind = $mod, code:60, exec, ${pkgs.brightnessctl}/bin/brightnessctl s +5%
bind = $mod, code:59, exec, ${pkgs.brightnessctl}/bin/brightnessctl s 5%-
exec-once = ${pkgs.hyprpaper}/bin/hyprpaper
windowrulev2 = tile, class:^(Spotify)$
windowrulev2 = workspace 9, class:^(Spotify)$
windowrulev2 = float, title:^(floating)$
bind = $mod SHIFT, q, killactive
bind = $mod SHIFT, f, fullscreen, 0
bind = $mod SHIFT, e, exit
bind = $mod, b, exec, firefox
bind = $mod, t, exec, footclient
bind = $mod, RETURN, exec, emacsclient -c --eval "(ccr/start-eshell)"
bind = $mod SHIFT, g, exec, emacsclient -c --eval "(ccr/start-chatgpt)"
bind = $mod, x, exec, emacsclient -c
bind = $mod SHIFT, n, exec, emacsclient --eval '(ccr/org-capture "n")' -c -F '((name . "floating"))'
bind = $mod SHIFT, w, exec, emacsclient --eval '(ccr/org-capture "j")' -c -F '((name . "floating"))'
bind = $mod, y, exec, ${pkgs.waypipe}/bin/waypipe --compress lz4=10 ssh picard.fleet emacsclient -c
bind = $mod, d, exec, ${pkgs.fuzzel}/bin/fuzzel --background-color=253559cc --border-radius=5 --border-width=0
bind = $mod, s, exec, ${screenshotScript}
bind = , XF86MonBrightnessUp, exec, ${pkgs.brightnessctl}/bin/brightnessctl s +5%
bind = , XF86MonBrightnessDown, exec, ${pkgs.brightnessctl}/bin/brightnessctl s 5%-
bind = $mod, code:60, exec, ${pkgs.brightnessctl}/bin/brightnessctl s +5%
bind = $mod, code:59, exec, ${pkgs.brightnessctl}/bin/brightnessctl s 5%-
bind = $mod, h, movefocus, l
bind = $mod, l, movefocus, r
bind = $mod, k, movefocus, u
bind = $mod, j, movefocus, d
bind = $mod SHIFT, t, togglegroup
bind = $mod, G, changegroupactive
bind = $mod SHIFT, q, killactive
bind = $mod SHIFT, f, fullscreen, 0
bind = $mod SHIFT, e, exit
bind = $mod SHIFT, h, movewindow, l
bind = $mod SHIFT, l, movewindow, r
bind = $mod SHIFT, k, movewindow, u
bind = $mod SHIFT, j ,movewindow, d
bind = $mod, h, movefocus, l
bind = $mod, l, movefocus, r
bind = $mod, k, movefocus, u
bind = $mod, j, movefocus, d
bind = $mod, p, movecurrentworkspacetomonitor, r
bind = $mod, o, movecurrentworkspacetomonitor, l
bind = $mod SHIFT, h, movewindow, l
bind = $mod SHIFT, l, movewindow, r
bind = $mod SHIFT, k, movewindow, u
bind = $mod SHIFT, j ,movewindow, d
bindm=ALT,mouse:272,movewindow
bind = $mod, p, movecurrentworkspacetomonitor, r
bind = $mod, o, movecurrentworkspacetomonitor, l
bind = $mod, 1, workspace, 1
bind = $mod, 2, workspace, 2
bind = $mod, 3, workspace, 3
bind = $mod, 4, workspace, 4
bind = $mod, 5, workspace, 5
bind = $mod, 6, workspace, 6
bind = $mod, 7, workspace, 7
bind = $mod, 8, workspace, 8
bind = $mod, 9, workspace, 9
bind = $mod, 0, workspace, 10
bindm=ALT,mouse:272,movewindow
bind = $mod SHIFT, 1, movetoworkspace, 1
bind = $mod SHIFT, 2, movetoworkspace, 2
bind = $mod SHIFT, 3, movetoworkspace, 3
bind = $mod SHIFT, 4, movetoworkspace, 4
bind = $mod SHIFT, 5, movetoworkspace, 5
bind = $mod SHIFT, 6, movetoworkspace, 6
bind = $mod SHIFT, 7, movetoworkspace, 7
bind = $mod SHIFT, 8, movetoworkspace, 8
bind = $mod SHIFT, 9, movetoworkspace, 9
bind = $mod SHIFT, 0, movetoworkspace, 10
bind = $mod, 1, workspace, 1
bind = $mod, 2, workspace, 2
bind = $mod, 3, workspace, 3
bind = $mod, 4, workspace, 4
bind = $mod, 5, workspace, 5
bind = $mod, 6, workspace, 6
bind = $mod, 7, workspace, 7
bind = $mod, 8, workspace, 8
bind = $mod, 9, workspace, 9
bind = $mod, 0, workspace, 10
general {
gaps_in = 0
gaps_out = 0
border_size = 1
col.active_border = rgba(AF8D61FF) rgba(CEB153FF) rgba(7B8387FF) 45deg
col.inactive_border = rgba(AF8D6166)
}
bind = $mod SHIFT, 1, movetoworkspace, 1
bind = $mod SHIFT, 2, movetoworkspace, 2
bind = $mod SHIFT, 3, movetoworkspace, 3
bind = $mod SHIFT, 4, movetoworkspace, 4
bind = $mod SHIFT, 5, movetoworkspace, 5
bind = $mod SHIFT, 6, movetoworkspace, 6
bind = $mod SHIFT, 7, movetoworkspace, 7
bind = $mod SHIFT, 8, movetoworkspace, 8
bind = $mod SHIFT, 9, movetoworkspace, 9
bind = $mod SHIFT, 0, movetoworkspace, 10
decoration {
# See https://wiki.hyprland.org/Configuring/Variables/ for more
general {
gaps_in = 0
gaps_out = 0
border_size = 1
col.active_border = rgba(AF8D61FF) rgba(CEB153FF) rgba(7B8387FF) 45deg
col.inactive_border = rgba(AF8D6166)
}
rounding = 2
# blur = true
# blur_size = 8
# blur_passes = 1
# blur_new_optimizations = true
decoration {
# See https://wiki.hyprland.org/Configuring/Variables/ for more
drop_shadow = true
shadow_range = 4
shadow_render_power = 3
col.shadow = rgba(a8cfee11)
}
rounding = 2
# blur = true
# blur_size = 8
# blur_passes = 1
# blur_new_optimizations = true
animations {
enabled = true
drop_shadow = true
shadow_range = 4
shadow_render_power = 3
col.shadow = rgba(a8cfee11)
}
# Some default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more
animations {
enabled = true
bezier = myBezier, 0.05, 0.9, 0.1, 1.05
# Some default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more
animation = windows, 1, 3, myBezier
animation = windowsOut, 1, 3, default, popin 80%
animation = border, 1, 5, default
animation = borderangle, 1, 4, default
animation = fade, 1, 3, default
animation = workspaces, 1, 3, default
}
bezier = myBezier, 0.05, 0.9, 0.1, 1.05
animation = windows, 1, 3, myBezier
animation = windowsOut, 1, 3, default, popin 80%
animation = border, 1, 5, default
animation = borderangle, 1, 4, default
animation = fade, 1, 3, default
animation = workspaces, 1, 3, default
}
'';
};
}

View file

@ -13,7 +13,7 @@
Service = {
CPUSchedulingPolicy = "idle";
IOSchedulingClass = "idle";
ExecStart = "${pkgs.nix-index}/bin/nix-index --nixpkgs ${fleetFlake.inputs.nixpkgsUnstable}";
ExecStart = "${pkgs.nix-index}/bin/nix-index --nixpkgs ${fleetFlake.inputs.nixpkgs}";
};
};

View file

@ -1,9 +1,7 @@
{
config,
lib,
pkgs,
age,
fleetFlake,
hostname,
...
}: {
@ -31,6 +29,24 @@
controlMaster = "auto";
};
systemd.user.services.atuind = {
Unit.Description = "Atuin daemon";
Install = {WantedBy = ["default.target"];};
Service.ExecStart = "${lib.getExe pkgs.atuin} daemon";
};
programs.atuin = {
enable = true;
settings = {
daemon.enabled = true;
auto_sync = true;
sync_frequency = "5m";
sync_address = "http://sisko.fleet:8889";
search_mode = "fuzzy";
style = "compact";
};
};
# programs.starship = {
# enable = false;
# settings = {
@ -222,10 +238,10 @@
nix-zsh-completions
comma
carapace # used by nushell
neovim
]
++ (lib.optionals (builtins.elem hostname ["kirk" "picard"]) [
nil # TODO probably not best place
(fleetFlake.inputs.nixd.packages.${pkgs.system}.nixd) # TODO probably not best place
nixd # TODO probably not the best place
terraform-lsp # TODO probably not best place
python3Packages.jedi-language-server # TODO probably not best place
nodePackages.typescript-language-server # TODO probably not best place

View file

@ -1,7 +1,11 @@
{pkgs, ...}: let
spotify-adblock = pkgs.nur.repos.nltch.spotify-adblock;
{
lib,
pkgs,
...
}: let
spotify-adblocked = pkgs.callPackage ../../packages/spotify-adblocked {};
in {
home.packages = [spotify-adblock];
home.packages = [spotify-adblocked];
systemd.user.services.spotify-adblocked = {
Install.WantedBy = ["graphical-session.target"];
@ -12,7 +16,7 @@ in {
};
Service = {
ExecStart = "${spotify-adblock}/bin/spotify";
ExecStart = lib.getExe spotify-adblocked;
Restart = "on-failure";
RestartSec = 3;
};

View file

@ -30,7 +30,7 @@
font.name = "Sans,Symbols Nerd Font";
iconTheme = {
name = "Adwaita";
package = pkgs.gnome.adwaita-icon-theme;
package = pkgs.adwaita-icon-theme;
};
};

View file

@ -4,17 +4,6 @@
...
}: {
services.swayidle = let
# Downgraded due to
# https://github.com/mortie/swaylock-effects/issues/95
# swaylock-effects = pkgs.swaylock-effects.overrideAttrs (_: {
# version = "jirutka-master";
# src = pkgs.fetchFromGitHub {
# owner = "jirutka";
# repo = "swaylock-effects";
# rev = "7c5681ce96587ce3090c6698501faeccdfdc157d";
# sha256 = "sha256-09Kq90wIIF9lPjiY2anf9MSgi/EqeXKXW1mFmhxA/aM";
# };
# });
swaylockWithArgs = pkgs.writeScriptBin "swaylockWithArgs" ''
${pkgs.swaylock-effects}/bin/swaylock \
--daemonize \
@ -30,7 +19,6 @@
--line-color 00000000 \
--inside-color 00000088 \
--separator-color 00000000 \
--grace 2 \
--fade-in 0.2
'';
swaylockCommand = "${swaylockWithArgs}/bin/swaylockWithArgs";

View file

@ -0,0 +1,21 @@
{
pkgs,
lib,
...
}: {
home.packages = [pkgs.tremotesf];
systemd.user.services.tremotesf = {
Install.WantedBy = ["graphical-session.target"];
Unit = {
Description = "tremotesf";
};
Service = {
ExecStart = "${lib.getExe pkgs.tremotesf} --minimized";
Restart = "on-failure";
RestartSec = 3;
};
};
}

View file

@ -0,0 +1,6 @@
{
services.vscode-server = {
enable = true;
enableFHS = true;
};
}

View file

@ -1,7 +1,6 @@
{
pkgs,
lib,
fleetFlake,
...
}: {
programs.waybar = {

View file

@ -6,11 +6,10 @@
home.packages = [pkgs.zmkBATx];
systemd.user.services.zmkBATx = {
Install.WantedBy = ["graphical-session.target"];
Install.WantedBy = ["graphical-session.target" "waybar.service"];
Unit = {
Description = "zmkBATx";
PartOf = ["graphical-session.target"];
};
Service = {

View file

@ -80,7 +80,7 @@
in
builtins.getFlake "github:NixOS/nixpkgs/${rev}";
extraHmModules = [
inputs.ccrEmacs.hmModules.default
# inputs.ccrEmacs.hmModules.default
];
vpn = {
ip = "10.100.0.5";
@ -107,7 +107,7 @@
inputs.lix-module.nixosModules.default
];
extraHmModules = [
inputs.ccrEmacs.hmModules.default
# inputs.ccrEmacs.hmModules.default
"${inputs.homeManagerGitWorkspace}/modules/services/git-workspace.nix"
];
secrets = {
@ -132,8 +132,9 @@
# inputs.hercules-ci-agent.nixosModules.agent-service
];
extraHmModules = [
inputs.ccrEmacs.hmModules.default
# inputs.ccrEmacs.hmModules.default
"${inputs.homeManagerGitWorkspace}/modules/services/git-workspace.nix"
inputs.vscode-server.nixosModules.home
];
secrets = {
"picard-wireguard-private-key" = {};
@ -159,7 +160,6 @@
};
extraModules = with inputs; [
disko.nixosModules.disko
arion.nixosModules.arion
impermanence.nixosModules.impermanence
# lix-module.nixosModules.default
# inputs.hercules-ci-agent.nixosModules.agent-service;

View file

@ -1,9 +1,7 @@
{
fleetModules,
config,
lib,
pkgs,
fleetFlake,
...
}: {
imports =

View file

@ -28,7 +28,7 @@ in {
nixpkgs = lib.mkOption {
description = "Used nixpkgs";
type = lib.types.anything;
default = inputs.nixpkgsUnstable;
default = inputs.nixpkgs;
};
extraModules = lib.mkOption {
description = "Extra NixOS modules";
@ -64,7 +64,7 @@ in {
nixpkgs = lib.mkOption {
description = "Used nixpkgs";
type = lib.types.anything;
default = inputs.nixpkgsUnstable;
default = inputs.nixpkgs;
};
extraModules = lib.mkOption {
description = "Extra NixOS modules";
@ -101,7 +101,7 @@ in {
nixpkgs = lib.mkOption {
description = "Used nixpkgs";
type = lib.types.anything;
default = inputs.nixpkgsUnstable;
default = inputs.nixpkgs;
};
homeManager = lib.mkOption {
description = "Used home-manager";
@ -174,11 +174,7 @@ in {
default = "ccr";
};
};
config.overlays = with inputs;
[
nur.overlay
]
++ cfg.overlays;
config.overlays = with inputs; cfg.overlays;
}));
default = {};
};
@ -260,7 +256,6 @@ in {
fleetHmModules = builtins.map (moduleName: "${self.outPath}/hmModules/${moduleName}");
fleetFlake = self;
vpn = cfg.vpnExtra // (lib.mapAttrs (_: host: host.vpn) cfg.hosts);
inherit (flakePartsArgs.config.allSystems.${config.system}.allModuleArgs.config._module.args) inputs';
};
};
};
@ -291,7 +286,7 @@ in {
internal = true;
default = hostname: config:
inputs.nix-on-droid.lib.nixOnDroidConfiguration {
pkgs = inputs.nixpkgsUnstable.legacyPackages.aarch64-linux;
pkgs = inputs.nixpkgs.legacyPackages.aarch64-linux;
modules = [
({
lib,

View file

@ -71,13 +71,6 @@
environment.systemPackages = with pkgs; [waypipe];
home-manager.users.ccr.gtk = {
enable = true;
iconTheme = {
name = "Adwaita";
package = pkgs.gnome.adwaita-icon-theme;
};
};
programs.dconf.enable = true;
programs.mosh.enable = true;

View file

@ -29,7 +29,6 @@
"printing"
"pam"
"wireguard-client"
"restic"
"binfmt"
"greetd"
# "syncthing"
@ -37,7 +36,7 @@
"forgejo-runners"
"teamviewer"
# "macos-ventura"
# "sunshine"
"sunshine"
"mount-rock5b"
"adb"
"guix"
@ -58,7 +57,8 @@
"shell"
"element"
"zmkbatx"
"emacs"
"tremotesf"
# "emacs"
"firefox"
"gpg"
"mpv"
@ -83,6 +83,7 @@
"obs-studio"
"calibre"
"reinstall-magisk-on-lineage"
"vscode-server"
];
extraGroups = [];
backupPaths = [];
@ -104,7 +105,18 @@
"i2c-dev" # needed?
];
boot.extraModulePackages = [config.boot.kernelPackages.ddcci-driver];
# https://github.com/NixOS/nixpkgs/issues/328909
boot.extraModulePackages = [
(config.boot.kernelPackages.ddcci-driver.overrideAttrs (old: {
patches = [];
src = pkgs.fetchFromGitLab {
owner = "${old.pname}-linux";
repo = "${old.pname}-linux";
rev = "7853cbfc28bc62e87db79f612568b25315397dd0";
hash = "sha256-QImfvYzMqyrRGyrS6I7ERYmteaTijd8ZRnC6+bA9OyM=";
};
}))
];
systemd.services.ddcci = {
serviceConfig.Type = "oneshot";

View file

@ -37,17 +37,18 @@
"garmin-collector"
"restic"
# "immich"
"atuin"
]
++ [
./disko.nix
];
# boot.kernelPackages = pkgs.linuxKernel.packages.linux_6_8;
# boot.kernelPackages = pkgs.linuxPackagesFor pkgs.linux_testing;
boot.kernelPackages = let
pkgs = fleetFlake.inputs.nixpkgsUnstableForSisko.legacyPackages.aarch64-linux;
in
pkgs.linuxPackagesFor pkgs.linux_testing;
boot.kernelPackages = pkgs.linuxPackagesFor pkgs.linux_6_10;
# boot.kernelPackages = let
# pkgs = fleetFlake.inputs.nixpkgsForSisko.legacyPackages.aarch64-linux;
# in
# pkgs.linuxPackagesFor pkgs.linux_testing;
# boot.kernelPackages = pkgs.linuxPackagesFor (pkgs.linux_6_9.override {
# argsOverride = {
# src = pkgs.fetchFromGitLab {

14
modules/atuin/default.nix Normal file
View file

@ -0,0 +1,14 @@
{config, ...}: {
services.atuin = {
enable = true;
openFirewall = false; # use only in the VPN
port = 8889;
host = "0.0.0.0";
openRegistration = true;
};
networking.firewall.interfaces."wg0" = {
allowedTCPPorts = [
config.services.atuin.port
];
};
}

View file

@ -7,10 +7,10 @@
system.autoUpgrade = {
enable = false;
flake = "github:aciceri/nixfleet#${config.networking.hostName}";
flags =
lib.lists.optional
(builtins.hasAttr "ccrEmacs" options)
["--update-input" "ccrEmacs" "ccrEmacs"];
# flags =
# lib.lists.optional
# (builtins.hasAttr "ccrEmacs" options)
# ["--update-input" "ccrEmacs" "ccrEmacs"];
dates = "daily";
allowReboot = false;
};

View file

@ -1,14 +1,13 @@
# heavily based on https://discourse.nixos.org/t/gitea-nix-actions-runner-setup/35279
{
config,
inputs',
pkgs,
lib,
...
}: let
storeDeps = pkgs.runCommand "store-deps" {} ''
mkdir -p $out/bin
for dir in ${toString [pkgs.coreutils pkgs.findutils pkgs.gnugrep pkgs.gawk pkgs.git pkgs.nix pkgs.bash pkgs.jq pkgs.nodejs inputs'.nix-fast-build.packages.nix-fast-build pkgs.curl pkgs.tea]}; do
for dir in ${with pkgs; builtins.toString [coreutils findutils gnugrep gawk git nix bash jq nodejs nix-fast-build curl tea]}; do
for bin in "$dir"/bin/*; do
ln -s "$bin" "$out/bin/$(basename "$bin")"
done

View file

@ -13,6 +13,15 @@
Exec=Hyprland
'';
})
(pkgs.writeTextFile {
name = "xorg-session.desktop";
destination = "/cosmic-session.desktop";
text = ''
[Desktop Entry]
Name=Cosmic
Exec=cosmic-session
'';
})
];
in {
services.greetd = {

View file

@ -27,53 +27,12 @@
rev = "d42edcabc67ba6a7f960e849c8aaec1aabef87c0";
hash = "sha256-KqbP6TpH9B0/AjtsW5TcWSNgUhND+w8rO6X8fHqtsDI=";
};
tuya-device-sharing-sdk = ps:
ps.callPackage (
{
lib,
buildPythonPackage,
fetchPypi,
requests,
paho-mqtt,
cryptography,
}: let
pname = "tuya-device-sharing-sdk";
version = "0.2.0";
in
buildPythonPackage {
inherit pname version;
src = fetchPypi {
inherit pname version;
hash = "sha256-fu8zh59wlnxtstNbNL8mIm10tiXy22oPbi6oUy5x8c8=";
};
postPatch = ''
touch requirements.txt
'';
doCheck = false;
propagatedBuildInputs = [
requests
paho-mqtt
cryptography
];
meta = with lib; {
description = "Tuya Device Sharing SDK";
homepage = "https://github.com/tuya/tuya-device-sharing-sdk";
license = licenses.mit;
maintainers = with maintainers; [aciceri];
};
}
) {};
in {
services.home-assistant = {
enable = true;
openFirewall = true;
package = pkgs.home-assistant.overrideAttrs (old: {
# doInstallCheck = false;
doInstallCheck = false;
# prePatch =
# ''
# rm -rf homeassistant/components/smartthings
@ -107,7 +66,7 @@ in {
# used by pun_sensor
holidays
beautifulsoup4
(tuya-device-sharing-sdk python3Packages) # remove after https://github.com/NixOS/nixpkgs/pull/294706/
tuya-device-sharing-sdk
getmac
garminconnect
tzlocal

View file

@ -1,221 +1,23 @@
# { lib, pkgs, config, ... }:
# let
# immichRoot = "/mnt/hd/immich";
# immichData = "${immichRoot}/data";
# # immichVersion = "v1.105.1";
# immichVersion = "v1.105.1";
# sharedEnv = {
# # You can find documentation for all the supported env variables at https://immich.app/docs/install/environment-variables
# # The location where your uploaded files are stored
# UPLOAD_LOCATION="./library";
# DB_DATA_LOCATION="./postgres";
# IMMICH_VERSION=immichVersion;
# DB_PASSWORD="postgres";
# DB_USERNAME="postgres";
# DB_DATABASE_NAME="immich";
# DB_HOSTNAME="postgres";
# REDIS_HOSTNAME = "redis";
# };
# postgresRoot = "${immichRoot}/pgsql";
# machineLearning = "${immichRoot}/ml-cache";
# in {
# systemd.tmpfiles.rules = [
# "d ${immichRoot} 770 ccr wheel"
# "d ${immichData} 770 ccr wheel"
# "d ${postgresRoot} 770 ccr wheel"
# "d ${machineLearning} 770 ccr wheel"
# ];
# virtualisation.docker.enable = lib.mkForce false;
# virtualisation.podman.enable = lib.mkForce true;
# virtualisation.podman.dockerSocket.enable = lib.mkForce true;
# virtualisation.podman.defaultNetwork.settings.dns_enabled = lib.mkForce true;
# networking.firewall.interfaces."podman+".allowedUDPPorts = [53 5353];
# environment.systemPackages = [
# pkgs.arion
# ];
# virtualisation.arion = {
# backend = lib.mkForce "podman-socket";
# projects.immich = {
# serviceName = "immich";
# settings = {
# project.name = "immich";
# networks.default = {
# name = "immich";
# };
# services = {
# "server" = {
# service = {
# image = "ghcr.io/immich-app/immich-server:${immichVersion}";
# container_name = "server";
# command = ["start.sh" "immich"];
# environment = sharedEnv // {
# # NODE_ENV = "production";
# };
# ports = [
# "2283:3001"
# ];
# volumes = [
# "${immichData}:/usr/src/app/upload:rw"
# "/etc/localtime:/etc/localtime:ro"
# ];
# depends_on = ["redis" "postgres"];
# restart = "always";
# };
# };
# "microservices" = {
# service = {
# image = "ghcr.io/immich-app/immich-server:${immichVersion}";
# container_name = "microservices";
# command = ["start.sh" "microservices"];
# environment = sharedEnv;
# volumes = ["${immichData}:/usr/src/app/upload:rw"];
# depends_on = ["redis" "postgres"];
# restart = "always";
# };
# };
# "machine_learning" = {
# service = {
# image = "ghcr.io/immich-app/immich-machine-learning:${immichVersion}";
# container_name = "machine_learning";
# volumes = [
# "${machineLearning}:/cache"
# ];
# restart = "always";
# environment = sharedEnv // {
# # NODE_ENV = "production";
# };
# };
# };
# "redis" = {
# service = {
# image = "docker.io/redis:6.2-alpine";
# container_name = "redis";
# restart = "always";
# tmpfs = ["/data"];
# };
# };
# "postgres" = {
# service = {
# image = "docker.io/tensorchord/pgvecto-rs:pg14-v0.2.0";
# container_name = "postgres";
# volumes = [
# "${postgresRoot}:/var/lib/postgresql/data"
# ];
# restart = "always";
# environment = {
# POSTGRES_PASSWORD = sharedEnv.DB_PASSWORD;
# POSTGRES_USER = sharedEnv.DB_USERNAME;
# POSTGRES_DB = sharedEnv.DB_DATABASE_NAME;
# POSTGRES_INITDB_ARGS = "--data-checksums";
# };
# };
# };
# };
# };
# };
# };
# }
{config, ...}: let
immichHost = "immich.example.com"; # TODO: put your immich domain name here
immichRoot = "/mnt/hd/immich"; # TODO: Tweak these to your desired storage locations
immichPhotos = "${immichRoot}/photos";
immichAppdataRoot = "${immichRoot}/appdata";
immichVersion = "release";
# immichExternalVolume1 = "/tank/BackupData/Google Photos/someone@example.com"; # TODO: if external volumes are desired
postgresRoot = "${immichAppdataRoot}/pgsql";
postgresPassword = "immich"; # TODO: put a random password here
postgresUser = "immich";
postgresDb = "immich";
nixpkgsImmich = builtins.getFlake "github:NixOS/nixpkgs/c0ee4c1770aa1ef998c977c4cc653a07ec95d9bf";
in {
# The primary source for this configuration is the recommended docker-compose installation of immich from
# https://immich.app/docs/install/docker-compose, which linkes to:
# - https://github.com/immich-app/immich/releases/latest/download/docker-compose.yml
# - https://github.com/immich-app/immich/releases/latest/download/example.env
# and has been transposed into nixos configuration here. Those upstream files should probably be checked
# for serious changes if there are any upgrade problems here.
#
# After initial deployment, these in-process configurations need to be done:
# - create an admin user by accessing the site
# - login with the admin user
# - set the "Machine Learning Settings" > "URL" to http://immich_machine_learning:3003
virtualisation.oci-containers.containers.immich_server = {
image = "ghcr.io/immich-app/immich-server:${immichVersion}";
ports = ["127.0.0.1:2283:3001"];
extraOptions = [
"--pull=newer"
# Force DNS resolution to only be the podman dnsname name server; by default podman provides a resolv.conf
# that includes both this server and the upstream system server, causing resolutions of other pod names
# to be inconsistent.
"--dns=10.88.0.1"
];
cmd = ["start.sh" "immich"];
environment = {
IMMICH_VERSION = immichVersion;
DB_HOSTNAME = "immich_postgres";
DB_USERNAME = postgresUser;
DB_DATABASE_NAME = postgresDb;
DB_PASSWORD = postgresPassword;
REDIS_HOSTNAME = "immich_redis";
containers.nextcloud = {
nixpkgs = nixpkgsImmich;
autoStart = true;
privateNetwork = true;
# hostAddress = "192.168.100.10";
# localAddress = "192.168.100.11";
# hostAddress6 = "fc00::1";
# localAddress6 = "fc00::2";
config = {
config,
pkgs,
lib,
...
}: {
services.immich = {
enable = true;
};
};
volumes = [
"${immichPhotos}:/usr/src/app/upload"
"/etc/localtime:/etc/localtime:ro"
# "${immichExternalVolume1}:${immichExternalVolume1}:ro"
];
};
virtualisation.oci-containers.containers.immich_microservices = {
image = "ghcr.io/immich-app/immich-server:${immichVersion}";
extraOptions = [
"--pull=newer"
# Force DNS resolution to only be the podman dnsname name server; by default podman provides a resolv.conf
# that includes both this server and the upstream system server, causing resolutions of other pod names
# to be inconsistent.
"--dns=10.88.0.1"
];
cmd = ["start.sh" "microservices"];
environment = {
IMMICH_VERSION = immichVersion;
DB_HOSTNAME = "immich_postgres";
DB_USERNAME = postgresUser;
DB_DATABASE_NAME = postgresDb;
DB_PASSWORD = postgresPassword;
REDIS_HOSTNAME = "immich_redis";
};
volumes = [
"${immichPhotos}:/usr/src/app/upload"
"/etc/localtime:/etc/localtime:ro"
# "${immichExternalVolume}1:${immichExternalVolume1}:ro"
];
};
virtualisation.oci-containers.containers.immich_machine_learning = {
image = "ghcr.io/immich-app/immich-machine-learning:${immichVersion}";
extraOptions = ["--pull=newer"];
environment = {
IMMICH_VERSION = immichVersion;
};
volumes = [
"${immichAppdataRoot}/model-cache:/cache"
];
};
virtualisation.oci-containers.containers.immich_redis = {
image = "redis:6.2-alpine@sha256:80cc8518800438c684a53ed829c621c94afd1087aaeb59b0d4343ed3e7bcf6c5";
};
virtualisation.oci-containers.containers.immich_postgres = {
image = "tensorchord/pgvecto-rs:pg14-v0.1.11";
environment = {
POSTGRES_PASSWORD = postgresPassword;
POSTGRES_USER = postgresUser;
POSTGRES_DB = postgresDb;
};
volumes = [
"${postgresRoot}:/var/lib/postgresql/data"
];
};
}

View file

@ -32,12 +32,13 @@
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
"mlabs.cachix.org-1:gStKdEqNKcrlSQw5iMW6wFCj3+b+1ASpBVY2SYuNV2M="
];
# deprecated-features = [ "url-literals" ];
};
nixPath = ["nixpkgs=${fleetFlake.inputs.nixpkgsUnstable}"];
nixPath = ["nixpkgs=${fleetFlake.inputs.nixpkgs}"];
extraOptions = ''
experimental-features = nix-command flakes ca-derivations impure-derivations
experimental-features = nix-command flakes impure-derivations
builders-use-substitutes = true
'';
@ -50,19 +51,11 @@
registry = lib.mkForce ({
nixpkgs.to = {
type = "path";
path = fleetFlake.inputs.nixpkgsUnstable;
};
nixpkgsUnstable.to = {
type = "path";
path = fleetFlake.inputs.nixpkgsUnstable;
};
nixpkgsStable.to = {
type = "path";
path = fleetFlake.inputs.nixpkgsStable;
path = fleetFlake.inputs.nixpkgs;
};
n.to = {
type = "path";
path = fleetFlake.inputs.nixpkgsUnstable;
path = fleetFlake.inputs.nixpkgs;
};
}
// (lib.optionalAttrs (builtins.hasAttr "ccr" config) {
@ -92,11 +85,11 @@
sshKey = "/home/${config.ccr.username}/.ssh/id_rsa";
}
++ (lib.lists.optional (config.networking.hostName == "picard") {
hostName = "mac.staging.mlabs.city";
hostName = "mac.staging.mlabs.city?remote-program=/run/current-system/sw/bin/nix-store";
system = "x86_64-darwin";
maxJobs = 4;
supportedFeatures = ["kvm" "nixos-test" "big-parallel" "benchmark"];
protocol = "ssh-ng";
protocol = "ssh";
sshUser = "root";
sshKey = "/home/${config.ccr.username}/.ssh/id_rsa";
});

View file

@ -1,3 +1,7 @@
{
{lib, ...}: {
services.pipewire.enable = true;
hardware.pulseaudio = {
enable = lib.mkForce false;
};
}

View file

@ -8,7 +8,7 @@
mkFor = hosts: lib.mkIf (builtins.elem hostname hosts);
in {
services.prometheus.exporters = {
node = mkFor ["sisko" "picard"] {
node = mkFor ["sisko" "picard" "kirk"] {
enable = true;
enabledCollectors = [
"cpu"
@ -34,10 +34,10 @@ in {
];
extraFlags = ["--collector.ethtool" "--collector.softirqs" "--collector.tcpstat" "--collector.wifi"];
};
wireguard = mkFor ["sisko" "picard"] {
wireguard = mkFor ["sisko" "picard" "kirk"] {
enable = true;
};
zfs = mkFor ["picard"] {
zfs = mkFor ["picard" "kirk"] {
enable = true;
};
# restic = mkFor ["sisko"] {
@ -49,7 +49,7 @@ in {
nginx = mkFor ["sisko"] {
enable = true;
};
smartctl = mkFor ["sisko" "picard"] {
smartctl = mkFor ["sisko" "picard" "kirk"] {
enable = true;
};
};

View file

@ -35,7 +35,7 @@ in {
job_name = "node";
static_configs = [
{
targets = builtins.map (host: "${host}.fleet:9100") ["sisko" "picard"];
targets = builtins.map (host: "${host}.fleet:9100") ["sisko" "picard" "kirk"];
}
];
}
@ -43,7 +43,7 @@ in {
job_name = "wireguard";
static_configs = [
{
targets = builtins.map (host: "${host}.fleet:9586") ["picard"];
targets = builtins.map (host: "${host}.fleet:9586") ["picard" "kirk"];
}
];
}
@ -51,7 +51,7 @@ in {
job_name = "zfs";
static_configs = [
{
targets = builtins.map (host: "${host}.fleet:9134") ["picard"];
targets = builtins.map (host: "${host}.fleet:9134") ["picard" "kirk"];
}
];
}
@ -83,7 +83,7 @@ in {
job_name = "smartctl";
static_configs = [
{
targets = builtins.map (host: "${host}.fleet:9633") ["sisko"];
targets = builtins.map (host: "${host}.fleet:9633") ["sisko" "kirk" "picard"];
}
];
}

View file

@ -10,17 +10,17 @@
samba = {
enable = true;
securityType = "user";
extraConfig = ''
workgroup = WORKGROUP
server string = rock5b
netbios name = rock5b
security = user
map to guest = bad user
vfs objects = recycle
recycle:repository = .recycle
recycle:keeptree = yes
recycle:versions = yes
'';
settings.global = {
"workgroup" = "WORKGROUP";
"server string" = "rock5b";
"netbios name" = "rock5b";
"security" = "user";
"map to guest" = "bad user";
"vfs objects" = "recycle";
"recycle:repository" = ".recycle";
"recycle:keeptree" = "yes";
"recycle:versions" = "yes";
};
shares = {
torrent = {
path = "/mnt/hd/torrent";

View file

@ -1,21 +1,13 @@
{
services.xserver = {
services.sunshine = {
enable = true;
videoDrivers = ["amdgpu"];
# displayManager.gdm.enable = true;
# displayManager.defaultSession = "gnome";
# displayManager.autoLogin.enable = true;
# displayManager.autoLogin.user = "sunshine"; # user must exists
# desktopManager.gnome.enable = true;
autoStart = true;
capSysAdmin = true;
openFirewall = true;
};
users.users.sunshine = {
isSystemUser = true;
group = "sunshine";
hardware = {
bluetooth.input.General = {
ClassicBondedOnly = false;
};
};
users.groups.sunshine = {};
}

View file

@ -45,4 +45,8 @@
];
ccr.extraGroups = ["transmission"];
environment.persistence."/persist".directories = [
config.services.transmission.home
];
}

View file

@ -19,7 +19,6 @@
type = lib.types.listOf overlayType;
default = with inputs; [
agenix.overlays.default
nur.overlay
(final: _: {
inherit (disko.packages.${final.system}) disko;
inherit (self.packages.${final.system}) deploy;
@ -46,7 +45,7 @@
_module.args.pkgs =
lib.foldl
(legacyPackages: legacyPackages.extend)
inputs.nixpkgsUnstable.legacyPackages.${system}
inputs.nixpkgs.legacyPackages.${system}
config.fleet.overlays;
packages =

View file

@ -0,0 +1,53 @@
{
spotify,
rustPlatform,
fetchFromGitHub,
zip,
unzip,
}: let
spotify-adblock = rustPlatform.buildRustPackage {
pname = "spotify-adblock";
version = "1.0.3";
src = fetchFromGitHub {
owner = "abba23";
repo = "spotify-adblock";
rev = "5a3281dee9f889afdeea7263558e7a715dcf5aab";
hash = "sha256-UzpHAHpQx2MlmBNKm2turjeVmgp5zXKWm3nZbEo0mYE=";
};
cargoSha256 = "sha256-wPV+ZY34OMbBrjmhvwjljbwmcUiPdWNHFU3ac7aVbIQ=";
patchPhase = ''
substituteInPlace src/lib.rs \
--replace-fail 'config.toml' $out/etc/spotify-adblock/config.toml
'';
buildPhase = ''
make
'';
installPhase = ''
mkdir -p $out/etc/spotify-adblock
install -D --mode=644 config.toml $out/etc/spotify-adblock
mkdir -p $out/lib
install -D --mode=644 --strip target/release/libspotifyadblock.so $out/lib
'';
};
in
spotify.overrideAttrs (
old: {
buildInputs = (old.buildInputs or []) ++ [zip unzip];
postInstall =
(old.postInstall or "")
+ ''
ln -s ${spotify-adblock}/lib/libspotifyadblock.so $libdir
sed -i "s:^Name=Spotify.*:Name=Spotify-adblock:" "$out/share/spotify/spotify.desktop"
wrapProgram $out/bin/spotify \
--set LD_PRELOAD "${spotify-adblock}/lib/libspotifyadblock.so"
# Hide placeholder for advert banner
${unzip}/bin/unzip -p $out/share/spotify/Apps/xpui.spa xpui.js | sed 's/adsEnabled:\!0/adsEnabled:false/' > $out/share/spotify/Apps/xpui.js
${zip}/bin/zip --junk-paths --update $out/share/spotify/Apps/xpui.spa $out/share/spotify/Apps/xpui.js
rm $out/share/spotify/Apps/xpui.js
'';
}
)