Compare commits
1 commit
Author | SHA1 | Date | |
---|---|---|---|
7a896f7a80 |
265 changed files with 4989 additions and 10783 deletions
|
@ -7,9 +7,5 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
name: Checkout repository
|
name: Checkout repository
|
||||||
- name: Attic login
|
|
||||||
run: attic login nixfleet http://sisko.wg.aciceri.dev:8081 ${{secrets.ATTIC_NIXFLEET_TOKEN}}
|
|
||||||
- name: Build with nix
|
- 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
|
run: nix-fast-build --no-nom --systems "x86_64-linux aarch64-linux"
|
||||||
- name: Report checks
|
|
||||||
run: report-checks
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
name: update-flake-lock
|
name: update-flake-lock
|
||||||
on:
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: "0 15 * * *" # daily at 15:00
|
- cron: '0 15 * * *' # daily at 15:00
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
lockfile:
|
lockfile:
|
||||||
|
@ -32,4 +32,4 @@ jobs:
|
||||||
--title "Update flake's lockfile" \
|
--title "Update flake's lockfile" \
|
||||||
--description "Check the commit description for inputs deltas" \
|
--description "Check the commit description for inputs deltas" \
|
||||||
--assignees aciceri \
|
--assignees aciceri \
|
||||||
|| echo "PR already existing"
|
|| echo "PR already existing"
|
||||||
|
|
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -2,4 +2,3 @@ result
|
||||||
.direnv
|
.direnv
|
||||||
.pre-commit-config.yaml
|
.pre-commit-config.yaml
|
||||||
*.qcow2
|
*.qcow2
|
||||||
result*
|
|
|
@ -3,55 +3,33 @@
|
||||||
self,
|
self,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}:
|
}: {
|
||||||
{
|
|
||||||
imports = [
|
imports = [
|
||||||
inputs.treefmt-nix.flakeModule
|
inputs.treefmt-nix.flakeModule
|
||||||
inputs.git-hooks-nix.flakeModule
|
inputs.pre-commit-hooks.flakeModule
|
||||||
];
|
];
|
||||||
|
|
||||||
perSystem =
|
perSystem = _: {
|
||||||
{ config, ... }:
|
treefmt.config = {
|
||||||
{
|
projectRootFile = ".git/config";
|
||||||
treefmt.config = {
|
programs.alejandra.enable = true;
|
||||||
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;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
flake.checks =
|
pre-commit.settings.hooks = {
|
||||||
let
|
alejandra.enable = true;
|
||||||
build = _: nc: nc.config.system.build.toplevel;
|
# deadnix.enable = true;
|
||||||
in
|
# statix.enable = true;
|
||||||
{
|
|
||||||
x86_64-linux = lib.mapAttrs build { inherit (self.nixosConfigurations) picard; };
|
|
||||||
aarch64-linux = lib.mapAttrs build {
|
|
||||||
inherit (self.nixosConfigurations) sisko; # pbp;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
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
24
ci/default.nix
Normal 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"];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
1281
flake.lock
generated
1281
flake.lock
generated
File diff suppressed because it is too large
Load diff
71
flake.nix
71
flake.nix
|
@ -3,59 +3,62 @@
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
flakeParts.url = "github:hercules-ci/flake-parts";
|
flakeParts.url = "github:hercules-ci/flake-parts";
|
||||||
nixpkgsSisko.url = "github:NixOS/nixpkgs/b6eaf97c6960d97350c584de1b6dcff03c9daf42";
|
nixpkgsUnstable.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||||
nixpkgs.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";
|
nixosHardware.url = "github:NixOS/nixos-hardware";
|
||||||
homeManager = {
|
homeManager = {
|
||||||
url = "github:nix-community/home-manager";
|
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
|
# TODO: remove after https://github.com/nix-community/home-manager/pull/3811
|
||||||
homeManagerGitWorkspace = {
|
homeManagerGitWorkspace = {
|
||||||
url = "github:aciceri/home-manager/git-workspace";
|
url = "github:aciceri/home-manager/git-workspace";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgsUnstable";
|
||||||
|
};
|
||||||
|
# TODO: remove after https://github.com/nix-community/home-manager/pull/4249
|
||||||
|
homeManagerSwayNC = {
|
||||||
|
url = "github:rhoriguchi/home-manager/swaync";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgsUnstable";
|
||||||
};
|
};
|
||||||
disko = {
|
disko = {
|
||||||
url = "github:nix-community/disko";
|
url = "github:nix-community/disko";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgsUnstable";
|
||||||
};
|
};
|
||||||
git-hooks-nix = {
|
pre-commit-hooks = {
|
||||||
url = "github:cachix/git-hooks.nix";
|
url = "github:cachix/pre-commit-hooks.nix";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs = {
|
||||||
|
nixpkgs.follows = "nixpkgsUnstable";
|
||||||
|
nixpkgs-stable.follows = "nixpkgsStable";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
nur.url = "github:nix-community/NUR";
|
||||||
agenix.url = "github:ryantm/agenix";
|
agenix.url = "github:ryantm/agenix";
|
||||||
|
rock5b.url = "github:aciceri/rock5b-nixos";
|
||||||
|
ccrEmacs.url = "git+https://git.aciceri.dev/aciceri/emacs.git";
|
||||||
treefmt-nix = {
|
treefmt-nix = {
|
||||||
url = "github:numtide/treefmt-nix";
|
url = "github:numtide/treefmt-nix";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgsUnstable";
|
||||||
};
|
};
|
||||||
|
hercules-ci-effects.url = "github:hercules-ci/hercules-ci-effects";
|
||||||
dream2nix.url = "github:nix-community/dream2nix";
|
dream2nix.url = "github:nix-community/dream2nix";
|
||||||
nix-on-droid.url = "github:nix-community/nix-on-droid";
|
hercules-ci-agent.url = "github:hercules-ci/hercules-ci-agent";
|
||||||
lix = {
|
nix-fast-build = {
|
||||||
url = "git+https://git@git.lix.systems/lix-project/lix"; # FIXME update
|
url = "github:Mic92/nix-fast-build";
|
||||||
flake = false;
|
inputs.nixpkgs.follows = "nixpkgsUnstable";
|
||||||
};
|
};
|
||||||
lix-module = {
|
nixThePlanet = {
|
||||||
url = "git+https://git.lix.systems/lix-project/nixos-module";
|
url = "github:aciceri/NixThePlanet/nix-in-darwin";
|
||||||
inputs.lix.follows = "lix";
|
inputs.nixpkgs.follows = "nixpkgsUnstable";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
};
|
};
|
||||||
mobile-nixos = {
|
nixDarwin = {
|
||||||
url = "github:NixOS/mobile-nixos";
|
url = "github:LnL7/nix-darwin";
|
||||||
flake = false;
|
inputs.nixpkgs.follows = "nixpkgsUnstable";
|
||||||
};
|
};
|
||||||
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";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs =
|
outputs = inputs @ {flakeParts, ...}:
|
||||||
inputs@{ flakeParts, ... }:
|
flakeParts.lib.mkFlake {inherit inputs;} {
|
||||||
flakeParts.lib.mkFlake { inherit inputs; } {
|
|
||||||
imports = [
|
imports = [
|
||||||
# TODO export modules as flake outputs
|
# TODO export modules as flake outputs
|
||||||
# ./modules
|
# ./modules
|
||||||
|
@ -64,10 +67,8 @@
|
||||||
./packages
|
./packages
|
||||||
./shell
|
./shell
|
||||||
./checks
|
./checks
|
||||||
|
./ci
|
||||||
];
|
];
|
||||||
systems = [
|
systems = ["x86_64-linux" "aarch64-linux"];
|
||||||
"x86_64-linux"
|
|
||||||
"aarch64-linux"
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
imports = [ ../email ];
|
imports = [../email];
|
||||||
config = {
|
config = {
|
||||||
accounts.email.accounts = {
|
accounts.email.accounts = {
|
||||||
autistici.aerc = {
|
autistici.aerc = {
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
{ pkgs, ... }:
|
{pkgs, ...}: {
|
||||||
{
|
home.packages = [pkgs.binance];
|
||||||
home.packages = [ pkgs.binance ];
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +1,6 @@
|
||||||
{
|
{
|
||||||
programs.btop = {
|
programs.btop = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings.update_ms = 100;
|
||||||
update_ms = 100;
|
|
||||||
theme_background = false;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +0,0 @@
|
||||||
{ pkgs, ... }:
|
|
||||||
{
|
|
||||||
home.packages = [ pkgs.calibre ];
|
|
||||||
}
|
|
|
@ -1,13 +0,0 @@
|
||||||
{ lib, ... }:
|
|
||||||
{
|
|
||||||
catppuccin = {
|
|
||||||
enable = true;
|
|
||||||
flavor = "mocha";
|
|
||||||
accent = "sapphire";
|
|
||||||
};
|
|
||||||
|
|
||||||
qt = {
|
|
||||||
platformTheme.name = lib.mkForce "kvantum";
|
|
||||||
style.name = lib.mkForce "kvantum";
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,4 +0,0 @@
|
||||||
{ pkgs, ... }:
|
|
||||||
{
|
|
||||||
home.packages = [ pkgs.chirp ];
|
|
||||||
}
|
|
|
@ -1,5 +1,4 @@
|
||||||
{ pkgs, ... }:
|
{pkgs, ...}: {
|
||||||
{
|
|
||||||
programs.chromium = {
|
programs.chromium = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.google-chrome;
|
package = pkgs.google-chrome;
|
||||||
|
|
|
@ -1,6 +1,3 @@
|
||||||
{ pkgs, ... }:
|
{pkgs, ...}: {
|
||||||
{
|
home.packages = [pkgs.cura];
|
||||||
home.packages = [
|
|
||||||
pkgs.cura-appimage
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
{ pkgs, ... }:
|
{pkgs, ...}: {
|
||||||
{
|
home.packages = [pkgs.digikam];
|
||||||
home.packages = [ pkgs.digikam ];
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,11 +1,5 @@
|
||||||
{ pkgs, ... }:
|
{pkgs, ...}: {
|
||||||
{
|
home.packages = [pkgs.discord];
|
||||||
home.packages = [
|
|
||||||
(pkgs.discord.override {
|
|
||||||
withOpenASAR = true;
|
|
||||||
withVencord = true;
|
|
||||||
})
|
|
||||||
];
|
|
||||||
home.file.".config/discord/settings.json".text = builtins.toJSON {
|
home.file.".config/discord/settings.json".text = builtins.toJSON {
|
||||||
SKIP_HOST_UPDATE = true;
|
SKIP_HOST_UPDATE = true;
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
{ pkgs, ... }:
|
{pkgs, ...}: {
|
||||||
{
|
home.packages = [pkgs.dolphin-emu];
|
||||||
home.packages = [ pkgs.dolphin-emu ];
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,17 +1,18 @@
|
||||||
{ pkgs, lib, ... }:
|
{pkgs, ...}: {
|
||||||
{
|
# home.packages = [pkgs.schildichat-desktop];
|
||||||
home.packages = [ pkgs.element-desktop ];
|
home.packages = [pkgs.element-desktop];
|
||||||
|
|
||||||
systemd.user.services.element-desktop = {
|
systemd.user.services.element-desktop = {
|
||||||
Install.WantedBy = [ "graphical-session.target" ];
|
Install.WantedBy = ["graphical-session.target"];
|
||||||
|
|
||||||
Unit = {
|
Unit = {
|
||||||
Description = "Element";
|
Description = "Element";
|
||||||
PartOf = [ "graphical-session.target" ];
|
PartOf = ["graphical-session.target"];
|
||||||
};
|
};
|
||||||
|
|
||||||
Service = {
|
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}/bin/element-desktop";
|
||||||
Restart = "on-failure";
|
Restart = "on-failure";
|
||||||
RestartSec = 3;
|
RestartSec = 3;
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,65 +1,11 @@
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
fleetFlake,
|
|
||||||
pkgs,
|
|
||||||
age,
|
age,
|
||||||
|
pkgs,
|
||||||
...
|
...
|
||||||
}:
|
}: {
|
||||||
let
|
ccrEmacs.enable = true;
|
||||||
emacs = fleetFlake.packages.${pkgs.system}.emacs;
|
home.sessionVariables.EDITOR = lib.mkForce "emacsclient";
|
||||||
inherit (emacs.passthru) treesitGrammars;
|
systemd.user.services.emacs.Service.EnvironmentFile = age.secrets.chatgpt-token.path;
|
||||||
in
|
home.packages = lib.lists.optional pkgs.stdenv.isx86_64 pkgs.llm-workflow-engine;
|
||||||
{
|
|
||||||
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"
|
|
||||||
'';
|
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,271 +1,17 @@
|
||||||
{
|
{
|
||||||
pkgs,
|
pkgs,
|
||||||
secrets,
|
secrets,
|
||||||
fleetFlake,
|
|
||||||
lib,
|
|
||||||
...
|
...
|
||||||
}:
|
}: {
|
||||||
{
|
|
||||||
programs.mbsync.enable = true;
|
programs.mbsync.enable = true;
|
||||||
programs.msmtp.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 = {
|
programs.notmuch = {
|
||||||
enable = true;
|
enable = true;
|
||||||
new.tags = [ "new" ];
|
hooks.preNew = "mbsync --all";
|
||||||
search.excludeTags = [
|
|
||||||
"trash"
|
|
||||||
"deleted"
|
|
||||||
"spam"
|
|
||||||
];
|
|
||||||
maildir.synchronizeFlags = true;
|
|
||||||
};
|
};
|
||||||
|
services.mbsync.enable = true;
|
||||||
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" ];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
accounts.email = {
|
accounts.email = {
|
||||||
accounts.autistici = {
|
accounts.autistici = {
|
||||||
aerc.enable = true;
|
|
||||||
address = "andrea.ciceri@autistici.org";
|
address = "andrea.ciceri@autistici.org";
|
||||||
gpg = {
|
gpg = {
|
||||||
key = "7A66EEA1E6C598D07D361287A1FC89532D1C565";
|
key = "7A66EEA1E6C598D07D361287A1FC89532D1C565";
|
||||||
|
@ -278,8 +24,6 @@
|
||||||
mbsync = {
|
mbsync = {
|
||||||
enable = true;
|
enable = true;
|
||||||
create = "maildir";
|
create = "maildir";
|
||||||
expunge = "both";
|
|
||||||
remove = "both";
|
|
||||||
};
|
};
|
||||||
msmtp.enable = true;
|
msmtp.enable = true;
|
||||||
notmuch.enable = true;
|
notmuch.enable = true;
|
||||||
|
|
|
@ -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);
|
|
||||||
}
|
|
|
@ -1,72 +1,34 @@
|
||||||
{
|
{
|
||||||
pkgs,
|
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 = {
|
programs.firefox = {
|
||||||
enable = true;
|
enable = true;
|
||||||
nativeMessagingHosts = [
|
package = pkgs.wrapFirefox pkgs.firefox-unwrapped {
|
||||||
pkgs.tridactyl-native
|
extraPolicies = {
|
||||||
pkgs.vdhcoapp
|
ExtensionSettings = {};
|
||||||
];
|
|
||||||
policies = {
|
|
||||||
DisableTelemetry = true;
|
|
||||||
DisableFirefoxStudies = true;
|
|
||||||
EnableTrackingProtection = {
|
|
||||||
Value = true;
|
|
||||||
Locked = true;
|
|
||||||
Cryptomining = true;
|
|
||||||
Fingerprinting = true;
|
|
||||||
EmailTracking = true;
|
|
||||||
};
|
};
|
||||||
HardwareAcceleration = true;
|
nativeMessagingHosts = [pkgs.tridactyl-native pkgs.fx-cast-bridge];
|
||||||
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")
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
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.force = true;
|
||||||
search.default = "google";
|
|
||||||
search.engines = {
|
search.engines = {
|
||||||
"Searx" = {
|
"Searx" = {
|
||||||
urls = [
|
urls = [
|
||||||
|
@ -82,18 +44,11 @@ in
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
extensions = [ ];
|
|
||||||
userChrome = builtins.readFile ./userchrome.css;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
home.sessionVariables = {
|
||||||
xdg.configFile."tridactyl/tridactylrc".text = ''
|
MOZ_ENABLE_WAYLAND = 1;
|
||||||
set editorcmd emacsclient -c %f
|
XDG_CURRENT_DESKTOP = "sway";
|
||||||
|
NIXOS_OZONE_WL = 1;
|
||||||
colors catppuccin
|
|
||||||
'';
|
|
||||||
|
|
||||||
xdg.configFile."tridactyl/themes/catppuccin.css" = {
|
|
||||||
source = ./catppuccin.css;
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -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;
|
|
||||||
}
|
|
|
@ -1,66 +1,31 @@
|
||||||
{
|
{lib, ...}: {
|
||||||
lib,
|
programs.foot = {
|
||||||
config,
|
enable = true;
|
||||||
...
|
server.enable = true;
|
||||||
}:
|
settings = {
|
||||||
lib.mkMerge [
|
main = {
|
||||||
{
|
term = "xterm-256color";
|
||||||
programs.foot = {
|
login-shell = "yes";
|
||||||
enable = true;
|
# Using dpi-aware = "yes" font size is too small on my external monitor
|
||||||
server.enable = true;
|
# Scaling that output in sway is inefficient and make XWayland apps blurred
|
||||||
settings = {
|
dpi-aware = "no";
|
||||||
main = {
|
font = let
|
||||||
term = "xterm-direct";
|
size = "12";
|
||||||
login-shell = "yes";
|
in
|
||||||
dpi-aware = "no";
|
lib.concatStringsSep ", " [
|
||||||
horizontal-letter-offset = "1";
|
"Fira Code:size=${size}"
|
||||||
pad = "1x1";
|
"Symbols Nerd Font:size=${size}"
|
||||||
font =
|
"JoyPixels:size=${size}"
|
||||||
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;
|
|
||||||
};
|
|
||||||
|
|
||||||
key-bindings = {
|
mouse = {
|
||||||
scrollback-up-page = "Control+Shift+k";
|
hide-when-typing = "yes";
|
||||||
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 = {
|
colors = {
|
||||||
hide-when-typing = "yes";
|
background = "282C34";
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
};
|
||||||
(lib.mkIf config.programs.fish.enable {
|
}
|
||||||
programs.fish.functions = {
|
|
||||||
mark_prompt_start = {
|
|
||||||
body = ''echo -en "\e]133;A\e\\"'';
|
|
||||||
onEvent = "fish_prompt";
|
|
||||||
};
|
|
||||||
foot_cmd_start = {
|
|
||||||
body = ''echo -en "\e]133;C\e\\"'';
|
|
||||||
onEvent = "fish_preexec";
|
|
||||||
};
|
|
||||||
foot_cmd_end = {
|
|
||||||
body = ''echo -en "\e]133;D\e\\"'';
|
|
||||||
onEvent = "fish_postexec";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
})
|
|
||||||
]
|
|
||||||
|
|
|
@ -1,4 +0,0 @@
|
||||||
{ pkgs, ... }:
|
|
||||||
{
|
|
||||||
home.packages = [ pkgs.freecad-wayland ];
|
|
||||||
}
|
|
|
@ -1,4 +0,0 @@
|
||||||
{ pkgs, ... }:
|
|
||||||
{
|
|
||||||
home.packages = [ pkgs.gimp ];
|
|
||||||
}
|
|
|
@ -2,8 +2,7 @@
|
||||||
age,
|
age,
|
||||||
username,
|
username,
|
||||||
...
|
...
|
||||||
}:
|
}: {
|
||||||
{
|
|
||||||
services.git-workspace = {
|
services.git-workspace = {
|
||||||
enable = true;
|
enable = true;
|
||||||
frequency = "04:00:00";
|
frequency = "04:00:00";
|
||||||
|
|
|
@ -2,21 +2,13 @@
|
||||||
pkgs,
|
pkgs,
|
||||||
username,
|
username,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
let
|
|
||||||
config = {
|
config = {
|
||||||
name = "Andrea Ciceri";
|
name = "Andrea Ciceri";
|
||||||
email = "andrea.ciceri@autistici.org";
|
email = "andrea.ciceri@autistici.org";
|
||||||
};
|
};
|
||||||
in
|
in {
|
||||||
{
|
imports = [../gitui ../lazygit];
|
||||||
imports = [
|
|
||||||
../gitui
|
|
||||||
../lazygit
|
|
||||||
];
|
|
||||||
|
|
||||||
home.packages = [ pkgs.git-credential-manager ];
|
|
||||||
|
|
||||||
programs.git = {
|
programs.git = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.gitAndTools.gitFull;
|
package = pkgs.gitAndTools.gitFull;
|
||||||
|
@ -27,18 +19,11 @@ in
|
||||||
rebase.autostash = true;
|
rebase.autostash = true;
|
||||||
github.user = "aciceri";
|
github.user = "aciceri";
|
||||||
|
|
||||||
user.signingKey = "/home/${username}/.ssh/id_ed25519";
|
user.signingKey = "/home/${username}/.ssh/id_rsa";
|
||||||
gpg.format = "ssh";
|
gpg.format = "ssh";
|
||||||
commit.gpgsign = true;
|
commit.gpgsign = true;
|
||||||
|
|
||||||
credential.helper = "libsecret";
|
core.editor = "emacsclient";
|
||||||
credential.credentialStore = "cache";
|
|
||||||
|
|
||||||
core = {
|
|
||||||
fsmonitor = true;
|
|
||||||
untrackedcache = true;
|
|
||||||
};
|
|
||||||
fetch.writeCommitGraph = true;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
userName = config.name;
|
userName = config.name;
|
||||||
|
@ -47,8 +32,7 @@ in
|
||||||
extraConfig.url = {
|
extraConfig.url = {
|
||||||
"ssh://git@github.com/".insteadOf = "https://github.com/";
|
"ssh://git@github.com/".insteadOf = "https://github.com/";
|
||||||
# Workaround for https://github.com/rust-lang/cargo/issues/3381#issuecomment-1193730972
|
# 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".insteadOf = "https://github.com/rust-lang/crates.io-index";
|
||||||
"https://github.com/rust-lang/crates.io-index";
|
|
||||||
"https://github.com/RustSec/advisory-db".insteadOf = "https://github.com/RustSec/advisory-db";
|
"https://github.com/RustSec/advisory-db".insteadOf = "https://github.com/RustSec/advisory-db";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
{
|
{
|
||||||
pkgs,
|
pkgs,
|
||||||
lib,
|
lib,
|
||||||
|
config,
|
||||||
...
|
...
|
||||||
}:
|
}: {
|
||||||
{
|
|
||||||
services.gnome-keyring = {
|
services.gnome-keyring = {
|
||||||
enable = false; # Is this broken? https://github.com/nix-community/home-manager/issues/1454
|
enable = false; # Is this broken? https://github.com/nix-community/home-manager/issues/1454
|
||||||
components = lib.mkForce [
|
components = lib.mkForce [
|
||||||
|
@ -12,7 +12,7 @@
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
home.packages = [ pkgs.gcr ]; # Needed in PATH
|
home.packages = [pkgs.gcr]; # Needed in PATH
|
||||||
|
|
||||||
# Workaround
|
# Workaround
|
||||||
wayland.windowManager.hyprland.extraConfig = ''
|
wayland.windowManager.hyprland.extraConfig = ''
|
||||||
|
|
|
@ -1,18 +1,25 @@
|
||||||
{ pkgs, ... }:
|
{pkgs, ...}: {
|
||||||
{
|
|
||||||
services.gpg-agent = {
|
services.gpg-agent = {
|
||||||
enable = true;
|
enable = true;
|
||||||
pinentryPackage = pkgs.pinentry-rofi.override {
|
enableSshSupport = true;
|
||||||
rofi = pkgs.rofi-wayland;
|
sshKeys = ["CE2FD0D9BECBD8876811714925066CC257413416"];
|
||||||
};
|
extraConfig = let
|
||||||
extraConfig = ''
|
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-emacs-pinentry
|
||||||
allow-loopback-pinentry
|
allow-loopback-pinentry
|
||||||
|
pinentry-program ${pinentryRofi}/bin/pinentry-rofi-with-env
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.gpg = {
|
programs.gpg = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = { };
|
settings = {};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,19 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
let
|
|
||||||
originalConfig = config.wayland.windowManager.hyprland.extraConfig;
|
|
||||||
config = builtins.replaceStrings [ "SUPER" ] [ "" ] originalConfig;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
systemd.user.services.headless-hyprland = {
|
|
||||||
Unit.Description = "Headless Hyprland";
|
|
||||||
Service = {
|
|
||||||
Type = "oneshot";
|
|
||||||
ExecStart = ''
|
|
||||||
${lib.getExe config.wayland.windowManager.hyprland.package} --config ${config}
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,16 +1,8 @@
|
||||||
{ pkgs, ... }:
|
|
||||||
{
|
{
|
||||||
home.packages = with pkgs; [
|
|
||||||
zk
|
|
||||||
nixd
|
|
||||||
terraform-ls
|
|
||||||
python3Packages.python-lsp-server
|
|
||||||
nodePackages.typescript-language-server
|
|
||||||
];
|
|
||||||
|
|
||||||
programs.helix = {
|
programs.helix = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
|
theme = "dracula";
|
||||||
editor = {
|
editor = {
|
||||||
indent-guides.render = true;
|
indent-guides.render = true;
|
||||||
cursor-shape = {
|
cursor-shape = {
|
||||||
|
@ -18,36 +10,7 @@
|
||||||
normal = "block";
|
normal = "block";
|
||||||
select = "underline";
|
select = "underline";
|
||||||
};
|
};
|
||||||
color-modes = true;
|
|
||||||
true-color = true; # to make colors coherent when in ssh
|
true-color = true; # to make colors coherent when in ssh
|
||||||
# inline-diagnostic = {
|
|
||||||
# cursor-line = "hint";
|
|
||||||
# other-lines = "error";
|
|
||||||
# };
|
|
||||||
};
|
|
||||||
};
|
|
||||||
languages = {
|
|
||||||
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" ];
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -3,16 +3,15 @@
|
||||||
pkgs,
|
pkgs,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
let
|
screenshotScript = pkgs.writeShellScript "screenshot.sh" ''
|
||||||
screenshotScript = pkgs.writeShellScriptBin "screenshot.sh" ''
|
|
||||||
filename="$HOME/shots/$(date --iso-8601=seconds).png"
|
filename="$HOME/shots/$(date --iso-8601=seconds).png"
|
||||||
coords="$(${pkgs.slurp}/bin/slurp)"
|
coords="$(${pkgs.slurp}/bin/slurp)"
|
||||||
${pkgs.grim}/bin/grim -t png -g "$coords" "$filename"
|
${pkgs.grim}/bin/grim -t png -g "$coords" "$filename"
|
||||||
wl-copy -t image/png < $filename
|
wl-copy -t image/png < $filename
|
||||||
'';
|
'';
|
||||||
hyprland = config.wayland.windowManager.hyprland.package;
|
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 [[ "$(${hyprland}/bin/hyprctl monitors) | grep '\sDP-[0-9]+'" ]]; then
|
||||||
if [[ $1 == "open" ]]; then
|
if [[ $1 == "open" ]]; then
|
||||||
${hyprland}/bin/hyprctl keyword monitor "eDP-1,1920x1080,3760x230,1"
|
${hyprland}/bin/hyprctl keyword monitor "eDP-1,1920x1080,3760x230,1"
|
||||||
|
@ -21,26 +20,19 @@ let
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
'';
|
'';
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
imports = [
|
imports = [
|
||||||
./hyprpaper.nix
|
./hyprpaper.nix
|
||||||
../waybar
|
../waybar
|
||||||
../swayidle
|
../swayidle
|
||||||
../gammastep
|
# ../mako
|
||||||
../swaync
|
../swaync
|
||||||
../foot
|
../gammastep
|
||||||
|
# ../kitty
|
||||||
|
../wezterm
|
||||||
];
|
];
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [wl-clipboard waypipe];
|
||||||
wl-clipboard
|
|
||||||
waypipe
|
|
||||||
switchMonitorScript
|
|
||||||
screenshotScript
|
|
||||||
hyprpaper
|
|
||||||
fuzzel
|
|
||||||
brightnessctl
|
|
||||||
];
|
|
||||||
|
|
||||||
systemd.user.sessionVariables = {
|
systemd.user.sessionVariables = {
|
||||||
NIXOS_OZONE_WL = "1";
|
NIXOS_OZONE_WL = "1";
|
||||||
|
@ -55,41 +47,162 @@ in
|
||||||
|
|
||||||
gtk = {
|
gtk = {
|
||||||
enable = true;
|
enable = true;
|
||||||
theme = {
|
font.name = "Sans,Symbols Nerd Font";
|
||||||
name = "Catppuccin-GTK-Purple-Dark-Compact";
|
|
||||||
package = pkgs.magnetic-catppuccin-gtk.override {
|
|
||||||
accent = [ "purple" ];
|
|
||||||
shade = "dark";
|
|
||||||
size = "compact";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
iconTheme = {
|
iconTheme = {
|
||||||
name = "Adwaita";
|
name = "Adwaita";
|
||||||
package = pkgs.adwaita-icon-theme;
|
package = pkgs.gnome.adwaita-icon-theme;
|
||||||
};
|
|
||||||
cursorTheme = {
|
|
||||||
name = "catppuccin-mocha-sapphire";
|
|
||||||
package = pkgs.catppuccin-cursors;
|
|
||||||
size = 38;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
home.file.".icons/catppuccin-mocha-sapphire" = {
|
services.kanshi = {
|
||||||
source = "${pkgs.catppuccin-cursors.mochaSapphire}/share/icons/catppuccin-mocha-sapphire-cursors";
|
|
||||||
recursive = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
qt = {
|
|
||||||
enable = true;
|
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 = {
|
wayland.windowManager.hyprland = {
|
||||||
enable = false;
|
enable = true;
|
||||||
plugins = with pkgs.hyprlandPlugins; [
|
extraConfig = ''
|
||||||
hy3
|
input {
|
||||||
hyprspace
|
touchpad {
|
||||||
];
|
disable_while_typing = true # set to true while playing
|
||||||
# TODO migrate to structured options
|
}
|
||||||
extraConfig = builtins.readFile ./hyprland.conf;
|
}
|
||||||
|
|
||||||
|
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 = SUPER, b, exec, firefox
|
||||||
|
bind = SUPER SHIFT, b , exec, ${pkgs.waypipe}/bin/waypipe --compress lz4=10 ssh mothership.fleet firefox
|
||||||
|
bind = SUPER SHIFT, RETURN, exec, ${config.programs.wezterm.package}/bin/wezterm ssh mothership.fleet
|
||||||
|
bind = SUPER, m, exec, ${config.programs.wezterm.package}/bin/wezterm start -- mosh mothership.fleet
|
||||||
|
bind = SUPER, t, exec, ${config.programs.wezterm.package}/bin/wezterm
|
||||||
|
bind = SUPER, RETURN, exec, emacsclient -c --eval "(ccr/start-eshell)"
|
||||||
|
bind = SUPER, x, exec, emacsclient -c
|
||||||
|
bind = SUPER SHIFT, n, exec, emacsclient --eval '(ccr/org-capture "n")' -c -F '((name . "floating"))'
|
||||||
|
bind = SUPER SHIFT, w, exec, emacsclient --eval '(ccr/org-capture "j")' -c -F '((name . "floating"))'
|
||||||
|
bind = SUPER, y, exec, ${pkgs.waypipe}/bin/waypipe --compress lz4=10 ssh picard.fleet emacsclient -c
|
||||||
|
bind = SUPER, d, exec, ${pkgs.fuzzel}/bin/fuzzel --background-color=253559cc --border-radius=5 --border-width=0
|
||||||
|
bind = SUPER, s, exec, ${screenshotScript}
|
||||||
|
bind = , XF86MonBrightnessUp, exec, ${pkgs.brightnessctl}/bin/brightnessctl s +5%
|
||||||
|
bind = , XF86MonBrightnessDown, exec, ${pkgs.brightnessctl}/bin/brightnessctl s 5%-
|
||||||
|
bind = SUPER, code:60, exec, ${pkgs.brightnessctl}/bin/brightnessctl s +5%
|
||||||
|
bind = SUPER, code:59, exec, ${pkgs.brightnessctl}/bin/brightnessctl s 5%-
|
||||||
|
bind = SUPER SHIFT, t, exec, ${config.services.swaync.package}/bin/swaync-client -t
|
||||||
|
|
||||||
|
|
||||||
|
bind = SUPER SHIFT, q, killactive
|
||||||
|
bind = SUPER SHIFT, f, fullscreen, 0
|
||||||
|
bind = SUPER SHIFT, e, exit
|
||||||
|
|
||||||
|
bind = SUPER, h, movefocus, l
|
||||||
|
bind = SUPER, l, movefocus, r
|
||||||
|
bind = SUPER, k, movefocus, u
|
||||||
|
bind = SUPER, j, movefocus, d
|
||||||
|
|
||||||
|
bind = SUPER SHIFT, h, movewindow, l
|
||||||
|
bind = SUPER SHIFT, l, movewindow, r
|
||||||
|
bind = SUPER SHIFT, k, movewindow, u
|
||||||
|
bind = SUPER SHIFT, j ,movewindow, d
|
||||||
|
|
||||||
|
bind = SUPER, p, movecurrentworkspacetomonitor, r
|
||||||
|
bind = SUPER, o, movecurrentworkspacetomonitor, l
|
||||||
|
|
||||||
|
bindm=ALT,mouse:272,movewindow
|
||||||
|
|
||||||
|
bind = SUPER, 1, workspace, 1
|
||||||
|
bind = SUPER, 2, workspace, 2
|
||||||
|
bind = SUPER, 3, workspace, 3
|
||||||
|
bind = SUPER, 4, workspace, 4
|
||||||
|
bind = SUPER, 5, workspace, 5
|
||||||
|
bind = SUPER, 6, workspace, 6
|
||||||
|
bind = SUPER, 7, workspace, 7
|
||||||
|
bind = SUPER, 8, workspace, 8
|
||||||
|
bind = SUPER, 9, workspace, 9
|
||||||
|
bind = SUPER, 0, workspace, 10
|
||||||
|
|
||||||
|
bind = SUPER SHIFT, 1, movetoworkspace, 1
|
||||||
|
bind = SUPER SHIFT, 2, movetoworkspace, 2
|
||||||
|
bind = SUPER SHIFT, 3, movetoworkspace, 3
|
||||||
|
bind = SUPER SHIFT, 4, movetoworkspace, 4
|
||||||
|
bind = SUPER SHIFT, 5, movetoworkspace, 5
|
||||||
|
bind = SUPER SHIFT, 6, movetoworkspace, 6
|
||||||
|
bind = SUPER SHIFT, 7, movetoworkspace, 7
|
||||||
|
bind = SUPER SHIFT, 8, movetoworkspace, 8
|
||||||
|
bind = SUPER SHIFT, 9, movetoworkspace, 9
|
||||||
|
bind = SUPER 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
|
||||||
|
}
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -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
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,9 +1,7 @@
|
||||||
let
|
let
|
||||||
wallpaper = ./wallpaper.png;
|
wallpaper = ./wallpaper.png;
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
xdg.configFile."hypr/hyprpaper.conf".text = ''
|
xdg.configFile."hypr/hyprpaper.conf".text = ''
|
||||||
splash = false
|
|
||||||
preload = ${wallpaper}
|
preload = ${wallpaper}
|
||||||
wallpaper = eDP-1,${wallpaper}
|
wallpaper = eDP-1,${wallpaper}
|
||||||
wallpaper = DP-1,${wallpaper}
|
wallpaper = DP-1,${wallpaper}
|
||||||
|
|
|
@ -1,4 +0,0 @@
|
||||||
{ fleetFlake, pkgs, ... }:
|
|
||||||
{
|
|
||||||
home.packages = [ fleetFlake.packages.${pkgs.system}.ib-tws ];
|
|
||||||
}
|
|
|
@ -1,3 +0,0 @@
|
||||||
{
|
|
||||||
programs.imv.enable = true;
|
|
||||||
}
|
|
|
@ -1,4 +1,3 @@
|
||||||
{ pkgs, ... }:
|
{pkgs, ...}: {
|
||||||
{
|
home.packages = [pkgs.kicad-small];
|
||||||
home.packages = [ pkgs.kicad-small ];
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
{ ... }:
|
{pkgs, ...}: {
|
||||||
{
|
|
||||||
programs.kitty = {
|
programs.kitty = {
|
||||||
enable = true;
|
enable = true;
|
||||||
font = {
|
font = {
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
{ pkgs, ... }:
|
{pkgs, ...}: {
|
||||||
{
|
|
||||||
programs.lazygit = {
|
programs.lazygit = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
|
|
|
@ -1,4 +0,0 @@
|
||||||
{ pkgs, ... }:
|
|
||||||
{
|
|
||||||
home.packages = [ pkgs.libreoffice ];
|
|
||||||
}
|
|
|
@ -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 ];
|
|
||||||
}
|
|
|
@ -1,4 +1,3 @@
|
||||||
{ pkgs, ... }:
|
{pkgs, ...}: {
|
||||||
{
|
home.packages = [pkgs.lutris];
|
||||||
home.packages = [ pkgs.lutris ];
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
{ pkgs, ... }:
|
{pkgs, ...}: {
|
||||||
{
|
home.packages = [pkgs.monero-gui];
|
||||||
home.packages = [ pkgs.monero-gui ];
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
{ pkgs, ... }:
|
{pkgs, ...}: {
|
||||||
{
|
home.packages = [pkgs.moonlight-qt];
|
||||||
home.packages = [ pkgs.moonlight-qt ];
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
# TODO: use upstream ytmusic when updated: https://github.com/OzymandiasTheGreat/mopidy-ytmusic/issues/68
|
# TODO: use upstream ytmusic when updated: https://github.com/OzymandiasTheGreat/mopidy-ytmusic/issues/68
|
||||||
{ pkgs, ... }:
|
{pkgs, ...}: let
|
||||||
let
|
|
||||||
ytmusicapi = pkgs.python310Packages.buildPythonPackage rec {
|
ytmusicapi = pkgs.python310Packages.buildPythonPackage rec {
|
||||||
pname = "ytmusicapi";
|
pname = "ytmusicapi";
|
||||||
version = "0.24.0";
|
version = "0.24.0";
|
||||||
|
@ -39,20 +38,14 @@ let
|
||||||
python310Packages.pytube
|
python310Packages.pytube
|
||||||
];
|
];
|
||||||
|
|
||||||
pythonImportsCheck = [ "mopidy_ytmusic" ];
|
pythonImportsCheck = ["mopidy_ytmusic"];
|
||||||
|
|
||||||
doCheck = false;
|
doCheck = false;
|
||||||
};
|
};
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
services.mopidy = {
|
services.mopidy = {
|
||||||
enable = true;
|
enable = true;
|
||||||
extensionPackages =
|
extensionPackages = [mopidy-ytmusic] ++ (with pkgs; [mopidy-mpd mopidy-mpris]);
|
||||||
[ mopidy-ytmusic ]
|
|
||||||
++ (with pkgs; [
|
|
||||||
mopidy-mpd
|
|
||||||
mopidy-mpris
|
|
||||||
]);
|
|
||||||
settings = {
|
settings = {
|
||||||
mpd = {
|
mpd = {
|
||||||
enabled = true;
|
enabled = true;
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
{ pkgs, ... }:
|
{pkgs, ...}: {
|
||||||
{
|
home.packages = [pkgs.nheko];
|
||||||
home.packages = [ pkgs.nheko ];
|
|
||||||
|
|
||||||
# systemd.user.services.nheko = {
|
# systemd.user.services.nheko = {
|
||||||
# Install.WantedBy = ["graphical-session.target"];
|
# Install.WantedBy = ["graphical-session.target"];
|
||||||
|
|
|
@ -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; }
|
|
||||||
}
|
|
|
@ -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 ];
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,27 +1,24 @@
|
||||||
{
|
{
|
||||||
|
config,
|
||||||
pkgs,
|
pkgs,
|
||||||
fleetFlake,
|
fleetFlake,
|
||||||
|
lib,
|
||||||
...
|
...
|
||||||
}:
|
}: {
|
||||||
{
|
|
||||||
programs.nix-index.enable = true;
|
programs.nix-index.enable = true;
|
||||||
|
|
||||||
systemd.user.services.nix-index-update = {
|
systemd.user.services.nix-index-update = {
|
||||||
Unit = {
|
Unit = {Description = "Update nix-index";};
|
||||||
Description = "Update nix-index";
|
|
||||||
};
|
|
||||||
|
|
||||||
Service = {
|
Service = {
|
||||||
CPUSchedulingPolicy = "idle";
|
CPUSchedulingPolicy = "idle";
|
||||||
IOSchedulingClass = "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 = {
|
systemd.user.timers.nix-index-update = {
|
||||||
Unit = {
|
Unit = {Description = "Update nix-index";};
|
||||||
Description = "Update nix-index";
|
|
||||||
};
|
|
||||||
|
|
||||||
Timer = {
|
Timer = {
|
||||||
Unit = "nix-index-update.service";
|
Unit = "nix-index-update.service";
|
||||||
|
@ -29,8 +26,6 @@
|
||||||
Persistent = true;
|
Persistent = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
Install = {
|
Install = {WantedBy = ["timers.target"];};
|
||||||
WantedBy = [ "timers.target" ];
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,10 +1,6 @@
|
||||||
{ pkgs, ... }:
|
{pkgs, ...}: {
|
||||||
{
|
|
||||||
programs.obs-studio = {
|
programs.obs-studio = {
|
||||||
enable = true;
|
enable = true;
|
||||||
plugins = with pkgs.obs-studio-plugins; [
|
plugins = with pkgs.obs-studio-plugins; [wlrobs input-overlay];
|
||||||
wlrobs
|
|
||||||
input-overlay
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
{ pkgs, ... }:
|
{pkgs, ...}: {
|
||||||
{
|
home.packages = [pkgs.openscad];
|
||||||
home.packages = [ pkgs.openscad ];
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,27 +1,13 @@
|
||||||
{ pkgs, lib, ... }:
|
|
||||||
{
|
{
|
||||||
services.pantalaimon = {
|
services.pantalaimon = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.pantalaimon.overrideAttrs {
|
|
||||||
pytestCheckPhase = "echo skip pytest";
|
|
||||||
};
|
|
||||||
settings = {
|
settings = {
|
||||||
Default = {
|
|
||||||
LogLevel = "Debug";
|
|
||||||
SSL = true;
|
|
||||||
};
|
|
||||||
local-matrix = {
|
local-matrix = {
|
||||||
Homeserver = "https://matrix.aciceri.dev";
|
Homeserver = "https://nixos.dev";
|
||||||
# Homeserver = "https://matrix.nixos.dev/_matrix/client";
|
ListenAddress = "127.0.0.1";
|
||||||
# Homeserver = "https://matrix.nixos.dev";
|
|
||||||
ListenAddress = "localhost";
|
|
||||||
ListenPort = 8008;
|
ListenPort = 8008;
|
||||||
# SSL = false;
|
|
||||||
UseKeyring = false;
|
|
||||||
# IgnoreVerification = true;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
systemd.user.services.pantalaimon.Unit.Requires = ["dbus.socket"];
|
||||||
systemd.user.services.pantalaimon.Unit.Requires = [ "dbus.socket" ];
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,22 +2,12 @@
|
||||||
pkgs,
|
pkgs,
|
||||||
username,
|
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 = {
|
programs.password-store = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
PASSWORD_STORE_DIR = "/home/${username}/.password-store";
|
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 ];
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,8 +2,7 @@
|
||||||
pkgs,
|
pkgs,
|
||||||
config,
|
config,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
let
|
|
||||||
inherit (config.programs.qutebrowser) settings;
|
inherit (config.programs.qutebrowser) settings;
|
||||||
websites = {
|
websites = {
|
||||||
searx = "https://searx.be";
|
searx = "https://searx.be";
|
||||||
|
@ -17,8 +16,7 @@ let
|
||||||
less-dark-white = "#cccccc";
|
less-dark-white = "#cccccc";
|
||||||
blue = "#0000ff";
|
blue = "#0000ff";
|
||||||
};
|
};
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
programs.qutebrowser = {
|
programs.qutebrowser = {
|
||||||
enable = true;
|
enable = true;
|
||||||
searchEngines = with websites; {
|
searchEngines = with websites; {
|
||||||
|
@ -36,15 +34,14 @@ in
|
||||||
",l" = ''config-cycle spellcheck.languages [" it-IT "] [" en-US "]'';
|
",l" = ''config-cycle spellcheck.languages [" it-IT "] [" en-US "]'';
|
||||||
};
|
};
|
||||||
insert = {
|
insert = {
|
||||||
"<Ctrl-p>" =
|
"<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'';
|
||||||
''spawn --userscript qute-pass --dmenu-invocation '${pkgs.fuzzel}/bin/fuzzel --background-color=253559cc --border-radius=5 --border-width=0 -d' --password-only --unfiltered'';
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
settings = {
|
settings = {
|
||||||
auto_save.session = true;
|
auto_save.session = true;
|
||||||
url = with websites; {
|
url = with websites; {
|
||||||
default_page = searx;
|
default_page = searx;
|
||||||
start_pages = [ searx ];
|
start_pages = [searx];
|
||||||
};
|
};
|
||||||
editor.command = [
|
editor.command = [
|
||||||
"emacsclient"
|
"emacsclient"
|
||||||
|
@ -111,13 +108,15 @@ in
|
||||||
};
|
};
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
fuzzel
|
fuzzel
|
||||||
(makeDesktopItem {
|
(
|
||||||
name = "qutebrowser";
|
makeDesktopItem {
|
||||||
exec = "qutebrowser %u";
|
name = "qutebrowser";
|
||||||
comment = "Qutebrowser";
|
exec = "qutebrowser %u";
|
||||||
desktopName = "qutebrowser";
|
comment = "Qutebrowser";
|
||||||
type = "Application";
|
desktopName = "qutebrowser";
|
||||||
mimeTypes = [ "x-scheme-handler/https" ];
|
type = "Application";
|
||||||
})
|
mimeTypes = ["x-scheme-handler/https"];
|
||||||
|
}
|
||||||
|
)
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -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 ];
|
|
||||||
}
|
|
|
@ -1,4 +1,3 @@
|
||||||
{ pkgs, ... }:
|
{pkgs, ...}: {
|
||||||
{
|
home.packages = [pkgs.remmina];
|
||||||
home.packages = [ pkgs.remmina ];
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +0,0 @@
|
||||||
{ pkgs, ... }:
|
|
||||||
{
|
|
||||||
home.packages = [
|
|
||||||
(builtins.getFlake "github:NixOS/nixpkgs/063dece00c5a77e4a0ea24e5e5a5bd75232806f8")
|
|
||||||
.legacyPackages.${pkgs.system}.sdrangel
|
|
||||||
pkgs.kdePackages.qtlocation
|
|
||||||
];
|
|
||||||
}
|
|
|
@ -1,29 +1,12 @@
|
||||||
{
|
{
|
||||||
|
config,
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
age,
|
age,
|
||||||
hostname,
|
|
||||||
config,
|
|
||||||
username,
|
|
||||||
...
|
...
|
||||||
}:
|
}: {
|
||||||
{
|
|
||||||
programs.bat.enable = true;
|
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 = {
|
programs.direnv = {
|
||||||
enable = true;
|
enable = true;
|
||||||
config = {
|
config = {
|
||||||
|
@ -32,47 +15,103 @@
|
||||||
nix-direnv.enable = true;
|
nix-direnv.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.lsd = {
|
# programs.exa = {
|
||||||
enable = true;
|
# enable = false;
|
||||||
};
|
# enableAliases = true;
|
||||||
|
# };
|
||||||
|
|
||||||
|
# programs.fzf.enable = false;
|
||||||
|
|
||||||
programs.vim.enable = true;
|
programs.vim.enable = true;
|
||||||
|
|
||||||
programs.ssh = {
|
programs.ssh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
controlMaster = "auto";
|
controlMaster = "auto";
|
||||||
|
controlPersist = "10m";
|
||||||
};
|
};
|
||||||
|
|
||||||
systemd.user.services.atuind = {
|
# programs.starship = {
|
||||||
Unit.Description = "Atuin daemon";
|
# enable = false;
|
||||||
Install = {
|
# settings = {
|
||||||
WantedBy = [ "default.target" ];
|
# character = {
|
||||||
};
|
# success_symbol = "[👌](bold green)";
|
||||||
Service = {
|
# error_symbol = "[🤌](bold red)";
|
||||||
ExecStartPre = "${lib.getExe' pkgs.toybox "rm"} -f ${config.programs.atuin.settings.daemon.socket_path}";
|
# };
|
||||||
ExecStart = "${lib.getExe pkgs.atuin} daemon";
|
# nix_shell = {
|
||||||
};
|
# symbol = "❄ ";
|
||||||
};
|
# };
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
|
||||||
programs.atuin = {
|
# Playing with it sometimes
|
||||||
enable = false; # FIXME broken on bash: https://github.com/nix-community/home-manager/issues/5958
|
# programs.nushell = {
|
||||||
settings = {
|
# enable = false;
|
||||||
daemon = {
|
# configFile.text = ''
|
||||||
enabled = true;
|
# let carapace_completer = {|spans|
|
||||||
socket_path = "/home/${username}/.local/share/atuin/atuin.sock"; # FIXME using ~ or $HOME doesn't work: https://github.com/atuinsh/atuin/issues/2289
|
# 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=";
|
||||||
};
|
};
|
||||||
auto_sync = true;
|
in "${theme}/themes/Dracula\ Official.theme";
|
||||||
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;
|
enable = true;
|
||||||
initExtra = lib.optionalString (builtins.hasAttr "cachix-personal-token" age.secrets) ''
|
shellInit = ''
|
||||||
|
fish_config theme choose "dracula"
|
||||||
export CACHIX_AUTH_TOKEN=$(cat ${age.secrets.cachix-personal-token.path})
|
export CACHIX_AUTH_TOKEN=$(cat ${age.secrets.cachix-personal-token.path})
|
||||||
'';
|
'';
|
||||||
shellAliases = {
|
shellAliases = {
|
||||||
|
@ -80,65 +119,95 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.zoxide.enable = true;
|
# programs.zsh = {
|
||||||
programs.thefuck.enable = true;
|
# enable = false; # Playing xswith fish at the moment
|
||||||
programs.oh-my-posh = {
|
# enableAutosuggestions = true;
|
||||||
enable = true;
|
# enableCompletion = true;
|
||||||
useTheme = "catppuccin_mocha";
|
# enableSyntaxHighlighting = true;
|
||||||
};
|
# enableVteIntegration = true;
|
||||||
|
# autocd = true;
|
||||||
programs.zellij.enableBashIntegration = false;
|
# oh-my-zsh = {
|
||||||
|
# enable = true;
|
||||||
# programs.fish = {
|
# plugins = [
|
||||||
# enable = true;
|
# "ag"
|
||||||
|
# "cabal"
|
||||||
|
# "colored-man-pages"
|
||||||
|
# "colorize"
|
||||||
|
# "command-not-found"
|
||||||
|
# "fzf"
|
||||||
|
# "git"
|
||||||
|
# "nomad"
|
||||||
|
# "pass"
|
||||||
|
# "python"
|
||||||
|
# "sudo"
|
||||||
|
# "terraform"
|
||||||
|
# "thefuck"
|
||||||
|
# ];
|
||||||
|
# };
|
||||||
# plugins = [
|
# plugins = [
|
||||||
# # {
|
|
||||||
# # name = "fifc";
|
|
||||||
# # src = pkgs.fishPlugins.fifc.src;
|
|
||||||
# # }
|
|
||||||
# {
|
# {
|
||||||
# name = "z";
|
# name = "fzf-tab";
|
||||||
# src = pkgs.fishPlugins.z.src;
|
# 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 = {
|
# shellAliases = {
|
||||||
# "cat" = "bat";
|
# "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 =
|
home.packages = with pkgs; [
|
||||||
with pkgs;
|
thefuck
|
||||||
[
|
htop-vim
|
||||||
dig.dnsutils
|
bottom
|
||||||
lsof
|
dig.dnsutils
|
||||||
comma
|
lsof
|
||||||
ffmpeg-headless
|
zsh-completions
|
||||||
jless
|
nix-zsh-completions
|
||||||
nix-melt
|
comma
|
||||||
nurl
|
# carapace # used by nushell
|
||||||
jq
|
nil # TODO probably not best place
|
||||||
yq-go
|
terraform-lsp # TODO probably not best place
|
||||||
procs
|
python3Packages.jedi-language-server # TODO probably not best place
|
||||||
chafa
|
nodePackages.typescript-language-server # TODO probably not best place
|
||||||
hexyl
|
cntr # TODO probably not best place
|
||||||
broot
|
# nom # FIXME disable on aarch64-linux, breaks everything :(
|
||||||
file
|
];
|
||||||
]
|
|
||||||
++ (lib.optionals
|
|
||||||
(builtins.elem hostname [
|
|
||||||
"kirk"
|
|
||||||
"picard"
|
|
||||||
])
|
|
||||||
[
|
|
||||||
cntr # TODO probably not best place
|
|
||||||
]
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
{ pkgs, ... }:
|
{pkgs, ...}: {
|
||||||
{
|
home.packages = [pkgs.slack];
|
||||||
home.packages = [ pkgs.slack ];
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,24 +1,18 @@
|
||||||
{
|
{pkgs, ...}: let
|
||||||
lib,
|
spotify-adblock = pkgs.nur.repos.nltch.spotify-adblock;
|
||||||
pkgs,
|
in {
|
||||||
...
|
home.packages = [spotify-adblock];
|
||||||
}:
|
|
||||||
let
|
|
||||||
spotify-adblocked = pkgs.callPackage ../../packages/spotify-adblocked { };
|
|
||||||
in
|
|
||||||
{
|
|
||||||
home.packages = [ spotify-adblocked ];
|
|
||||||
|
|
||||||
systemd.user.services.spotify-adblocked = {
|
systemd.user.services.spotify-adblocked = {
|
||||||
Install.WantedBy = [ "graphical-session.target" ];
|
Install.WantedBy = ["graphical-session.target"];
|
||||||
|
|
||||||
Unit = {
|
Unit = {
|
||||||
Description = "Spotify";
|
Description = "Spotify";
|
||||||
PartOf = [ "graphical-session.target" ];
|
PartOf = ["graphical-session.target"];
|
||||||
};
|
};
|
||||||
|
|
||||||
Service = {
|
Service = {
|
||||||
ExecStart = lib.getExe spotify-adblocked;
|
ExecStart = "${spotify-adblock}/bin/spotify";
|
||||||
Restart = "on-failure";
|
Restart = "on-failure";
|
||||||
RestartSec = 3;
|
RestartSec = 3;
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
{ pkgs, ... }:
|
{pkgs, ...}: {
|
||||||
{
|
home.packages = [pkgs.steam-run];
|
||||||
home.packages = [ pkgs.steam-run ];
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,8 +3,7 @@
|
||||||
lib,
|
lib,
|
||||||
config,
|
config,
|
||||||
...
|
...
|
||||||
}:
|
}: {
|
||||||
{
|
|
||||||
imports = [
|
imports = [
|
||||||
../waybar
|
../waybar
|
||||||
../swayidle
|
../swayidle
|
||||||
|
@ -13,7 +12,7 @@
|
||||||
../kitty
|
../kitty
|
||||||
];
|
];
|
||||||
config = {
|
config = {
|
||||||
home.packages = with pkgs; [ wl-clipboard ];
|
home.packages = with pkgs; [wl-clipboard];
|
||||||
|
|
||||||
systemd.user.sessionVariables = {
|
systemd.user.sessionVariables = {
|
||||||
NIXOS_OZONE_WL = "1";
|
NIXOS_OZONE_WL = "1";
|
||||||
|
@ -28,109 +27,106 @@
|
||||||
|
|
||||||
gtk = {
|
gtk = {
|
||||||
enable = true;
|
enable = true;
|
||||||
font.name = lib.mkForce "Sans,Symbols Nerd Font";
|
font.name = "Sans,Symbols Nerd Font";
|
||||||
iconTheme = {
|
iconTheme = {
|
||||||
name = "Adwaita";
|
name = "Adwaita";
|
||||||
package = pkgs.adwaita-icon-theme;
|
package = pkgs.gnome.adwaita-icon-theme;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
wayland = {
|
wayland = {
|
||||||
windowManager.sway =
|
windowManager.sway = let
|
||||||
let
|
modifier = "Mod4";
|
||||||
modifier = "Mod4";
|
in {
|
||||||
in
|
enable = true;
|
||||||
{
|
wrapperFeatures.gtk = true;
|
||||||
enable = true;
|
config = {
|
||||||
wrapperFeatures.gtk = true;
|
inherit modifier;
|
||||||
config = {
|
menu = "${pkgs.fuzzel}/bin/fuzzel --background-color=253559cc --border-radius=5 --border-width=0";
|
||||||
inherit modifier;
|
output = let
|
||||||
menu = "${pkgs.fuzzel}/bin/fuzzel --background-color=253559cc --border-radius=5 --border-width=0";
|
bg = "${./wallpaper.svg} fill";
|
||||||
output =
|
in {
|
||||||
let
|
DP-2 = {
|
||||||
bg = "${./wallpaper.svg} fill";
|
res = "1900x1200";
|
||||||
in
|
pos = "0 0";
|
||||||
{
|
inherit bg;
|
||||||
DP-2 = {
|
transform = "90";
|
||||||
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";
|
|
||||||
};
|
};
|
||||||
assigns = {
|
DP-1 = {
|
||||||
"1" = [
|
res = "2560x1440";
|
||||||
{ title = ".*Mozilla Firefox$"; }
|
pos = "1200 230";
|
||||||
{ title = ".*qutebrowser$"; }
|
inherit bg;
|
||||||
];
|
|
||||||
"2" = [ { title = "^((?!qutebrowser-editor).)*Emacs$"; } ];
|
|
||||||
"3" = [ { title = "Slack.*"; } ];
|
|
||||||
"9" = [ { title = "^Element.*"; } ];
|
|
||||||
};
|
};
|
||||||
floating.criteria = [
|
eDP-1 = {
|
||||||
{ title = "MetaMask Notification.*"; }
|
res = "1920x1080";
|
||||||
{ title = "Volume Control"; } # pavucontrol
|
pos = "3760 230";
|
||||||
{ title = "^.*editor - qutebrowser$"; } # Emacs opened by qutebrowser
|
inherit bg;
|
||||||
];
|
|
||||||
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
|
|
||||||
'';
|
|
||||||
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 = ''
|
terminal = "${config.programs.kitty.package}/bin/kitty ${config.programs.kitty.package}/bin/kitty +kitten ssh mothership.fleet";
|
||||||
bindsym ${modifier}+p move workspace to output right
|
bars = [
|
||||||
'';
|
{
|
||||||
xwayland = true;
|
mode = "hide";
|
||||||
systemdIntegration = true;
|
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;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,50 +2,65 @@
|
||||||
pkgs,
|
pkgs,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}:
|
}: {
|
||||||
{
|
services.swayidle = let
|
||||||
services.swayidle =
|
# Downgraded due to
|
||||||
let
|
# https://github.com/mortie/swaylock-effects/issues/95
|
||||||
swaylockWithArgs = pkgs.writeScriptBin "swaylockWithArgs" ''
|
# swaylock-effects = pkgs.swaylock-effects.overrideAttrs (_: {
|
||||||
${pkgs.swaylock-effects}/bin/swaylock \
|
# version = "jirutka-master";
|
||||||
--daemonize \
|
# src = pkgs.fetchFromGitHub {
|
||||||
--screenshots \
|
# owner = "jirutka";
|
||||||
--clock \
|
# repo = "swaylock-effects";
|
||||||
--indicator \
|
# rev = "7c5681ce96587ce3090c6698501faeccdfdc157d";
|
||||||
--indicator-radius 100 \
|
# sha256 = "sha256-09Kq90wIIF9lPjiY2anf9MSgi/EqeXKXW1mFmhxA/aM";
|
||||||
--indicator-thickness 7 \
|
# };
|
||||||
--effect-blur 7x5 \
|
# });
|
||||||
--effect-vignette 0.5:0.5 \
|
swaylockWithArgs = pkgs.writeScriptBin "swaylockWithArgs" ''
|
||||||
--ring-color bb00cc \
|
${pkgs.swaylock-effects}/bin/swaylock \
|
||||||
--key-hl-color 880033 \
|
--daemonize \
|
||||||
--line-color 00000000 \
|
--screenshots \
|
||||||
--inside-color 00000088 \
|
--clock \
|
||||||
--separator-color 00000000 \
|
--indicator \
|
||||||
--fade-in 0.2
|
--indicator-radius 100 \
|
||||||
'';
|
--indicator-thickness 7 \
|
||||||
swaylockCommand = "${swaylockWithArgs}/bin/swaylockWithArgs";
|
--effect-blur 7x5 \
|
||||||
in
|
--effect-vignette 0.5:0.5 \
|
||||||
{
|
--ring-color bb00cc \
|
||||||
enable = true;
|
--key-hl-color 880033 \
|
||||||
events = [
|
--line-color 00000000 \
|
||||||
{
|
--inside-color 00000088 \
|
||||||
event = "before-sleep";
|
--separator-color 00000000 \
|
||||||
command = swaylockCommand;
|
--grace 2 \
|
||||||
}
|
--fade-in 0.2
|
||||||
{
|
'';
|
||||||
event = "lock";
|
swaylockCommand = "${swaylockWithArgs}/bin/swaylockWithArgs";
|
||||||
command = swaylockCommand;
|
in {
|
||||||
}
|
enable = true;
|
||||||
];
|
events = [
|
||||||
timeouts = [
|
{
|
||||||
{
|
event = "before-sleep";
|
||||||
timeout = 600;
|
command = swaylockCommand;
|
||||||
command = swaylockCommand;
|
}
|
||||||
}
|
{
|
||||||
{
|
event = "lock";
|
||||||
timeout = 720;
|
command = swaylockCommand;
|
||||||
command = "${pkgs.systemd}/bin/systemctl suspend";
|
}
|
||||||
}
|
];
|
||||||
];
|
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"];
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +0,0 @@
|
||||||
{ pkgs, ... }:
|
|
||||||
{
|
|
||||||
home.packages = [ pkgs.teams-for-linux ];
|
|
||||||
}
|
|
|
@ -1,14 +1,14 @@
|
||||||
{
|
{
|
||||||
imports = [ ../email ];
|
imports = [../email];
|
||||||
config = {
|
config = {
|
||||||
accounts.email.accounts = {
|
accounts.email.accounts = {
|
||||||
autistici.thunderbird = {
|
autistici.thunderbird = {
|
||||||
enable = true;
|
enable = true;
|
||||||
profiles = [ "default" ];
|
profiles = ["default"];
|
||||||
};
|
};
|
||||||
mlabs.thunderbird = {
|
mlabs.thunderbird = {
|
||||||
enable = true;
|
enable = true;
|
||||||
profiles = [ "default" ];
|
profiles = ["default"];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
programs.thunderbird = {
|
programs.thunderbird = {
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
{ pkgs, ... }:
|
{pkgs, ...}: {
|
||||||
{
|
home.packages = [pkgs.tor-browser];
|
||||||
home.packages = [ pkgs.tor-browser ];
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -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;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,4 +0,0 @@
|
||||||
{ pkgs, ... }:
|
|
||||||
{
|
|
||||||
home.packages = [ pkgs.vial ];
|
|
||||||
}
|
|
|
@ -1,6 +0,0 @@
|
||||||
{
|
|
||||||
services.vscode-server = {
|
|
||||||
enable = true;
|
|
||||||
enableFHS = true;
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,5 +1,4 @@
|
||||||
{ pkgs, ... }:
|
{pkgs, ...}: {
|
||||||
{
|
|
||||||
programs.vscode = {
|
programs.vscode = {
|
||||||
enable = true;
|
enable = true;
|
||||||
# For a few reasons sometimes I'm forced to use VSCode and I don't have time to nixifiy even its configuration.
|
# For a few reasons sometimes I'm forced to use VSCode and I don't have time to nixifiy even its configuration.
|
||||||
|
|
|
@ -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"
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,25 +1,121 @@
|
||||||
{
|
{
|
||||||
pkgs,
|
pkgs,
|
||||||
lib,
|
lib,
|
||||||
|
fleetFlake,
|
||||||
...
|
...
|
||||||
}:
|
}: {
|
||||||
{
|
|
||||||
programs.waybar = {
|
programs.waybar = {
|
||||||
enable = true;
|
enable = true;
|
||||||
systemd.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;
|
# waybar needs the hyprctl binary in PATH when started in hyprland
|
||||||
|
systemd.user.services.waybar.Service.Environment = "PATH=${lib.makeBinPath [pkgs.hyprland]}";
|
||||||
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
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,71 +1,45 @@
|
||||||
* {
|
* {
|
||||||
border: none;
|
border: none;
|
||||||
font-family: "Iosevka Comfy", "FontAwesome", "Nerd Font";
|
border-radius: 0;
|
||||||
font-size: 1.35rem;
|
min-height: 0;
|
||||||
font-weight: 600;
|
font-family: Fira Code;
|
||||||
background: none;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
window#waybar {
|
window#waybar {
|
||||||
color: #a5adcb;
|
background: rgba(255, 255, 255, 0.05);
|
||||||
background-color: #181926;
|
color: white;
|
||||||
|
font-size: 1.2rem;
|
||||||
border-top-right-radius: 5px;
|
|
||||||
border-bottom-right-radius: 5px;
|
|
||||||
}
|
|
||||||
.modules-left,
|
|
||||||
.modules-right,
|
|
||||||
.modules-center {
|
|
||||||
padding: 12px 4px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
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 {
|
#workspaces button {
|
||||||
color: #5b6078;
|
padding: 0 10px;
|
||||||
background: none;
|
background: transparent;
|
||||||
padding: 0;
|
color: white;
|
||||||
}
|
font-size: 2rem;
|
||||||
#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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#custom-powermenu {
|
#workspaces button.active {
|
||||||
margin: 12px 0 0 0;
|
box-shadow: inset 0 -5px red;
|
||||||
color: #6e738d;
|
}
|
||||||
|
|
||||||
|
#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;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,23 +0,0 @@
|
||||||
{
|
|
||||||
pkgs,
|
|
||||||
lib,
|
|
||||||
vpn,
|
|
||||||
hostname,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
{
|
|
||||||
systemd.user.services.wayvnc = {
|
|
||||||
Install.WantedBy = [ "graphical-session.target" ];
|
|
||||||
|
|
||||||
Unit = {
|
|
||||||
Description = "WayVNC";
|
|
||||||
PartOf = [ "graphical-session.target" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
Service = {
|
|
||||||
ExecStart = "${lib.getExe' pkgs.wayvnc "wayvnc"} ${vpn.${hostname}.ip} 5900";
|
|
||||||
Restart = "on-failure";
|
|
||||||
RestartSec = 3;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,9 +1,8 @@
|
||||||
{
|
{...}: {
|
||||||
programs.wezterm = {
|
programs.wezterm = {
|
||||||
enable = true;
|
enable = true;
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
return {
|
return {
|
||||||
-- enable_wayland = false; -- https://github.com/wez/wezterm/issues/4483
|
|
||||||
font = wezterm.font_with_fallback {
|
font = wezterm.font_with_fallback {
|
||||||
{
|
{
|
||||||
family = 'Iosevka Comfy',
|
family = 'Iosevka Comfy',
|
||||||
|
@ -14,7 +13,7 @@
|
||||||
};
|
};
|
||||||
font_size = 13;
|
font_size = 13;
|
||||||
allow_square_glyphs_to_overflow_width = "Always";
|
allow_square_glyphs_to_overflow_width = "Always";
|
||||||
color_scheme = "Catppuccin Mocha";
|
color_scheme = "Dracula (Official)";
|
||||||
window_background_opacity = 1;
|
window_background_opacity = 1;
|
||||||
enable_tab_bar = false;
|
enable_tab_bar = false;
|
||||||
hide_mouse_cursor_when_typing = false;
|
hide_mouse_cursor_when_typing = false;
|
||||||
|
|
|
@ -1,13 +1,12 @@
|
||||||
{ pkgs, ... }:
|
{pkgs, ...}: {
|
||||||
{
|
home.packages = [pkgs.whatsapp-for-linux];
|
||||||
home.packages = [ pkgs.whatsapp-for-linux ];
|
|
||||||
|
|
||||||
systemd.user.services.whatsapp = {
|
systemd.user.services.whatsapp = {
|
||||||
Install.WantedBy = [ "graphical-session.target" ];
|
Install.WantedBy = ["graphical-session.target"];
|
||||||
|
|
||||||
Unit = {
|
Unit = {
|
||||||
Description = "Whatsapp";
|
Description = "Whatsapp";
|
||||||
PartOf = [ "graphical-session.target" ];
|
PartOf = ["graphical-session.target"];
|
||||||
};
|
};
|
||||||
|
|
||||||
Service = {
|
Service = {
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
{ pkgs, ... }:
|
{pkgs, ...}: {
|
||||||
{
|
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
winetricks
|
winetricks
|
||||||
wineWowPackages.waylandFull
|
wineWowPackages.waylandFull
|
||||||
|
|
|
@ -1,12 +1,11 @@
|
||||||
{ pkgs, ... }:
|
{pkgs, ...}: {
|
||||||
{
|
|
||||||
xdg = {
|
xdg = {
|
||||||
enable = true;
|
enable = true;
|
||||||
mimeApps.enable = true;
|
mimeApps.enable = true;
|
||||||
mimeApps.defaultApplications = {
|
mimeApps.defaultApplications = {
|
||||||
"text/html" = [ "firefox.desktop" ];
|
"text/html" = ["firefox.desktop"];
|
||||||
"x-scheme-handler/http" = [ "firefox.desktop" ];
|
"x-scheme-handler/http" = ["firefox.desktop"];
|
||||||
"x-scheme-handler/https" = [ "firefox.desktop" ];
|
"x-scheme-handler/https" = ["firefox.desktop"];
|
||||||
};
|
};
|
||||||
desktopEntries = {
|
desktopEntries = {
|
||||||
org-protocol = {
|
org-protocol = {
|
||||||
|
@ -14,43 +13,16 @@
|
||||||
genericName = "Org protocol";
|
genericName = "Org protocol";
|
||||||
exec = "emacsclient -- %u";
|
exec = "emacsclient -- %u";
|
||||||
terminal = false;
|
terminal = false;
|
||||||
mimeType = [ "x-scheme-handler/org-protocol" ];
|
mimeType = ["x-scheme-handler/org-protocol"];
|
||||||
};
|
};
|
||||||
firefox = {
|
firefox = {
|
||||||
name = "firefox";
|
name = "firefox";
|
||||||
genericName = "Firefox protocol";
|
genericName = "Firefox protocol";
|
||||||
exec = "firefox -- %U";
|
exec = "firefox -- %U";
|
||||||
terminal = false;
|
terminal = false;
|
||||||
mimeType = [
|
mimeType = ["text/html" "text/xml" "text/uri"];
|
||||||
"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];
|
||||||
}
|
}
|
||||||
|
|
|
@ -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;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -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}}";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,26 +0,0 @@
|
||||||
{
|
|
||||||
pkgs,
|
|
||||||
lib,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
{
|
|
||||||
home.packages = [ pkgs.zmkBATx ];
|
|
||||||
|
|
||||||
systemd.user.services.zmkBATx = {
|
|
||||||
Install.WantedBy = [
|
|
||||||
"waybar.service"
|
|
||||||
];
|
|
||||||
|
|
||||||
Unit = {
|
|
||||||
Description = "zmkBATx";
|
|
||||||
};
|
|
||||||
|
|
||||||
Service = {
|
|
||||||
ExecStart = ''
|
|
||||||
${pkgs.runtimeShell} -l -c "${lib.getExe' pkgs.busybox "sleep"} 5 && ${lib.getExe pkgs.zmkBATx}"
|
|
||||||
'';
|
|
||||||
Restart = "on-failure";
|
|
||||||
RestartSec = 3;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,4 +0,0 @@
|
||||||
{ pkgs, ... }:
|
|
||||||
{
|
|
||||||
home.packages = [ pkgs.zoom-us ];
|
|
||||||
}
|
|
|
@ -1,4 +0,0 @@
|
||||||
{ pkgs, ... }:
|
|
||||||
{
|
|
||||||
home.packages = [ pkgs.zulip ];
|
|
||||||
}
|
|
26
hosts/archer/#default.nix#
Normal file
26
hosts/archer/#default.nix#
Normal 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.
|
||||||
|
}
|
|
@ -1,9 +1,6 @@
|
||||||
{ pkgs, ... }:
|
{pkgs, ...}: {
|
||||||
{
|
environment.systemPackages = [
|
||||||
environment.systemPackages = with pkgs; [
|
pkgs.vim
|
||||||
helix
|
|
||||||
vim
|
|
||||||
git
|
|
||||||
];
|
];
|
||||||
|
|
||||||
nix.settings.experimental-features = "nix-command flakes";
|
nix.settings.experimental-features = "nix-command flakes";
|
||||||
|
@ -12,5 +9,5 @@
|
||||||
|
|
||||||
services.nix-daemon.enable = true;
|
services.nix-daemon.enable = true;
|
||||||
|
|
||||||
system.stateVersion = 5;
|
# nixpkgs.localSystem = "x86_64-darwin";
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
{
|
{
|
||||||
fleetModules,
|
fleetModules,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
...
|
...
|
||||||
}:
|
}: {
|
||||||
{
|
|
||||||
imports =
|
imports =
|
||||||
[
|
[
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
|
|
|
@ -7,22 +7,15 @@
|
||||||
pkgs,
|
pkgs,
|
||||||
modulesPath,
|
modulesPath,
|
||||||
...
|
...
|
||||||
}:
|
}: {
|
||||||
{
|
|
||||||
imports = [
|
imports = [
|
||||||
(modulesPath + "/installer/scan/not-detected.nix")
|
(modulesPath + "/installer/scan/not-detected.nix")
|
||||||
];
|
];
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = [
|
boot.initrd.availableKernelModules = ["ahci" "xhci_pci" "usb_storage" "usbhid" "sd_mod"];
|
||||||
"ahci"
|
boot.initrd.kernelModules = [];
|
||||||
"xhci_pci"
|
boot.kernelModules = ["kvm-intel"];
|
||||||
"usb_storage"
|
boot.extraModulePackages = [];
|
||||||
"usbhid"
|
|
||||||
"sd_mod"
|
|
||||||
];
|
|
||||||
boot.initrd.kernelModules = [ ];
|
|
||||||
boot.kernelModules = [ "kvm-intel" ];
|
|
||||||
boot.extraModulePackages = [ ];
|
|
||||||
|
|
||||||
boot.loader.systemd-boot.enable = true;
|
boot.loader.systemd-boot.enable = true;
|
||||||
boot.loader.efi.canTouchEfiVariables = true;
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
|
@ -38,7 +31,7 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
swapDevices = [
|
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
|
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||||
|
|
|
@ -1,42 +1,76 @@
|
||||||
{
|
{
|
||||||
|
self,
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
inputs,
|
inputs,
|
||||||
...
|
...
|
||||||
}:
|
}: {
|
||||||
{
|
imports = [./module.nix];
|
||||||
imports = [ ./module.nix ];
|
|
||||||
|
|
||||||
fleet = {
|
fleet = {
|
||||||
darwinHosts.archer = { };
|
darwinHosts.archer = {
|
||||||
|
};
|
||||||
nixOnDroidHosts.janeway = { };
|
|
||||||
|
|
||||||
hosts = {
|
hosts = {
|
||||||
deltaflyer = {
|
# thinkpad = {
|
||||||
nixpkgs =
|
# extraModules = with inputs; [
|
||||||
let
|
# nixosHardware.nixosModules.lenovo-thinkpad-x1-7th-gen
|
||||||
# keep in sync with https://github.com/mobile-nixos/mobile-nixos/blob/development/npins/sources.json
|
# buildbot-nix.nixosModules.buildbot-master
|
||||||
rev = "d3c42f187194c26d9f0309a8ecc469d6c878ce33";
|
# buildbot-nix.nixosModules.buildbot-worker
|
||||||
in
|
# ];
|
||||||
builtins.getFlake "github:NixOS/nixpkgs/${rev}";
|
# extraHmModules = with inputs; [
|
||||||
extraHmModules = [
|
# ccrEmacs.hmModules.default
|
||||||
inputs.catppuccin.homeModules.catppuccin
|
# {
|
||||||
];
|
# # TODO: remove after https://github.com/nix-community/home-manager/pull/3811
|
||||||
vpn = {
|
# imports = let
|
||||||
ip = "10.100.0.5";
|
# hmModules = "${inputs.homeManagerGitWorkspace}/modules";
|
||||||
publicKey = "6bzmBx2b5yzMdW0aK0KapoBesNcxTv5+qdo+pGmG+jc=";
|
# in [
|
||||||
};
|
# "${hmModules}/services/git-workspace.nix"
|
||||||
# homeManager = builtins.getFlake "github:nix-community/home-manager/670d9ecc3e46a6e3265c203c2d136031a3d3548e";
|
# ];
|
||||||
extraModules = [
|
# }
|
||||||
(import "${inputs.mobile-nixos}/lib/configuration.nix" { device = "oneplus-fajita"; })
|
# ];
|
||||||
inputs.catppuccin.nixosModules.catppuccin
|
# overlays = [inputs.nil.overlays.default];
|
||||||
inputs.lix-module.nixosModules.default
|
# secrets = {
|
||||||
];
|
# "thinkpad-wireguard-private-key" = {};
|
||||||
secrets = {
|
# "cachix-personal-token".owner = "ccr";
|
||||||
"deltaflyer-wireguard-private-key" = { };
|
# "autistici-password".owner = "ccr";
|
||||||
"chatgpt-token".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";
|
||||||
|
# };
|
||||||
|
# };
|
||||||
kirk = {
|
kirk = {
|
||||||
vpn = {
|
vpn = {
|
||||||
ip = "10.100.0.3";
|
ip = "10.100.0.3";
|
||||||
|
@ -45,20 +79,19 @@
|
||||||
extraModules = [
|
extraModules = [
|
||||||
inputs.disko.nixosModules.disko
|
inputs.disko.nixosModules.disko
|
||||||
inputs.nixosHardware.nixosModules.lenovo-thinkpad-x1-7th-gen
|
inputs.nixosHardware.nixosModules.lenovo-thinkpad-x1-7th-gen
|
||||||
inputs.lix-module.nixosModules.default
|
|
||||||
inputs.catppuccin.nixosModules.catppuccin
|
|
||||||
];
|
];
|
||||||
extraHmModules = [
|
extraHmModules = [
|
||||||
|
inputs.ccrEmacs.hmModules.default
|
||||||
"${inputs.homeManagerGitWorkspace}/modules/services/git-workspace.nix"
|
"${inputs.homeManagerGitWorkspace}/modules/services/git-workspace.nix"
|
||||||
inputs.catppuccin.homeModules.catppuccin
|
"${inputs.homeManagerSwayNC}/modules/services/swaync.nix"
|
||||||
];
|
];
|
||||||
secrets = {
|
secrets = {
|
||||||
"kirk-wireguard-private-key" = { };
|
"kirk-wireguard-private-key" = {};
|
||||||
"chatgpt-token".owner = "ccr";
|
"chatgpt-token".owner = "ccr";
|
||||||
"cachix-personal-token".owner = "ccr";
|
"cachix-personal-token".owner = "ccr";
|
||||||
"git-workspace-tokens".owner = "ccr";
|
"git-workspace-tokens".owner = "ccr";
|
||||||
"autistici-password".owner = "ccr";
|
"autistici-password".owner = "ccr";
|
||||||
"restic-hetzner-password" = { };
|
"restic-hetzner-password" = {};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -69,22 +102,25 @@
|
||||||
};
|
};
|
||||||
extraModules = [
|
extraModules = [
|
||||||
inputs.disko.nixosModules.disko
|
inputs.disko.nixosModules.disko
|
||||||
inputs.lix-module.nixosModules.default
|
inputs.nixThePlanet.nixosModules.macos-ventura
|
||||||
inputs.lanzaboote.nixosModules.lanzaboote
|
# inputs.hercules-ci-agent.nixosModules.agent-service
|
||||||
inputs.catppuccin.nixosModules.catppuccin
|
|
||||||
];
|
];
|
||||||
extraHmModules = [
|
extraHmModules = [
|
||||||
|
inputs.ccrEmacs.hmModules.default
|
||||||
"${inputs.homeManagerGitWorkspace}/modules/services/git-workspace.nix"
|
"${inputs.homeManagerGitWorkspace}/modules/services/git-workspace.nix"
|
||||||
inputs.vscode-server.nixosModules.home
|
"${inputs.homeManagerSwayNC}/modules/services/swaync.nix"
|
||||||
inputs.catppuccin.homeModules.catppuccin
|
|
||||||
];
|
];
|
||||||
secrets = {
|
secrets = {
|
||||||
"picard-wireguard-private-key" = { };
|
"picard-wireguard-private-key" = {};
|
||||||
"chatgpt-token".owner = "ccr";
|
"chatgpt-token".owner = "ccr";
|
||||||
"cachix-personal-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";
|
"git-workspace-tokens".owner = "ccr";
|
||||||
"autistici-password".owner = "ccr";
|
"autistici-password".owner = "ccr";
|
||||||
"restic-hetzner-password" = { };
|
"restic-hetzner-password" = {};
|
||||||
|
"aws-credentials".owner = "hercules-ci-agent";
|
||||||
"forgejo-runners-token".owner = "nixuser";
|
"forgejo-runners-token".owner = "nixuser";
|
||||||
"forgejo-nix-access-tokens".owner = "nixuser";
|
"forgejo-nix-access-tokens".owner = "nixuser";
|
||||||
};
|
};
|
||||||
|
@ -92,85 +128,50 @@
|
||||||
|
|
||||||
sisko = {
|
sisko = {
|
||||||
system = "aarch64-linux";
|
system = "aarch64-linux";
|
||||||
nixpkgs = inputs.nixpkgsSisko;
|
nixpkgs = inputs.nixpkgsUnstableForSisko; # using more recent `nixpkgsUnstable` it fails to restart
|
||||||
enableHomeManager = false;
|
|
||||||
vpn = {
|
vpn = {
|
||||||
ip = "10.100.0.1";
|
ip = "10.100.0.1";
|
||||||
publicKey = "bc5giljukT1+ChbbyTLdOfejfR3c8RZ4XoXmQM54nTY=";
|
publicKey = "bc5giljukT1+ChbbyTLdOfejfR3c8RZ4XoXmQM54nTY=";
|
||||||
};
|
};
|
||||||
extraModules = with inputs; [
|
extraModules = with inputs; [
|
||||||
disko.nixosModules.disko
|
disko.nixosModules.disko
|
||||||
impermanence.nixosModules.impermanence
|
# inputs.hercules-ci-agent.nixosModules.agent-service;
|
||||||
lix-module.nixosModules.default
|
# rock5b.nixosModules.default
|
||||||
];
|
];
|
||||||
secrets = {
|
secrets = {
|
||||||
"sisko-wireguard-private-key" = { };
|
"sisko-wireguard-private-key" = {};
|
||||||
"home-planimetry".owner = "hass";
|
"hercules-ci-join-token".owner = "hercules-ci-agent";
|
||||||
"home-assistant-token".owner = "prometheus";
|
"hercules-ci-binary-caches".owner = "hercules-ci-agent";
|
||||||
"grafana-password".owner = "grafana";
|
"hercules-ci-secrets-json".owner = "hercules-ci-agent";
|
||||||
"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";
|
|
||||||
"cachix-personal-token".owner = "ccr";
|
"cachix-personal-token".owner = "ccr";
|
||||||
"git-workspace-tokens".owner = "ccr";
|
"home-planimetry".owner = "hass";
|
||||||
"autistici-password".owner = "ccr";
|
"cloudflare-dyndns-api-token" = {};
|
||||||
"restic-hetzner-password" = { };
|
"restic-hetzner-password" = {};
|
||||||
"forgejo-runners-token".owner = "nixuser";
|
"minio-credentials".owner = "minio";
|
||||||
"forgejo-nix-access-tokens".owner = "nixuser";
|
"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 = {
|
vpnExtra = {
|
||||||
oneplus8t = {
|
oneplus6t = {
|
||||||
ip = "10.100.0.4";
|
ip = "10.100.0.4";
|
||||||
publicKey = "9ccx4C4xvPC6lPgTZAHDSfK4FS2BP2i4D57u9IZjw18=";
|
publicKey = "O6/tKaA8Hs7OEqi15hV4RwviR6vyCTMYv6ZlhsI+tnI=";
|
||||||
};
|
|
||||||
macos-ventura = {
|
|
||||||
ip = "10.100.0.6";
|
|
||||||
publicKey = "/Eee1V0PsjZSzj7un1NxHKtFR+TpUIgJ7VAdIAzmvzQ=";
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
flake.nixosConfigurations =
|
||||||
|
lib.mapAttrs
|
||||||
|
config.fleet._mkNixosConfiguration
|
||||||
|
config.fleet.hosts;
|
||||||
|
|
||||||
|
flake.darwinConfigurations =
|
||||||
|
lib.mapAttrs
|
||||||
|
config.fleet._mkDarwinConfiguration
|
||||||
|
config.fleet.darwinHosts;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,166 +0,0 @@
|
||||||
{
|
|
||||||
fleetModules,
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
{
|
|
||||||
imports =
|
|
||||||
fleetModules [
|
|
||||||
"common"
|
|
||||||
"ssh"
|
|
||||||
"ccr"
|
|
||||||
"nix"
|
|
||||||
"bluetooth"
|
|
||||||
"dbus"
|
|
||||||
"networkmanager"
|
|
||||||
"pam"
|
|
||||||
"fonts"
|
|
||||||
"waydroid"
|
|
||||||
"wireguard-client"
|
|
||||||
]
|
|
||||||
++ [
|
|
||||||
# ./mobile-nixos-branding.nix
|
|
||||||
./plasma-mobile.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
# options.home-manager.services.kanshi.attrTag = null;
|
|
||||||
|
|
||||||
config = lib.mkMerge [
|
|
||||||
# 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";
|
|
||||||
|
|
||||||
# Automatically login as defaultUserName.
|
|
||||||
# services.xserver.displayManager.autoLogin = {
|
|
||||||
# user = "ccr";
|
|
||||||
# };
|
|
||||||
}
|
|
||||||
|
|
||||||
# Networking, modem and misc.
|
|
||||||
{
|
|
||||||
# Ensures any rndis config from stage-1 is not clobbered by NetworkManager
|
|
||||||
networking.networkmanager.unmanaged = [
|
|
||||||
"rndis0"
|
|
||||||
"usb0"
|
|
||||||
];
|
|
||||||
|
|
||||||
# Setup USB gadget networking in initrd...
|
|
||||||
mobile.boot.stage-1.networking.enable = lib.mkDefault true;
|
|
||||||
}
|
|
||||||
|
|
||||||
# SSH
|
|
||||||
{
|
|
||||||
# Start SSH by default...
|
|
||||||
# Not a good idea given the fact this config is insecure (well-known password).
|
|
||||||
services.openssh = {
|
|
||||||
settings.PermitRootLogin = lib.mkForce "yes";
|
|
||||||
};
|
|
||||||
mobile.adbd.enable = true;
|
|
||||||
ccr = {
|
|
||||||
enable = true;
|
|
||||||
autologin = true;
|
|
||||||
modules = [
|
|
||||||
"git"
|
|
||||||
"shell"
|
|
||||||
"helix"
|
|
||||||
# "hyprland"
|
|
||||||
"niri"
|
|
||||||
"emacs"
|
|
||||||
"firefox"
|
|
||||||
"mpv"
|
|
||||||
"xdg"
|
|
||||||
"catppuccin"
|
|
||||||
];
|
|
||||||
extraGroups = [
|
|
||||||
"dialout"
|
|
||||||
"feedbackd"
|
|
||||||
"networkmanager"
|
|
||||||
"video"
|
|
||||||
"wheel"
|
|
||||||
];
|
|
||||||
backupPaths = [ ];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
system.stateVersion = "24.11";
|
|
||||||
nixpkgs.config.allowUnfreePredicate =
|
|
||||||
pkg:
|
|
||||||
builtins.elem (lib.getName pkg) [
|
|
||||||
"oneplus-sdm845-firmware-zstd"
|
|
||||||
"oneplus-sdm845-firmware-xz"
|
|
||||||
"oneplus-sdm845-firmware"
|
|
||||||
];
|
|
||||||
nixpkgs.crossSystem = lib.mkForce null;
|
|
||||||
nixpkgs.localSystem.system = "aarch64-linux"; # we use an aarch64 nix remote builder or binfmt
|
|
||||||
# mobile.boot.stage-1.kernel.useStrictKernelConfig = lib.mkDefault true;
|
|
||||||
|
|
||||||
ccr.extraModules = [
|
|
||||||
{
|
|
||||||
programs.fish.loginShellInit = ''
|
|
||||||
pgrep niri >/dev/null || exec niri-session
|
|
||||||
'';
|
|
||||||
# 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;
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
environment.systemPackages = [
|
|
||||||
# (pkgs.writeShellApplication {
|
|
||||||
# name = "start-win98";
|
|
||||||
# text = fleetFlake.inputs.nixThePlanet.apps.aarch64-linux.win98.program;
|
|
||||||
# })
|
|
||||||
pkgs.libreoffice
|
|
||||||
pkgs.superTuxKart
|
|
||||||
pkgs.chromium
|
|
||||||
pkgs.dolphin-emu
|
|
||||||
];
|
|
||||||
|
|
||||||
zramSwap.enable = lib.mkDefault true;
|
|
||||||
|
|
||||||
boot.binfmt.emulatedSystems = lib.mkForce [
|
|
||||||
"x86_64-linux"
|
|
||||||
"i686-linux"
|
|
||||||
"i386-linux"
|
|
||||||
"i486-linux"
|
|
||||||
"i586-linux"
|
|
||||||
];
|
|
||||||
}
|
|
||||||
];
|
|
||||||
}
|
|
|
@ -1,55 +0,0 @@
|
||||||
#
|
|
||||||
# Minimum config used to enable Plasma Mobile.
|
|
||||||
#
|
|
||||||
{
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
{
|
|
||||||
mobile.beautification = {
|
|
||||||
silentBoot = lib.mkDefault false;
|
|
||||||
splash = lib.mkDefault false;
|
|
||||||
};
|
|
||||||
|
|
||||||
services.xserver = {
|
|
||||||
enable = true;
|
|
||||||
|
|
||||||
# # desktopManager.plasma5.mobile.enable = true;
|
|
||||||
|
|
||||||
displayManager.autoLogin = {
|
|
||||||
enable = true;
|
|
||||||
user = "ccr";
|
|
||||||
};
|
|
||||||
|
|
||||||
displayManager.session = [
|
|
||||||
{
|
|
||||||
manage = "desktop";
|
|
||||||
name = "niri";
|
|
||||||
start = ''
|
|
||||||
${pkgs.niri}/bin/niri-session &
|
|
||||||
waitPID=$!
|
|
||||||
'';
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
displayManager.defaultSession = "niri";
|
|
||||||
|
|
||||||
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
|
|
||||||
networking.networkmanager.enable = true;
|
|
||||||
networking.wireless.enable = false;
|
|
||||||
powerManagement.enable = true;
|
|
||||||
}
|
|
|
@ -4,8 +4,7 @@
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}:
|
}: {
|
||||||
{
|
|
||||||
imports =
|
imports =
|
||||||
[
|
[
|
||||||
(modulesPath + "/installer/scan/not-detected.nix")
|
(modulesPath + "/installer/scan/not-detected.nix")
|
||||||
|
@ -43,29 +42,17 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
fonts = {
|
fonts = {
|
||||||
fonts = with pkgs; [
|
fonts = with pkgs; [powerline-fonts dejavu_fonts fira-code fira-code-symbols emacs-all-the-icons-fonts nerdfonts joypixels etBook];
|
||||||
powerline-fonts
|
|
||||||
dejavu_fonts
|
|
||||||
fira-code
|
|
||||||
fira-code-symbols
|
|
||||||
emacs-all-the-icons-fonts
|
|
||||||
nerdfonts
|
|
||||||
joypixels
|
|
||||||
etBook
|
|
||||||
];
|
|
||||||
fontconfig.defaultFonts = {
|
fontconfig.defaultFonts = {
|
||||||
monospace = [ "DejaVu Sans Mono for Powerline" ];
|
monospace = ["DejaVu Sans Mono for Powerline"];
|
||||||
sansSerif = [ "DejaVu Sans" ];
|
sansSerif = ["DejaVu Sans"];
|
||||||
serif = [ "DejaVu Serif" ];
|
serif = ["DejaVu Serif"];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
nixpkgs.config.joypixels.acceptLicense = true;
|
nixpkgs.config.joypixels.acceptLicense = true;
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [waypipe firefox];
|
||||||
waypipe
|
|
||||||
firefox
|
|
||||||
];
|
|
||||||
|
|
||||||
programs.mosh.enable = true;
|
programs.mosh.enable = true;
|
||||||
|
|
||||||
|
@ -74,7 +61,7 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
boot.loader.grub = {
|
boot.loader.grub = {
|
||||||
devices = [ "/dev/sda" ];
|
devices = ["/dev/sda"];
|
||||||
efiSupport = true;
|
efiSupport = true;
|
||||||
efiInstallAsRemovable = true;
|
efiInstallAsRemovable = true;
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,10 +1,9 @@
|
||||||
# Example to create a bios compatible gpt partition
|
# Example to create a bios compatible gpt partition
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
disks ? [ "/dev/sda" ],
|
disks ? ["/dev/sda"],
|
||||||
...
|
...
|
||||||
}:
|
}: {
|
||||||
{
|
|
||||||
disk = lib.genAttrs disks (dev: {
|
disk = lib.genAttrs disks (dev: {
|
||||||
device = dev;
|
device = dev;
|
||||||
type = "disk";
|
type = "disk";
|
||||||
|
@ -18,7 +17,7 @@
|
||||||
start = "0";
|
start = "0";
|
||||||
end = "1M";
|
end = "1M";
|
||||||
part-type = "primary";
|
part-type = "primary";
|
||||||
flags = [ "bios_grub" ];
|
flags = ["bios_grub"];
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
type = "partition";
|
type = "partition";
|
||||||
|
|
|
@ -4,8 +4,7 @@
|
||||||
lib,
|
lib,
|
||||||
config,
|
config,
|
||||||
...
|
...
|
||||||
}:
|
}: {
|
||||||
{
|
|
||||||
imports =
|
imports =
|
||||||
[
|
[
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
|
@ -22,7 +21,7 @@
|
||||||
"shell"
|
"shell"
|
||||||
"git"
|
"git"
|
||||||
];
|
];
|
||||||
packages = [ ];
|
packages = [];
|
||||||
extraGroups = [
|
extraGroups = [
|
||||||
"wheel"
|
"wheel"
|
||||||
"fuse"
|
"fuse"
|
||||||
|
@ -32,7 +31,7 @@
|
||||||
|
|
||||||
systemd.services.standby-sdb = {
|
systemd.services.standby-sdb = {
|
||||||
description = "Set spindown time (sleep) for /dev/sdb ";
|
description = "Set spindown time (sleep) for /dev/sdb ";
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = ["multi-user.target"];
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
Type = "oneshot";
|
Type = "oneshot";
|
||||||
ExecStart = "${pkgs.hdparm}/bin/hdparm -B 127 -S 241 /dev/sdb";
|
ExecStart = "${pkgs.hdparm}/bin/hdparm -B 127 -S 241 /dev/sdb";
|
||||||
|
@ -41,7 +40,7 @@
|
||||||
|
|
||||||
systemd.services.standby-sdc = {
|
systemd.services.standby-sdc = {
|
||||||
description = "Set spindown time (sleep) for /dev/sdc ";
|
description = "Set spindown time (sleep) for /dev/sdc ";
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = ["multi-user.target"];
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
Type = "oneshot";
|
Type = "oneshot";
|
||||||
ExecStart = "${pkgs.hdparm}/bin/hdparm -B 127 -S 241 /dev/sdc";
|
ExecStart = "${pkgs.hdparm}/bin/hdparm -B 127 -S 241 /dev/sdc";
|
||||||
|
@ -55,7 +54,7 @@
|
||||||
isSystemUser = true;
|
isSystemUser = true;
|
||||||
group = "amule";
|
group = "amule";
|
||||||
};
|
};
|
||||||
users.groups."amule" = { };
|
users.groups."amule" = {};
|
||||||
|
|
||||||
services = {
|
services = {
|
||||||
samba-wsdd = {
|
samba-wsdd = {
|
||||||
|
@ -262,35 +261,33 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
systemd.services.ydns =
|
systemd.services.ydns = let
|
||||||
let
|
ydnsUpdater = pkgs.writeScriptBin "ydnsUpdater" ''
|
||||||
ydnsUpdater = pkgs.writeScriptBin "ydnsUpdater" ''
|
USER="andrea.ciceri@autistici.org"
|
||||||
USER="andrea.ciceri@autistici.org"
|
PASSWORD=$(cat /home/ccr/.ydns-password)
|
||||||
PASSWORD=$(cat /home/ccr/.ydns-password)
|
DOMAIN="ccr.ydns.eu"
|
||||||
DOMAIN="ccr.ydns.eu"
|
for SUBDOMAIN in "books" "music" "sync" "torrent" "gate"
|
||||||
for SUBDOMAIN in "books" "music" "sync" "torrent" "gate"
|
do
|
||||||
do
|
HOST="$SUBDOMAIN.$DOMAIN"
|
||||||
HOST="$SUBDOMAIN.$DOMAIN"
|
${pkgs.curl}/bin/curl --basic -u "$USER:$PASSWORD" --silent https://ydns.io/api/v1/update/?host=$HOST
|
||||||
${pkgs.curl}/bin/curl --basic -u "$USER:$PASSWORD" --silent https://ydns.io/api/v1/update/?host=$HOST
|
done
|
||||||
done
|
${pkgs.curl}/bin/curl --basic -u "$USER:$PASSWORD" --silent https://ydns.io/api/v1/update/?host=$DOMAIN
|
||||||
${pkgs.curl}/bin/curl --basic -u "$USER:$PASSWORD" --silent https://ydns.io/api/v1/update/?host=$DOMAIN
|
'';
|
||||||
'';
|
in {
|
||||||
in
|
description = "YDNS IP updater";
|
||||||
{
|
wantedBy = ["multi-user.target"];
|
||||||
description = "YDNS IP updater";
|
after = ["network.target"];
|
||||||
wantedBy = [ "multi-user.target" ];
|
serviceConfig = {
|
||||||
after = [ "network.target" ];
|
User = "root";
|
||||||
serviceConfig = {
|
Type = "oneshot";
|
||||||
User = "root";
|
ExecStart = "${pkgs.bash}/bin/bash ${ydnsUpdater}/bin/ydnsUpdater";
|
||||||
Type = "oneshot";
|
|
||||||
ExecStart = "${pkgs.bash}/bin/bash ${ydnsUpdater}/bin/ydnsUpdater";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
};
|
||||||
|
|
||||||
systemd.services.wstunnel = {
|
systemd.services.wstunnel = {
|
||||||
description = "WSTunnel";
|
description = "WSTunnel";
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = ["multi-user.target"];
|
||||||
after = [ "network.target" ];
|
after = ["network.target"];
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
User = "root";
|
User = "root";
|
||||||
Type = "oneshot";
|
Type = "oneshot";
|
||||||
|
@ -300,8 +297,8 @@
|
||||||
|
|
||||||
# TODO It seems to not work
|
# TODO It seems to not work
|
||||||
systemd.timers.ydnsUpdater = {
|
systemd.timers.ydnsUpdater = {
|
||||||
wantedBy = [ "timers.target" ];
|
wantedBy = ["timers.target"];
|
||||||
partOf = [ "ydnsUpdater.service" ];
|
partOf = ["ydnsUpdater.service"];
|
||||||
timerConfig = {
|
timerConfig = {
|
||||||
OnCalendar = "*-*-* *:00:00"; # hourly
|
OnCalendar = "*-*-* *:00:00"; # hourly
|
||||||
Unit = "ydnsUpdater.service";
|
Unit = "ydnsUpdater.service";
|
||||||
|
@ -333,13 +330,13 @@
|
||||||
|
|
||||||
networking.nat.enable = true;
|
networking.nat.enable = true;
|
||||||
networking.nat.externalInterface = "enp0s10";
|
networking.nat.externalInterface = "enp0s10";
|
||||||
networking.nat.internalInterfaces = [ "wg0" ];
|
networking.nat.internalInterfaces = ["wg0"];
|
||||||
|
|
||||||
networking.wireguard.interfaces = {
|
networking.wireguard.interfaces = {
|
||||||
# "wg0" is the network interface name. You can name the interface arbitrarily.
|
# "wg0" is the network interface name. You can name the interface arbitrarily.
|
||||||
wg0 = {
|
wg0 = {
|
||||||
# Determines the IP address and subnet of the server's end of the tunnel interface.
|
# 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.
|
# The port that WireGuard listens to. Must be accessible by the client.
|
||||||
listenPort = 51820;
|
listenPort = 51820;
|
||||||
|
@ -369,7 +366,7 @@
|
||||||
# Public key of the peer (not a file path).
|
# Public key of the peer (not a file path).
|
||||||
publicKey = "fCwjd75CefC9A7WqO7s3xfOk2nRcoTKfnAzDT6Lc5AA=";
|
publicKey = "fCwjd75CefC9A7WqO7s3xfOk2nRcoTKfnAzDT6Lc5AA=";
|
||||||
# List of IPs assigned to this peer within the tunnel subnet. Used to configure routing.
|
# 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"];
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,14 +1,6 @@
|
||||||
{ lib, ... }:
|
{lib, ...}: {
|
||||||
{
|
|
||||||
boot = {
|
boot = {
|
||||||
initrd.availableKernelModules = [
|
initrd.availableKernelModules = ["ohci_pci" "ehci_pci" "ahci" "usb_storage" "usbhid" "sd_mod"];
|
||||||
"ohci_pci"
|
|
||||||
"ehci_pci"
|
|
||||||
"ahci"
|
|
||||||
"usb_storage"
|
|
||||||
"usbhid"
|
|
||||||
"sd_mod"
|
|
||||||
];
|
|
||||||
loader.grub = lib.mkForce {
|
loader.grub = lib.mkForce {
|
||||||
enable = true;
|
enable = true;
|
||||||
version = 2;
|
version = 2;
|
||||||
|
@ -31,5 +23,5 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
swapDevices = [ { device = "/dev/disk/by-label/swap"; } ];
|
swapDevices = [{device = "/dev/disk/by-label/swap";}];
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,82 +0,0 @@
|
||||||
{
|
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
fleetFlake,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
let
|
|
||||||
sshdTmpDirectory = "${config.user.home}/sshd-tmp";
|
|
||||||
sshdDirectory = "${config.user.home}/sshd";
|
|
||||||
port = 8022;
|
|
||||||
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";
|
|
||||||
|
|
||||||
# Set up nix for flakes
|
|
||||||
nix.extraOptions = ''
|
|
||||||
experimental-features = nix-command flakes
|
|
||||||
'';
|
|
||||||
|
|
||||||
# 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 =
|
|
||||||
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}"
|
|
||||||
|
|
||||||
$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"
|
|
||||||
|
|
||||||
$DRY_RUN_CMD mv $VERBOSE_ARG "${sshdTmpDirectory}" "${sshdDirectory}"
|
|
||||||
fi
|
|
||||||
'';
|
|
||||||
|
|
||||||
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
|
|
||||||
'')
|
|
||||||
];
|
|
||||||
}
|
|
|
@ -3,8 +3,7 @@
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}:
|
}: {
|
||||||
{
|
|
||||||
imports =
|
imports =
|
||||||
fleetModules [
|
fleetModules [
|
||||||
"common"
|
"common"
|
||||||
|
@ -27,37 +26,34 @@
|
||||||
"printing"
|
"printing"
|
||||||
"pam"
|
"pam"
|
||||||
"wireguard-client"
|
"wireguard-client"
|
||||||
|
"restic"
|
||||||
"greetd"
|
"greetd"
|
||||||
"syncthing"
|
"syncthing"
|
||||||
"mount-sisko"
|
"mount-rock5b"
|
||||||
"adb"
|
|
||||||
"binfmt"
|
|
||||||
"prometheus-exporters"
|
|
||||||
"alloy"
|
|
||||||
"syncthing"
|
|
||||||
"zerotier"
|
|
||||||
]
|
]
|
||||||
++ [ ./disko.nix ];
|
++ [
|
||||||
|
./disko.nix
|
||||||
|
];
|
||||||
|
|
||||||
ccr = {
|
ccr = {
|
||||||
enable = true;
|
enable = true;
|
||||||
autologin = false;
|
autologin = true;
|
||||||
modules = [
|
modules = [
|
||||||
"git"
|
"git"
|
||||||
"git-workspace"
|
"git-workspace"
|
||||||
"helix"
|
"helix"
|
||||||
"shell"
|
"shell"
|
||||||
"zellij"
|
|
||||||
"element"
|
"element"
|
||||||
|
"emacs"
|
||||||
"firefox"
|
"firefox"
|
||||||
"gpg"
|
"gpg"
|
||||||
"mpv"
|
"mpv"
|
||||||
"password-store"
|
"password-store"
|
||||||
"slack"
|
"slack"
|
||||||
"hyprland"
|
"hyprland"
|
||||||
"niri"
|
|
||||||
"udiskie"
|
"udiskie"
|
||||||
"xdg"
|
"xdg"
|
||||||
|
"spotify"
|
||||||
"lutris"
|
"lutris"
|
||||||
"wine"
|
"wine"
|
||||||
"cura"
|
"cura"
|
||||||
|
@ -65,33 +61,23 @@
|
||||||
"email"
|
"email"
|
||||||
"digikam"
|
"digikam"
|
||||||
"discord"
|
"discord"
|
||||||
"remmina"
|
|
||||||
"calibre"
|
|
||||||
"zathura"
|
|
||||||
"imv"
|
|
||||||
"catppuccin"
|
|
||||||
"libreoffice"
|
|
||||||
"emacs"
|
|
||||||
"chirp"
|
|
||||||
"sdrangel"
|
|
||||||
"zmkbatx"
|
|
||||||
"moonlight"
|
|
||||||
"gimp"
|
|
||||||
];
|
];
|
||||||
extraGroups = [ "plugdev" ];
|
extraGroups = [];
|
||||||
backupPaths = [ ];
|
backupPaths = [];
|
||||||
};
|
};
|
||||||
|
|
||||||
boot.initrd.kernelModules = [ "i915" ];
|
boot.initrd.kernelModules = ["i915"];
|
||||||
boot.initrd.availableKernelModules = [
|
boot.initrd.availableKernelModules = [
|
||||||
"nvme"
|
"nvme"
|
||||||
"xhci_pci"
|
"xhci_pci"
|
||||||
"usb_storage"
|
"usb_storage"
|
||||||
"sd_mod"
|
"sd_mod"
|
||||||
];
|
];
|
||||||
boot.kernelModules = [ "kvm-intel" ];
|
boot.kernelModules = [
|
||||||
|
"kvm-intel"
|
||||||
|
];
|
||||||
|
|
||||||
boot.kernelPackages = pkgs.linuxPackages;
|
boot.kernelPackages = pkgs.linuxKernel.packages.linux_6_7;
|
||||||
|
|
||||||
boot.loader.efi.canTouchEfiVariables = true;
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
boot.loader.systemd-boot = {
|
boot.loader.systemd-boot = {
|
||||||
|
@ -104,15 +90,10 @@
|
||||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
powerManagement.cpuFreqGovernor = lib.mkDefault "schedutil";
|
powerManagement.cpuFreqGovernor = lib.mkDefault "schedutil";
|
||||||
hardware.enableRedistributableFirmware = lib.mkDefault true;
|
hardware.enableRedistributableFirmware = lib.mkDefault true;
|
||||||
hardware.rtl-sdr.enable = true;
|
|
||||||
|
|
||||||
hardware.graphics = {
|
hardware.opengl = {
|
||||||
enable = true;
|
enable = true;
|
||||||
enable32Bit = true;
|
driSupport = true;
|
||||||
};
|
driSupport32Bit = true;
|
||||||
|
|
||||||
zramSwap = {
|
|
||||||
enable = true;
|
|
||||||
algorithm = "zstd";
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
482
hosts/module.nix
482
hosts/module.nix
|
@ -8,208 +8,66 @@
|
||||||
config,
|
config,
|
||||||
inputs,
|
inputs,
|
||||||
...
|
...
|
||||||
}:
|
} @ flakePartsArgs: let
|
||||||
let
|
|
||||||
cfg = config.fleet;
|
cfg = config.fleet;
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
options.fleet = {
|
options.fleet = {
|
||||||
darwinHosts = lib.mkOption {
|
darwinHosts = lib.mkOption {
|
||||||
type = lib.types.attrsOf (
|
type = lib.types.attrsOf (lib.types.submodule ({name, ...}: {
|
||||||
lib.types.submodule (
|
options = {
|
||||||
{ name, ... }:
|
name = lib.mkOption {
|
||||||
{
|
description = "Host name";
|
||||||
options = {
|
type = lib.types.strMatching "^$|^[[:alnum:]]([[:alnum:]_-]{0,61}[[:alnum:]])?$";
|
||||||
name = lib.mkOption {
|
default = name;
|
||||||
description = "Host name";
|
};
|
||||||
type = lib.types.strMatching "^$|^[[:alnum:]]([[:alnum:]_-]{0,61}[[:alnum:]])?$";
|
system = lib.mkOption {
|
||||||
default = name;
|
description = "NixOS architecture (a.k.a. system)";
|
||||||
};
|
type = lib.types.str;
|
||||||
system = lib.mkOption {
|
default = "x86_64-darwin";
|
||||||
description = "NixOS architecture (a.k.a. system)";
|
};
|
||||||
type = lib.types.str;
|
nixpkgs = lib.mkOption {
|
||||||
default = "x86_64-darwin";
|
description = "Used nixpkgs";
|
||||||
};
|
type = lib.types.anything;
|
||||||
nixpkgs = lib.mkOption {
|
default = inputs.nixpkgsUnstable;
|
||||||
description = "Used nixpkgs";
|
};
|
||||||
type = lib.types.anything;
|
extraModules = lib.mkOption {
|
||||||
default = inputs.nixpkgs;
|
description = "Extra NixOS modules";
|
||||||
};
|
type = lib.types.listOf lib.types.deferredModule;
|
||||||
extraModules = lib.mkOption {
|
default = [];
|
||||||
description = "Extra NixOS modules";
|
};
|
||||||
type = lib.types.listOf lib.types.deferredModule;
|
overlays = lib.mkOption {
|
||||||
default = [ ];
|
description = "Enabled Nixpkgs overlays";
|
||||||
};
|
type = lib.types.listOf (lib.mkOptionType {
|
||||||
overlays = lib.mkOption {
|
name = "nixpkgs-overlay";
|
||||||
description = "Enabled Nixpkgs overlays";
|
description = "nixpkgs overlay";
|
||||||
type = lib.types.listOf (
|
check = lib.isFunction;
|
||||||
lib.mkOptionType {
|
merge = lib.mergeOneOption;
|
||||||
name = "nixpkgs-overlay";
|
});
|
||||||
description = "nixpkgs overlay";
|
default = [];
|
||||||
check = lib.isFunction;
|
};
|
||||||
merge = lib.mergeOneOption;
|
};
|
||||||
}
|
}));
|
||||||
);
|
|
||||||
default = [ ];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
)
|
|
||||||
);
|
|
||||||
};
|
|
||||||
nixOnDroidHosts = lib.mkOption {
|
|
||||||
type = lib.types.attrsOf (
|
|
||||||
lib.types.submodule (
|
|
||||||
{ name, ... }:
|
|
||||||
{
|
|
||||||
options = {
|
|
||||||
name = lib.mkOption {
|
|
||||||
description = "Host name";
|
|
||||||
type = lib.types.strMatching "^$|^[[:alnum:]]([[:alnum:]_-]{0,61}[[:alnum:]])?$";
|
|
||||||
default = name;
|
|
||||||
};
|
|
||||||
system = lib.mkOption {
|
|
||||||
description = "NixOS architecture (a.k.a. system)";
|
|
||||||
type = lib.types.str;
|
|
||||||
default = "aarch64-linux";
|
|
||||||
};
|
|
||||||
nixpkgs = lib.mkOption {
|
|
||||||
description = "Used nixpkgs";
|
|
||||||
type = lib.types.anything;
|
|
||||||
default = inputs.nixpkgs;
|
|
||||||
};
|
|
||||||
extraModules = lib.mkOption {
|
|
||||||
description = "Extra NixOS modules";
|
|
||||||
type = lib.types.listOf lib.types.deferredModule;
|
|
||||||
default = [ ];
|
|
||||||
};
|
|
||||||
overlays = lib.mkOption {
|
|
||||||
description = "Enabled Nixpkgs overlays";
|
|
||||||
type = lib.types.listOf (
|
|
||||||
lib.mkOptionType {
|
|
||||||
name = "nixpkgs-overlay";
|
|
||||||
description = "nixpkgs overlay";
|
|
||||||
check = lib.isFunction;
|
|
||||||
merge = lib.mergeOneOption;
|
|
||||||
}
|
|
||||||
);
|
|
||||||
default = [ ];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
)
|
|
||||||
);
|
|
||||||
};
|
};
|
||||||
hosts = lib.mkOption {
|
hosts = lib.mkOption {
|
||||||
description = "Host configuration";
|
description = "Host configuration";
|
||||||
type = lib.types.attrsOf (
|
type = lib.types.attrsOf (lib.types.submodule ({name, ...}: {
|
||||||
lib.types.submodule (
|
options = {
|
||||||
{ name, ... }:
|
name = lib.mkOption {
|
||||||
{
|
description = "Host name";
|
||||||
options = {
|
type = lib.types.strMatching "^$|^[[:alnum:]]([[:alnum:]_-]{0,61}[[:alnum:]])?$";
|
||||||
name = lib.mkOption {
|
default = name;
|
||||||
description = "Host name";
|
};
|
||||||
type = lib.types.strMatching "^$|^[[:alnum:]]([[:alnum:]_-]{0,61}[[:alnum:]])?$";
|
system = lib.mkOption {
|
||||||
default = name;
|
description = "NixOS architecture (a.k.a. system)";
|
||||||
};
|
type = lib.types.str;
|
||||||
system = lib.mkOption {
|
default = "x86_64-linux";
|
||||||
description = "NixOS architecture (a.k.a. system)";
|
};
|
||||||
type = lib.types.str;
|
nixpkgs = lib.mkOption {
|
||||||
default = "x86_64-linux";
|
description = "Used nixpkgs";
|
||||||
};
|
type = lib.types.anything;
|
||||||
nixpkgs = lib.mkOption {
|
default = inputs.nixpkgsUnstable;
|
||||||
description = "Used nixpkgs";
|
};
|
||||||
type = lib.types.anything;
|
vpn = {
|
||||||
default = inputs.nixpkgs;
|
|
||||||
};
|
|
||||||
homeManager = lib.mkOption {
|
|
||||||
description = "Used home-manager";
|
|
||||||
type = lib.types.anything;
|
|
||||||
default = inputs.homeManager;
|
|
||||||
};
|
|
||||||
vpn = {
|
|
||||||
ip = lib.mkOption {
|
|
||||||
description = "Wireguard VPN ip";
|
|
||||||
type = lib.types.str;
|
|
||||||
};
|
|
||||||
publicKey = lib.mkOption {
|
|
||||||
description = "Wireguard public key";
|
|
||||||
type = lib.types.str;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
secrets = lib.mkOption {
|
|
||||||
description = "List of secrets names in the `secrets` folder";
|
|
||||||
type = lib.types.attrsOf (
|
|
||||||
lib.types.submodule (
|
|
||||||
{ name, ... }:
|
|
||||||
{
|
|
||||||
options = {
|
|
||||||
owner = lib.mkOption {
|
|
||||||
type = lib.types.str;
|
|
||||||
default = "root";
|
|
||||||
};
|
|
||||||
group = lib.mkOption {
|
|
||||||
type = lib.types.str;
|
|
||||||
default = "root";
|
|
||||||
};
|
|
||||||
file = lib.mkOption {
|
|
||||||
type = lib.types.path;
|
|
||||||
default = "${self.outPath}/secrets/${name}.age";
|
|
||||||
};
|
|
||||||
mode = lib.mkOption {
|
|
||||||
# TODO improve type
|
|
||||||
type = lib.types.str;
|
|
||||||
default = "0440";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
)
|
|
||||||
);
|
|
||||||
default = { };
|
|
||||||
};
|
|
||||||
enableHomeManager = lib.mkOption {
|
|
||||||
description = "Enable home-manager module";
|
|
||||||
type = lib.types.bool;
|
|
||||||
default = true;
|
|
||||||
};
|
|
||||||
overlays = lib.mkOption {
|
|
||||||
description = "Enabled Nixpkgs overlays";
|
|
||||||
type = lib.types.listOf (
|
|
||||||
lib.mkOptionType {
|
|
||||||
name = "nixpkgs-overlay";
|
|
||||||
description = "nixpkgs overlay";
|
|
||||||
check = lib.isFunction;
|
|
||||||
merge = lib.mergeOneOption;
|
|
||||||
}
|
|
||||||
);
|
|
||||||
default = [ ];
|
|
||||||
};
|
|
||||||
extraModules = lib.mkOption {
|
|
||||||
description = "Extra NixOS modules";
|
|
||||||
type = lib.types.listOf lib.types.deferredModule;
|
|
||||||
default = [ ];
|
|
||||||
};
|
|
||||||
extraHmModules = lib.mkOption {
|
|
||||||
description = "Extra home-manager modules";
|
|
||||||
type = lib.types.listOf lib.types.deferredModule;
|
|
||||||
default = [ ];
|
|
||||||
};
|
|
||||||
extraHmModulesUser = lib.mkOption {
|
|
||||||
description = "User for which to import extraHmModulesUser";
|
|
||||||
type = lib.types.str;
|
|
||||||
default = "ccr";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
config.overlays = with inputs; cfg.overlays;
|
|
||||||
}
|
|
||||||
)
|
|
||||||
);
|
|
||||||
default = { };
|
|
||||||
};
|
|
||||||
vpnExtra = lib.mkOption {
|
|
||||||
type = lib.types.attrsOf (
|
|
||||||
lib.types.submodule {
|
|
||||||
options = {
|
|
||||||
ip = lib.mkOption {
|
ip = lib.mkOption {
|
||||||
description = "Wireguard VPN ip";
|
description = "Wireguard VPN ip";
|
||||||
type = lib.types.str;
|
type = lib.types.str;
|
||||||
|
@ -219,85 +77,149 @@ in
|
||||||
type = lib.types.str;
|
type = lib.types.str;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
secrets = lib.mkOption {
|
||||||
);
|
description = "List of secrets names in the `secrets` folder";
|
||||||
default = { };
|
type = lib.types.attrsOf (lib.types.submodule ({name, ...}: {
|
||||||
|
options = {
|
||||||
|
owner = lib.mkOption {
|
||||||
|
type = lib.types.str;
|
||||||
|
default = "root";
|
||||||
|
};
|
||||||
|
group = lib.mkOption {
|
||||||
|
type = lib.types.str;
|
||||||
|
default = "root";
|
||||||
|
};
|
||||||
|
file = lib.mkOption {
|
||||||
|
type = lib.types.path;
|
||||||
|
default = "${self.outPath}/secrets/${name}.age";
|
||||||
|
};
|
||||||
|
mode = lib.mkOption {
|
||||||
|
# TODO improve type
|
||||||
|
type = lib.types.str;
|
||||||
|
default = "0440";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}));
|
||||||
|
default = {};
|
||||||
|
};
|
||||||
|
enableHomeManager = lib.mkOption {
|
||||||
|
description = "Enable home-manager module";
|
||||||
|
type = lib.types.bool;
|
||||||
|
default = true;
|
||||||
|
};
|
||||||
|
overlays = lib.mkOption {
|
||||||
|
description = "Enabled Nixpkgs overlays";
|
||||||
|
type = lib.types.listOf (lib.mkOptionType {
|
||||||
|
name = "nixpkgs-overlay";
|
||||||
|
description = "nixpkgs overlay";
|
||||||
|
check = lib.isFunction;
|
||||||
|
merge = lib.mergeOneOption;
|
||||||
|
});
|
||||||
|
default = [];
|
||||||
|
};
|
||||||
|
extraModules = lib.mkOption {
|
||||||
|
description = "Extra NixOS modules";
|
||||||
|
type = lib.types.listOf lib.types.deferredModule;
|
||||||
|
default = [];
|
||||||
|
};
|
||||||
|
extraHmModules = lib.mkOption {
|
||||||
|
description = "Extra home-manager modules";
|
||||||
|
type = lib.types.listOf lib.types.deferredModule;
|
||||||
|
default = [];
|
||||||
|
};
|
||||||
|
extraHmModulesUser = lib.mkOption {
|
||||||
|
description = "User for which to import extraHmModulesUser";
|
||||||
|
type = lib.types.str;
|
||||||
|
default = "ccr";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
config.overlays = with inputs;
|
||||||
|
[
|
||||||
|
nur.overlay
|
||||||
|
]
|
||||||
|
++ cfg.overlays;
|
||||||
|
}));
|
||||||
|
default = {};
|
||||||
|
};
|
||||||
|
vpnExtra = lib.mkOption {
|
||||||
|
type = lib.types.attrsOf (lib.types.submodule {
|
||||||
|
options = {
|
||||||
|
ip = lib.mkOption {
|
||||||
|
description = "Wireguard VPN ip";
|
||||||
|
type = lib.types.str;
|
||||||
|
};
|
||||||
|
publicKey = lib.mkOption {
|
||||||
|
description = "Wireguard public key";
|
||||||
|
type = lib.types.str;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
});
|
||||||
|
default = {};
|
||||||
};
|
};
|
||||||
_mkNixosConfiguration = lib.mkOption {
|
_mkNixosConfiguration = lib.mkOption {
|
||||||
description = "Function returning a proper NixOS configuration";
|
description = "Function returning a proper NixOS configuration";
|
||||||
type = lib.types.functionTo (lib.types.functionTo lib.types.attrs); # TODO improve this type
|
type = lib.types.functionTo (lib.types.functionTo lib.types.attrs); # TODO improve this type
|
||||||
internal = true;
|
internal = true;
|
||||||
default =
|
default = hostname: config:
|
||||||
hostname: config:
|
|
||||||
config.nixpkgs.lib.nixosSystem {
|
config.nixpkgs.lib.nixosSystem {
|
||||||
inherit (config) system;
|
inherit (config) system;
|
||||||
modules =
|
modules =
|
||||||
[
|
[
|
||||||
(
|
({lib, ...}: {
|
||||||
{ lib, ... }:
|
networking.hostName = lib.mkForce hostname;
|
||||||
{
|
nixpkgs.overlays = config.overlays;
|
||||||
networking.hostName = lib.mkForce hostname;
|
})
|
||||||
nixpkgs.overlays = config.overlays;
|
|
||||||
}
|
|
||||||
)
|
|
||||||
"${self.outPath}/hosts/${hostname}"
|
"${self.outPath}/hosts/${hostname}"
|
||||||
]
|
]
|
||||||
++ (lib.optionals (config.secrets != [ ]) [
|
++ (lib.optionals (config.secrets != []) [
|
||||||
inputs.agenix.nixosModules.default
|
inputs.agenix.nixosModules.default
|
||||||
(
|
({lib, ...}: let
|
||||||
{ lib, ... }:
|
allSecrets = lib.mapAttrs' (name: value: {
|
||||||
let
|
name = lib.removeSuffix ".age" name;
|
||||||
allSecrets = lib.mapAttrs' (name: value: {
|
inherit value;
|
||||||
name = lib.removeSuffix ".age" name;
|
}) (import "${self.outPath}/secrets/secrets.nix");
|
||||||
inherit value;
|
filteredSecrets =
|
||||||
}) (import "${self.outPath}/secrets/secrets.nix");
|
lib.filterAttrs
|
||||||
filteredSecrets = lib.filterAttrs (name: _: builtins.hasAttr name config.secrets) allSecrets;
|
(name: _: builtins.hasAttr name config.secrets)
|
||||||
in
|
allSecrets;
|
||||||
{
|
in {
|
||||||
age.secrets = lib.mapAttrs' (name: _: {
|
age.secrets =
|
||||||
|
lib.mapAttrs' (name: _: {
|
||||||
name = builtins.baseNameOf name;
|
name = builtins.baseNameOf name;
|
||||||
value = {
|
value = {
|
||||||
inherit (config.secrets.${name})
|
inherit (config.secrets.${name}) owner group file mode;
|
||||||
owner
|
|
||||||
group
|
|
||||||
file
|
|
||||||
mode
|
|
||||||
;
|
|
||||||
};
|
};
|
||||||
}) filteredSecrets;
|
})
|
||||||
}
|
filteredSecrets;
|
||||||
)
|
})
|
||||||
])
|
])
|
||||||
++ (lib.optionals config.enableHomeManager (
|
++ (lib.optionals config.enableHomeManager (let
|
||||||
let
|
user = config.extraHmModulesUser;
|
||||||
user = config.extraHmModulesUser;
|
extraHmModules = config.extraHmModules;
|
||||||
extraHmModules = config.extraHmModules;
|
in [
|
||||||
in
|
inputs.homeManager.nixosModule
|
||||||
[
|
({
|
||||||
config.homeManager.nixosModules.home-manager
|
config,
|
||||||
(
|
pkgs,
|
||||||
{
|
...
|
||||||
config,
|
}: {
|
||||||
...
|
home-manager.users."${user}" = {
|
||||||
}:
|
imports = extraHmModules;
|
||||||
{
|
_module.args = {
|
||||||
home-manager.users."${user}" = {
|
age = config.age or {};
|
||||||
imports = extraHmModules;
|
fleetFlake = self;
|
||||||
_module.args = {
|
pkgsStable = inputs.nixpkgsStable.legacyPackages.${pkgs.system};
|
||||||
age = config.age or { };
|
};
|
||||||
fleetFlake = self;
|
};
|
||||||
};
|
})
|
||||||
};
|
]))
|
||||||
}
|
|
||||||
)
|
|
||||||
]
|
|
||||||
))
|
|
||||||
++ config.extraModules;
|
++ config.extraModules;
|
||||||
specialArgs = {
|
specialArgs = {
|
||||||
fleetModules = builtins.map (moduleName: "${self.outPath}/modules/${moduleName}");
|
fleetModules = builtins.map (moduleName: "${self.outPath}/modules/${moduleName}");
|
||||||
fleetHmModules = builtins.map (moduleName: "${self.outPath}/hmModules/${moduleName}");
|
fleetHmModules = builtins.map (moduleName: "${self.outPath}/hmModules/${moduleName}");
|
||||||
fleetFlake = self;
|
fleetFlake = self;
|
||||||
vpn = cfg.vpnExtra // (lib.mapAttrs (_: host: host.vpn) cfg.hosts);
|
vpn = cfg.vpnExtra // (lib.mapAttrs (_: host: host.vpn) cfg.hosts);
|
||||||
|
inherit (flakePartsArgs.config.allSystems.${config.system}.allModuleArgs.config._module.args) inputs';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -305,55 +227,21 @@ in
|
||||||
description = "Function returning a proper Darwin configuration";
|
description = "Function returning a proper Darwin configuration";
|
||||||
type = lib.types.functionTo (lib.types.functionTo lib.types.attrs); # TODO improve this type
|
type = lib.types.functionTo (lib.types.functionTo lib.types.attrs); # TODO improve this type
|
||||||
internal = true;
|
internal = true;
|
||||||
default =
|
default = hostname: config:
|
||||||
hostname: config:
|
|
||||||
inputs.nixDarwin.lib.darwinSystem {
|
inputs.nixDarwin.lib.darwinSystem {
|
||||||
modules = [
|
modules = [
|
||||||
(
|
({
|
||||||
{
|
lib,
|
||||||
lib,
|
pkgs,
|
||||||
...
|
...
|
||||||
}:
|
}: {
|
||||||
{
|
networking.hostName = lib.mkForce hostname;
|
||||||
networking.hostName = lib.mkForce hostname;
|
nixpkgs.overlays = config.overlays;
|
||||||
nixpkgs.overlays = config.overlays;
|
nixpkgs.hostPlatform = config.system;
|
||||||
nixpkgs.hostPlatform = config.system;
|
})
|
||||||
}
|
|
||||||
)
|
|
||||||
"${self.outPath}/hosts/${hostname}"
|
"${self.outPath}/hosts/${hostname}"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
_mkNixOnDroidConfiguration = lib.mkOption {
|
|
||||||
description = "Function returning a proper nix-on-droid configuration";
|
|
||||||
type = lib.types.functionTo (lib.types.functionTo lib.types.attrs); # TODO improve this type
|
|
||||||
internal = true;
|
|
||||||
default =
|
|
||||||
hostname: config:
|
|
||||||
inputs.nix-on-droid.lib.nixOnDroidConfiguration {
|
|
||||||
pkgs = inputs.nixpkgs.legacyPackages.aarch64-linux;
|
|
||||||
modules = [
|
|
||||||
(
|
|
||||||
{
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
{
|
|
||||||
nixpkgs.overlays = config.overlays;
|
|
||||||
_module.args.fleetFlake = self;
|
|
||||||
}
|
|
||||||
)
|
|
||||||
"${self.outPath}/hosts/${hostname}"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
config = {
|
|
||||||
flake.nixosConfigurations = lib.mapAttrs config.fleet._mkNixosConfiguration config.fleet.hosts;
|
|
||||||
|
|
||||||
flake.darwinConfigurations = lib.mapAttrs config.fleet._mkDarwinConfiguration config.fleet.darwinHosts;
|
|
||||||
|
|
||||||
flake.nixOnDroidConfigurations = lib.mapAttrs config.fleet._mkNixOnDroidConfiguration config.fleet.nixOnDroidHosts;
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue