Compare commits

..

No commits in common. "master" and "wip" have entirely different histories.
master ... wip

265 changed files with 12866 additions and 9809 deletions

View file

@ -7,9 +7,5 @@ jobs:
steps:
- uses: actions/checkout@v4
name: Checkout repository
- name: Attic login
run: attic login nixfleet http://sisko.wg.aciceri.dev:8081 ${{secrets.ATTIC_NIXFLEET_TOKEN}}
- name: Build with nix
run: nix-fast-build --no-nom --systems "x86_64-linux aarch64-linux" --attic-cache "nixfleet" --skip-cached --result-file result.json || true
- name: Report checks
run: report-checks
run: nix-fast-build --no-nom --systems "x86_64-linux aarch64-linux"

View file

@ -1,7 +1,7 @@
name: update-flake-lock
on:
schedule:
- cron: "0 15 * * *" # daily at 15:00
- cron: '0 15 * * *' # daily at 15:00
jobs:
lockfile:

1
.gitignore vendored
View file

@ -2,4 +2,3 @@ result
.direnv
.pre-commit-config.yaml
*.qcow2
result*

View file

@ -3,55 +3,33 @@
self,
lib,
...
}:
{
}: {
imports = [
inputs.treefmt-nix.flakeModule
inputs.git-hooks-nix.flakeModule
inputs.pre-commit-hooks.flakeModule
];
perSystem =
{ config, ... }:
{
treefmt.config = {
projectRootFile = ".git/config";
flakeFormatter = true;
flakeCheck = true;
programs = {
nixfmt.enable = true;
prettier.enable = true;
black.enable = true;
shfmt.enable = true;
};
settings.global.excludes = [
"*.age"
"*.svg"
"*.png"
"*.jpg"
"*.bin"
"*.el"
"*.org"
".envrc"
"*.conf"
];
};
pre-commit.settings = {
hooks.treefmt = {
enable = true;
package = config.treefmt.build.wrapper;
};
};
perSystem = _: {
treefmt.config = {
projectRootFile = ".git/config";
programs.alejandra.enable = true;
};
flake.checks =
let
build = _: nc: nc.config.system.build.toplevel;
in
{
x86_64-linux = lib.mapAttrs build { inherit (self.nixosConfigurations) picard; };
aarch64-linux = lib.mapAttrs build {
inherit (self.nixosConfigurations) sisko; # pbp;
};
pre-commit.settings.hooks = {
alejandra.enable = true;
# deadnix.enable = true;
# statix.enable = true;
};
};
flake.checks = let
build = _: nc: nc.config.system.build.toplevel;
in {
x86_64-linux = lib.mapAttrs build {
inherit (self.nixosConfigurations) picard;
};
aarch64-linux = lib.mapAttrs build {
inherit (self.nixosConfigurations) sisko; #pbp;
};
};
}

24
ci/default.nix Normal file
View file

@ -0,0 +1,24 @@
{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"];
};
};
}

1384
flake.lock generated

File diff suppressed because it is too large Load diff

View file

@ -3,59 +3,74 @@
inputs = {
flakeParts.url = "github:hercules-ci/flake-parts";
nixpkgsSisko.url = "github:NixOS/nixpkgs/b6eaf97c6960d97350c584de1b6dcff03c9daf42";
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
nixpkgsUnstable.url = "github:NixOS/nixpkgs/nixos-unstable";
nixpkgsUnstableForSisko.url = "github:NixOS/nixpkgs/0e74ca98a74bc7270d28838369593635a5db3260";
nixpkgsStable.url = "github:NixOS/nixpkgs/nixos-23.11";
nixosHardware.url = "github:NixOS/nixos-hardware";
homeManager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
inputs.nixpkgs.follows = "nixpkgsUnstable";
};
# TODO: remove after https://github.com/nix-community/home-manager/pull/3811
homeManagerGitWorkspace = {
url = "github:aciceri/home-manager/git-workspace";
inputs.nixpkgs.follows = "nixpkgs";
inputs.nixpkgs.follows = "nixpkgsUnstable";
};
disko = {
url = "github:nix-community/disko";
inputs.nixpkgs.follows = "nixpkgs";
inputs.nixpkgs.follows = "nixpkgsUnstable";
};
git-hooks-nix = {
url = "github:cachix/git-hooks.nix";
inputs.nixpkgs.follows = "nixpkgs";
pre-commit-hooks = {
url = "github:cachix/pre-commit-hooks.nix";
inputs = {
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";
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 = "nixpkgs";
inputs.nixpkgs.follows = "nixpkgsUnstable";
};
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";
};
nixDarwin = {
url = "github:LnL7/nix-darwin";
inputs.nixpkgs.follows = "nixpkgsUnstable";
};
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"; # FIXME update
url = "git+https://git@git.lix.systems/lix-project/lix";
flake = false;
};
lix-module = {
url = "git+https://git.lix.systems/lix-project/nixos-module";
inputs.lix.follows = "lix";
inputs.nixpkgs.follows = "nixpkgs";
inputs.nixpkgs.follows = "nixpkgsUnstable";
};
mobile-nixos = {
url = "github:NixOS/mobile-nixos";
flake = false;
};
impermanence.url = "github:nix-community/impermanence";
vscode-server.url = "github:nix-community/nixos-vscode-server";
lanzaboote = {
url = "github:nix-community/lanzaboote";
inputs.nixpkgs.follows = "nixpkgs";
};
catppuccin.url = "github:catppuccin/nix";
emacs-overlay.url = "github:nix-community/emacs-overlay";
arion.url = "github:hercules-ci/arion";
};
outputs =
inputs@{ flakeParts, ... }:
flakeParts.lib.mkFlake { inherit inputs; } {
outputs = inputs @ {flakeParts, ...}:
flakeParts.lib.mkFlake {inherit inputs;} {
imports = [
# TODO export modules as flake outputs
# ./modules
@ -64,10 +79,8 @@
./packages
./shell
./checks
./ci
];
systems = [
"x86_64-linux"
"aarch64-linux"
];
systems = ["x86_64-linux" "aarch64-linux"];
};
}

View file

@ -1,5 +1,5 @@
{
imports = [ ../email ];
imports = [../email];
config = {
accounts.email.accounts = {
autistici.aerc = {

View file

@ -1,4 +1,3 @@
{ pkgs, ... }:
{
home.packages = [ pkgs.binance ];
{pkgs, ...}: {
home.packages = [pkgs.binance];
}

View file

@ -1,9 +1,18 @@
{
{pkgs, ...}: {
programs.btop = {
enable = true;
settings = {
update_ms = 100;
theme_background = false;
# color_theme = "${config.programs.btop.package}/share/btop/themes/dracula.theme";
color_theme = let
catppuccin-theme = pkgs.fetchFromGitHub {
owner = "catppuccin";
repo = "btop";
rev = "21b8d5956a8b07fa52519e3267fb3a2d2e693d17";
hash = "sha256-UXeTypc15MhjgGUiCrDUZ40m32yH2o1N+rcrEgY6sME=";
};
in "${catppuccin-theme}/themes/catppuccin_mocha.theme";
};
};
}

View file

@ -1,4 +1,3 @@
{ pkgs, ... }:
{
home.packages = [ pkgs.calibre ];
{pkgs, ...}: {
home.packages = [pkgs.calibre];
}

View file

@ -1,13 +0,0 @@
{ lib, ... }:
{
catppuccin = {
enable = true;
flavor = "mocha";
accent = "sapphire";
};
qt = {
platformTheme.name = lib.mkForce "kvantum";
style.name = lib.mkForce "kvantum";
};
}

View file

@ -1,4 +0,0 @@
{ pkgs, ... }:
{
home.packages = [ pkgs.chirp ];
}

View file

@ -1,5 +1,4 @@
{ pkgs, ... }:
{
{pkgs, ...}: {
programs.chromium = {
enable = true;
package = pkgs.google-chrome;

View file

@ -1,6 +1,3 @@
{ pkgs, ... }:
{
home.packages = [
pkgs.cura-appimage
];
{pkgs, ...}: {
home.packages = [pkgs.cura];
}

View file

@ -1,4 +1,3 @@
{ pkgs, ... }:
{
home.packages = [ pkgs.digikam ];
{pkgs, ...}: {
home.packages = [pkgs.digikam];
}

View file

@ -1,11 +1,5 @@
{ pkgs, ... }:
{
home.packages = [
(pkgs.discord.override {
withOpenASAR = true;
withVencord = true;
})
];
{pkgs, ...}: {
home.packages = [pkgs.discord];
home.file.".config/discord/settings.json".text = builtins.toJSON {
SKIP_HOST_UPDATE = true;
};

View file

@ -1,4 +1,3 @@
{ pkgs, ... }:
{
home.packages = [ pkgs.dolphin-emu ];
{pkgs, ...}: {
home.packages = [pkgs.dolphin-emu];
}

View file

@ -1,17 +1,18 @@
{ pkgs, lib, ... }:
{
home.packages = [ pkgs.element-desktop ];
{pkgs, ...}: {
# home.packages = [pkgs.schildichat-desktop];
home.packages = [pkgs.element-desktop-wayland];
systemd.user.services.element-desktop = {
Install.WantedBy = [ "graphical-session.target" ];
Install.WantedBy = ["graphical-session.target"];
Unit = {
Description = "Element";
PartOf = [ "graphical-session.target" ];
PartOf = ["graphical-session.target"];
};
Service = {
ExecStart = lib.getExe pkgs.element-desktop;
# ExecStart = "${pkgs.schildichat-desktop}/bin/schildichat-desktop"; # TODO I preferred SchildiChat but it was removed from nixpkgs becuase unsafe
ExecStart = "${pkgs.element-desktop-wayland}/bin/element-desktop";
Restart = "on-failure";
RestartSec = 3;
};

View file

@ -1,65 +1,10 @@
{
lib,
fleetFlake,
pkgs,
age,
pkgs,
...
}:
let
emacs = fleetFlake.packages.${pkgs.system}.emacs;
inherit (emacs.passthru) treesitGrammars;
in
{
systemd.user.sessionVariables = {
EDITOR = lib.mkForce "emacsclient -c";
OPENAI_API_KEY_PATH = age.secrets.chatgpt-token.path;
};
programs.emacs = {
enable = true;
package = emacs;
};
services.emacs = {
enable = true;
client.enable = true;
defaultEditor = true;
socketActivation.enable = false;
startWithUserSession = true;
package = emacs;
};
home.packages =
with pkgs;
[
binutils
delta
(ripgrep.override { withPCRE2 = true; })
gnutls
fd
hunspell
python3
imagemagick
ghostscript_headless
mupdf-headless
poppler_utils
ffmpegthumbnailer
mediainfo
unzipNLS
nodejs_20
qadwaitadecorations
kdePackages.qtwayland
copilot-language-server.fhs
math-preview
emacs-lsp-booster
]
++ (with hunspellDicts; [
en_US-large
it_IT
]);
home.activation.linkEmacsConfig = lib.hm.dag.entryAnywhere ''
if [ ! -d "$HOME/.config/emacs" ]; then
$DRY_RUN_CMD mkdir "$HOME/.config/emacs"
$DRY_RUN_CMD ln -s "$HOME/projects/aciceri/nixfleet/hmModules/emacs/init.el" "$HOME/.config/emacs/init.el"
$DRY_RUN_CMD ln -s "$HOME/.config/emacs" "$HOME/emacs"
fi
$DRY_RUN_CMD ln -sfn ${treesitGrammars} "$HOME/.config/emacs/tree-sitter"
'';
}: {
ccrEmacs.enable = true;
home.sessionVariables.EDITOR = lib.mkForce "emacsclient";
systemd.user.services.emacs.Service.EnvironmentFile = age.secrets.chatgpt-token.path;
}

File diff suppressed because it is too large Load diff

View file

@ -1,271 +1,17 @@
{
pkgs,
secrets,
fleetFlake,
lib,
...
}:
{
}: {
programs.mbsync.enable = true;
programs.msmtp.enable = true;
services.mbsync = {
enable = true;
postExec = lib.getExe (
pkgs.writeShellScriptBin "mbsync-post-exec" ''
${lib.getExe pkgs.notmuch} new
for _ in _ _
do
afew -C ~/.config/notmuch/default/config --tag --new -vv
afew -C ~/.config/notmuch/default/config --move --new -vv
done
''
);
};
# 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)";
# };
# filters = {
# "text/plain" = "colorize";
# "text/html" = "html";
# "text/calendar" = "calendar";
# "message/delivery-status" = "colorize";
# "message/rfc822" = "colorize";
# "image/*" = "${pkgs.catimg}/bin/catimg -";
# };
# };
# };
programs.notmuch = {
enable = true;
new.tags = [ "new" ];
search.excludeTags = [
"trash"
"deleted"
"spam"
];
maildir.synchronizeFlags = true;
hooks.preNew = "mbsync --all";
};
programs.afew = {
enable = true;
extraConfig = ''
[Filter.1]
message = "Tag GitHub notifications"
tags = +github
query = from:noreply@github.com OR from:notifications@github.com
[Filter.2]
query = "folder:autistici/Inbox"
tags = +autistici
message = "Tag personal autistici emails"
[Filter.3]
query = "not folder:autistici/Inbox"
tag = -new
message = "Sanity check: remove the new tag for emails moved out from Inbox"
[Filter.4]
query = "not folder:autistici/Inbox"
tag = -new
message = "Sanity check: remove the new tag for emails moved out from Inbox"
[Filter.5]
query = "not folder:autistici/Sent"
tag = +sent
message = "Sanity check: add the sent tag for emails in Sent"
[Filter.6]
query = "not folder:autistici/Drafts"
tag = +draft
message = "Sanity check: add the draft tag for emails in Draft"
[MailMover]
folders = autistici/Inbox
rename = true
autistici/Inbox = 'tag:archive':autistici/Archive 'tag:github':autistici/GitHub 'NOT tag:new':autistici/Trash
'';
};
systemd.user.services.emails-watcher = {
Unit.Description = "Send notifications when new emails arrive";
Install = {
WantedBy = [ "default.target" ];
};
Service = {
ExecStart = "${lib.getExe fleetFlake.packages.${pkgs.system}.emails-watcher}";
Environment = [ "INBOX_NEW=~/Maildir/autistici/Inbox/new" ];
};
};
services.mbsync.enable = true;
accounts.email = {
accounts.autistici = {
aerc.enable = true;
address = "andrea.ciceri@autistici.org";
gpg = {
key = "7A66EEA1E6C598D07D361287A1FC89532D1C565";
@ -278,8 +24,6 @@
mbsync = {
enable = true;
create = "maildir";
expunge = "both";
remove = "both";
};
msmtp.enable = true;
notmuch.enable = true;

View file

@ -1,193 +0,0 @@
:root {
/* Catppuccin Colors */
--bg: #1e1e2e;
--currentline: #302d41;
--fg: #d9e0ee;
--comment: #575268;
--flamingo: #f2cdcd;
--mauve: #ddb6f2;
--pink: #f5c2e7;
--maroon: #e8a2af;
--red: #f28fad;
--peach: #f8bd96;
--yellow: #fae3b0;
--green: #abe9b3;
--teal: #b5e8e0;
--blue: #96cdfb;
--sky: #89dceb;
--lavender: #c9cbff;
--rosewater: #f5e0dc;
--font: monospace; /*"FiraCode Nerd Font Mono";*/
/* vimium theme uses colors: flamingo, peach, rosewater, green, blue, lavender */
--tridactyl-fg: var(--fg);
--tridactyl-bg: var(--bg);
--tridactyl-url-fg: var(--rosewater);
--tridactyl-url-bg: var(--bg);
--tridactyl-highlight-box-bg: var(--currentline);
--tridactyl-highlight-box-fg: var(--fg);
--tridactyl-of-fg: var(--fg);
--tridactyl-of-bg: var(--currentline);
--tridactyl-cmdl-fg: var(--bg);
--tridactyl-cmdl-font-family: var(--font);
--tridactyl-cmplt-font-family: var(--font);
--tridactyl-hintspan-font-family: var(--font);
/* Hint character tags */
--tridactyl-hintspan-fg: var(--bg) !important;
--tridactyl-hintspan-bg: var(--green) !important;
/* Element Highlights */
--tridactyl-hint-active-fg: none;
--tridactyl-hint-active-bg: none;
--tridactyl-hint-active-outline: none;
--tridactyl-hint-bg: none;
--tridactyl-hint-outline: none;
}
#command-line-holder {
order: 1;
border: 2px solid var(--lavender);
background: var(--tridactyl-bg);
}
#tridactyl-input {
padding: 1rem;
color: var(--tridactyl-fg);
width: 90%;
font-size: 1.5rem;
line-height: 1.5;
background: var(--tridactyl-bg);
padding-left: unset;
padding: 1rem;
}
#completions table {
font-size: 0.8rem;
font-weight: 200;
border-spacing: 0;
table-layout: fixed;
padding: 1rem 0;
/* padding-top: 1rem; */
/* padding-bottom: 1rem; */
}
#completions > div {
max-height: calc(20 * var(--option-height));
min-height: calc(10 * var(--option-height));
}
/* COMPLETIONS */
#completions {
--option-height: 1.4em;
color: var(--tridactyl-fg);
background: var(--tridactyl-bg);
display: inline-block;
font-size: unset;
font-weight: 200;
overflow: hidden;
width: 100%;
border-top: unset;
order: 2;
}
/* Olie doesn't know how CSS inheritance works */
#completions .HistoryCompletionSource {
max-height: unset;
min-height: unset;
}
#completions .HistoryCompletionSource table {
width: 100%;
font-size: 9pt;
border-spacing: 0;
table-layout: fixed;
}
/* redundancy 2: redundancy 2: more redundancy */
#completions .BmarkCompletionSource {
max-height: unset;
min-height: unset;
}
#completions table tr td.prefix,
#completions table tr td.privatewindow,
#completions table tr td.container,
#completions table tr td.icon {
display: none;
}
#completions .BufferCompletionSource table {
width: unset;
font-size: unset;
border-spacing: unset;
table-layout: unset;
}
#completions table tr .title,
#completions table tr td.excmd {
width: 50%;
padding-left: 1rem;
color: var(--blue);
}
#completions table tr .content,
#completions table tr td.documentation {
padding-right: 1rem;
}
#completions table tr {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
#completions table tr td {
padding: 0.5rem 0;
}
#completions .sectionHeader {
background: unset;
font-weight: bold;
border-bottom: unset;
padding: 1rem 1rem 0 !important;
padding-left: unset;
padding-bottom: 0.2rem;
color: var(--peach);
}
#cmdline_iframe {
position: fixed !important;
bottom: unset;
top: 25% !important;
left: 10% !important;
z-index: 2147483647 !important;
width: 80% !important;
box-shadow: rgba(0, 0, 0, 0.5) 0px 0px 20px !important;
}
.TridactylStatusIndicator {
position: fixed !important;
bottom: 0 !important;
background: var(--tridactyl-bg) !important;
border: unset !important;
border: 1px var(--purple) solid !important;
font-size: 12pt !important;
/*font-weight: 200 !important;*/
padding: 0.8ex !important;
}
#completions .focused {
background: var(--currentline);
/* color: var(--blue); */
font-weight: bold;
}
#completions .focused td.title {
color: var(--pink);
}
#completions .focused .url {
background: var(--currentline);
color: var(--green);
}

View file

@ -1,72 +1,34 @@
{
pkgs,
username,
...
}:
let
mkExtension = shortId: uuid: {
name = uuid;
value = {
install_url = "https://addons.mozilla.org/en-US/firefox/downloads/latest/${shortId}/latest.xpi";
installation_mode = "normal_installed";
};
};
in
{
}: {
programs.firefox = {
enable = true;
nativeMessagingHosts = [
pkgs.tridactyl-native
pkgs.vdhcoapp
];
policies = {
DisableTelemetry = true;
DisableFirefoxStudies = true;
EnableTrackingProtection = {
Value = true;
Locked = true;
Cryptomining = true;
Fingerprinting = true;
EmailTracking = true;
package = pkgs.wrapFirefox pkgs.firefox-unwrapped {
extraPolicies = {
ExtensionSettings = {};
};
HardwareAcceleration = true;
FirefoxHome = {
TopSites = false;
SponsoredTopSites = false;
Highlights = false;
Pocket = false;
SponsoredPocket = false;
Snippets = false;
Locked = false;
};
FirefoxSuggest = {
WebSuggestions = true;
SponsoredSuggestions = false;
ImproveSuggest = false;
Locked = true;
};
OverrideFirstRunPage = "";
OverridePostUpdatePage = "";
DontCheckDefaultBrowser = true;
DisplayMenuBar = "default-off"; # alternatives: "always", "never" or "default-on"
SearchBar = "unified"; # alternative: "separate"
HttpsOnlyMode = "force_enabled";
NoDefaultBookmarks = true;
OfferToSaveLogins = false;
OfferToSaveLoginsDefault = false;
PasswordManagerEnabled = true;
DefaultDownloadDirectory = "\${home}/Downloads";
PromptForDownloadLocation = false;
RequestedLocales = "en-US";
ExtensionSettings = builtins.listToAttrs [
(mkExtension "ublock-origin" "uBlock0@raymondhill.net")
(mkExtension "tridactyl-vim" "tridactyl.vim@cmcaine.co.uk")
(mkExtension "styl-us" "7a7a4a92-a2a0-41d1-9fd7-1e92480d612d")
];
nativeMessagingHosts = [pkgs.tridactyl-native];
};
profiles.default = {
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";
"browser.search.isUS" = false;
"distribution.searchplugins.defaultLocale" = "it-IT";
"general.useragent.locale" = "it-IT";
"browser.bookmarks.showMobileBookmarks" = true;
"browser.download.folderList" = 2;
"browser.download.lastDir" = "/home/${username}/Downloads/";
"browser.shell.checkDefaultBrowser" = false;
};
search.force = true;
search.default = "google";
search.engines = {
"Searx" = {
urls = [
@ -82,18 +44,10 @@ in
];
};
};
extensions = [ ];
userChrome = builtins.readFile ./userchrome.css;
};
};
xdg.configFile."tridactyl/tridactylrc".text = ''
set editorcmd emacsclient -c %f
colors catppuccin
'';
xdg.configFile."tridactyl/themes/catppuccin.css" = {
source = ./catppuccin.css;
home.sessionVariables = {
MOZ_ENABLE_WAYLAND = 1;
NIXOS_OZONE_WL = 1;
};
}

View file

@ -1,73 +0,0 @@
/* * Do not remove the @namespace line -- it's required for correct functioning */
/* set default namespace to XUL */
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
/* Remove Back button when there's nothing to go Back to */
#back-button[disabled="true"] {
display: none;
}
/* Remove Forward button when there's nothing to go Forward to */
#forward-button[disabled="true"] {
display: none;
}
/* Remove Home button (never use it) */
#home-button {
display: none;
}
.titlebar-spacer {
display: none !important;
}
/* Remove import bookmarks button */
#import-button {
display: none;
}
/* Remove bookmark toolbar */
toolbarbutton.bookmark-item:not(.subviewbutton) {
display: none;
}
/* Remove whitespace in toolbar */
#nav-bar toolbarpaletteitem[id^="wrapper-customizableui-special-spring"],
#nav-bar toolbarspring {
display: none;
}
/* Hide dumb Firefox View button */
#firefox-view-button {
visibility: hidden;
}
/* Hide Firefox tab icon */
.tab-icon-image {
display: none;
}
/* Linux stuff to keep GNOME system theme */
.titlebar-min {
appearance: auto !important;
-moz-default-appearance: -moz-window-button-minimize !important;
}
.titlebar-max {
appearance: auto !important;
-moz-default-appearance: -moz-window-button-maximize !important;
}
.titlebar-restore {
appearance: auto !important;
-moz-default-appearance: -moz-window-button-restore !important;
}
.titlebar-close {
appearance: auto !important;
-moz-default-appearance: -moz-window-button-close !important;
}
.titlebar-button {
list-style-image: none !important;
}

