Start refactoring
- remove emacs - remove inputs - trying to speed up evaluation - update inputs
This commit is contained in:
parent
0ab8805aa5
commit
2d3e4844b7
39 changed files with 808 additions and 1452 deletions
|
@ -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
1044
flake.lock
generated
File diff suppressed because it is too large
Load diff
37
flake.nix
37
flake.nix
|
@ -4,56 +4,42 @@
|
||||||
inputs = {
|
inputs = {
|
||||||
flakeParts.url = "github:hercules-ci/flake-parts";
|
flakeParts.url = "github:hercules-ci/flake-parts";
|
||||||
# FIXME remove constraint
|
# FIXME remove constraint
|
||||||
nixpkgsUnstable.url = "github:NixOS/nixpkgs/2893f56de08021cffd9b6b6dfc70fd9ccd51eb60";
|
nixpkgs.url = "github:NixOS/nixpkgs";
|
||||||
nixpkgsUnstableForSisko.url = "github:NixOS/nixpkgs/0e74ca98a74bc7270d28838369593635a5db3260";
|
# nixpkgsForSisko.url = "github:NixOS/nixpkgs/0e74ca98a74bc7270d28838369593635a5db3260";
|
||||||
nixpkgsStable.url = "github:NixOS/nixpkgs/nixos-23.11";
|
|
||||||
nixosHardware.url = "github:NixOS/nixos-hardware";
|
nixosHardware.url = "github:NixOS/nixos-hardware";
|
||||||
homeManager = {
|
homeManager = {
|
||||||
url = "github:nix-community/home-manager";
|
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
|
# TODO: remove after https://github.com/nix-community/home-manager/pull/3811
|
||||||
homeManagerGitWorkspace = {
|
homeManagerGitWorkspace = {
|
||||||
url = "github:aciceri/home-manager/git-workspace";
|
url = "github:aciceri/home-manager/git-workspace";
|
||||||
inputs.nixpkgs.follows = "nixpkgsUnstable";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
disko = {
|
disko = {
|
||||||
url = "github:nix-community/disko";
|
url = "github:nix-community/disko";
|
||||||
inputs.nixpkgs.follows = "nixpkgsUnstable";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
pre-commit-hooks = {
|
pre-commit-hooks = {
|
||||||
url = "github:cachix/pre-commit-hooks.nix";
|
url = "github:cachix/pre-commit-hooks.nix";
|
||||||
inputs = {
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
nixpkgs.follows = "nixpkgsUnstable";
|
|
||||||
nixpkgs-stable.follows = "nixpkgsStable";
|
|
||||||
};
|
};
|
||||||
};
|
|
||||||
# FIXME go back to master after nltch's repository is re-added
|
|
||||||
nur.url = "github:nix-community/NUR/324a5f3b9fbfdb77336dc9fa1c0a02f33a6acf6d";
|
|
||||||
agenix.url = "github:ryantm/agenix";
|
agenix.url = "github:ryantm/agenix";
|
||||||
rock5b.url = "github:aciceri/rock5b-nixos";
|
rock5b.url = "github:aciceri/rock5b-nixos";
|
||||||
ccrEmacs.url = "git+https://git.aciceri.dev/aciceri/emacs.git";
|
|
||||||
treefmt-nix = {
|
treefmt-nix = {
|
||||||
url = "github:numtide/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";
|
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 = {
|
nixThePlanet = {
|
||||||
url = "github:aciceri/NixThePlanet/nix-in-darwin";
|
url = "github:aciceri/NixThePlanet/nix-in-darwin";
|
||||||
inputs.nixpkgs.follows = "nixpkgsUnstable";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
nixDarwin = {
|
nixDarwin = {
|
||||||
url = "github:LnL7/nix-darwin";
|
url = "github:LnL7/nix-darwin";
|
||||||
inputs.nixpkgs.follows = "nixpkgsUnstable";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
nix-on-droid.url = "github:nix-community/nix-on-droid";
|
nix-on-droid.url = "github:nix-community/nix-on-droid";
|
||||||
nixd.url = "github:nix-community/nixd";
|
|
||||||
lix = {
|
lix = {
|
||||||
url = "git+https://git@git.lix.systems/lix-project/lix";
|
url = "git+https://git@git.lix.systems/lix-project/lix";
|
||||||
flake = false;
|
flake = false;
|
||||||
|
@ -61,14 +47,14 @@
|
||||||
lix-module = {
|
lix-module = {
|
||||||
url = "git+https://git.lix.systems/lix-project/nixos-module";
|
url = "git+https://git.lix.systems/lix-project/nixos-module";
|
||||||
inputs.lix.follows = "lix";
|
inputs.lix.follows = "lix";
|
||||||
inputs.nixpkgs.follows = "nixpkgsUnstable";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
mobile-nixos = {
|
mobile-nixos = {
|
||||||
url = "github:NixOS/mobile-nixos";
|
url = "github:NixOS/mobile-nixos";
|
||||||
flake = false;
|
flake = false;
|
||||||
};
|
};
|
||||||
arion.url = "github:hercules-ci/arion";
|
|
||||||
impermanence.url = "github:nix-community/impermanence";
|
impermanence.url = "github:nix-community/impermanence";
|
||||||
|
vscode-server.url = "github:nix-community/nixos-vscode-server";
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = inputs @ {flakeParts, ...}:
|
outputs = inputs @ {flakeParts, ...}:
|
||||||
|
@ -81,7 +67,6 @@
|
||||||
./packages
|
./packages
|
||||||
./shell
|
./shell
|
||||||
./checks
|
./checks
|
||||||
./ci
|
|
||||||
];
|
];
|
||||||
systems = ["x86_64-linux" "aarch64-linux"];
|
systems = ["x86_64-linux" "aarch64-linux"];
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,3 +1,28 @@
|
||||||
{pkgs, ...}: {
|
{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[@]}"
|
||||||
|
'')
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,13 +5,183 @@
|
||||||
}: {
|
}: {
|
||||||
programs.mbsync.enable = true;
|
programs.mbsync.enable = true;
|
||||||
programs.msmtp.enable = true;
|
programs.msmtp.enable = true;
|
||||||
programs.notmuch = {
|
|
||||||
enable = true;
|
|
||||||
hooks.preNew = "mbsync --all";
|
|
||||||
};
|
|
||||||
services.mbsync.enable = true;
|
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.email = {
|
||||||
accounts.autistici = {
|
accounts.autistici = {
|
||||||
|
aerc.enable = true;
|
||||||
address = "andrea.ciceri@autistici.org";
|
address = "andrea.ciceri@autistici.org";
|
||||||
gpg = {
|
gpg = {
|
||||||
key = "7A66EEA1E6C598D07D361287A1FC89532D1C565";
|
key = "7A66EEA1E6C598D07D361287A1FC89532D1C565";
|
||||||
|
|
|
@ -12,11 +12,6 @@
|
||||||
nativeMessagingHosts = [pkgs.tridactyl-native];
|
nativeMessagingHosts = [pkgs.tridactyl-native];
|
||||||
};
|
};
|
||||||
profiles.${username} = {
|
profiles.${username} = {
|
||||||
extensions = with pkgs.nur.repos.rycee.firefox-addons; [
|
|
||||||
privacy-badger
|
|
||||||
ublock-origin
|
|
||||||
tridactyl
|
|
||||||
];
|
|
||||||
settings = {
|
settings = {
|
||||||
"browser.startup.homepage" = "https://google.it";
|
"browser.startup.homepage" = "https://google.it";
|
||||||
"browser.search.region" = "IT";
|
"browser.search.region" = "IT";
|
||||||
|
|
|
@ -1,8 +1,11 @@
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
|
config,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
|
lib.mkMerge [
|
||||||
|
{
|
||||||
programs.foot = let
|
programs.foot = let
|
||||||
catppuccin = pkgs.fetchFromGitHub {
|
catppuccin = pkgs.fetchFromGitHub {
|
||||||
owner = "catppuccin";
|
owner = "catppuccin";
|
||||||
|
@ -17,8 +20,6 @@
|
||||||
main = {
|
main = {
|
||||||
term = "xterm-256color";
|
term = "xterm-256color";
|
||||||
login-shell = "yes";
|
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";
|
dpi-aware = "no";
|
||||||
horizontal-letter-offset = "1";
|
horizontal-letter-offset = "1";
|
||||||
include = "${catppuccin}/themes/catppuccin-mocha.ini";
|
include = "${catppuccin}/themes/catppuccin-mocha.ini";
|
||||||
|
@ -31,6 +32,19 @@
|
||||||
"JoyPixels:size=${size}"
|
"JoyPixels:size=${size}"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
cursor = {
|
||||||
|
blink = true;
|
||||||
|
};
|
||||||
|
tweak = {
|
||||||
|
overflowing-glyphs = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
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 = {
|
mouse = {
|
||||||
hide-when-typing = "yes";
|
hide-when-typing = "yes";
|
||||||
|
@ -38,3 +52,20 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
(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";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
})
|
||||||
|
]
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
{
|
{
|
||||||
programs.helix = {
|
programs.helix = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
defaultEditor = true;
|
||||||
settings = {
|
settings = {
|
||||||
theme = "catppuccin_mocha";
|
theme = "catppuccin_mocha";
|
||||||
editor = {
|
editor = {
|
||||||
|
@ -11,6 +12,10 @@
|
||||||
select = "underline";
|
select = "underline";
|
||||||
};
|
};
|
||||||
true-color = true; # to make colors coherent when in ssh
|
true-color = true; # to make colors coherent when in ssh
|
||||||
|
# inline-diagnostic = {
|
||||||
|
# cursor-line = "hint";
|
||||||
|
# other-lines = "error";
|
||||||
|
# };
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
languages = {
|
languages = {
|
||||||
|
@ -19,13 +24,26 @@
|
||||||
name = "nix";
|
name = "nix";
|
||||||
language-servers = ["nixd"];
|
language-servers = ["nixd"];
|
||||||
}
|
}
|
||||||
];
|
|
||||||
language-servers = [
|
|
||||||
{
|
{
|
||||||
name = "nixd";
|
name = "markdown";
|
||||||
command = "nixd";
|
language-servers = ["zk"];
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "typescript";
|
||||||
|
language-servers = ["vtsls"];
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
language-server = {
|
||||||
|
nixd.command = "nixd";
|
||||||
|
vtsls = {
|
||||||
|
command = "vtsls";
|
||||||
|
args = ["--stdio"];
|
||||||
|
};
|
||||||
|
zk = {
|
||||||
|
command = "zk";
|
||||||
|
args = ["lsp"];
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,8 +50,18 @@ in {
|
||||||
font.name = "Sans,Symbols Nerd Font";
|
font.name = "Sans,Symbols Nerd Font";
|
||||||
iconTheme = {
|
iconTheme = {
|
||||||
name = "Adwaita";
|
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 = {
|
# services.kanshi = {
|
||||||
|
@ -81,9 +91,25 @@ in {
|
||||||
# };
|
# };
|
||||||
# };
|
# };
|
||||||
|
|
||||||
|
home.file.".icons/catppuccin-mocha-sapphire" = {
|
||||||
|
source = "${pkgs.catppuccin-cursors.mochaSapphire}/share/icons/catppuccin-mocha-sapphire-cursors";
|
||||||
|
recursive = true;
|
||||||
|
};
|
||||||
|
|
||||||
wayland.windowManager.hyprland = {
|
wayland.windowManager.hyprland = {
|
||||||
enable = true;
|
enable = true;
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
|
cursor {
|
||||||
|
hide_on_key_press = true
|
||||||
|
enable_hyprcursor = true
|
||||||
|
zoom_rigid = true
|
||||||
|
}
|
||||||
|
|
||||||
|
env = HYPRCURSOR_THEME,catppuccin-mocha-sapphire
|
||||||
|
env = HYPRCURSOR_SIZE,48
|
||||||
|
env = XCURSOR_THEME,catppuccin-mocha-sapphire
|
||||||
|
env = XCURSOR_SIZE,48
|
||||||
|
|
||||||
$mod = SUPER
|
$mod = SUPER
|
||||||
|
|
||||||
input {
|
input {
|
||||||
|
@ -102,15 +128,12 @@ in {
|
||||||
|
|
||||||
windowrulev2 = tile, class:^(Spotify)$
|
windowrulev2 = tile, class:^(Spotify)$
|
||||||
windowrulev2 = workspace 9, 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)$
|
windowrulev2 = float, title:^(floating)$
|
||||||
|
|
||||||
bind = $mod, b, exec, firefox
|
bind = $mod, b, exec, firefox
|
||||||
bind = $mod, t, exec, foot
|
bind = $mod, t, exec, footclient
|
||||||
bind = $mod, RETURN, exec, emacsclient -c --eval "(ccr/start-eshell)"
|
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, x, exec, emacsclient -c
|
||||||
bind = $mod SHIFT, n, exec, emacsclient --eval '(ccr/org-capture "n")' -c -F '((name . "floating"))'
|
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 SHIFT, w, exec, emacsclient --eval '(ccr/org-capture "j")' -c -F '((name . "floating"))'
|
||||||
|
@ -122,7 +145,8 @@ in {
|
||||||
bind = $mod, code:60, 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, code:59, exec, ${pkgs.brightnessctl}/bin/brightnessctl s 5%-
|
||||||
|
|
||||||
|
bind = $mod SHIFT, t, togglegroup
|
||||||
|
bind = $mod, G, changegroupactive
|
||||||
bind = $mod SHIFT, q, killactive
|
bind = $mod SHIFT, q, killactive
|
||||||
bind = $mod SHIFT, f, fullscreen, 0
|
bind = $mod SHIFT, f, fullscreen, 0
|
||||||
bind = $mod SHIFT, e, exit
|
bind = $mod SHIFT, e, exit
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
Service = {
|
Service = {
|
||||||
CPUSchedulingPolicy = "idle";
|
CPUSchedulingPolicy = "idle";
|
||||||
IOSchedulingClass = "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}";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,7 @@
|
||||||
{
|
{
|
||||||
config,
|
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
age,
|
age,
|
||||||
fleetFlake,
|
|
||||||
hostname,
|
hostname,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
|
@ -31,6 +29,24 @@
|
||||||
controlMaster = "auto";
|
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 = {
|
# programs.starship = {
|
||||||
# enable = false;
|
# enable = false;
|
||||||
# settings = {
|
# settings = {
|
||||||
|
@ -222,10 +238,10 @@
|
||||||
nix-zsh-completions
|
nix-zsh-completions
|
||||||
comma
|
comma
|
||||||
carapace # used by nushell
|
carapace # used by nushell
|
||||||
|
neovim
|
||||||
]
|
]
|
||||||
++ (lib.optionals (builtins.elem hostname ["kirk" "picard"]) [
|
++ (lib.optionals (builtins.elem hostname ["kirk" "picard"]) [
|
||||||
nil # TODO probably not best place
|
nixd # TODO probably not the best place
|
||||||
(fleetFlake.inputs.nixd.packages.${pkgs.system}.nixd) # TODO probably not best place
|
|
||||||
terraform-lsp # TODO probably not best place
|
terraform-lsp # TODO probably not best place
|
||||||
python3Packages.jedi-language-server # TODO probably not best place
|
python3Packages.jedi-language-server # TODO probably not best place
|
||||||
nodePackages.typescript-language-server # TODO probably not best place
|
nodePackages.typescript-language-server # TODO probably not best place
|
||||||
|
|
|
@ -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 {
|
in {
|
||||||
home.packages = [spotify-adblock];
|
home.packages = [spotify-adblocked];
|
||||||
|
|
||||||
systemd.user.services.spotify-adblocked = {
|
systemd.user.services.spotify-adblocked = {
|
||||||
Install.WantedBy = ["graphical-session.target"];
|
Install.WantedBy = ["graphical-session.target"];
|
||||||
|
@ -12,7 +16,7 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
Service = {
|
Service = {
|
||||||
ExecStart = "${spotify-adblock}/bin/spotify";
|
ExecStart = lib.getExe spotify-adblocked;
|
||||||
Restart = "on-failure";
|
Restart = "on-failure";
|
||||||
RestartSec = 3;
|
RestartSec = 3;
|
||||||
};
|
};
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
font.name = "Sans,Symbols Nerd Font";
|
font.name = "Sans,Symbols Nerd Font";
|
||||||
iconTheme = {
|
iconTheme = {
|
||||||
name = "Adwaita";
|
name = "Adwaita";
|
||||||
package = pkgs.gnome.adwaita-icon-theme;
|
package = pkgs.adwaita-icon-theme;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -4,17 +4,6 @@
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
services.swayidle = let
|
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" ''
|
swaylockWithArgs = pkgs.writeScriptBin "swaylockWithArgs" ''
|
||||||
${pkgs.swaylock-effects}/bin/swaylock \
|
${pkgs.swaylock-effects}/bin/swaylock \
|
||||||
--daemonize \
|
--daemonize \
|
||||||
|
@ -30,7 +19,6 @@
|
||||||
--line-color 00000000 \
|
--line-color 00000000 \
|
||||||
--inside-color 00000088 \
|
--inside-color 00000088 \
|
||||||
--separator-color 00000000 \
|
--separator-color 00000000 \
|
||||||
--grace 2 \
|
|
||||||
--fade-in 0.2
|
--fade-in 0.2
|
||||||
'';
|
'';
|
||||||
swaylockCommand = "${swaylockWithArgs}/bin/swaylockWithArgs";
|
swaylockCommand = "${swaylockWithArgs}/bin/swaylockWithArgs";
|
||||||
|
|
21
hmModules/tremotesf/default.nix
Normal file
21
hmModules/tremotesf/default.nix
Normal 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;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
6
hmModules/vscode-server/default.nix
Normal file
6
hmModules/vscode-server/default.nix
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
services.vscode-server = {
|
||||||
|
enable = true;
|
||||||
|
enableFHS = true;
|
||||||
|
};
|
||||||
|
}
|
|
@ -1,7 +1,6 @@
|
||||||
{
|
{
|
||||||
pkgs,
|
pkgs,
|
||||||
lib,
|
lib,
|
||||||
fleetFlake,
|
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
programs.waybar = {
|
programs.waybar = {
|
||||||
|
|
|
@ -6,11 +6,10 @@
|
||||||
home.packages = [pkgs.zmkBATx];
|
home.packages = [pkgs.zmkBATx];
|
||||||
|
|
||||||
systemd.user.services.zmkBATx = {
|
systemd.user.services.zmkBATx = {
|
||||||
Install.WantedBy = ["graphical-session.target"];
|
Install.WantedBy = ["graphical-session.target" "waybar.service"];
|
||||||
|
|
||||||
Unit = {
|
Unit = {
|
||||||
Description = "zmkBATx";
|
Description = "zmkBATx";
|
||||||
PartOf = ["graphical-session.target"];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
Service = {
|
Service = {
|
||||||
|
|
|
@ -80,7 +80,7 @@
|
||||||
in
|
in
|
||||||
builtins.getFlake "github:NixOS/nixpkgs/${rev}";
|
builtins.getFlake "github:NixOS/nixpkgs/${rev}";
|
||||||
extraHmModules = [
|
extraHmModules = [
|
||||||
inputs.ccrEmacs.hmModules.default
|
# inputs.ccrEmacs.hmModules.default
|
||||||
];
|
];
|
||||||
vpn = {
|
vpn = {
|
||||||
ip = "10.100.0.5";
|
ip = "10.100.0.5";
|
||||||
|
@ -107,7 +107,7 @@
|
||||||
inputs.lix-module.nixosModules.default
|
inputs.lix-module.nixosModules.default
|
||||||
];
|
];
|
||||||
extraHmModules = [
|
extraHmModules = [
|
||||||
inputs.ccrEmacs.hmModules.default
|
# inputs.ccrEmacs.hmModules.default
|
||||||
"${inputs.homeManagerGitWorkspace}/modules/services/git-workspace.nix"
|
"${inputs.homeManagerGitWorkspace}/modules/services/git-workspace.nix"
|
||||||
];
|
];
|
||||||
secrets = {
|
secrets = {
|
||||||
|
@ -132,8 +132,9 @@
|
||||||
# inputs.hercules-ci-agent.nixosModules.agent-service
|
# inputs.hercules-ci-agent.nixosModules.agent-service
|
||||||
];
|
];
|
||||||
extraHmModules = [
|
extraHmModules = [
|
||||||
inputs.ccrEmacs.hmModules.default
|
# inputs.ccrEmacs.hmModules.default
|
||||||
"${inputs.homeManagerGitWorkspace}/modules/services/git-workspace.nix"
|
"${inputs.homeManagerGitWorkspace}/modules/services/git-workspace.nix"
|
||||||
|
inputs.vscode-server.nixosModules.home
|
||||||
];
|
];
|
||||||
secrets = {
|
secrets = {
|
||||||
"picard-wireguard-private-key" = {};
|
"picard-wireguard-private-key" = {};
|
||||||
|
@ -159,7 +160,6 @@
|
||||||
};
|
};
|
||||||
extraModules = with inputs; [
|
extraModules = with inputs; [
|
||||||
disko.nixosModules.disko
|
disko.nixosModules.disko
|
||||||
arion.nixosModules.arion
|
|
||||||
impermanence.nixosModules.impermanence
|
impermanence.nixosModules.impermanence
|
||||||
# lix-module.nixosModules.default
|
# lix-module.nixosModules.default
|
||||||
# inputs.hercules-ci-agent.nixosModules.agent-service;
|
# inputs.hercules-ci-agent.nixosModules.agent-service;
|
||||||
|
|
|
@ -1,9 +1,7 @@
|
||||||
{
|
{
|
||||||
fleetModules,
|
fleetModules,
|
||||||
config,
|
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
fleetFlake,
|
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
imports =
|
imports =
|
||||||
|
|
|
@ -28,7 +28,7 @@ in {
|
||||||
nixpkgs = lib.mkOption {
|
nixpkgs = lib.mkOption {
|
||||||
description = "Used nixpkgs";
|
description = "Used nixpkgs";
|
||||||
type = lib.types.anything;
|
type = lib.types.anything;
|
||||||
default = inputs.nixpkgsUnstable;
|
default = inputs.nixpkgs;
|
||||||
};
|
};
|
||||||
extraModules = lib.mkOption {
|
extraModules = lib.mkOption {
|
||||||
description = "Extra NixOS modules";
|
description = "Extra NixOS modules";
|
||||||
|
@ -64,7 +64,7 @@ in {
|
||||||
nixpkgs = lib.mkOption {
|
nixpkgs = lib.mkOption {
|
||||||
description = "Used nixpkgs";
|
description = "Used nixpkgs";
|
||||||
type = lib.types.anything;
|
type = lib.types.anything;
|
||||||
default = inputs.nixpkgsUnstable;
|
default = inputs.nixpkgs;
|
||||||
};
|
};
|
||||||
extraModules = lib.mkOption {
|
extraModules = lib.mkOption {
|
||||||
description = "Extra NixOS modules";
|
description = "Extra NixOS modules";
|
||||||
|
@ -101,7 +101,7 @@ in {
|
||||||
nixpkgs = lib.mkOption {
|
nixpkgs = lib.mkOption {
|
||||||
description = "Used nixpkgs";
|
description = "Used nixpkgs";
|
||||||
type = lib.types.anything;
|
type = lib.types.anything;
|
||||||
default = inputs.nixpkgsUnstable;
|
default = inputs.nixpkgs;
|
||||||
};
|
};
|
||||||
homeManager = lib.mkOption {
|
homeManager = lib.mkOption {
|
||||||
description = "Used home-manager";
|
description = "Used home-manager";
|
||||||
|
@ -174,11 +174,7 @@ in {
|
||||||
default = "ccr";
|
default = "ccr";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
config.overlays = with inputs;
|
config.overlays = with inputs; cfg.overlays;
|
||||||
[
|
|
||||||
nur.overlay
|
|
||||||
]
|
|
||||||
++ cfg.overlays;
|
|
||||||
}));
|
}));
|
||||||
default = {};
|
default = {};
|
||||||
};
|
};
|
||||||
|
@ -260,7 +256,6 @@ in {
|
||||||
fleetHmModules = builtins.map (moduleName: "${self.outPath}/hmModules/${moduleName}");
|
fleetHmModules = builtins.map (moduleName: "${self.outPath}/hmModules/${moduleName}");
|
||||||
fleetFlake = self;
|
fleetFlake = self;
|
||||||
vpn = cfg.vpnExtra // (lib.mapAttrs (_: host: host.vpn) cfg.hosts);
|
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;
|
internal = true;
|
||||||
default = hostname: config:
|
default = hostname: config:
|
||||||
inputs.nix-on-droid.lib.nixOnDroidConfiguration {
|
inputs.nix-on-droid.lib.nixOnDroidConfiguration {
|
||||||
pkgs = inputs.nixpkgsUnstable.legacyPackages.aarch64-linux;
|
pkgs = inputs.nixpkgs.legacyPackages.aarch64-linux;
|
||||||
modules = [
|
modules = [
|
||||||
({
|
({
|
||||||
lib,
|
lib,
|
||||||
|
|
|
@ -71,13 +71,6 @@
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [waypipe];
|
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.dconf.enable = true;
|
||||||
|
|
||||||
programs.mosh.enable = true;
|
programs.mosh.enable = true;
|
||||||
|
|
|
@ -29,7 +29,6 @@
|
||||||
"printing"
|
"printing"
|
||||||
"pam"
|
"pam"
|
||||||
"wireguard-client"
|
"wireguard-client"
|
||||||
"restic"
|
|
||||||
"binfmt"
|
"binfmt"
|
||||||
"greetd"
|
"greetd"
|
||||||
# "syncthing"
|
# "syncthing"
|
||||||
|
@ -37,7 +36,7 @@
|
||||||
"forgejo-runners"
|
"forgejo-runners"
|
||||||
"teamviewer"
|
"teamviewer"
|
||||||
# "macos-ventura"
|
# "macos-ventura"
|
||||||
# "sunshine"
|
"sunshine"
|
||||||
"mount-rock5b"
|
"mount-rock5b"
|
||||||
"adb"
|
"adb"
|
||||||
"guix"
|
"guix"
|
||||||
|
@ -58,7 +57,8 @@
|
||||||
"shell"
|
"shell"
|
||||||
"element"
|
"element"
|
||||||
"zmkbatx"
|
"zmkbatx"
|
||||||
"emacs"
|
"tremotesf"
|
||||||
|
# "emacs"
|
||||||
"firefox"
|
"firefox"
|
||||||
"gpg"
|
"gpg"
|
||||||
"mpv"
|
"mpv"
|
||||||
|
@ -83,6 +83,7 @@
|
||||||
"obs-studio"
|
"obs-studio"
|
||||||
"calibre"
|
"calibre"
|
||||||
"reinstall-magisk-on-lineage"
|
"reinstall-magisk-on-lineage"
|
||||||
|
"vscode-server"
|
||||||
];
|
];
|
||||||
extraGroups = [];
|
extraGroups = [];
|
||||||
backupPaths = [];
|
backupPaths = [];
|
||||||
|
@ -104,7 +105,18 @@
|
||||||
"i2c-dev" # needed?
|
"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 = {
|
systemd.services.ddcci = {
|
||||||
serviceConfig.Type = "oneshot";
|
serviceConfig.Type = "oneshot";
|
||||||
|
|
|
@ -37,17 +37,18 @@
|
||||||
"garmin-collector"
|
"garmin-collector"
|
||||||
"restic"
|
"restic"
|
||||||
# "immich"
|
# "immich"
|
||||||
|
"atuin"
|
||||||
]
|
]
|
||||||
++ [
|
++ [
|
||||||
./disko.nix
|
./disko.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
# boot.kernelPackages = pkgs.linuxKernel.packages.linux_6_8;
|
# boot.kernelPackages = pkgs.linuxKernel.packages.linux_6_8;
|
||||||
# boot.kernelPackages = pkgs.linuxPackagesFor pkgs.linux_testing;
|
boot.kernelPackages = pkgs.linuxPackagesFor pkgs.linux_6_10;
|
||||||
boot.kernelPackages = let
|
# boot.kernelPackages = let
|
||||||
pkgs = fleetFlake.inputs.nixpkgsUnstableForSisko.legacyPackages.aarch64-linux;
|
# pkgs = fleetFlake.inputs.nixpkgsForSisko.legacyPackages.aarch64-linux;
|
||||||
in
|
# in
|
||||||
pkgs.linuxPackagesFor pkgs.linux_testing;
|
# pkgs.linuxPackagesFor pkgs.linux_testing;
|
||||||
# boot.kernelPackages = pkgs.linuxPackagesFor (pkgs.linux_6_9.override {
|
# boot.kernelPackages = pkgs.linuxPackagesFor (pkgs.linux_6_9.override {
|
||||||
# argsOverride = {
|
# argsOverride = {
|
||||||
# src = pkgs.fetchFromGitLab {
|
# src = pkgs.fetchFromGitLab {
|
||||||
|
|
14
modules/atuin/default.nix
Normal file
14
modules/atuin/default.nix
Normal 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
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
|
@ -7,10 +7,10 @@
|
||||||
system.autoUpgrade = {
|
system.autoUpgrade = {
|
||||||
enable = false;
|
enable = false;
|
||||||
flake = "github:aciceri/nixfleet#${config.networking.hostName}";
|
flake = "github:aciceri/nixfleet#${config.networking.hostName}";
|
||||||
flags =
|
# flags =
|
||||||
lib.lists.optional
|
# lib.lists.optional
|
||||||
(builtins.hasAttr "ccrEmacs" options)
|
# (builtins.hasAttr "ccrEmacs" options)
|
||||||
["--update-input" "ccrEmacs" "ccrEmacs"];
|
# ["--update-input" "ccrEmacs" "ccrEmacs"];
|
||||||
dates = "daily";
|
dates = "daily";
|
||||||
allowReboot = false;
|
allowReboot = false;
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,14 +1,13 @@
|
||||||
# heavily based on https://discourse.nixos.org/t/gitea-nix-actions-runner-setup/35279
|
# heavily based on https://discourse.nixos.org/t/gitea-nix-actions-runner-setup/35279
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
inputs',
|
|
||||||
pkgs,
|
pkgs,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
storeDeps = pkgs.runCommand "store-deps" {} ''
|
storeDeps = pkgs.runCommand "store-deps" {} ''
|
||||||
mkdir -p $out/bin
|
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
|
for bin in "$dir"/bin/*; do
|
||||||
ln -s "$bin" "$out/bin/$(basename "$bin")"
|
ln -s "$bin" "$out/bin/$(basename "$bin")"
|
||||||
done
|
done
|
||||||
|
|
|
@ -13,6 +13,15 @@
|
||||||
Exec=Hyprland
|
Exec=Hyprland
|
||||||
'';
|
'';
|
||||||
})
|
})
|
||||||
|
(pkgs.writeTextFile {
|
||||||
|
name = "xorg-session.desktop";
|
||||||
|
destination = "/cosmic-session.desktop";
|
||||||
|
text = ''
|
||||||
|
[Desktop Entry]
|
||||||
|
Name=Cosmic
|
||||||
|
Exec=cosmic-session
|
||||||
|
'';
|
||||||
|
})
|
||||||
];
|
];
|
||||||
in {
|
in {
|
||||||
services.greetd = {
|
services.greetd = {
|
||||||
|
|
|
@ -27,53 +27,12 @@
|
||||||
rev = "d42edcabc67ba6a7f960e849c8aaec1aabef87c0";
|
rev = "d42edcabc67ba6a7f960e849c8aaec1aabef87c0";
|
||||||
hash = "sha256-KqbP6TpH9B0/AjtsW5TcWSNgUhND+w8rO6X8fHqtsDI=";
|
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 {
|
in {
|
||||||
services.home-assistant = {
|
services.home-assistant = {
|
||||||
enable = true;
|
enable = true;
|
||||||
openFirewall = true;
|
openFirewall = true;
|
||||||
package = pkgs.home-assistant.overrideAttrs (old: {
|
package = pkgs.home-assistant.overrideAttrs (old: {
|
||||||
# doInstallCheck = false;
|
doInstallCheck = false;
|
||||||
# prePatch =
|
# prePatch =
|
||||||
# ''
|
# ''
|
||||||
# rm -rf homeassistant/components/smartthings
|
# rm -rf homeassistant/components/smartthings
|
||||||
|
@ -107,7 +66,7 @@ in {
|
||||||
# used by pun_sensor
|
# used by pun_sensor
|
||||||
holidays
|
holidays
|
||||||
beautifulsoup4
|
beautifulsoup4
|
||||||
(tuya-device-sharing-sdk python3Packages) # remove after https://github.com/NixOS/nixpkgs/pull/294706/
|
tuya-device-sharing-sdk
|
||||||
getmac
|
getmac
|
||||||
garminconnect
|
garminconnect
|
||||||
tzlocal
|
tzlocal
|
||||||
|
|
|
@ -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
|
{config, ...}: let
|
||||||
immichHost = "immich.example.com"; # TODO: put your immich domain name here
|
nixpkgsImmich = builtins.getFlake "github:NixOS/nixpkgs/c0ee4c1770aa1ef998c977c4cc653a07ec95d9bf";
|
||||||
|
|
||||||
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";
|
|
||||||
in {
|
in {
|
||||||
# The primary source for this configuration is the recommended docker-compose installation of immich from
|
containers.nextcloud = {
|
||||||
# https://immich.app/docs/install/docker-compose, which linkes to:
|
nixpkgs = nixpkgsImmich;
|
||||||
# - https://github.com/immich-app/immich/releases/latest/download/docker-compose.yml
|
autoStart = true;
|
||||||
# - https://github.com/immich-app/immich/releases/latest/download/example.env
|
privateNetwork = true;
|
||||||
# and has been transposed into nixos configuration here. Those upstream files should probably be checked
|
# hostAddress = "192.168.100.10";
|
||||||
# for serious changes if there are any upgrade problems here.
|
# localAddress = "192.168.100.11";
|
||||||
#
|
# hostAddress6 = "fc00::1";
|
||||||
# After initial deployment, these in-process configurations need to be done:
|
# localAddress6 = "fc00::2";
|
||||||
# - create an admin user by accessing the site
|
config = {
|
||||||
# - login with the admin user
|
config,
|
||||||
# - set the "Machine Learning Settings" > "URL" to http://immich_machine_learning:3003
|
pkgs,
|
||||||
|
lib,
|
||||||
virtualisation.oci-containers.containers.immich_server = {
|
...
|
||||||
image = "ghcr.io/immich-app/immich-server:${immichVersion}";
|
}: {
|
||||||
ports = ["127.0.0.1:2283:3001"];
|
services.immich = {
|
||||||
extraOptions = [
|
enable = true;
|
||||||
"--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";
|
|
||||||
};
|
};
|
||||||
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"
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,12 +32,13 @@
|
||||||
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||||
"mlabs.cachix.org-1:gStKdEqNKcrlSQw5iMW6wFCj3+b+1ASpBVY2SYuNV2M="
|
"mlabs.cachix.org-1:gStKdEqNKcrlSQw5iMW6wFCj3+b+1ASpBVY2SYuNV2M="
|
||||||
];
|
];
|
||||||
|
# deprecated-features = [ "url-literals" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
nixPath = ["nixpkgs=${fleetFlake.inputs.nixpkgsUnstable}"];
|
nixPath = ["nixpkgs=${fleetFlake.inputs.nixpkgs}"];
|
||||||
|
|
||||||
extraOptions = ''
|
extraOptions = ''
|
||||||
experimental-features = nix-command flakes ca-derivations impure-derivations
|
experimental-features = nix-command flakes impure-derivations
|
||||||
builders-use-substitutes = true
|
builders-use-substitutes = true
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
@ -50,19 +51,11 @@
|
||||||
registry = lib.mkForce ({
|
registry = lib.mkForce ({
|
||||||
nixpkgs.to = {
|
nixpkgs.to = {
|
||||||
type = "path";
|
type = "path";
|
||||||
path = fleetFlake.inputs.nixpkgsUnstable;
|
path = fleetFlake.inputs.nixpkgs;
|
||||||
};
|
|
||||||
nixpkgsUnstable.to = {
|
|
||||||
type = "path";
|
|
||||||
path = fleetFlake.inputs.nixpkgsUnstable;
|
|
||||||
};
|
|
||||||
nixpkgsStable.to = {
|
|
||||||
type = "path";
|
|
||||||
path = fleetFlake.inputs.nixpkgsStable;
|
|
||||||
};
|
};
|
||||||
n.to = {
|
n.to = {
|
||||||
type = "path";
|
type = "path";
|
||||||
path = fleetFlake.inputs.nixpkgsUnstable;
|
path = fleetFlake.inputs.nixpkgs;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
// (lib.optionalAttrs (builtins.hasAttr "ccr" config) {
|
// (lib.optionalAttrs (builtins.hasAttr "ccr" config) {
|
||||||
|
@ -92,11 +85,11 @@
|
||||||
sshKey = "/home/${config.ccr.username}/.ssh/id_rsa";
|
sshKey = "/home/${config.ccr.username}/.ssh/id_rsa";
|
||||||
}
|
}
|
||||||
++ (lib.lists.optional (config.networking.hostName == "picard") {
|
++ (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";
|
system = "x86_64-darwin";
|
||||||
maxJobs = 4;
|
maxJobs = 4;
|
||||||
supportedFeatures = ["kvm" "nixos-test" "big-parallel" "benchmark"];
|
supportedFeatures = ["kvm" "nixos-test" "big-parallel" "benchmark"];
|
||||||
protocol = "ssh-ng";
|
protocol = "ssh";
|
||||||
sshUser = "root";
|
sshUser = "root";
|
||||||
sshKey = "/home/${config.ccr.username}/.ssh/id_rsa";
|
sshKey = "/home/${config.ccr.username}/.ssh/id_rsa";
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
{
|
{lib, ...}: {
|
||||||
services.pipewire.enable = true;
|
services.pipewire.enable = true;
|
||||||
|
|
||||||
|
hardware.pulseaudio = {
|
||||||
|
enable = lib.mkForce false;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
mkFor = hosts: lib.mkIf (builtins.elem hostname hosts);
|
mkFor = hosts: lib.mkIf (builtins.elem hostname hosts);
|
||||||
in {
|
in {
|
||||||
services.prometheus.exporters = {
|
services.prometheus.exporters = {
|
||||||
node = mkFor ["sisko" "picard"] {
|
node = mkFor ["sisko" "picard" "kirk"] {
|
||||||
enable = true;
|
enable = true;
|
||||||
enabledCollectors = [
|
enabledCollectors = [
|
||||||
"cpu"
|
"cpu"
|
||||||
|
@ -34,10 +34,10 @@ in {
|
||||||
];
|
];
|
||||||
extraFlags = ["--collector.ethtool" "--collector.softirqs" "--collector.tcpstat" "--collector.wifi"];
|
extraFlags = ["--collector.ethtool" "--collector.softirqs" "--collector.tcpstat" "--collector.wifi"];
|
||||||
};
|
};
|
||||||
wireguard = mkFor ["sisko" "picard"] {
|
wireguard = mkFor ["sisko" "picard" "kirk"] {
|
||||||
enable = true;
|
enable = true;
|
||||||
};
|
};
|
||||||
zfs = mkFor ["picard"] {
|
zfs = mkFor ["picard" "kirk"] {
|
||||||
enable = true;
|
enable = true;
|
||||||
};
|
};
|
||||||
# restic = mkFor ["sisko"] {
|
# restic = mkFor ["sisko"] {
|
||||||
|
@ -49,7 +49,7 @@ in {
|
||||||
nginx = mkFor ["sisko"] {
|
nginx = mkFor ["sisko"] {
|
||||||
enable = true;
|
enable = true;
|
||||||
};
|
};
|
||||||
smartctl = mkFor ["sisko" "picard"] {
|
smartctl = mkFor ["sisko" "picard" "kirk"] {
|
||||||
enable = true;
|
enable = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -35,7 +35,7 @@ in {
|
||||||
job_name = "node";
|
job_name = "node";
|
||||||
static_configs = [
|
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";
|
job_name = "wireguard";
|
||||||
static_configs = [
|
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";
|
job_name = "zfs";
|
||||||
static_configs = [
|
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";
|
job_name = "smartctl";
|
||||||
static_configs = [
|
static_configs = [
|
||||||
{
|
{
|
||||||
targets = builtins.map (host: "${host}.fleet:9633") ["sisko"];
|
targets = builtins.map (host: "${host}.fleet:9633") ["sisko" "kirk" "picard"];
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,17 +10,17 @@
|
||||||
samba = {
|
samba = {
|
||||||
enable = true;
|
enable = true;
|
||||||
securityType = "user";
|
securityType = "user";
|
||||||
extraConfig = ''
|
settings.global = {
|
||||||
workgroup = WORKGROUP
|
"workgroup" = "WORKGROUP";
|
||||||
server string = rock5b
|
"server string" = "rock5b";
|
||||||
netbios name = rock5b
|
"netbios name" = "rock5b";
|
||||||
security = user
|
"security" = "user";
|
||||||
map to guest = bad user
|
"map to guest" = "bad user";
|
||||||
vfs objects = recycle
|
"vfs objects" = "recycle";
|
||||||
recycle:repository = .recycle
|
"recycle:repository" = ".recycle";
|
||||||
recycle:keeptree = yes
|
"recycle:keeptree" = "yes";
|
||||||
recycle:versions = yes
|
"recycle:versions" = "yes";
|
||||||
'';
|
};
|
||||||
shares = {
|
shares = {
|
||||||
torrent = {
|
torrent = {
|
||||||
path = "/mnt/hd/torrent";
|
path = "/mnt/hd/torrent";
|
||||||
|
|
|
@ -1,21 +1,13 @@
|
||||||
{
|
{
|
||||||
services.xserver = {
|
services.sunshine = {
|
||||||
enable = true;
|
enable = true;
|
||||||
videoDrivers = ["amdgpu"];
|
autoStart = true;
|
||||||
|
capSysAdmin = true;
|
||||||
# displayManager.gdm.enable = true;
|
openFirewall = true;
|
||||||
# displayManager.defaultSession = "gnome";
|
};
|
||||||
|
hardware = {
|
||||||
# displayManager.autoLogin.enable = true;
|
bluetooth.input.General = {
|
||||||
# displayManager.autoLogin.user = "sunshine"; # user must exists
|
ClassicBondedOnly = false;
|
||||||
|
|
||||||
# desktopManager.gnome.enable = true;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
users.users.sunshine = {
|
|
||||||
isSystemUser = true;
|
|
||||||
group = "sunshine";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
users.groups.sunshine = {};
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,4 +45,8 @@
|
||||||
];
|
];
|
||||||
|
|
||||||
ccr.extraGroups = ["transmission"];
|
ccr.extraGroups = ["transmission"];
|
||||||
|
|
||||||
|
environment.persistence."/persist".directories = [
|
||||||
|
config.services.transmission.home
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,7 +19,6 @@
|
||||||
type = lib.types.listOf overlayType;
|
type = lib.types.listOf overlayType;
|
||||||
default = with inputs; [
|
default = with inputs; [
|
||||||
agenix.overlays.default
|
agenix.overlays.default
|
||||||
nur.overlay
|
|
||||||
(final: _: {
|
(final: _: {
|
||||||
inherit (disko.packages.${final.system}) disko;
|
inherit (disko.packages.${final.system}) disko;
|
||||||
inherit (self.packages.${final.system}) deploy;
|
inherit (self.packages.${final.system}) deploy;
|
||||||
|
@ -46,7 +45,7 @@
|
||||||
_module.args.pkgs =
|
_module.args.pkgs =
|
||||||
lib.foldl
|
lib.foldl
|
||||||
(legacyPackages: legacyPackages.extend)
|
(legacyPackages: legacyPackages.extend)
|
||||||
inputs.nixpkgsUnstable.legacyPackages.${system}
|
inputs.nixpkgs.legacyPackages.${system}
|
||||||
config.fleet.overlays;
|
config.fleet.overlays;
|
||||||
|
|
||||||
packages =
|
packages =
|
||||||
|
|
53
packages/spotify-adblocked/default.nix
Normal file
53
packages/spotify-adblocked/default.nix
Normal 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
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
)
|
Loading…
Add table
Reference in a new issue