View file

@ -1,66 +1,40 @@
{
lib,
config,
pkgs,
...
}:
lib.mkMerge [
{
programs.foot = {
enable = true;
server.enable = true;
settings = {
main = {
term = "xterm-direct";
login-shell = "yes";
dpi-aware = "no";
horizontal-letter-offset = "1";
pad = "1x1";
font =
let
size = "13";
in
lib.mkForce (
lib.concatStringsSep ", " [
"Iosevka Comfy:size=${size}"
"Symbols Nerd Font:size=${size}"
"JoyPixels:size=${size}"
]
);
};
cursor = {
blink = true;
};
tweak = {
overflowing-glyphs = true;
};
}: {
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}"
];
};
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";
};
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,4 +0,0 @@
{ pkgs, ... }:
{
home.packages = [ pkgs.freecad-wayland ];
}

View file

@ -1,4 +0,0 @@
{ pkgs, ... }:
{
home.packages = [ pkgs.gimp ];
}

View file

@ -2,8 +2,7 @@
age,
username,
...
}:
{
}: {
services.git-workspace = {
enable = true;
frequency = "04:00:00";

View file

@ -2,21 +2,13 @@
pkgs,
username,
...
}:
let
}: let
config = {
name = "Andrea Ciceri";
email = "andrea.ciceri@autistici.org";
};
in
{
imports = [
../gitui
../lazygit
];
home.packages = [ pkgs.git-credential-manager ];
in {
imports = [../gitui ../lazygit];
programs.git = {
enable = true;
package = pkgs.gitAndTools.gitFull;
@ -27,18 +19,11 @@ in
rebase.autostash = true;
github.user = "aciceri";
user.signingKey = "/home/${username}/.ssh/id_ed25519";
user.signingKey = "/home/${username}/.ssh/id_rsa";
gpg.format = "ssh";
commit.gpgsign = true;
credential.helper = "libsecret";
credential.credentialStore = "cache";
core = {
fsmonitor = true;
untrackedcache = true;
};
fetch.writeCommitGraph = true;
core.editor = "emacsclient";
};
userName = config.name;
@ -47,8 +32,7 @@ in
extraConfig.url = {
"ssh://git@github.com/".insteadOf = "https://github.com/";
# Workaround for https://github.com/rust-lang/cargo/issues/3381#issuecomment-1193730972
"https://github.com/rust-lang/crates.io-index".insteadOf =
"https://github.com/rust-lang/crates.io-index";
"https://github.com/rust-lang/crates.io-index".insteadOf = "https://github.com/rust-lang/crates.io-index";
"https://github.com/RustSec/advisory-db".insteadOf = "https://github.com/RustSec/advisory-db";
};

View file

@ -1,9 +1,9 @@
{
pkgs,
lib,
config,
...
}:
{
}: {
services.gnome-keyring = {
enable = false; # Is this broken? https://github.com/nix-community/home-manager/issues/1454
components = lib.mkForce [
@ -12,7 +12,7 @@
];
};
home.packages = [ pkgs.gcr ]; # Needed in PATH
home.packages = [pkgs.gcr]; # Needed in PATH
# Workaround
wayland.windowManager.hyprland.extraConfig = ''

View file

@ -1,18 +1,25 @@
{ pkgs, ... }:
{
{pkgs, ...}: {
services.gpg-agent = {
enable = true;
pinentryPackage = pkgs.pinentry-rofi.override {
rofi = pkgs.rofi-wayland;
};
extraConfig = ''
enableSshSupport = true;
sshKeys = ["CE2FD0D9BECBD8876811714925066CC257413416"];
extraConfig = let
pinentryRofi = pkgs.writeShellApplication {
name = "pinentry-rofi-with-env";
runtimeInputs = with pkgs; [coreutils rofi];
text = ''
"${pkgs.pinentry-rofi}/bin/pinentry-rofi" "$@"
'';
};
in ''
allow-emacs-pinentry
allow-loopback-pinentry
pinentry-program ${pinentryRofi}/bin/pinentry-rofi-with-env
'';
};
programs.gpg = {
enable = true;
settings = { };
settings = {};
};
}

View file

@ -1,12 +1,11 @@
{
config,
lib,
...
}:
let
}: let
originalConfig = config.wayland.windowManager.hyprland.extraConfig;
config = builtins.replaceStrings [ "SUPER" ] [ "" ] originalConfig;
in
{
config = builtins.replaceStrings ["SUPER"] [""] originalConfig;
in {
systemd.user.services.headless-hyprland = {
Unit.Description = "Headless Hyprland";
Service = {

View file

@ -1,16 +1,8 @@
{ pkgs, ... }:
{
home.packages = with pkgs; [
zk
nixd
terraform-ls
python3Packages.python-lsp-server
nodePackages.typescript-language-server
];
programs.helix = {
enable = true;
settings = {
theme = "catppuccin_mocha";
editor = {
indent-guides.render = true;
cursor-shape = {
@ -18,36 +10,7 @@
normal = "block";
select = "underline";
};
color-modes = true;
true-color = true; # to make colors coherent when in ssh
# inline-diagnostic = {
# cursor-line = "hint";
# other-lines = "error";
# };
};
};
languages = {
language = [
{
name = "nix";
language-servers = [ "nixd" ];
formatter.command = "nixfmt";
}
{
name = "markdown";
language-servers = [ "zk" ];
}
{
name = "typescript";
language-servers = [ "vtsls" ];
}
];
language-server = {
nixd.command = "nixd";
zk = {
command = "zk";
args = [ "lsp" ];
};
};
};
};

View file

@ -3,16 +3,15 @@
pkgs,
lib,
...
}:
let
screenshotScript = pkgs.writeShellScriptBin "screenshot.sh" ''
}: let
screenshotScript = pkgs.writeShellScript "screenshot.sh" ''
filename="$HOME/shots/$(date --iso-8601=seconds).png"
coords="$(${pkgs.slurp}/bin/slurp)"
${pkgs.grim}/bin/grim -t png -g "$coords" "$filename"
wl-copy -t image/png < $filename
'';
hyprland = config.wayland.windowManager.hyprland.package;
switchMonitorScript = pkgs.writeShellScriptBin "switch-monitor.sh" ''
switchMonitorScript = pkgs.writeShellScript "switch-monitor.sh" ''
if [[ "$(${hyprland}/bin/hyprctl monitors) | grep '\sDP-[0-9]+'" ]]; then
if [[ $1 == "open" ]]; then
${hyprland}/bin/hyprctl keyword monitor "eDP-1,1920x1080,3760x230,1"
@ -21,26 +20,19 @@ let
fi
fi
'';
in
{
in {
imports = [
./hyprpaper.nix
../waybar
../swayidle
../gammastep
# ../wezterm
../wayvnc
../swaync
../foot
];
home.packages = with pkgs; [
wl-clipboard
waypipe
switchMonitorScript
screenshotScript
hyprpaper
fuzzel
brightnessctl
];
home.packages = with pkgs; [wl-clipboard waypipe];
systemd.user.sessionVariables = {
NIXOS_OZONE_WL = "1";
@ -55,41 +47,160 @@ in
gtk = {
enable = true;
theme = {
name = "Catppuccin-GTK-Purple-Dark-Compact";
package = pkgs.magnetic-catppuccin-gtk.override {
accent = [ "purple" ];
shade = "dark";
size = "compact";
};
};
font.name = "Sans,Symbols Nerd Font";
iconTheme = {
name = "Adwaita";
package = pkgs.adwaita-icon-theme;
};
cursorTheme = {
name = "catppuccin-mocha-sapphire";
package = pkgs.catppuccin-cursors;
size = 38;
package = pkgs.gnome.adwaita-icon-theme;
};
};
home.file.".icons/catppuccin-mocha-sapphire" = {
source = "${pkgs.catppuccin-cursors.mochaSapphire}/share/icons/catppuccin-mocha-sapphire-cursors";
recursive = true;
};
qt = {
enable = true;
};
# services.kanshi = {
# enable = true;
# systemdTarget = "hyprland-session.target";
# profiles = {
# undocked = {
# outputs = [
# {
# status = "enable";
# criteria = "eDP-1";
# }
# ];
# };
# docked = {
# outputs = [
# {
# status = "disable";
# criteria = "eDP-1";
# }
# {
# status = "enable";
# criteria = "DP-1";
# }
# ];
# };
# };
# };
wayland.windowManager.hyprland = {
enable = false;
plugins = with pkgs.hyprlandPlugins; [
hy3
hyprspace
];
# TODO migrate to structured options
extraConfig = builtins.readFile ./hyprland.conf;
enable = true;
extraConfig = ''
$mod = SUPER
input {
touchpad {
disable_while_typing = true # set to true while playing
}
}
monitor = HDMI-A-1, 2560x1440, 0x0, 1 # picard
monitor = eDP-1, 1920x1080, 0x0, 1 # kirk
bindl=,switch:off:Lid Switch,exec,${switchMonitorScript} open
bindl=,switch:on:Lid Switch,exec,${switchMonitorScript} close
exec-once = ${pkgs.hyprpaper}/bin/hyprpaper
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)$
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%-
bind = $mod SHIFT, q, killactive
bind = $mod SHIFT, f, fullscreen, 0
bind = $mod SHIFT, e, exit
bind = $mod, h, movefocus, l
bind = $mod, l, movefocus, r
bind = $mod, k, movefocus, u
bind = $mod, j, movefocus, d
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, p, movecurrentworkspacetomonitor, r
bind = $mod, o, movecurrentworkspacetomonitor, l
bindm=ALT,mouse:272,movewindow
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
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
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)
}
decoration {
# See https://wiki.hyprland.org/Configuring/Variables/ for more
rounding = 2
# blur = true
# blur_size = 8
# blur_passes = 1
# blur_new_optimizations = true
drop_shadow = true
shadow_range = 4
shadow_render_power = 3
col.shadow = rgba(a8cfee11)
}
animations {
enabled = true
# Some default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more
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

@ -1,190 +0,0 @@
cursor {
hide_on_key_press = true
enable_hyprcursor = true
zoom_rigid = true
}
env = HYPRCURSOR_THEME,catppuccin-mocha-sapphire
env = HYPRCURSOR_SIZE,40
env = XCURSOR_THEME,catppuccin-mocha-sapphire
env = XCURSOR_SIZE,40
$mod = SUPER
input {
touchpad {
disable_while_typing = true # set to true while playing
}
}
monitor = HDMI-A-1, 2560x1440, 0x0, 1 # picard
monitor = eDP-1, 1920x1080, 0x0, 1, mirror, DP-1 # kirk
bindl=,switch:off:Lid Switch,exec,switch-monitor.sh open
bindl=,switch:on:Lid Switch,exec,switch-monitor.sh close
exec-once = hyprpaper
windowrulev2 = tile, class:^(Spotify)$
windowrulev2 = workspace 9, class:^(Spotify)$
windowrulev2 = float, title:^(floating)$
bind = $mod, b, exec, firefox
# bind = $mod, t, exec, footclient $SHELL -C "zellij"
bind = $mod, t, exec, footclient $SHELL
bind = $mod, RETURN, exec, emacsclient -c --eval "(ccr/start-eshell)"
bind = $mod, m, exec, emacsclient -c --eval '(notmuch-search "tag:new")'
bind = $mod, g, exec, emacsclient -c --eval '(switch-to-buffer (gptel "*ChatGPT*"))'
bind = $mod, c, exec, emacsclient -c --eval '(org-roam-dailies-capture-today)'
bind = $mod, d, exec, fuzzel --background-color=253559cc --border-radius=5 --border-width=0
bind = $mod, s, exec, screenshot.sh
bind = $mod, n, exec, logseq
bind = $mod, x, exec, emacsclient -c
bind = , XF86MonBrightnessUp, exec, brightnessctl s +5%
bind = , XF86MonBrightnessDown, exec, brightnessctl s 5%-
bind = $mod, code:60, exec, brightnessctl s +5%
bind = $mod, code:59, exec, brightnessctl s 5%-
bind = $mod SHIFT, t, hy3:makegroup, tab, ephemeral
bind = $mod SHIFT, q, killactive
bind = $mod SHIFT, f, fullscreen, 0
bind = $mod SHIFT, e, exit
bind = $mod, h, hy3:movefocus, l
bind = $mod, l, hy3:movefocus, r
bind = $mod, k, hy3:movefocus, u
bind = $mod, j, hy3:movefocus, d
bind = $mod SHIFT, h, hy3:movewindow, l
bind = $mod SHIFT, l, hy3:movewindow, r
bind = $mod SHIFT, k, hy3:movewindow, u
bind = $mod SHIFT, j ,hy3:movewindow, d
bind = $mod, v, hy3:makegroup, v
bind = $mod SHIFT, v, hy3:makegroup, h
bind = $mod, p, movecurrentworkspacetomonitor, r
bind = $mod, o, movecurrentworkspacetomonitor, l
bindm=ALT,mouse:272,hy3:movewindow
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
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
general {
layout = hy3
gaps_in = 8
gaps_out = 5
}
decoration {
rounding = 8
# drop_shadow = true
# shadow_range = 4
# shadow_render_power = 3
# col.shadow = rgba(a8cfee11)
}
animations {
enabled = true
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
}
plugin {
hy3 {
# disable gaps when only one window is onscreen
# 0 - always show gaps
# 1 - hide gaps with a single window onscreen
# 2 - 1 but also show the window border
no_gaps_when_only = 0 # default: 0
# policy controlling what happens when a node is removed from a group,
# leaving only a group
# 0 = remove the nested group
# 1 = keep the nested group
# 2 = keep the nested group only if its parent is a tab group
node_collapse_policy = 2 # default: 2
# offset from group split direction when only one window is in a group
group_inset = 0 # default: 10
# if a tab group will automatically be created for the first window spawned in a workspace
tab_first_window = false
# tab group settings
tabs {
# height of the tab bar
height = 20
# padding between the tab bar and its focused node
padding = 10
# the tab bar should animate in/out from the top instead of below the window
from_top = false
# rounding of tab bar corners
rounding = 4
# render the window title on the bar
render_text = true
# center the window title
text_center = true
# font to render the window title with
text_font = Fira Code
# height of the window title
text_height = 14
# left padding of the window title
text_padding = 4
# active tab bar segment color
# col.active = <color> # default: 0xff32b4ff
# urgent tab bar segment color
# col.urgent = <color> # default: 0xffff4f4f
# inactive tab bar segment color
# col.inactive = <color> # default: 0x80808080
# active tab bar text color
# col.text.active = <color> # default: 0xff000000
# urgent tab bar text color
# col.text.urgent = <color> # default: 0xff000000
# inactive tab bar text color
# col.text.inactive = <color> # default: 0xff000000
}
}
}

View file

@ -1,9 +1,7 @@
let
wallpaper = ./wallpaper.png;
in
{
in {
xdg.configFile."hypr/hyprpaper.conf".text = ''
splash = false
preload = ${wallpaper}
wallpaper = eDP-1,${wallpaper}
wallpaper = DP-1,${wallpaper}

View file

@ -1,4 +0,0 @@
{ fleetFlake, pkgs, ... }:
{
home.packages = [ fleetFlake.packages.${pkgs.system}.ib-tws ];
}

View file

@ -1,3 +0,0 @@
{
programs.imv.enable = true;
}

View file

@ -1,4 +1,3 @@
{ pkgs, ... }:
{
home.packages = [ pkgs.kicad-small ];
{pkgs, ...}: {
home.packages = [pkgs.kicad-small];
}

View file

@ -1,5 +1,4 @@
{ ... }:
{
{pkgs, ...}: {
programs.kitty = {
enable = true;
font = {

View file

@ -1,5 +1,4 @@
{ pkgs, ... }:
{
{pkgs, ...}: {
programs.lazygit = {
enable = true;
settings = {

View file

@ -1,4 +0,0 @@
{ pkgs, ... }:
{
home.packages = [ pkgs.libreoffice ];
}

View file

@ -1,15 +0,0 @@
{ pkgs, lib, ... }:
let
logseq = pkgs.appimageTools.wrapType2 {
name = "logseq";
version = "nightly-20240909";
src = pkgs.fetchurl {
url = "https://github.com/logseq/logseq/releases/download/nightly/Logseq-linux-x64-0.10.10-alpha+nightly.20240909.AppImage";
hash = "sha256-Hy/zk8ZCkWajsMRUMsewLvkKpMpsBZYnFootPU9y6Z0=";
};
};
logseq-wayland = pkgs.writeScriptBin "logseq" "${lib.getExe' logseq "logseq"} --enable-features=UseOzonePlatform --ozone-platform=wayland";
in
{
home.packages = [ logseq-wayland ];
}

View file

@ -1,4 +1,3 @@
{ pkgs, ... }:
{
home.packages = [ pkgs.lutris ];
{pkgs, ...}: {
home.packages = [pkgs.lutris];
}

View file

@ -1,4 +1,3 @@
{ pkgs, ... }:
{
home.packages = [ pkgs.monero-gui ];
{pkgs, ...}: {
home.packages = [pkgs.monero-gui];
}

View file

@ -1,4 +1,3 @@
{ pkgs, ... }:
{
home.packages = [ pkgs.moonlight-qt ];
{pkgs, ...}: {
home.packages = [pkgs.moonlight-qt];
}

View file

@ -1,6 +1,5 @@
# TODO: use upstream ytmusic when updated: https://github.com/OzymandiasTheGreat/mopidy-ytmusic/issues/68
{ pkgs, ... }:
let
{pkgs, ...}: let
ytmusicapi = pkgs.python310Packages.buildPythonPackage rec {
pname = "ytmusicapi";
version = "0.24.0";
@ -39,20 +38,14 @@ let
python310Packages.pytube
];
pythonImportsCheck = [ "mopidy_ytmusic" ];
pythonImportsCheck = ["mopidy_ytmusic"];
doCheck = false;
};
in
{
in {
services.mopidy = {
enable = true;
extensionPackages =
[ mopidy-ytmusic ]
++ (with pkgs; [
mopidy-mpd
mopidy-mpris
]);
extensionPackages = [mopidy-ytmusic] ++ (with pkgs; [mopidy-mpd mopidy-mpris]);
settings = {
mpd = {
enabled = true;

View file

@ -1,6 +1,5 @@
{ pkgs, ... }:
{
home.packages = [ pkgs.nheko ];
{pkgs, ...}: {
home.packages = [pkgs.nheko];
# systemd.user.services.nheko = {
# Install.WantedBy = ["graphical-session.target"];

View file

@ -1,580 +0,0 @@
// This config is in the KDL format: https://kdl.dev
// "/-" comments out the following node.
// Check the wiki for a full description of the configuration:
// https://github.com/YaLTeR/niri/wiki/Configuration:-Overview
// Input device configuration.
// Find the full list of options on the wiki:
// https://github.com/YaLTeR/niri/wiki/Configuration:-Input
input {
keyboard {
xkb {
layout "us"
// options "grp:win_space_toggle,compose:ralt,ctrl:nocaps"
}
}
// Next sections include libinput settings.
// Omitting settings disables them, or leaves them at their default values.
touchpad {
// off
tap
// dwt
// dwtp
natural-scroll
// accel-speed 0.2
// accel-profile "flat"
// scroll-method "two-finger"
// disabled-on-external-mouse
}
mouse {
// off
// natural-scroll
// accel-speed 0.2
// accel-profile "flat"
// scroll-method "no-scroll"
}
trackpoint {
// off
// natural-scroll
// accel-speed 0.2
// accel-profile "flat"
// scroll-method "on-button-down"
// scroll-button 273
// middle-emulation
}
// Uncomment this to make the mouse warp to the center of newly focused windows.
warp-mouse-to-focus
// Focus windows and outputs automatically when moving the mouse into them.
// Setting max-scroll-amount="0%" makes it work only on windows already fully on screen.
focus-follows-mouse max-scroll-amount="0%"
}
cursor {
xcursor-theme "catppuccin-mocha-sapphire"
xcursor-size 38
hide-when-typing
hide-after-inactive-ms 10000
}
spawn-at-startup "xwayland-satellite"
environment {
QT_QPA_PLATFORM "wayland"
DISPLAY ":0"
}
hotkey-overlay {
skip-at-startup
}
// You can configure outputs by their name, which you can find
// by running `niri msg outputs` while inside a niri instance.
// The built-in laptop monitor is usually called "eDP-1".
// Find more information on the wiki:
// https://github.com/YaLTeR/niri/wiki/Configuration:-Outputs
// Remember to uncomment the node by removing "/-"!
output "eDP-1" {
// Uncomment this line to disable this output.
// off
// Resolution and, optionally, refresh rate of the output.
// The format is "<width>x<height>" or "<width>x<height>@<refresh rate>".
// If the refresh rate is omitted, niri will pick the highest refresh rate
// for the resolution.
// If the mode is omitted altogether or is invalid, niri will pick one automatically.
// Run `niri msg outputs` while inside a niri instance to list all outputs and their modes.
mode "1920x1080@59.999"
// You can use integer or fractional scale, for example use 1.5 for 150% scale.
scale 1.1
// Transform allows to rotate the output counter-clockwise, valid values are:monitor
// normal, 90, 180, 270, flipped, flipped-90, flipped-180 and flipped-270.
transform "normal"
// Position of the output in the global coordinate space.
// This affects directional monitor actions like "focus-monitor-left", and cursor movement.
// The cursor can only move between directly adjacent outputs.
// Output scale and rotation has to be taken into account for positioning:
// outputs are sized in logical, or scaled, pixels.
// For example, a 3840×2160 output with scale 2.0 will have a logical size of 1920×1080,
// so to put another output directly adjacent to it on the right, set its x to 1920.
// If the position is unset or results in an overlap, the output is instead placed
// automatically.
// position x=1280 y=0
}
output "Dell Inc. DELL U2515H 9X2VY5170PJL" {
mode "2560x1440@59.951"
scale 1
transform "normal"
}
// Settings that influence how windows are positioned and sized.
// Find more information on the wiki:
// https://github.com/YaLTeR/niri/wiki/Configuration:-Layout
layout {
// Set gaps around windows in logical pixels.
gaps 16
// When to center a column when changing focus, options are:
// - "never", default behavior, focusing an off-screen column will keep at the left
// or right edge of the screen.
// - "always", the focused column will always be centered.
// - "on-overflow", focusing a column will center it if it doesn't fit
// together with the previously focused column.
center-focused-column "never"
// You can customize the widths that "switch-preset-column-width" (Mod+R) toggles between.
preset-column-widths {
// Proportion sets the width as a fraction of the output width, taking gaps into account.
// For example, you can perfectly fit four windows sized "proportion 0.25" on an output.
// The default preset widths are 1/3, 1/2 and 2/3 of the output.
proportion 0.33333
proportion 0.5
proportion 0.66667
// Fixed sets the width in logical pixels exactly.
// fixed 1920
}
// You can also customize the heights that "switch-preset-window-height" (Mod+Shift+R) toggles between.
// preset-window-heights { }
// You can change the default width of the new windows.
default-column-width { proportion 0.5; }
// If you leave the brackets empty, the windows themselves will decide their initial width.
// default-column-width {}
// By default focus ring and border are rendered as a solid background rectangle
// behind windows. That is, they will show up through semitransparent windows.
// This is because windows using client-side decorations can have an arbitrary shape.
//
// If you don't like that, you should uncomment `prefer-no-csd` below.
// Niri will draw focus ring and border *around* windows that agree to omit their
// client-side decorations.
//
// Alternatively, you can override it with a window rule called
// `draw-border-with-background`.
// You can change how the focus ring looks.
focus-ring {
// Uncomment this line to disable the focus ring.
// off
// How many logical pixels the ring extends out from the windows.
width 2
// Colors can be set in a variety of ways:
// - CSS named colors: "red"
// - RGB hex: "#rgb", "#rgba", "#rrggbb", "#rrggbbaa"
// - CSS-like notation: "rgb(255, 127, 0)", rgba(), hsl() and a few others.
// Color of the ring on the active monitor.
active-color "#7fc8ff"
// Color of the ring on inactive monitors.
inactive-color "#505050"
// You can also use gradients. They take precedence over solid colors.
// Gradients are rendered the same as CSS linear-gradient(angle, from, to).
// The angle is the same as in linear-gradient, and is optional,
// defaulting to 180 (top-to-bottom gradient).
// You can use any CSS linear-gradient tool on the web to set these up.
// Changing the color space is also supported, check the wiki for more info.
//
// active-gradient from="#80c8ff" to="#bbddff" angle=45
// You can also color the gradient relative to the entire view
// of the workspace, rather than relative to just the window itself.
// To do that, set relative-to="workspace-view".
//
// inactive-gradient from="#505050" to="#808080" angle=45 relative-to="workspace-view"
}
// You can also add a border. It's similar to the focus ring, but always visible.
border {
// The settings are the same as for the focus ring.
// If you enable the border, you probably want to disable the focus ring.
off
width 4
active-color "#ffc87f"
inactive-color "#505050"
// active-gradient from="#ffbb66" to="#ffc880" angle=45 relative-to="workspace-view"
// inactive-gradient from="#505050" to="#808080" angle=45 relative-to="workspace-view"
}
// Struts shrink the area occupied by windows, similarly to layer-shell panels.
// You can think of them as a kind of outer gaps. They are set in logical pixels.
// Left and right struts will cause the next window to the side to always be visible.
// Top and bottom struts will simply add outer gaps in addition to the area occupied by
// layer-shell panels and regular gaps.
struts {
// left 64
// right 64
// top 64
// bottom 64
}
shadow {
on
}
}
layer-rule {
match namespace="^rofi$"
shadow {
on
}
}
// Add lines like this to spawn processes at startup.
// Note that running niri as a session supports xdg-desktop-autostart,
// which may be more convenient to use.
// See the binds section below for more spawn examples.
spawn-at-startup "waypaper" "--wallpaper" "~/.config/niri/wallpaper.png"
// Uncomment this line to ask the clients to omit their client-side decorations if possible.
// If the client will specifically ask for CSD, the request will be honored.
// Additionally, clients will be informed that they are tiled, removing some client-side rounded corners.
// This option will also fix border/focus ring drawing behind some semitransparent windows.
// After enabling or disabling this, you need to restart the apps for this to take effect.
prefer-no-csd
// You can change the path where screenshots are saved.
// A ~ at the front will be expanded to the home directory.
// The path is formatted with strftime(3) to give you the screenshot date and time.
screenshot-path "~/Pictures/Screenshots/Screenshot from %Y-%m-%d %H-%M-%S.png"
// You can also set this to null to disable saving screenshots to disk.
// screenshot-path null
// Animation settings.
// The wiki explains how to configure individual animations:
// https://github.com/YaLTeR/niri/wiki/Configuration:-Animations
animations {
// Uncomment to turn off all animations.
// off
// Slow down all animations by this factor. Values below 1 speed them up instead.
// slowdown 3.0
}
// Window rules let you adjust behavior for individual windows.
// Find more information on the wiki:
// https://github.com/YaLTeR/niri/wiki/Configuration:-Window-Rules
// Work around WezTerm's initial configure bug
// by setting an empty default-column-width.
window-rule {
// This regular expression is intentionally made as specific as possible,
// since this is the default config, and we want no false positives.
// You can get away with just app-id="wezterm" if you want.
match app-id=r#"^org\.wezfurlong\.wezterm$"#
default-column-width {}
}
// Example: block out two password managers from screen capture.
// (This example rule is commented out with a "/-" in front.)
/-window-rule {
match app-id=r#"^org\.keepassxc\.KeePassXC$"#
match app-id=r#"^org\.gnome\.World\.Secrets$"#
block-out-from "screen-capture"
// Use this instead if you want them visible on third-party screenshot tools.
// block-out-from "screencast"
}
window-rule {
geometry-corner-radius 4
clip-to-geometry true
}
window-rule {
match app-id=r#"^spotify$"#
open-maximized true
open-on-workspace "spotify"
}
window-rule {
match app-id=r#"^Slack$"#
open-maximized true
}
window-rule {
match app-id=r#"^Element"#
open-maximized true
}
window-rule {
match title=r#"^Emacs Selector$"#
opacity 0.95
open-floating true
open-focused true
}
window-rule {
match title=r#"^bTop$"#
opacity 0.95
open-floating true
open-focused true
}
window-rule {
match title=r#"^GPTel - Emacs$"#
opacity 0.95
open-floating true
open-focused true
}
window-rule {
match title=r#"^Authentication Required"#
open-floating true
open-focused true
}
binds {
// Keys consist of modifiers separated by + signs, followed by an XKB key name
// in the end. To find an XKB name for a particular key, you may use a program
// like wev.
//
// "Mod" is a special modifier equal to Super when running on a TTY, and to Alt
// when running as a winit window.
//
// Most actions that you can bind here can also be invoked programmatically with
// `niri msg action do-something`.
// Mod-Shift-/, which is usually the same as Mod-?,
// shows a list of important hotkeys.
Mod+Shift+Slash { show-hotkey-overlay; }
// Suggested binds for running programs: terminal, app launcher, screen locker.
Mod+T { spawn "footclient"; }
Mod+D { spawn "rofi" "-show" "drun"; }
Mod+W { spawn "rofi" "-show" "window"; }
Mod+P { spawn "rofi-pass" "--clip"; }
Mod+X { spawn "emacsclient" "-c"; }
Mod+B { spawn "firefox"; }
Mod+RETURN { spawn "emacsclient" "-c" "--eval" "(ccr/start-eshell)"; }
Mod+M { spawn "emacsclient" "-c" "--eval" "(notmuch-search \"tag:new\")"; }
// Mod+G { spawn "emacsclient" "-c" "--eval" "(switch-to-buffer (gptel \"*ChatGPT*\"))" "-F" "((name . \"GPTel - Emacs\") (width . $NIRI_GPTEL_COLS) (height . $NIRI_GPTEL_ROWS))'"; }
Mod+G { spawn "run-floating-gptel"; }
Mod+Shift+C { spawn "emacsclient" "-c" "--eval" "(org-roam-dailies-capture-today)"; }
Mod+Alt+L { spawn "swaylock"; }
Mod+Space { spawn "rofi" "-show" "menu" "-modi" "menu:rofi-power-menu"; }
// Mod+Ctrl+b { spawn "foot" "--title='bTop'" "-W" "$NIRI_BTOP_COLSx$NIRI_BTOP_ROWS" "btop";}
Mod+Ctrl+b { spawn "run-floating-btop"; }
// Example volume keys mappings for PipeWire & WirePlumber.
// The allow-when-locked=true property makes them work even when the session is locked.
XF86AudioRaiseVolume allow-when-locked=true { spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.1+"; }
XF86AudioLowerVolume allow-when-locked=true { spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.1-"; }
XF86AudioMute allow-when-locked=true { spawn "wpctl" "set-mute" "@DEFAULT_AUDIO_SINK@" "toggle"; }
XF86AudioMicMute allow-when-locked=true { spawn "wpctl" "set-mute" "@DEFAULT_AUDIO_SOURCE@" "toggle"; }
Mod+Shift+period { spawn "brightnessctl" "s" "5%+"; }
Mod+Shift+comma { spawn "brightnessctl" "s" "5%-"; }
Mod+XF86MonBrightnessUp { spawn "brightnessctl" "s" "5%+"; }
Mod+XF86MonBrightnessDown { spawn "brightnessctl" "s" "5%-"; }
Mod+Q { close-window; }
Mod+Left { focus-column-left; }
Mod+Down { focus-window-down; }
Mod+Up { focus-window-up; }
Mod+Right { focus-column-right; }
Mod+H { focus-column-left; }
Mod+J { focus-window-down; }
Mod+K { focus-window-up; }
Mod+L { focus-column-right; }
Mod+Ctrl+Left { move-column-left; }
Mod+Ctrl+Down { move-window-down; }
Mod+Ctrl+Up { move-window-up; }
Mod+Ctrl+Right { move-column-right; }
Mod+Ctrl+H { move-column-left; }
Mod+Ctrl+J { move-window-down; }
Mod+Ctrl+K { move-window-up; }
Mod+Ctrl+L { move-column-right; }
// Alternative commands that move across workspaces when reaching
// the first or last window in a column.
// Mod+J { focus-window-or-workspace-down; }
// Mod+K { focus-window-or-workspace-up; }
// Mod+Ctrl+J { move-window-down-or-to-workspace-down; }
// Mod+Ctrl+K { move-window-up-or-to-workspace-up; }
Mod+Home { focus-column-first; }
Mod+End { focus-column-last; }
Mod+Ctrl+Home { move-column-to-first; }
Mod+Ctrl+End { move-column-to-last; }
Mod+Shift+Left { focus-monitor-left; }
Mod+Shift+Down { focus-monitor-down; }
Mod+Shift+Up { focus-monitor-up; }
Mod+Shift+Right { focus-monitor-right; }
Mod+Shift+H { focus-monitor-left; }
Mod+Shift+J { focus-monitor-down; }
Mod+Shift+K { focus-monitor-up; }
Mod+Shift+L { focus-monitor-right; }
Mod+Shift+Ctrl+Left { move-column-to-monitor-left; }
Mod+Shift+Ctrl+Down { move-column-to-monitor-down; }
Mod+Shift+Ctrl+Up { move-column-to-monitor-up; }
Mod+Shift+Ctrl+Right { move-column-to-monitor-right; }
Mod+Shift+Ctrl+H { move-column-to-monitor-left; }
Mod+Shift+Ctrl+J { move-column-to-monitor-down; }
Mod+Shift+Ctrl+K { move-column-to-monitor-up; }
Mod+Shift+Ctrl+L { move-column-to-monitor-right; }
// Alternatively, there are commands to move just a single window:
// Mod+Shift+Ctrl+Left { move-window-to-monitor-left; }
// ...
// And you can also move a whole workspace to another monitor:
// Mod+Shift+Ctrl+Left { move-workspace-to-monitor-left; }
// ...
Mod+Page_Down { focus-workspace-down; }
Mod+Page_Up { focus-workspace-up; }
Mod+U { focus-workspace-down; }
Mod+I { focus-workspace-up; }
Mod+Ctrl+Page_Down { move-column-to-workspace-down; }
Mod+Ctrl+Page_Up { move-column-to-workspace-up; }
Mod+Ctrl+U { move-column-to-workspace-down; }
Mod+Ctrl+I { move-column-to-workspace-up; }
// Alternatively, there are commands to move just a single window:
// Mod+Ctrl+Page_Down { move-window-to-workspace-down; }
// ...
Mod+Shift+Page_Down { move-workspace-down; }
Mod+Shift+Page_Up { move-workspace-up; }
Mod+Shift+U { move-workspace-down; }
Mod+Shift+I { move-workspace-up; }
// You can bind mouse wheel scroll ticks using the following syntax.
// These binds will change direction based on the natural-scroll setting.
//
// To avoid scrolling through workspaces really fast, you can use
// the cooldown-ms property. The bind will be rate-limited to this value.
// You can set a cooldown on any bind, but it's most useful for the wheel.
Mod+WheelScrollDown cooldown-ms=150 { focus-workspace-down; }
Mod+WheelScrollUp cooldown-ms=150 { focus-workspace-up; }
Mod+Ctrl+WheelScrollDown cooldown-ms=150 { move-column-to-workspace-down; }
Mod+Ctrl+WheelScrollUp cooldown-ms=150 { move-column-to-workspace-up; }
Mod+WheelScrollRight { focus-column-right; }
Mod+WheelScrollLeft { focus-column-left; }
Mod+Ctrl+WheelScrollRight { move-column-right; }
Mod+Ctrl+WheelScrollLeft { move-column-left; }
// Usually scrolling up and down with Shift in applications results in
// horizontal scrolling; these binds replicate that.
Mod+Shift+WheelScrollDown { focus-column-right; }
Mod+Shift+WheelScrollUp { focus-column-left; }
Mod+Ctrl+Shift+WheelScrollDown { move-column-right; }
Mod+Ctrl+Shift+WheelScrollUp { move-column-left; }
// Similarly, you can bind touchpad scroll "ticks".
// Touchpad scrolling is continuous, so for these binds it is split into
// discrete intervals.
// These binds are also affected by touchpad's natural-scroll, so these
// example binds are "inverted", since we have natural-scroll enabled for
// touchpads by default.
// Mod+TouchpadScrollDown { spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.02+"; }
// Mod+TouchpadScrollUp { spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.02-"; }
// You can refer to workspaces by index. However, keep in mind that
// niri is a dynamic workspace system, so these commands are kind of
// "best effort". Trying to refer to a workspace index bigger than
// the current workspace count will instead refer to the bottommost
// (empty) workspace.
//
// For example, with 2 workspaces + 1 empty, indices 3, 4, 5 and so on
// will all refer to the 3rd workspace.
Mod+1 { focus-workspace 1; }
Mod+2 { focus-workspace 2; }
Mod+3 { focus-workspace 3; }
Mod+4 { focus-workspace 4; }
Mod+5 { focus-workspace 5; }
Mod+6 { focus-workspace 6; }
Mod+7 { focus-workspace 7; }
Mod+8 { focus-workspace 8; }
Mod+9 { focus-workspace 9; }
Mod+Ctrl+1 { move-column-to-workspace 1; }
Mod+Ctrl+2 { move-column-to-workspace 2; }
Mod+Ctrl+3 { move-column-to-workspace 3; }
Mod+Ctrl+4 { move-column-to-workspace 4; }
Mod+Ctrl+5 { move-column-to-workspace 5; }
Mod+Ctrl+6 { move-column-to-workspace 6; }
Mod+Ctrl+7 { move-column-to-workspace 7; }
Mod+Ctrl+8 { move-column-to-workspace 8; }
Mod+Ctrl+9 { move-column-to-workspace 9; }
// Alternatively, there are commands to move just a single window:
// Mod+Ctrl+1 { move-window-to-workspace 1; }
// Switches focus between the current and the previous workspace.
// Mod+Tab { focus-workspace-previous; }
// Consume one window from the right into the focused column.
Mod+Comma { consume-window-into-column; }
// Expel one window from the focused column to the right.
Mod+Period { expel-window-from-column; }
// There are also commands that consume or expel a single window to the side.
Mod+BracketLeft { consume-or-expel-window-left; }
Mod+BracketRight { consume-or-expel-window-right; }
Mod+R { switch-preset-column-width; }
Mod+Shift+R { switch-preset-window-height; }
Mod+Ctrl+R { reset-window-height; }
Mod+F { maximize-column; }
Mod+Shift+F { fullscreen-window; }
Mod+C { center-column; }
// Finer width adjustments.
// This command can also:
// * set width in pixels: "1000"
// * adjust width in pixels: "-5" or "+5"
// * set width as a percentage of screen width: "25%"
// * adjust width as a percentage of screen width: "-10%" or "+10%"
// Pixel sizes use logical, or scaled, pixels. I.e. on an output with scale 2.0,
// set-column-width "100" will make the column occupy 200 physical screen pixels.
Mod+Minus { set-column-width "-10%"; }
Mod+Equal { set-column-width "+10%"; }
// Finer height adjustments when in column with other windows.
Mod+Shift+Minus { set-window-height "-10%"; }
Mod+Shift+Equal { set-window-height "+10%"; }
// Actions to switch layouts.
// Note: if you uncomment these, make sure you do NOT have
// a matching layout switch hotkey configured in xkb options above.
// Having both at once on the same hotkey will break the switching,
// since it will switch twice upon pressing the hotkey (once by xkb, once by niri).
// Mod+Space { switch-layout "next"; }
// Mod+Shift+Space { switch-layout "prev"; }
Mod+S { screenshot; }
Mod+Ctrl+S { screenshot-window; }
// The quit action will show a confirmation dialog to avoid accidental exits.
Mod+Shift+E { quit; }
Ctrl+Alt+Delete { quit; }
// Powers off the monitors. To turn them back on, do any input like
// moving the mouse or pressing any other key.
Mod+Shift+P { power-off-monitors; }
}

View file

@ -1,284 +0,0 @@
{
pkgs,
lib,
config,
hostname,
...
}:
let
niriVars =
{
picard = {
floating-gptel = {
rows = "60";
cols = "150";
};
floating-btop = {
rows = "60";
cols = "210";
};
};
kirk = {
floating-gptel = {
rows = "40";
cols = "140";
};
floating-btop = {
rows = "40";
cols = "140";
};
};
}
."${hostname}" or {
floating-gptel = {
rows = "40";
cols = "140";
};
floating-btop = {
rows = "40";
cols = "140";
};
};
run-floating-gptel =
with niriVars.floating-gptel;
pkgs.writeScriptBin "run-floating-gptel" ''
emacsclient -c --eval '(switch-to-buffer (gptel "*GptEl*"))' -F '((name . "GPTel - Emacs") (width . ${cols}) (height . ${rows}))'
'';
run-floating-btop =
with niriVars.floating-btop;
pkgs.writeScriptBin "run-floating-btop" ''
foot --title='bTop' -W ${cols}x${rows} btop
'';
in
{
home.packages = with pkgs; [
niri
waypaper
xwayland-satellite
run-floating-gptel
run-floating-btop
];
systemd.user.targets.niri-session = {
Unit = {
Description = "Niri session";
BindsTo = [ "graphical-session.target" ];
Wants = [
"graphical-session-pre.target"
"xdg-desktop-autostart.target"
];
After = [ "graphical-session-pre.target" ];
Before = [ "xdg-desktop-autostart.target" ];
};
};
home.file."${config.xdg.configHome}/niri/wallpaper.png" = {
source = ../hyprland/wallpaper.png;
};
home.activation.linkNiriConfig = lib.hm.dag.entryAnywhere ''
if [ ! -e "$HOME/.config/niri/config.kdl" ]; then
$DRY_RUN_CMD ln -s "$HOME/projects/aciceri/nixfleet/hmModules/niri/config.kdl" "$HOME/.config/niri/config.kdl"
fi
'';
home.sessionVariables = {
DISPLAY = ":0";
QT_QPA_PLATFORM = "wayland";
};
programs.rofi = {
enable = true;
package = pkgs.rofi-wayland;
theme =
let
inherit (config.lib.formats.rasi) mkLiteral;
cfg = config.catppuccin.fzf;
palette = (lib.importJSON "${config.catppuccin.sources.palette}/palette.json").${cfg.flavor}.colors;
selectColor = color: palette.${color}.hex;
in
lib.mkForce {
"*" = {
# blue = mkLiteral "#0000FF";
# white = mkLiteral "#FFFFFF";
# black = mkLiteral "#000000";
# grey = mkLiteral "#eeeeee";
blue = mkLiteral (selectColor "blue");
white = mkLiteral "#FFFFFF";
black = mkLiteral "#000000";
grey = mkLiteral "#eeeeee";
spacing = 2;
background-color = mkLiteral "#00000000";
border-color = mkLiteral "#444444FF";
anchor = mkLiteral "north";
location = mkLiteral "center";
};
"window" = {
transparency = "real";
background-color = mkLiteral "#00000000";
border = 0;
padding = mkLiteral "0% 0% 1em 0%";
x-offset = 0;
y-offset = mkLiteral "-10%";
};
"mainbox" = {
padding = mkLiteral "0px";
border = 0;
spacing = mkLiteral "1%";
};
"message" = {
border = 0;
border-radius = mkLiteral "4px";
padding = mkLiteral "1em";
background-color = mkLiteral "@white";
text-color = mkLiteral "@black";
};
"textbox normal" = {
text-color = mkLiteral "#002B36FF";
padding = 0;
border = 0;
};
"listview" = {
fixed-height = 1;
border = 0;
padding = mkLiteral "1em";
reverse = false;
border-radius = mkLiteral "4px";
columns = 1;
background-color = mkLiteral "@white";
};
"element" = {
border = 0;
padding = mkLiteral "2px";
highlight = mkLiteral "bold";
};
"element-text" = {
background-color = mkLiteral "inherit";
text-color = mkLiteral "inherit";
};
"element normal.normal" = {
text-color = mkLiteral "#002B36FF";
background-color = mkLiteral "#F5F5F500";
};
"element normal.urgent" = {
text-color = mkLiteral "#D75F00FF";
background-color = mkLiteral "#F5F5F5FF";
};
"element normal.active" = {
text-color = mkLiteral "#005F87FF";
background-color = mkLiteral "#F5F5F5FF";
};
"element selected.normal" = {
text-color = mkLiteral "#F5F5F5FF";
background-color = mkLiteral "#4271AEFF";
};
"element selected.urgent" = {
text-color = mkLiteral "#F5F5F5FF";
background-color = mkLiteral "#D75F00FF";
};
"element selected.active" = {
text-color = mkLiteral "#F5F5F5FF";
background-color = mkLiteral "#005F87FF";
};
"element alternate.normal" = {
text-color = mkLiteral "#002B36FF";
background-color = mkLiteral "#D0D0D0FF";
};
"element alternate.urgent" = {
text-color = mkLiteral "#D75F00FF";
background-color = mkLiteral "#D0D0D0FF";
};
"element alternate.active" = {
text-color = mkLiteral "#005F87FF";
background-color = mkLiteral "#D0D0D0FF";
};
"scrollbar" = {
border = 0;
padding = 0;
};
"inputbar" = {
spacing = 0;
border = 0;
padding = mkLiteral "0.5em 1em";
background-color = mkLiteral "@grey";
index = 0;
border-radius = mkLiteral "4px";
children = map mkLiteral [
"prompt"
"textbox-prompt-colon"
"entry"
"case-indicator"
];
};
"inputbar normal" = {
foreground-color = mkLiteral "#002B36FF";
background-color = mkLiteral "#F5F5F500";
};
"mode-switcher" = {
border = 0;
padding = mkLiteral "0.5em 1em";
background-color = mkLiteral "@grey";
index = 10;
};
"button selected" = {
text-color = mkLiteral "#4271AEFF";
};
"textbox-prompt-colon" = {
expand = false;
str = ":";
margin = mkLiteral "0px 0.3em 0em 0em";
text-color = mkLiteral "@black";
};
"error-message" = {
border = 0;
border-radius = mkLiteral "4px";
padding = mkLiteral "1em";
background-color = mkLiteral "#FF8888";
text-color = mkLiteral "@black";
};
};
extraConfig = {
modi = "drun,window,ssh";
combi-modes = [
"drun"
"window"
"ssh"
];
};
font = "Iosevka Comfy 12";
terminal = "footclient";
pass = {
enable = true;
package = pkgs.rofi-pass-wayland;
};
plugins = [ pkgs.rofi-calc ];
};
}

View file

@ -1,27 +1,24 @@
{
config,
pkgs,
fleetFlake,
lib,
...
}:
{
}: {
programs.nix-index.enable = true;
systemd.user.services.nix-index-update = {
Unit = {
Description = "Update nix-index";
};
Unit = {Description = "Update nix-index";};
Service = {
CPUSchedulingPolicy = "idle";
IOSchedulingClass = "idle";
ExecStart = "${pkgs.nix-index}/bin/nix-index --nixpkgs ${fleetFlake.inputs.nixpkgs}";
ExecStart = "${pkgs.nix-index}/bin/nix-index --nixpkgs ${fleetFlake.inputs.nixpkgsUnstable}";
};
};
systemd.user.timers.nix-index-update = {
Unit = {
Description = "Update nix-index";
};
Unit = {Description = "Update nix-index";};
Timer = {
Unit = "nix-index-update.service";
@ -29,8 +26,6 @@
Persistent = true;
};
Install = {
WantedBy = [ "timers.target" ];
};
Install = {WantedBy = ["timers.target"];};
};
}

View file

@ -1,10 +1,6 @@
{ pkgs, ... }:
{
{pkgs, ...}: {
programs.obs-studio = {
enable = true;
plugins = with pkgs.obs-studio-plugins; [
wlrobs
input-overlay
];
plugins = with pkgs.obs-studio-plugins; [wlrobs input-overlay];
};
}

View file

@ -1,4 +1,3 @@
{ pkgs, ... }:
{
home.packages = [ pkgs.openscad ];
{pkgs, ...}: {
home.packages = [pkgs.openscad];
}

View file

@ -1,27 +1,13 @@
{ pkgs, lib, ... }:
{
services.pantalaimon = {
enable = true;
package = pkgs.pantalaimon.overrideAttrs {
pytestCheckPhase = "echo skip pytest";
};
settings = {
Default = {
LogLevel = "Debug";
SSL = true;
};
local-matrix = {
Homeserver = "https://matrix.aciceri.dev";
# Homeserver = "https://matrix.nixos.dev/_matrix/client";
# Homeserver = "https://matrix.nixos.dev";
ListenAddress = "localhost";
Homeserver = "https://nixos.dev";
ListenAddress = "127.0.0.1";
ListenPort = 8008;
# SSL = false;
UseKeyring = false;
# IgnoreVerification = true;
};
};
};
systemd.user.services.pantalaimon.Unit.Requires = [ "dbus.socket" ];
systemd.user.services.pantalaimon.Unit.Requires = ["dbus.socket"];
}

View file

@ -2,22 +2,12 @@
pkgs,
username,
...
}:
let
fzfpass = pkgs.writeShellApplication {
name = "fzfpass";
text = ''
find "$PASSWORD_STORE_DIR" -name "*.gpg" | sed "s|$PASSWORD_STORE_DIR/||; s|\.gpg||" | fzf --border --info=inline | xargs pass "$@"
'';
};
in
{
}: {
programs.password-store = {
enable = true;
settings = {
PASSWORD_STORE_DIR = "/home/${username}/.password-store";
};
package = pkgs.pass.withExtensions (e: [ e.pass-otp ]);
package = pkgs.pass.withExtensions (e: [e.pass-otp]);
};
home.packages = [ fzfpass ];
}

View file

@ -2,8 +2,7 @@
pkgs,
config,
...
}:
let
}: let
inherit (config.programs.qutebrowser) settings;
websites = {
searx = "https://searx.be";
@ -17,8 +16,7 @@ let
less-dark-white = "#cccccc";
blue = "#0000ff";
};
in
{
in {
programs.qutebrowser = {
enable = true;
searchEngines = with websites; {
@ -36,15 +34,14 @@ in
",l" = ''config-cycle spellcheck.languages [" it-IT "] [" en-US "]'';
};
insert = {
"<Ctrl-p>" =
''spawn --userscript qute-pass --dmenu-invocation '${pkgs.fuzzel}/bin/fuzzel --background-color=253559cc --border-radius=5 --border-width=0 -d' --password-only --unfiltered'';
"<Ctrl-p>" = ''spawn --userscript qute-pass --dmenu-invocation '${pkgs.fuzzel}/bin/fuzzel --background-color=253559cc --border-radius=5 --border-width=0 -d' --password-only --unfiltered'';
};
};
settings = {
auto_save.session = true;
url = with websites; {
default_page = searx;
start_pages = [ searx ];
start_pages = [searx];
};
editor.command = [
"emacsclient"
@ -111,13 +108,15 @@ in
};
home.packages = with pkgs; [
fuzzel
(makeDesktopItem {
name = "qutebrowser";
exec = "qutebrowser %u";
comment = "Qutebrowser";
desktopName = "qutebrowser";
type = "Application";
mimeTypes = [ "x-scheme-handler/https" ];
})
(
makeDesktopItem {
name = "qutebrowser";
exec = "qutebrowser %u";
comment = "Qutebrowser";
desktopName = "qutebrowser";
type = "Application";
mimeTypes = ["x-scheme-handler/https"];
}
)
];
}

View file

@ -1,28 +0,0 @@
{ pkgs, ... }:
let
reinstall-magisk-on-lineage = pkgs.stdenv.mkDerivation {
name = "reinstall-magisk-on-lineage";
version = "git";
src = pkgs.fetchFromGitHub {
owner = "NicolasWebDev";
repo = "reinstall-magisk-on-lineageos";
rev = "1ca911ed555d4badd705c6c71750b78be8962b0b";
hash = "sha256-95LzcWL4efR77i8UlzIT+7wQXp+91K2sUwcjmHvTf+Q=";
};
propagatedBuildInputs = with pkgs; [
android-tools
jq
];
installPhase = ''
mkdir -p $out/bin
cp reinstall-magisk-on-lineageos $out/bin/reinstall-magisk-on-lineageos
'';
patchPhase = ''
substituteInPlace reinstall-magisk-on-lineageos \
--replace-fail "paste_yours_here" "\"\$1\""
'';
};
in
{
home.packages = [ reinstall-magisk-on-lineage ];
}

View file

@ -1,4 +1,3 @@
{ pkgs, ... }:
{
home.packages = [ pkgs.remmina ];
{pkgs, ...}: {
home.packages = [pkgs.remmina];
}

View file

@ -1,8 +0,0 @@
{ pkgs, ... }:
{
home.packages = [
(builtins.getFlake "github:NixOS/nixpkgs/063dece00c5a77e4a0ea24e5e5a5bd75232806f8")
.legacyPackages.${pkgs.system}.sdrangel
pkgs.kdePackages.qtlocation
];
}

View file

@ -1,29 +1,14 @@
{
config,
lib,
pkgs,
age,
fleetFlake,
hostname,
config,
username,
...
}:
{
}: {
programs.bat.enable = true;
programs.ranger = {
enable = true;
settings = {
"preview_images" = true;
"preview_images_method" = "sixel";
};
};
programs.fzf.enable = true;
programs.ripgrep.enable = true;
programs.fd.enable = true;
programs.direnv = {
enable = true;
config = {
@ -32,9 +17,12 @@
nix-direnv.enable = true;
};
programs.lsd = {
enable = true;
};
# programs.exa = {
# enable = false;
# enableAliases = true;
# };
# programs.fzf.enable = false;
programs.vim.enable = true;
@ -43,102 +31,205 @@
controlMaster = "auto";
};
systemd.user.services.atuind = {
Unit.Description = "Atuin daemon";
Install = {
WantedBy = [ "default.target" ];
# programs.starship = {
# enable = false;
# settings = {
# character = {
# success_symbol = "[👌](bold green)";
# error_symbol = "[🤌](bold red)";
# };
# nix_shell = {
# symbol = "❄ ";
# };
# };
# };
# Playing with it sometimes
# programs.nushell = {
# enable = false;
# configFile.text = ''
# let carapace_completer = {|spans|
# carapace $spans.0 nushell $spans | from json
# }
# let-env config = {
# show_banner: false
# ls: {
# use_ls_colors: true # use the LS_COLORS environment variable to colorize output
# clickable_links: true # enable or disable clickable links. Your terminal has to support links.
# }
# rm: {
# always_trash: true # always act as if -t was given. Can be overridden with -p
# }
# cd: {
# abbreviations: true # allows `cd s/o/f` to expand to `cd some/other/folder`
# }
# table: {
# mode: compact # basic, compact, compact_double, light, thin, with_love, rounded, reinforced, heavy, none, other
# index_mode: always # "always" show indexes, "never" show indexes, "auto" = show indexes when a table has "index" column
# trim: {
# methodology: wrapping # wrapping or truncating
# wrapping_try_keep_words: true # A strategy used by the 'wrapping' methodology
# truncating_suffix: "..." # A suffix used by the 'truncating' methodology
# }
# }
# history: {
# max_size: 10000 # Session has to be reloaded for this to take effect
# sync_on_enter: true # Enable to share history between multiple sessions, else you have to close the session to write history to file
# file_format: "plaintext" # "sqlite" or "plaintext"
# }
# completions: {
# case_sensitive: false # set to true to enable case-sensitive completions
# quick: true # set this to false to prevent auto-selecting completions when only one remains
# partial: true # set this to false to prevent partial filling of the prompt
# algorithm: "fuzzy" # prefix or fuzzy
# external: {
# enable: true # set to false to prevent nushell looking into $env.PATH to find more suggestions, `false` recommended for WSL users as this look up my be very slow
# max_results: 100 # setting it lower can improve completion performance at the cost of omitting some options
# completer: $carapace_completer # check 'carapace_completer' above as an example
# }
# }
# filesize: {
# metric: true # true => KB, MB, GB (ISO standard), false => KiB, MiB, GiB (Windows standard)
# format: "auto" # b, kb, kib, mb, mib, gb, gib, tb, tib, pb, pib, eb, eib, zb, zib, auto
# }
# buffer_editor: "${config.programs.helix.package}/bin/helix"
# }
# '';
# };
xdg.configFile = {
"dracula-theme" = {
target = "fish/themes/dracula.theme";
source = let
theme = pkgs.fetchFromGitHub {
owner = "dracula";
repo = "fish";
rev = "269cd7d76d5104fdc2721db7b8848f6224bdf554";
hash = "sha256-Hyq4EfSmWmxwCYhp3O8agr7VWFAflcUe8BUKh50fNfY=";
};
in "${theme}/themes/Dracula\ Official.theme";
};
Service = {
ExecStartPre = "${lib.getExe' pkgs.toybox "rm"} -f ${config.programs.atuin.settings.daemon.socket_path}";
ExecStart = "${lib.getExe pkgs.atuin} daemon";
"catppuccin-theme" = {
target = "fish/themes/Catppuccin\ Mocha.theme";
source = let
theme = pkgs.fetchFromGitHub {
owner = "catppuccin";
repo = "fish";
rev = "a3b9eb5eaf2171ba1359fe98f20d226c016568cf";
hash = "sha256-shQxlyoauXJACoZWtRUbRMxmm10R8vOigXwjxBhG8ng=";
};
in "${theme}/themes/Catppuccin\ Mocha.theme";
};
};
programs.atuin = {
enable = false; # FIXME broken on bash: https://github.com/nix-community/home-manager/issues/5958
settings = {
daemon = {
enabled = true;
socket_path = "/home/${username}/.local/share/atuin/atuin.sock"; # FIXME using ~ or $HOME doesn't work: https://github.com/atuinsh/atuin/issues/2289
};
auto_sync = true;
sync_frequency = "5m";
sync_address = "http://sisko.wg.aciceri.dev:8889";
search_mode = "fuzzy";
style = "compact";
enter_accept = "true";
};
};
programs.bash = {
programs.fish = {
enable = true;
initExtra = lib.optionalString (builtins.hasAttr "cachix-personal-token" age.secrets) ''
export CACHIX_AUTH_TOKEN=$(cat ${age.secrets.cachix-personal-token.path})
'';
shellInit =
''
fish_config theme choose "dracula"
fish_config theme choose "Catppuccin Mocha"
''
+ lib.optionalString (builtins.hasAttr "cachix-personal-token" age.secrets) ''
export CACHIX_AUTH_TOKEN=$(cat ${age.secrets.cachix-personal-token.path})
'';
shellAliases = {
"cat" = "bat";
};
};
programs.zoxide.enable = true;
programs.thefuck.enable = true;
programs.oh-my-posh = {
enable = true;
useTheme = "catppuccin_mocha";
};
programs.zellij.enableBashIntegration = false;
# programs.fish = {
# enable = true;
# programs.zsh = {
# enable = false; # Playing xswith fish at the moment
# enableAutosuggestions = true;
# enableCompletion = true;
# enableSyntaxHighlighting = true;
# enableVteIntegration = true;
# autocd = true;
# oh-my-zsh = {
# enable = true;
# plugins = [
# "ag"
# "cabal"
# "colored-man-pages"
# "colorize"
# "command-not-found"
# "fzf"
# "git"
# "nomad"
# "pass"
# "python"
# "sudo"
# "terraform"
# "thefuck"
# ];
# };
# plugins = [
# # {
# # name = "fifc";
# # src = pkgs.fishPlugins.fifc.src;
# # }
# {
# name = "z";
# src = pkgs.fishPlugins.z.src;
# name = "fzf-tab";
# src = pkgs.fetchFromGitHub {
# owner = "Aloxaf";
# repo = "fzf-tab";
# rev = "c2b4aa5ad2532cca91f23908ac7f00efb7ff09c9";
# sha256 = "sha256-gvZp8P3quOtcy1Xtt1LAW1cfZ/zCtnAmnWqcwrKel6w=";
# };
# }
# {
# name = "fzf-tab";
# src = pkgs.fetchFromGitHub {
# owner = "Aloxaf";
# repo = "fzf-tab";
# rev = "c2b4aa5ad2532cca91f23908ac7f00efb7ff09c9";
# sha256 = "sha256-gvZp8P3quOtcy1Xtt1LAW1cfZ/zCtnAmnWqcwrKel6w=";
# };
# }
# {
# name = "fast-syntax-highlighting";
# src = pkgs.fetchFromGitHub {
# owner = "zdharma-continuum";
# repo = "fast-syntax-highlighting";
# rev = "13d7b4e63468307b6dcb2dadf6150818f242cbff";
# sha256 = "sha256-AmsexwVombgVmRvl4O9Kd/WbnVJHPTXETxBv18PDHz4=";
# };
# }
# ];
# shellInit =
# ''
# # fish_vi_key_bindings
# fish_default_key_bindings
# ''
# + lib.optionalString (builtins.hasAttr "cachix-personal-token" age.secrets) ''
# export CACHIX_AUTH_TOKEN=$(cat ${age.secrets.cachix-personal-token.path})
# '';
# shellAliases = {
# "cat" = "bat";
# "em" = "TERM=wezterm emacsclient -nw";
# };
# loginExtra = "[[ -z $DISPLAY && $TTY = /dev/tty1 ]] && exec dbus-run-session Hyprland";
# envExtra = ''
# # [ $TERM = "dumb" ] && unsetopt zle && PS1='$ ' # for Emacs TRAMP mode
# '';
# initExtra = ''
# export CACHIX_AUTH_TOKEN=$(cat ${age.secrets.cachix-personal-token.path})
# # Don't enable VIM emulation when in Emacs
# [[ -z $INSIDE_EMACS ]] && source ${pkgs.zsh-vi-mode}/share/zsh-vi-mode/zsh-vi-mode.plugin.zsh
# # When enabling starship, home-manager add an `initExtra` rule to disable it when in Emacs but not with VTerm,
# # since I use also `eat` besides `vterm` the following line is needed
# [[ "$INSIDE_EMACS" =~ "eat" ]] && eval "$(${config.home.profileDirectory}/bin/starship init zsh)"
# '';
# };
home.packages =
with pkgs;
home.packages = with pkgs;
[
thefuck
htop-vim
bottom
dig.dnsutils
lsof
zsh-completions
nix-zsh-completions
comma
ffmpeg-headless
jless
nix-melt
nurl
jq
yq-go
procs
chafa
hexyl
broot
file
carapace # used by nushell
]
++ (lib.optionals
(builtins.elem hostname [
"kirk"
"picard"
])
[
cntr # TODO probably not best place
]
);
++ (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
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
cntr # TODO probably not best place
nom # FIXME disable on aarch64-linux, breaks everything :(
]);
}

View file

@ -1,4 +1,3 @@
{ pkgs, ... }:
{
home.packages = [ pkgs.slack ];
{pkgs, ...}: {
home.packages = [pkgs.slack];
}

View file

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

View file

@ -1,4 +1,3 @@
{ pkgs, ... }:
{
home.packages = [ pkgs.steam-run ];
{pkgs, ...}: {
home.packages = [pkgs.steam-run];
}

View file

@ -3,8 +3,7 @@
lib,
config,
...
}:
{
}: {
imports = [
../waybar
../swayidle
@ -13,7 +12,7 @@
../kitty
];
config = {
home.packages = with pkgs; [ wl-clipboard ];
home.packages = with pkgs; [wl-clipboard];
systemd.user.sessionVariables = {
NIXOS_OZONE_WL = "1";
@ -28,109 +27,106 @@
gtk = {
enable = true;
font.name = lib.mkForce "Sans,Symbols Nerd Font";
font.name = "Sans,Symbols Nerd Font";
iconTheme = {
name = "Adwaita";
package = pkgs.adwaita-icon-theme;
package = pkgs.gnome.adwaita-icon-theme;
};
};
wayland = {
windowManager.sway =
let
modifier = "Mod4";
in
{
enable = true;
wrapperFeatures.gtk = true;
config = {
inherit modifier;
menu = "${pkgs.fuzzel}/bin/fuzzel --background-color=253559cc --border-radius=5 --border-width=0";
output =
let
bg = "${./wallpaper.svg} fill";
in
{
DP-2 = {
res = "1900x1200";
pos = "0 0";
inherit bg;
transform = "90";
};
DP-1 = {
res = "2560x1440";
pos = "1200 230";
inherit bg;
};
eDP-1 = {
res = "1920x1080";
pos = "3760 230";
inherit bg;
};
};
terminal = "${config.programs.kitty.package}/bin/kitty ${config.programs.kitty.package}/bin/kitty +kitten ssh mothership.fleet";
bars = [
{
mode = "hide";
position = "top";
command = "${pkgs.waybar}/bin/waybar";
}
];
gaps = {
smartBorders = "on";
windowManager.sway = let
modifier = "Mod4";
in {
enable = true;
wrapperFeatures.gtk = true;
config = {
inherit modifier;
menu = "${pkgs.fuzzel}/bin/fuzzel --background-color=253559cc --border-radius=5 --border-width=0";
output = let
bg = "${./wallpaper.svg} fill";
in {
DP-2 = {
res = "1900x1200";
pos = "0 0";
inherit bg;
transform = "90";
};
assigns = {
"1" = [
{ title = ".*Mozilla Firefox$"; }
{ title = ".*qutebrowser$"; }
];
"2" = [ { title = "^((?!qutebrowser-editor).)*Emacs$"; } ];
"3" = [ { title = "Slack.*"; } ];
"9" = [ { title = "^Element.*"; } ];
DP-1 = {
res = "2560x1440";
pos = "1200 230";
inherit bg;
};
floating.criteria = [
{ title = "MetaMask Notification.*"; }
{ title = "Volume Control"; } # pavucontrol
{ title = "^.*editor - qutebrowser$"; } # Emacs opened by qutebrowser
];
input = {
"*" = {
xkb_layout = "us";
xkb_variant = "altgr-intl";
};
eDP-1 = {
res = "1920x1080";
pos = "3760 230";
inherit bg;
};
keybindings =
let
screenshotScript = pkgs.writeShellScript "screenshot.sh" ''
filename="$HOME/shots/$(date --iso-8601=seconds).png"
coords="$(${pkgs.slurp}/bin/slurp)"
${pkgs.grim}/bin/grim -t png -g "$coords" "$filename"
wl-copy -t image/png < $filename
'';
in
lib.mkOptionDefault {
"${modifier}+x" = "exec emacsclient -c";
"${modifier}+y" =
"exec ${pkgs.waypipe}/bin/waypipe --compress lz4=10 ssh mothership.fleet emacsclient -c";
"${modifier}+b" = "exec qutebrowser";
"${modifier}+s" = "exec ${screenshotScript}";
# "${modifier}+g" = "exec ${screenrecordingScript}"; # FIXME
"${modifier}+t" = ''
exec emacsclient -c -F "\'(name . \\"VTerm\\"))" -q --eval '(vterm (getenv "SHELL"))'
'';
"${modifier}+u" = ''
exec ${pkgs.waypipe}/bin/waypipe --compress lz4=10 ssh mothership.fleet emacsclient -c -F "\'(name . \\"VTerm\\"))" -q --eval '(eat (getenv "SHELL"))'
'';
"XF86MonBrightnessUp" = "exec ${pkgs.brightnessctl}/bin/brightnessctl s +5%";
"XF86MonBrightnessDown" = "exec ${pkgs.brightnessctl}/bin/brightnessctl s 5%-";
};
};
extraConfig = ''
bindsym ${modifier}+p move workspace to output right
'';
xwayland = true;
systemdIntegration = true;
terminal = "${config.programs.kitty.package}/bin/kitty ${config.programs.kitty.package}/bin/kitty +kitten ssh mothership.fleet";
bars = [
{
mode = "hide";
position = "top";
command = "${pkgs.waybar}/bin/waybar";
}
];
gaps = {
smartBorders = "on";
};
assigns = {
"1" = [{title = ".*Mozilla Firefox$";} {title = ".*qutebrowser$";}];
"2" = [{title = "^((?!qutebrowser-editor).)*Emacs$";}];
"3" = [{title = "Slack.*";}];
"9" = [{title = "^Element.*";}];
};
floating.criteria = [
{title = "MetaMask Notification.*";}
{title = "Volume Control";} # pavucontrol
{title = "^.*editor - qutebrowser$";} # Emacs opened by qutebrowser
];
input = {
"*" = {
xkb_layout = "us";
xkb_variant = "altgr-intl";
};
};
keybindings = let
screenshotScript = pkgs.writeShellScript "screenshot.sh" ''
filename="$HOME/shots/$(date --iso-8601=seconds).png"
coords="$(${pkgs.slurp}/bin/slurp)"
${pkgs.grim}/bin/grim -t png -g "$coords" "$filename"
wl-copy -t image/png < $filename
'';
screenrecordingScript = pkgs.writeShellScript "screenrecorder.sh" ''
filename="$HOME/shots/recording-$(date --iso-8601=seconds).mp4"
coords="$(${pkgs.slurp}/bin/slurp)"
${pkgs.wf-recorder}/bin/wf-recorder -g "$coords" -f "$filename"
wl-copy -t video/mp4 < $filename
'';
in
lib.mkOptionDefault {
"${modifier}+x" = "exec emacsclient -c";
"${modifier}+y" = "exec ${pkgs.waypipe}/bin/waypipe --compress lz4=10 ssh mothership.fleet emacsclient -c";
"${modifier}+b" = "exec qutebrowser";
"${modifier}+s" = "exec ${screenshotScript}";
# "${modifier}+g" = "exec ${screenrecordingScript}"; # FIXME
"${modifier}+t" = ''
exec emacsclient -c -F "\'(name . \\"VTerm\\"))" -q --eval '(vterm (getenv "SHELL"))'
'';
"${modifier}+u" = ''
exec ${pkgs.waypipe}/bin/waypipe --compress lz4=10 ssh mothership.fleet emacsclient -c -F "\'(name . \\"VTerm\\"))" -q --eval '(eat (getenv "SHELL"))'
'';
"XF86MonBrightnessUp" = "exec ${pkgs.brightnessctl}/bin/brightnessctl s +5%";
"XF86MonBrightnessDown" = "exec ${pkgs.brightnessctl}/bin/brightnessctl s 5%-";
};
};
extraConfig = ''
bindsym ${modifier}+p move workspace to output right
'';
xwayland = true;
systemdIntegration = true;
};
};
};
}

View file

@ -2,50 +2,65 @@
pkgs,
lib,
...
}:
{
services.swayidle =
let
swaylockWithArgs = pkgs.writeScriptBin "swaylockWithArgs" ''
${pkgs.swaylock-effects}/bin/swaylock \
--daemonize \
--screenshots \
--clock \
--indicator \
--indicator-radius 100 \
--indicator-thickness 7 \
--effect-blur 7x5 \
--effect-vignette 0.5:0.5 \
--ring-color bb00cc \
--key-hl-color 880033 \
--line-color 00000000 \
--inside-color 00000088 \
--separator-color 00000000 \
--fade-in 0.2
'';
swaylockCommand = "${swaylockWithArgs}/bin/swaylockWithArgs";
in
{
enable = true;
events = [
{
event = "before-sleep";
command = swaylockCommand;
}
{
event = "lock";
command = swaylockCommand;
}
];
timeouts = [
{
timeout = 600;
command = swaylockCommand;
}
{
timeout = 720;
command = "${pkgs.systemd}/bin/systemctl suspend";
}
];
};
}: {
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 \
--screenshots \
--clock \
--indicator \
--indicator-radius 100 \
--indicator-thickness 7 \
--effect-blur 7x5 \
--effect-vignette 0.5:0.5 \
--ring-color bb00cc \
--key-hl-color 880033 \
--line-color 00000000 \
--inside-color 00000088 \
--separator-color 00000000 \
--grace 2 \
--fade-in 0.2
'';
swaylockCommand = "${swaylockWithArgs}/bin/swaylockWithArgs";
in {
enable = true;
events = [
{
event = "before-sleep";
command = swaylockCommand;
}
{
event = "lock";
command = swaylockCommand;
}
];
timeouts = [
{
timeout = 600;
command = swaylockCommand;
}
{
timeout = 720;
command = "${pkgs.systemd}/bin/systemctl suspend";
}
];
};
# Otherwise it will start only after Sway and will not work with Hyprland
systemd.user.services.swayidle = {
Unit.PartOf = lib.mkForce [];
Install.WantedBy = lib.mkForce ["hyprland-session.target"];
};
}

View file

@ -1,4 +1,3 @@
{ pkgs, ... }:
{
home.packages = [ pkgs.teams-for-linux ];
{pkgs, ...}: {
home.packages = [pkgs.teams-for-linux];
}

View file

@ -1,14 +1,14 @@
{
imports = [ ../email ];
imports = [../email];
config = {
accounts.email.accounts = {
autistici.thunderbird = {
enable = true;
profiles = [ "default" ];
profiles = ["default"];
};
mlabs.thunderbird = {
enable = true;
profiles = [ "default" ];
profiles = ["default"];
};
};
programs.thunderbird = {

View file

@ -1,4 +1,3 @@
{ pkgs, ... }:
{
home.packages = [ pkgs.tor-browser ];
{pkgs, ...}: {
home.packages = [pkgs.tor-browser];
}

View file

@ -1,27 +0,0 @@
{
pkgs,
lib,
...
}:
{
home.packages = [ pkgs.tremotesf ];
systemd.user.services.tremotesf = {
Install.WantedBy = [
"waybar.service"
];
Unit = {
Description = "tremotesf";
};
Service = {
ExecStart = pkgs.writeShellScript "start-tremotesf.sh" ''
sleep 5
${lib.getExe pkgs.tremotesf} --minimized
'';
Restart = "on-failure";
RestartSec = 3;
};
};
}

View file

@ -1,4 +0,0 @@
{ pkgs, ... }:
{
home.packages = [ pkgs.vial ];
}

View file

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

View file

@ -1,5 +1,4 @@
{ pkgs, ... }:
{
{pkgs, ...}: {
programs.vscode = {
enable = true;
# For a few reasons sometimes I'm forced to use VSCode and I don't have time to nixifiy even its configuration.

View file

@ -1,78 +0,0 @@
{
"layer": "top",
"position": "left",
"width": 36,
"margin": "12 0 12 0",
"spacing": 2,
"modules-left": ["clock", "custom/sep", "niri/window"],
"modules-center": ["niri/workspaces"],
"modules-right": [
"tray",
"custom/sep",
"temperature",
"custom/sep",
"pulseaudio",
"custom/powermenu"
],
"custom/sep": {
"format": "──"
// "format": ""
},
"custom/powermenu": {
"on-click": "rofi -show menu -modi menu:rofi-power-menu",
"format": "",
"tooltip": false
},
"niri/workspaces": {
"format": "{icon}",
"on-click": "activate",
"format-icons": {
"active": "",
"urgent": "",
"default": ""
}
},
"niri/window": {
"rotate": 90,
"rewrite": {
"(.*) — Mozilla Firefox": " $1",
"(.*) - Emacs": " $1",
"(.*) - Slack": " $1"
}
},
"clock": {
"tooltip": true,
"format": "{:%H\n%M}",
"tooltip-format": "{:%Y-%m-%d}"
},
"tray": {
"icon-size": 20,
"spacing": 5,
"show-passive-items": "false"
},
"temperature": {
"rotate": 90,
"hwmon-path": "/sys/class/hwmon/hwmon2/temp1_input",
"critical-threshold": 80,
"format": "{icon} {temperatureC}°C",
"format-icons": ["", "", ""]
},
"pulseaudio": {
"rotate": 90,
"format": "{icon} {volume}%",
"format-bluetooth": "{icon} {volume}%",
"format-muted": "MUTE ",
"format-icons": {
"headphones": "",
"handsfree": "",
"headset": "",
"phone": "",
"portable": "",
"car": "",
"default": ["", ""]
},
"scroll-step": 3,
"on-click": "pavucontrol",
"on-click-right": "pactl set-source-mute @DEFAULT_SOURCE@ toggle"
}
}

View file

@ -1,25 +1,121 @@
{
pkgs,
lib,
fleetFlake,
...
}:
{
}: {
programs.waybar = {
enable = true;
systemd.enable = true;
style = builtins.readFile ./style.css;
settings = {
mainBar = {
ipc = true;
layer = "top";
position = "top";
height = 30;
modules-left = [
"wlr/mode"
"hyprland/workspaces"
];
modules-center = ["wlr/window"];
modules-right = [
"network"
"tray"
"pulseaudio"
"cpu"
"memory"
"temperature"
"backlight"
"battery"
"clock"
];
"hyprland/workspaces" = {
all-outputs = true;
disable-scroll-wraparound = true;
# format = "{icon}";
on-click = "activate";
# format-icons = {
# "1" = "";
# "2" = "";
# "3" = "";
# "9" = "ﬧ";
# urgent = "";
# };
# sort-by-number = true;
};
"wlr/mode" = {tooltip = false;};
"wlr/window" = {max_length = 50;};
tray = {
spacing = 10;
};
battery = {
format = "{capacity}% {icon}";
format-alt = "{time} {icon}";
format-charging = "{capacity}% ";
format-icons = [" " " " " " " " " "];
format-plugged = "{capacity}% ";
states = {
critical = 15;
warning = 30;
};
};
clock = {
format-alt = "{:%Y-%m-%d}";
tooltip-format = "{:%Y-%m-%d | %H:%M}";
};
cpu = {
format = "{usage}% ";
tooltip = false;
};
memory = {format = "{}% ";};
network = {
interval = 1;
format-alt = "{ifname}: {ipaddr}/{cidr}";
format-disconnected = "Disconnected ";
format-ethernet = "{ifname}: {ipaddr}/{cidr} 󰈀 up: {bandwidthUpBits:>4} down: {bandwidthDownBits:>4}";
format-linked = "{ifname} (No IP) ";
format-wifi = "{essid} ({signalStrength}%) {ipaddr}/{cidr} up: {bandwidthUpBits:>4} down: {bandwidthDownBits:>4}";
};
pulseaudio = {
format = "{volume}% {icon} {format_source}";
format-bluetooth = "{volume}% {icon} {format_source}";
format-bluetooth-muted = " {icon} {format_source}";
format-icons = {
car = "";
default = [" " " " " "];
handsfree = "";
headphones = " ";
headset = "";
phone = "";
portable = "";
};
format-muted = " {format_source}";
format-source = "{volume}% ";
format-source-muted = "";
on-click = "${pkgs.pavucontrol}/bin/pavucontrol";
};
"wlr/mode" = {format = ''<span style="italic">{}</span>'';};
temperature = {
critical-threshold = 80;
format = "{temperatureC}°C {icon}";
format-icons = ["" "" ""];
hwmon-path = "/sys/class/hwmon/hwmon2/temp1_input"; # picard FIXME
# hwmon-path = "/sys/class/thermal/thermal_zone4/temp"; # thinkpad
};
backlight = {
device = "ddcci2";
format = "{percent}% {icon}";
format-icons = [" " " "];
};
};
};
};
catppuccin.waybar.enable = lib.mkForce false;
home.activation.linkWaybarConfig = lib.hm.dag.entryAnywhere ''
if [ ! -d "$HOME/.config/waybar" ]; then
$DRY_RUN_CMD mkdir -p "$HOME/.config/waybar"
$DRY_RUN_CMD ln -s "$HOME/projects/aciceri/nixfleet/hmModules/waybar/config.json" "$HOME/.config/waybar/config"
$DRY_RUN_CMD ln -s "$HOME/projects/aciceri/nixfleet/hmModules/waybar/style.css" "$HOME/.config/waybar/style.css"
fi
'';
home.packages = with pkgs; [
rofi-power-menu
];
# waybar needs the hyprctl binary in PATH when started in hyprland
systemd.user.services.waybar.Service.Environment = "PATH=${lib.makeBinPath [pkgs.hyprland]}";
}

View file

@ -1,71 +1,45 @@
* {
border: none;
font-family: "Iosevka Comfy", "FontAwesome", "Nerd Font";
font-size: 1.35rem;
font-weight: 600;
background: none;
border-radius: 0;
min-height: 0;
font-family: Fira Code;
}
window#waybar {
color: #a5adcb;
background-color: #181926;
border-top-right-radius: 5px;
border-bottom-right-radius: 5px;
}
.modules-left,
.modules-right,
.modules-center {
padding: 12px 4px;
background: rgba(255, 255, 255, 0.05);
color: white;
font-size: 1.2rem;
}
tooltip {
color: #a5adcb;
background-color: #181926;
text-shadow: none;
}
tooltip * {
color: #a5adcb;
text-shadow: none;
}
#custom-sep {
color: #494d64;
}
#workspaces button:hover {
box-shadow: inherit;
text-shadow: inherit;
}
#workspaces button {
color: #5b6078;
background: none;
padding: 0;
}
#workspaces button:hover {
color: #a6da95;
}
#workspaces button.active {
color: #f5bde6;
}
#temperature {
color: #eed49f;
}
#clock {
font-weight: 600;
color: #8bd5ca;
}
#custom-bluetooth_devices {
color: #8aadf4;
}
#pulseaudio {
color: #a6da95;
}
#pulseaudio.muted {
color: #ed8796;
padding: 0 10px;
background: transparent;
color: white;
font-size: 2rem;
}
#custom-powermenu {
margin: 12px 0 0 0;
color: #6e738d;
#workspaces button.active {
box-shadow: inset 0 -5px red;
}
#workspaces button.focused, #workspaces button:hover {
box-shadow: inset 0 -5px white;
}
#workspaces button.urgent {
/* background: @theme_fg_color; */
/* color: @theme_selected_bg_color; */
}
#mode {
margin: 0 4px;
padding: 0 4px;
/* background: @theme_fg_color; */
/* color: @unfocused_borders; */
}
#pulseaudio, #network, #cpu, #memory, #disk, #temperature, #battery, #language, #clock, #tray {
margin: 0 4px;
padding: 0 2px;
}

View file

@ -4,14 +4,13 @@
vpn,
hostname,
...
}:
{
}: {
systemd.user.services.wayvnc = {
Install.WantedBy = [ "graphical-session.target" ];
Install.WantedBy = ["graphical-session.target"];
Unit = {
Description = "WayVNC";
PartOf = [ "graphical-session.target" ];
PartOf = ["graphical-session.target"];
};
Service = {

7319
hmModules/wezterm/Cargo.lock generated Normal file

File diff suppressed because it is too large Load diff

View file

@ -1,6 +1,67 @@
{
pkgs,
hostname,
...
}: {
programs.wezterm = {
enable = true;
package =
if hostname == "pircard"
then
(pkgs.wezterm.overrideAttrs (old: rec {
pname = "wezterm";
version = "20240406-cce0706";
src = pkgs.fetchFromGitHub {
owner = "wez";
repo = "${pname}";
rev = "cce0706b1f2a9e2d1f02c57f2d1cd367c91df1ae";
fetchSubmodules = true;
hash = "sha256-BBPxidOpFrw/tIRTqMSREyJF3QEWOwlIoVRT3FD62sQ=";
};
cargoDeps = pkgs.rustPlatform.importCargoLock {
lockFile = "${src}/Cargo.lock";
outputHashes = {
"xcb-imdkit-0.3.0" = "sha256-fTpJ6uNhjmCWv7dZqVgYuS2Uic36XNYTbqlaly5QBjI=";
};
};
patches =
(old.patches or [])
++ [
(pkgs.fetchpatch {
# fix(wayland): ensure repaint event is sent in show
url = "https://patch-diff.githubusercontent.com/raw/wez/wezterm/pull/5264.patch";
hash = "sha256-c+frVaBEL0h3PJvNu3AW2iap+uUXBY8olbm7Wsxuh4Q=";
})
(pkgs.writeText
"wezterm-remove_capabilities.patch"
''
diff --git a/window/src/os/wayland/seat.rs b/window/src/os/wayland/seat.rs
index 3798f4259..e91591130 100644
--- a/window/src/os/wayland/seat.rs
+++ b/window/src/os/wayland/seat.rs
@@ -65,9 +65,15 @@ impl SeatHandler for WaylandState {
_conn: &Connection,
_qh: &QueueHandle<Self>,
_seat: WlSeat,
- _capability: smithay_client_toolkit::seat::Capability,
+ capability: smithay_client_toolkit::seat::Capability,
) {
- todo!()
+ if capability == Capability::Keyboard && self.keyboard.is_some() {
+ self.keyboard.take().unwrap().release();
+ }
+
+ if capability == Capability::Pointer && self.pointer.is_some() {
+ self.pointer = None;
+ }
}
fn remove_seat(&mut self, _conn: &Connection, _qh: &QueueHandle<Self>, _seat: WlSeat) {
'')
];
}))
else pkgs.wezterm;
extraConfig = ''
return {
-- enable_wayland = false; -- https://github.com/wez/wezterm/issues/4483

View file

@ -1,13 +1,12 @@
{ pkgs, ... }:
{
home.packages = [ pkgs.whatsapp-for-linux ];
{pkgs, ...}: {
home.packages = [pkgs.whatsapp-for-linux];
systemd.user.services.whatsapp = {
Install.WantedBy = [ "graphical-session.target" ];
Install.WantedBy = ["graphical-session.target"];
Unit = {
Description = "Whatsapp";
PartOf = [ "graphical-session.target" ];
PartOf = ["graphical-session.target"];
};
Service = {

View file

@ -1,5 +1,4 @@
{ pkgs, ... }:
{
{pkgs, ...}: {
home.packages = with pkgs; [
winetricks
wineWowPackages.waylandFull

View file

@ -1,12 +1,11 @@
{ pkgs, ... }:
{
{pkgs, ...}: {
xdg = {
enable = true;
mimeApps.enable = true;
mimeApps.defaultApplications = {
"text/html" = [ "firefox.desktop" ];
"x-scheme-handler/http" = [ "firefox.desktop" ];
"x-scheme-handler/https" = [ "firefox.desktop" ];
"text/html" = ["firefox.desktop"];
"x-scheme-handler/http" = ["firefox.desktop"];
"x-scheme-handler/https" = ["firefox.desktop"];
};
desktopEntries = {
org-protocol = {
@ -14,43 +13,16 @@
genericName = "Org protocol";
exec = "emacsclient -- %u";
terminal = false;
mimeType = [ "x-scheme-handler/org-protocol" ];
mimeType = ["x-scheme-handler/org-protocol"];
};
firefox = {
name = "firefox";
genericName = "Firefox protocol";
exec = "firefox -- %U";
terminal = false;
mimeType = [
"text/html"
"text/xml"
"text/uri"
];
mimeType = ["text/html" "text/xml" "text/uri"];
};
};
portal = {
enable = true;
configPackages = with pkgs; [
# xdg-desktop-portal-wlr
# xdg-desktop-portal-gtk
# xdg-desktop-portal-hyprland
xdg-desktop-portal-gnome
# xdg-desktop-portal
# kdePackages.xdg-desktop-portal-kde
# libsForQt5.xdg-desktop-portal-kde
gnome-keyring
];
extraPortals = with pkgs; [
# xdg-desktop-portal-wlr
# xdg-desktop-portal-gtk
# xdg-desktop-portal-hyprland
xdg-desktop-portal-gnome
# xdg-desktop-portal
# kdePackages.xdg-desktop-portal-kde
gnome-keyring
];
};
};
home.packages = [ pkgs.xdg-utils ];
home.packages = [pkgs.xdg-utils];
}

View file

@ -1,107 +0,0 @@
{
config,
pkgs,
lib,
...
}:
let
zjstatus = pkgs.fetchurl {
url = "https://github.com/dj95/zjstatus/releases/download/v0.17.0/zjstatus.wasm";
hash = "sha256-IgTfSl24Eap+0zhfiwTvmdVy/dryPxfEF7LhVNVXe+U=";
};
cfg = config.catppuccin.fzf;
palette = (lib.importJSON "${config.catppuccin.sources.palette}/palette.json").${cfg.flavor}.colors;
selectColor = color: palette.${color}.hex;
color_fg = selectColor "text";
color_bg = selectColor "mantle";
color_black = selectColor "surface1";
color_red = selectColor "red";
color_green = selectColor "green";
color_yellow = selectColor "yellow";
color_blue = selectColor "blue";
color_magenta = selectColor "pink";
color_cyan = selectColor "teal";
color_white = selectColor "subtext1";
layout = pkgs.writeText "layout.kdl" ''
layout {
default_tab_template {
pane size=1 borderless=true {
plugin location="file:${zjstatus}" {
color_fg "${color_fg}"
color_bg "${color_bg}"
color_black "${color_black}"
color_red "${color_red}"
color_green "${color_green}"
color_yellow "${color_yellow}"
color_blue "${color_blue}"
color_magenta "${color_magenta}"
color_cyan "${color_cyan}"
color_white "${color_white}"
format_left "{mode}#[bg=$bg] {tabs}"
// format_center "#[bg=$bg,fg=$fg] Zellij: #[bg=$bg,fg=$fg]{session}"
// format_right "{datetime}"
format_right "#[bg=$bg,fg=$fg] Zellij: #[bg=$bg,fg=$fg]{session} "
format_space "#[bg=$bg]"
format_hide_on_overlength "true"
format_precedence "crl"
border_enabled "false"
border_char ""
border_format "#[fg=#6C7086]{char}"
border_position "top"
hide_frame_for_single_pane "true"
mode_normal "#[bg=$green,fg=$bg,bold] NORMAL #[bg=$bg,fg=$green]"
mode_locked "#[bg=$red,fg=$bg,bold] LOCKED #[bg=$bg,fg=$red]"
mode_resize "#[bg=$blue,fg=$bg,bold] RESIZE #[bg=$bg,fg=$blue]"
mode_pane "#[bg=$blue,fg=$bg,bold] PANE #[bg=$bg,fg=$blue]"
mode_tab "#[bg=$yellow,fg=$bg,bold] TAB #[bg=$bg,fg=$yellow]"
mode_scroll "#[bg=$blue,fg=$bg,bold] SCROLL #[bg=$bg,fg=$blue]"
mode_enter_search "#[bg=$yellow,fg=$bg,bold] ENT-SEARCH #[bg=$bg,fg=$yellow]"
mode_search "#[bg=$yellow,fg=$bg,bold] SEARCHARCH #[bg=$bg,fg=$yellow]"
mode_rename_tab "#[bg=$yellow,fg=$bg,bold] RENAME-TAB #[bg=$bg,fg=$yellow]"
mode_rename_pane "#[bg=$blue,fg=$bg,bold] RENAME-PANE #[bg=$bg,fg=$blue]"
mode_session "#[bg=$blue,fg=$bg,bold] SESSION #[bg=$bg,fg=$blue]"
mode_move "#[bg=$blue,fg=$bg,bold] MOVE #[bg=$bg,fg=$blue]"
mode_prompt "#[bg=$blue,fg=$bg,bold] PROMPT #[bg=$bg,fg=$blue]"
mode_tmux "#[bg=$magenta,fg=$bg,bold] TMUX #[bg=$bg,fg=$magenta]"
// formatting for inactive tabs
tab_normal "#[bg=$bg,fg=$cyan] #[bg=$cyan,fg=$bg,bold] {index} {floating_indicator}#[bg=$bg,fg=$bg,bold]"
tab_normal_fullscreen "#[bg=$bg,fg=$cyan] #[bg=$cyan,fg=$bg,bold] {index} {fullscreen_indicator}#[bg=$bg,fg=$bg,bold]"
tab_normal_sync "#[bg=$bg,fg=$cyan] #[bg=$cyan,fg=$bg,bold] {index} {sync_indicator}#[bg=$bg,fg=$bg,bold]"
// formatting for the current active tab
tab_active "#[bg=$bg,fg=$yellow] #[bg=$yellow,fg=$bg,bold] {index} {floating_indicator}#[bg=$bg,fg=$bg,bold]"
tab_active_fullscreen "#[bg=$bg,fg=$yellow] #[bg=$yellow,fg=$bg,bold] {index} {fullscreen_indicator}#[bg=$bg,fg=$bg,bold]"
tab_active_sync "#[bg=$bg,fg=$yellow] #[bg=$yellow,fg=$bg,bold] {index} {sync_indicator}#[bg=$bg,fg=$bg,bold]"
// separator between the tabs
tab_separator "#[bg=$bg] "
// indicators
tab_sync_indicator " "
tab_fullscreen_indicator " 󰊓"
tab_floating_indicator " 󰹙"
datetime "#[fg=$fg] {format} "
datetime_format "%Y-%m-%d %H:%M"
datetime_timezone "Europe/Rome"
}
}
children
}
}
'';
in
{
programs.zellij = {
enable = true;
settings = {
default_layout = "${layout}";
pane_frames = false;
};
};
}

View file

@ -1,42 +0,0 @@
{
programs.bat.enable = true;
programs.fzf.enable = true;
programs.zk = {
enable = true;
settings = {
notebook.dir = "~/notebook";
note = {
language = "en";
default-title = "Untitled";
filename = "{{id}}";
extension = "md";
template = "default.md";
};
group.journal = {
paths = [ "journal" ];
note = {
filename = "{{format-date now}}";
template = "journal.md";
};
};
format.markdown = {
hashtags = false;
colon-tags = true;
multiword-tags = false;
};
tool = {
pager = "less -FIRX";
fzf-preview = "bat --color always {-1}";
};
lsp.diagnostics = {
wiki-title = "hint";
dead-link = "error";
};
lsp.completion = {
note-label = "{{title-or-path}}";
note-filter-text = "{{title}} {{path}}";
note-detail = "{{filename-stem}}";
};
};
};
}

View file

@ -2,23 +2,19 @@
pkgs,
lib,
...
}:
{
home.packages = [ pkgs.zmkBATx ];
}: {
home.packages = [pkgs.zmkBATx];
systemd.user.services.zmkBATx = {
Install.WantedBy = [
"waybar.service"
];
Install.WantedBy = ["graphical-session.target"];
Unit = {
Description = "zmkBATx";
PartOf = ["graphical-session.target"];
};
Service = {
ExecStart = ''
${pkgs.runtimeShell} -l -c "${lib.getExe' pkgs.busybox "sleep"} 5 && ${lib.getExe pkgs.zmkBATx}"
'';
ExecStart = lib.getExe pkgs.zmkBATx;
Restart = "on-failure";
RestartSec = 3;
};

View file

@ -1,4 +0,0 @@
{ pkgs, ... }:
{
home.packages = [ pkgs.zoom-us ];
}

View file

@ -1,4 +1,3 @@
{ pkgs, ... }:
{
home.packages = [ pkgs.zulip ];
{pkgs, ...}: {
home.packages = [pkgs.zulip];
}

View file

@ -0,0 +1,26 @@
{pkgs, ...}: {
# $ nix-env -qaP | grep wget
environment.systemPackages =
[ pkgs.vim
];
# # Auto upgrade nix package and the daemon service.
# services.nix-daemon.enable = true;
# # nix.package = pkgs.nix;
# # Necessary for using flakes on this system.
# nix.settings.experimental-features = "nix-command flakes";
# # Create /etc/zshrc that loads the nix-darwin environment.
# programs.zsh.enable = true; # default shell on catalina
# # programs.fish.enable = true;
# # # Set Git commit hash for darwin-version.
# # system.configurationRevision = self.rev or self.dirtyRev or null;
# # Used for backwards compatibility, please read the changelog before changing.
# # $ darwin-rebuild changelog
# system.stateVersion = 4;
# # The platform the configuration will be used on.
}

View file

@ -1,9 +1,6 @@
{ pkgs, ... }:
{
environment.systemPackages = with pkgs; [
helix
vim
git
{pkgs, ...}: {
environment.systemPackages = [
pkgs.vim
];
nix.settings.experimental-features = "nix-command flakes";
@ -12,5 +9,5 @@
services.nix-daemon.enable = true;
system.stateVersion = 5;
# nixpkgs.localSystem = "x86_64-darwin";
}

View file

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

View file

@ -7,22 +7,15 @@
pkgs,
modulesPath,
...
}:
{
}: {
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [
"ahci"
"xhci_pci"
"usb_storage"
"usbhid"
"sd_mod"
];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
boot.initrd.availableKernelModules = ["ahci" "xhci_pci" "usb_storage" "usbhid" "sd_mod"];
boot.initrd.kernelModules = [];
boot.kernelModules = ["kvm-intel"];
boot.extraModulePackages = [];
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
@ -38,7 +31,7 @@
};
swapDevices = [
{ device = "/dev/disk/by-label/swap"; }
{device = "/dev/disk/by-label/swap";}
];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking

View file

@ -1,38 +1,97 @@
{
self,
lib,
config,
inputs,
...
}:
{
imports = [ ./module.nix ];
}: {
imports = [./module.nix];
fleet = {
darwinHosts.archer = { };
darwinHosts.archer = {};
nixOnDroidHosts.janeway = { };
nixOnDroidHosts.janeway = {};
hosts = {
# thinkpad = {
# extraModules = with inputs; [
# nixosHardware.nixosModules.lenovo-thinkpad-x1-7th-gen
# buildbot-nix.nixosModules.buildbot-master
# buildbot-nix.nixosModules.buildbot-worker
# ];
# extraHmModules = with inputs; [
# ccrEmacs.hmModules.default
# {
# # TODO: remove after https://github.com/nix-community/home-manager/pull/3811
# imports = let
# hmModules = "${inputs.homeManagerGitWorkspace}/modules";
# in [
# "${hmModules}/services/git-workspace.nix"
# ];
# }
# ];
# overlays = [inputs.nil.overlays.default];
# secrets = {
# "thinkpad-wireguard-private-key" = {};
# "cachix-personal-token".owner = "ccr";
# "autistici-password".owner = "ccr";
# "git-workspace-tokens".owner = "ccr";
# "chatgpt-token".owner = "ccr";
# };
# };
# rock5b = {
# system = "aarch64-linux";
# extraModules = with inputs; [
# disko.nixosModules.disko
# rock5b.nixosModules.default
# ];
# secrets = {
# "rock5b-wireguard-private-key" = {};
# "hercules-ci-join-token".owner = "hercules-ci-agent";
# "hercules-ci-binary-caches".owner = "hercules-ci-agent";
# "cachix-personal-token".owner = "ccr";
# "home-planimetry".owner = "hass";
# "cloudflare-dyndns-api-token" = {};
# # "nextcloud-admin-pass".owner = "nextcloud";
# # "aws-credentials" = {};
# };
# colmena.deployment.buildOnTarget = true;
# };
# pbp = {
# system = "aarch64-linux";
# extraModules = with inputs; [
# nixosHardware.nixosModules.pine64-pinebook-pro
# disko.nixosModules.disko
# ];
# extraHmModules = [
# inputs.ccrEmacs.hmModules.default
# ];
# secrets = {
# "pbp-wireguard-private-key" = {};
# "cachix-personal-token".owner = "ccr";
# "chatgpt-token".owner = "ccr";
# };
# };
deltaflyer = {
nixpkgs =
let
# keep in sync with https://github.com/mobile-nixos/mobile-nixos/blob/development/npins/sources.json
rev = "d3c42f187194c26d9f0309a8ecc469d6c878ce33";
in
nixpkgs = let
# keep in sync with https://github.com/NixOS/mobile-nixos/blob/development/pkgs.nix
rev = "44d0940ea560dee511026a53f0e2e2cde489b4d4";
in
builtins.getFlake "github:NixOS/nixpkgs/${rev}";
extraHmModules = [
inputs.catppuccin.homeModules.catppuccin
inputs.ccrEmacs.hmModules.default
];
vpn = {
ip = "10.100.0.5";
publicKey = "6bzmBx2b5yzMdW0aK0KapoBesNcxTv5+qdo+pGmG+jc=";
};
# homeManager = builtins.getFlake "github:nix-community/home-manager/670d9ecc3e46a6e3265c203c2d136031a3d3548e";
homeManager = builtins.getFlake "github:nix-community/home-manager/670d9ecc3e46a6e3265c203c2d136031a3d3548e";
extraModules = [
(import "${inputs.mobile-nixos}/lib/configuration.nix" { device = "oneplus-fajita"; })
inputs.catppuccin.nixosModules.catppuccin
inputs.lix-module.nixosModules.default
(import "${inputs.mobile-nixos}/lib/configuration.nix" {device = "oneplus-fajita";})
];
secrets = {
"deltaflyer-wireguard-private-key" = { };
"deltaflyer-wireguard-private-key" = {};
"chatgpt-token".owner = "ccr";
};
};
@ -46,19 +105,18 @@
inputs.disko.nixosModules.disko
inputs.nixosHardware.nixosModules.lenovo-thinkpad-x1-7th-gen
inputs.lix-module.nixosModules.default
inputs.catppuccin.nixosModules.catppuccin
];
extraHmModules = [
inputs.ccrEmacs.hmModules.default
"${inputs.homeManagerGitWorkspace}/modules/services/git-workspace.nix"
inputs.catppuccin.homeModules.catppuccin
];
secrets = {
"kirk-wireguard-private-key" = { };
"kirk-wireguard-private-key" = {};
"chatgpt-token".owner = "ccr";
"cachix-personal-token".owner = "ccr";
"git-workspace-tokens".owner = "ccr";
"autistici-password".owner = "ccr";
"restic-hetzner-password" = { };
"restic-hetzner-password" = {};
};
};
@ -69,22 +127,25 @@
};
extraModules = [
inputs.disko.nixosModules.disko
inputs.nixThePlanet.nixosModules.macos-ventura
inputs.lix-module.nixosModules.default
inputs.lanzaboote.nixosModules.lanzaboote
inputs.catppuccin.nixosModules.catppuccin
# inputs.hercules-ci-agent.nixosModules.agent-service
];
extraHmModules = [
inputs.ccrEmacs.hmModules.default
"${inputs.homeManagerGitWorkspace}/modules/services/git-workspace.nix"
inputs.vscode-server.nixosModules.home
inputs.catppuccin.homeModules.catppuccin
];
secrets = {
"picard-wireguard-private-key" = { };
"picard-wireguard-private-key" = {};
"chatgpt-token".owner = "ccr";
"cachix-personal-token".owner = "ccr";
"hercules-ci-join-token".owner = "hercules-ci-agent";
"hercules-ci-binary-caches".owner = "hercules-ci-agent";
"hercules-ci-secrets-json".owner = "hercules-ci-agent";
"git-workspace-tokens".owner = "ccr";
"autistici-password".owner = "ccr";
"restic-hetzner-password" = { };
"restic-hetzner-password" = {};
"aws-credentials".owner = "hercules-ci-agent";
"forgejo-runners-token".owner = "nixuser";
"forgejo-nix-access-tokens".owner = "nixuser";
};
@ -92,84 +153,40 @@
sisko = {
system = "aarch64-linux";
nixpkgs = inputs.nixpkgsSisko;
enableHomeManager = false;
vpn = {
ip = "10.100.0.1";
publicKey = "bc5giljukT1+ChbbyTLdOfejfR3c8RZ4XoXmQM54nTY=";
};
extraModules = with inputs; [
disko.nixosModules.disko
impermanence.nixosModules.impermanence
lix-module.nixosModules.default
arion.nixosModules.arion
# lix-module.nixosModules.default
# inputs.hercules-ci-agent.nixosModules.agent-service;
# rock5b.nixosModules.default
];
secrets = {
"sisko-wireguard-private-key" = { };
"home-planimetry".owner = "hass";
"home-assistant-token".owner = "prometheus";
"grafana-password".owner = "grafana";
"cloudflare-dyndns-api-token" = { };
"restic-hetzner-password" = { };
"hass-ssh-key".owner = "hass";
"sisko-attic-environment-file".owner = "atticd";
"autistici-password" = {
# FIXME terrible, should create a third ad-hoc group
owner = "grafana";
group = "forgejo";
};
"matrix-registration-shared-secret".owner = "matrix-synapse";
};
};
pike = {
vpn = {
ip = "10.100.0.8";
publicKey = "16ctjunXCXDPLSUhocstJ9z9l45/YuJFxlLkpoxChjI=";
};
extraModules = [
inputs.lix-module.nixosModules.default
inputs.catppuccin.nixosModules.catppuccin
];
extraHmModules = [
"${inputs.homeManagerGitWorkspace}/modules/services/git-workspace.nix"
inputs.vscode-server.nixosModules.home
inputs.catppuccin.homeModules.catppuccin
];
secrets = {
"pike-wireguard-private-key" = { };
"chatgpt-token".owner = "ccr";
"sisko-wireguard-private-key" = {};
"hercules-ci-join-token".owner = "hercules-ci-agent";
"hercules-ci-binary-caches".owner = "hercules-ci-agent";
"hercules-ci-secrets-json".owner = "hercules-ci-agent";
"cachix-personal-token".owner = "ccr";
"git-workspace-tokens".owner = "ccr";
"autistici-password".owner = "ccr";
"restic-hetzner-password" = { };
"forgejo-runners-token".owner = "nixuser";
"forgejo-nix-access-tokens".owner = "nixuser";
"home-planimetry".owner = "hass";
"cloudflare-dyndns-api-token" = {};
"restic-hetzner-password" = {};
"minio-credentials".owner = "minio";
"aws-credentials".owner = "hercules-ci-agent";
"hass-ssh-key".owner = "hass";
"matrix-registration-shared-secret".owner = "matrix-synapse";
"matrix-sliding-sync-secret".owner = "matrix-synapse";
"autistici-password".owner = "forgejo";
};
};
tpol = {
extraModules = with inputs; [
lix-module.nixosModules.default
];
secrets = {
"tpol-wireguard-private-key" = { };
};
vpn = {
ip = "10.100.0.7";
publicKey = "b/Pi7koTFo5CMAAzcL2ulvQ/0dUjKzbmXpvh4Lb/Bgo=";
};
extraHmModulesUser = "mara";
};
};
vpnExtra = {
oneplus8t = {
oneplus6t = {
ip = "10.100.0.4";
publicKey = "9ccx4C4xvPC6lPgTZAHDSfK4FS2BP2i4D57u9IZjw18=";
};
macos-ventura = {
ip = "10.100.0.6";
publicKey = "/Eee1V0PsjZSzj7un1NxHKtFR+TpUIgJ7VAdIAzmvzQ=";
publicKey = "cXHPaJXeA/JB7DKlZXR86zYcz1OEVPMOvAmDhBQF91E=";
};
};
};

View file

@ -1,10 +1,11 @@
{
fleetModules,
config,
lib,
pkgs,
fleetFlake,
...
}:
{
}: {
imports =
fleetModules [
"common"
@ -30,13 +31,6 @@
# INSECURE STUFF FIRST
# Users and hardcoded passwords.
{
nixpkgs.overlays = [
(prev: final: {
gcc7 = final.gcc;
gcc8 = final.gcc;
})
];
users.users.root.password = "nixos";
# users.users.ccr.password = "1234";
@ -49,10 +43,7 @@
# Networking, modem and misc.
{
# Ensures any rndis config from stage-1 is not clobbered by NetworkManager
networking.networkmanager.unmanaged = [
"rndis0"
"usb0"
];
networking.networkmanager.unmanaged = ["rndis0" "usb0"];
# Setup USB gadget networking in initrd...
mobile.boot.stage-1.networking.enable = lib.mkDefault true;
@ -73,13 +64,11 @@
"git"
"shell"
"helix"
# "hyprland"
"niri"
"hyprland"
"emacs"
"firefox"
"mpv"
"xdg"
"catppuccin"
];
extraGroups = [
"dialout"
@ -88,14 +77,13 @@
"video"
"wheel"
];
backupPaths = [ ];
backupPaths = [];
};
}
{
system.stateVersion = "24.11";
nixpkgs.config.allowUnfreePredicate =
pkg:
nixpkgs.config.allowUnfreePredicate = pkg:
builtins.elem (lib.getName pkg) [
"oneplus-sdm845-firmware-zstd"
"oneplus-sdm845-firmware-xz"
@ -108,35 +96,33 @@
ccr.extraModules = [
{
programs.fish.loginShellInit = ''
pgrep niri >/dev/null || exec niri-session
pgrep Hypr >/dev/null || exec dbus-run-session Hyprland
'';
# wayland.windowManager.hyprland.extraConfig = lib.mkAfter ''
# monitor = DSI-1, 1080x2340, 0x0, 2, transform, 1
# input {
# touchdevice {
# transform = 1
# }
# }
# bind = $mod, r, exec, rotate-screen hor
# bind = $mod SHIFT, r, exec, rotate-screen ver
# '';
home.packages =
let
rotateScript = pkgs.writeShellApplication {
name = "rotate-screen";
runtimeInputs = [ pkgs.hyprland ];
text = ''
if [[ "$1" == "hor" ]]; then
hyprctl keyword monitor DSI-1,1080x2340,0x0,2,transform,1
hyprctl keyword input:touchdevice:transform 1
elif [[ "$1" == "ver" ]]; then
hyprctl keyword monitor DSI-1,1080x2340,0x0,2,transform,0
hyprctl keyword input:touchdevice:transform 0
fi
'';
};
in
[ rotateScript ];
wayland.windowManager.hyprland.extraConfig = lib.mkAfter ''
monitor = DSI-1, 1080x2340, 0x0, 2, transform, 1
input {
touchdevice {
transform = 1
}
}
bind = $mod, r, exec, rotate-screen hor
bind = $mod SHIFT, r, exec, rotate-screen ver
'';
home.packages = let
rotateScript = pkgs.writeShellApplication {
name = "rotate-screen";
runtimeInputs = [pkgs.hyprland];
text = ''
if [[ "$1" == "hor" ]]; then
hyprctl keyword monitor DSI-1,1080x2340,0x0,2,transform,1
hyprctl keyword input:touchdevice:transform 1
elif [[ "$1" == "ver" ]]; then
hyprctl keyword monitor DSI-1,1080x2340,0x0,2,transform,0
hyprctl keyword input:touchdevice:transform 0
fi
'';
};
in [rotateScript];
services.swayidle.enable = lib.mkForce false;
}
];
@ -154,13 +140,7 @@
zramSwap.enable = lib.mkDefault true;
boot.binfmt.emulatedSystems = lib.mkForce [
"x86_64-linux"
"i686-linux"
"i386-linux"
"i486-linux"
"i586-linux"
];
boot.binfmt.emulatedSystems = lib.mkForce ["x86_64-linux" "i686-linux" "i386-linux" "i486-linux" "i586-linux"];
}
];
}

View file

@ -2,11 +2,11 @@
# Minimum config used to enable Plasma Mobile.
#
{
config,
lib,
pkgs,
...
}:
{
}: {
mobile.beautification = {
silentBoot = lib.mkDefault false;
splash = lib.mkDefault false;
@ -17,38 +17,35 @@
# # desktopManager.plasma5.mobile.enable = true;
displayManager.autoLogin = {
enable = true;
user = "ccr";
};
# displayManager.autoLogin = {
# enable = true;
# };
displayManager.session = [
{
manage = "desktop";
name = "niri";
start = ''
${pkgs.niri}/bin/niri-session &
waitPID=$!
'';
}
];
# displayManager.session = [{
# manage = "desktop";
# name = "hyprland";
# start = ''
# ${pkgs.hyprland}/bin/Hyprland &
# waitPID=$!
# '';
# }];
displayManager.defaultSession = "niri";
# displayManager.defaultSession = "hyprland";
displayManager.lightdm = {
enable = true;
# Workaround for autologin only working at first launch.
# A logout or session crashing will show the login screen otherwise.
extraSeatDefaults = ''
session-cleanup-script=${pkgs.procps}/bin/pkill -P1 -fx ${pkgs.lightdm}/sbin/lightdm
'';
};
# displayManager.lightdm = {
# enable = true;
# # Workaround for autologin only working at first launch.
# # A logout or session crashing will show the login screen otherwise.
# extraSeatDefaults = ''
# session-cleanup-script=${pkgs.procps}/bin/pkill -P1 -fx ${pkgs.lightdm}/sbin/lightdm
# '';
# };
libinput.enable = true;
};
hardware.bluetooth.enable = true;
hardware.pulseaudio.enable = lib.mkDefault false; # mkDefault to help out users wanting pipewire
hardware.pulseaudio.enable = lib.mkDefault true; # mkDefault to help out users wanting pipewire
networking.networkmanager.enable = true;
networking.wireless.enable = false;
powerManagement.enable = true;

View file

@ -4,8 +4,7 @@
lib,
pkgs,
...
}:
{
}: {
imports =
[
(modulesPath + "/installer/scan/not-detected.nix")
@ -43,29 +42,17 @@
};
fonts = {
fonts = with pkgs; [
powerline-fonts
dejavu_fonts
fira-code
fira-code-symbols
emacs-all-the-icons-fonts
nerdfonts
joypixels
etBook
];
fonts = with pkgs; [powerline-fonts dejavu_fonts fira-code fira-code-symbols emacs-all-the-icons-fonts nerdfonts joypixels etBook];
fontconfig.defaultFonts = {
monospace = [ "DejaVu Sans Mono for Powerline" ];
sansSerif = [ "DejaVu Sans" ];
serif = [ "DejaVu Serif" ];
monospace = ["DejaVu Sans Mono for Powerline"];
sansSerif = ["DejaVu Sans"];
serif = ["DejaVu Serif"];
};
};
nixpkgs.config.joypixels.acceptLicense = true;
environment.systemPackages = with pkgs; [
waypipe
firefox
];
environment.systemPackages = with pkgs; [waypipe firefox];
programs.mosh.enable = true;
@ -74,7 +61,7 @@
};
boot.loader.grub = {
devices = [ "/dev/sda" ];
devices = ["/dev/sda"];
efiSupport = true;
efiInstallAsRemovable = true;
};

View file

@ -1,10 +1,9 @@
# Example to create a bios compatible gpt partition
{
lib,
disks ? [ "/dev/sda" ],
disks ? ["/dev/sda"],
...
}:
{
}: {
disk = lib.genAttrs disks (dev: {
device = dev;
type = "disk";
@ -18,7 +17,7 @@
start = "0";
end = "1M";
part-type = "primary";
flags = [ "bios_grub" ];
flags = ["bios_grub"];
}
{
type = "partition";

View file

@ -4,8 +4,7 @@
lib,
config,
...
}:
{
}: {
imports =
[
./hardware-configuration.nix
@ -22,7 +21,7 @@
"shell"
"git"
];
packages = [ ];
packages = [];
extraGroups = [
"wheel"
"fuse"
@ -32,7 +31,7 @@
systemd.services.standby-sdb = {
description = "Set spindown time (sleep) for /dev/sdb ";
wantedBy = [ "multi-user.target" ];
wantedBy = ["multi-user.target"];
serviceConfig = {
Type = "oneshot";
ExecStart = "${pkgs.hdparm}/bin/hdparm -B 127 -S 241 /dev/sdb";
@ -41,7 +40,7 @@
systemd.services.standby-sdc = {
description = "Set spindown time (sleep) for /dev/sdc ";
wantedBy = [ "multi-user.target" ];
wantedBy = ["multi-user.target"];
serviceConfig = {
Type = "oneshot";
ExecStart = "${pkgs.hdparm}/bin/hdparm -B 127 -S 241 /dev/sdc";
@ -55,7 +54,7 @@
isSystemUser = true;
group = "amule";
};
users.groups."amule" = { };
users.groups."amule" = {};
services = {
samba-wsdd = {
@ -262,35 +261,33 @@
};
};
systemd.services.ydns =
let
ydnsUpdater = pkgs.writeScriptBin "ydnsUpdater" ''
USER="andrea.ciceri@autistici.org"
PASSWORD=$(cat /home/ccr/.ydns-password)
DOMAIN="ccr.ydns.eu"
for SUBDOMAIN in "books" "music" "sync" "torrent" "gate"
do
HOST="$SUBDOMAIN.$DOMAIN"
${pkgs.curl}/bin/curl --basic -u "$USER:$PASSWORD" --silent https://ydns.io/api/v1/update/?host=$HOST
done
${pkgs.curl}/bin/curl --basic -u "$USER:$PASSWORD" --silent https://ydns.io/api/v1/update/?host=$DOMAIN
'';
in
{
description = "YDNS IP updater";
wantedBy = [ "multi-user.target" ];
after = [ "network.target" ];
serviceConfig = {
User = "root";
Type = "oneshot";
ExecStart = "${pkgs.bash}/bin/bash ${ydnsUpdater}/bin/ydnsUpdater";
};
systemd.services.ydns = let
ydnsUpdater = pkgs.writeScriptBin "ydnsUpdater" ''
USER="andrea.ciceri@autistici.org"
PASSWORD=$(cat /home/ccr/.ydns-password)
DOMAIN="ccr.ydns.eu"
for SUBDOMAIN in "books" "music" "sync" "torrent" "gate"
do
HOST="$SUBDOMAIN.$DOMAIN"
${pkgs.curl}/bin/curl --basic -u "$USER:$PASSWORD" --silent https://ydns.io/api/v1/update/?host=$HOST
done
${pkgs.curl}/bin/curl --basic -u "$USER:$PASSWORD" --silent https://ydns.io/api/v1/update/?host=$DOMAIN
'';
in {
description = "YDNS IP updater";
wantedBy = ["multi-user.target"];
after = ["network.target"];
serviceConfig = {
User = "root";
Type = "oneshot";
ExecStart = "${pkgs.bash}/bin/bash ${ydnsUpdater}/bin/ydnsUpdater";
};
};
systemd.services.wstunnel = {
description = "WSTunnel";
wantedBy = [ "multi-user.target" ];
after = [ "network.target" ];
wantedBy = ["multi-user.target"];
after = ["network.target"];
serviceConfig = {
User = "root";
Type = "oneshot";
@ -300,8 +297,8 @@
# TODO It seems to not work
systemd.timers.ydnsUpdater = {
wantedBy = [ "timers.target" ];
partOf = [ "ydnsUpdater.service" ];
wantedBy = ["timers.target"];
partOf = ["ydnsUpdater.service"];
timerConfig = {
OnCalendar = "*-*-* *:00:00"; # hourly
Unit = "ydnsUpdater.service";
@ -333,13 +330,13 @@
networking.nat.enable = true;
networking.nat.externalInterface = "enp0s10";
networking.nat.internalInterfaces = [ "wg0" ];
networking.nat.internalInterfaces = ["wg0"];
networking.wireguard.interfaces = {
# "wg0" is the network interface name. You can name the interface arbitrarily.
wg0 = {
# Determines the IP address and subnet of the server's end of the tunnel interface.
ips = [ "10.100.0.1/24" ];
ips = ["10.100.0.1/24"];
# The port that WireGuard listens to. Must be accessible by the client.
listenPort = 51820;
@ -369,7 +366,7 @@
# Public key of the peer (not a file path).
publicKey = "fCwjd75CefC9A7WqO7s3xfOk2nRcoTKfnAzDT6Lc5AA=";
# List of IPs assigned to this peer within the tunnel subnet. Used to configure routing.
allowedIPs = [ "10.100.0.2/32" ];
allowedIPs = ["10.100.0.2/32"];
}
];
};

View file

@ -1,14 +1,6 @@
{ lib, ... }:
{
{lib, ...}: {
boot = {
initrd.availableKernelModules = [
"ohci_pci"
"ehci_pci"
"ahci"
"usb_storage"
"usbhid"
"sd_mod"
];
initrd.availableKernelModules = ["ohci_pci" "ehci_pci" "ahci" "usb_storage" "usbhid" "sd_mod"];
loader.grub = lib.mkForce {
enable = true;
version = 2;
@ -31,5 +23,5 @@
};
};
swapDevices = [ { device = "/dev/disk/by-label/swap"; } ];
swapDevices = [{device = "/dev/disk/by-label/swap";}];
}

View file

@ -1,20 +1,19 @@
{
config,
lib,
pkgs,
fleetFlake,
...
}:
let
}: let
sshdTmpDirectory = "${config.user.home}/sshd-tmp";
sshdDirectory = "${config.user.home}/sshd";
pathToPubKey = "/mnt/sdcard/Download/picard_host_key.pub";
port = 8022;
in
{
in {
# Backup etc files instead of failing to activate generation if a file already exists in /etc
environment.etcBackupExtension = ".bak";
# Read the changelog before changing this value
system.stateVersion = "24.05";
system.stateVersion = "23.11";
# Set up nix for flakes
nix.extraOptions = ''
@ -24,59 +23,36 @@ in
# Set your time zone
time.timeZone = "Europe/Rome";
home-manager.config =
{ ... }:
{
home.stateVersion = "24.05";
_module.args = {
hostname = "janeway";
age.secrets = { };
};
imports = [ ../../hmModules/shell ];
};
build.activation.sshd = ''
$DRY_RUN_CMD mkdir $VERBOSE_ARG --parents "${config.user.home}/.ssh"
$DRY_RUN_CMD cat ${pathToPubKey} > "${config.user.home}/.ssh/authorized_keys"
build.activation.sshd =
let
keys = (builtins.import ../../lib).keys;
inherit (keys) hosts users;
in
''
$DRY_RUN_CMD mkdir $VERBOSE_ARG --parents "${config.user.home}/.ssh"
$DRY_RUN_CMD echo ${hosts.picard} > "${config.user.home}/.ssh/authorized_keys"
$DRY_RUN_CMD echo ${hosts.sisko} >> "${config.user.home}/.ssh/authorized_keys"
$DRY_RUN_CMD echo ${hosts.kirk} >> "${config.user.home}/.ssh/authorized_keys"
$DRY_RUN_CMD echo ${users.ccr-ssh} >> "${config.user.home}/.ssh/authorized_keys"
if [[ ! -d "${sshdDirectory}" ]]; then
$DRY_RUN_CMD rm $VERBOSE_ARG --recursive --force "${sshdTmpDirectory}"
$DRY_RUN_CMD mkdir $VERBOSE_ARG --parents "${sshdTmpDirectory}"
if [[ ! -d "${sshdDirectory}" ]]; then
$DRY_RUN_CMD rm $VERBOSE_ARG --recursive --force "${sshdTmpDirectory}"
$DRY_RUN_CMD mkdir $VERBOSE_ARG --parents "${sshdTmpDirectory}"
$VERBOSE_ECHO "Generating host keys..."
$DRY_RUN_CMD ${pkgs.openssh}/bin/ssh-keygen -t rsa -b 4096 -f "${sshdTmpDirectory}/ssh_host_rsa_key" -N ""
$VERBOSE_ECHO "Generating host keys..."
$DRY_RUN_CMD ${pkgs.openssh}/bin/ssh-keygen -t rsa -b 4096 -f "${sshdTmpDirectory}/ssh_host_rsa_key" -N ""
$VERBOSE_ECHO "Writing sshd_config..."
$DRY_RUN_CMD echo -e "HostKey ${sshdDirectory}/ssh_host_rsa_key\nPort ${toString port}\n" > "${sshdTmpDirectory}/sshd_config"
$VERBOSE_ECHO "Writing sshd_config..."
$DRY_RUN_CMD echo -e "HostKey ${sshdDirectory}/ssh_host_rsa_key\nPort ${toString port}\n" > "${sshdTmpDirectory}/sshd_config"
$DRY_RUN_CMD mv $VERBOSE_ARG "${sshdTmpDirectory}" "${sshdDirectory}"
fi
'';
$DRY_RUN_CMD mv $VERBOSE_ARG "${sshdTmpDirectory}" "${sshdDirectory}"
fi
'';
environment.packages = [
pkgs.vim
pkgs.bottom
pkgs.helix
pkgs.stress
pkgs.openssh
pkgs.git
(pkgs.writeScriptBin "sshd-start" ''
#!${pkgs.runtimeShell}
environment.packages =
let
inherit (fleetFlake.inputs.ccrEmacs.packages.aarch64-linux) ccrEmacs;
in
[
pkgs.bottom
pkgs.helix
pkgs.stress
pkgs.openssh
pkgs.git
pkgs.btop
ccrEmacs
(pkgs.writeScriptBin "sshd-start" ''
#!${pkgs.runtimeShell}
echo "Starting sshd in non-daemonized way on port ${toString port}"
${pkgs.openssh}/bin/sshd -f "${sshdDirectory}/sshd_config" -D
'')
];
echo "Starting sshd in non-daemonized way on port ${toString port}"
${pkgs.openssh}/bin/sshd -f "${sshdDirectory}/sshd_config" -D
'')
];
}

View file

@ -2,9 +2,9 @@
fleetModules,
lib,
pkgs,
config,
...
}:
{
}: {
imports =
fleetModules [
"common"
@ -27,37 +27,36 @@
"printing"
"pam"
"wireguard-client"
"restic"
"greetd"
"syncthing"
"mount-sisko"
"mount-rock5b"
"adb"
"binfmt"
"prometheus-exporters"
"alloy"
"syncthing"
"zerotier"
"calibre"
]
++ [ ./disko.nix ];
++ [
./disko.nix
];
ccr = {
enable = true;
autologin = false;
autologin = true;
modules = [
"git"
"git-workspace"
"helix"
"shell"
"zellij"
"element"
"emacs"
"firefox"
"gpg"
"mpv"
"password-store"
"slack"
"hyprland"
"niri"
"udiskie"
"xdg"
"spotify"
"lutris"
"wine"
"cura"
@ -66,32 +65,24 @@
"digikam"
"discord"
"remmina"
"calibre"
"zathura"
"imv"
"catppuccin"
"libreoffice"
"emacs"
"chirp"
"sdrangel"
"zmkbatx"
"moonlight"
"gimp"
"zulip"
];
extraGroups = [ "plugdev" ];
backupPaths = [ ];
extraGroups = [];
backupPaths = [];
};
boot.initrd.kernelModules = [ "i915" ];
boot.initrd.kernelModules = ["i915"];
boot.initrd.availableKernelModules = [
"nvme"
"xhci_pci"
"usb_storage"
"sd_mod"
];
boot.kernelModules = [ "kvm-intel" ];
boot.kernelModules = [
"kvm-intel"
];
boot.kernelPackages = pkgs.linuxPackages;
boot.kernelPackages = config.boot.zfs.package.latestCompatibleLinuxPackages;
boot.loader.efi.canTouchEfiVariables = true;
boot.loader.systemd-boot = {
@ -104,15 +95,10 @@
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
powerManagement.cpuFreqGovernor = lib.mkDefault "schedutil";
hardware.enableRedistributableFirmware = lib.mkDefault true;
hardware.rtl-sdr.enable = true;
hardware.graphics = {
hardware.opengl = {
enable = true;
enable32Bit = true;
};
zramSwap = {
enable = true;
algorithm = "zstd";
driSupport = true;
driSupport32Bit = true;
};
}

Some files were not shown because too many files have changed in this diff Show more