Compare commits
4 commits
7c7e9317db
...
184ef24913
| Author | SHA1 | Date | |
|---|---|---|---|
| 184ef24913 | |||
| 4da8981990 | |||
| f4c27362c4 | |||
| 7f4c0310db |
125 changed files with 1725 additions and 1736 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
|
@ -1,2 +1,5 @@
|
||||||
### direnv ###
|
### direnv ###
|
||||||
.direnv
|
.direnv
|
||||||
|
|
||||||
|
### pre-commit ###
|
||||||
|
.pre-commit-config.yaml
|
||||||
|
|
|
||||||
3
alejandra.toml
Normal file
3
alejandra.toml
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
# (experimental) Configuration options for Alejandra
|
||||||
|
|
||||||
|
indentation = "TwoSpaces" # Or: FourSpaces, Tabs
|
||||||
112
flake.lock
generated
112
flake.lock
generated
|
|
@ -176,6 +176,22 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"flake-compat": {
|
"flake-compat": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1696426674,
|
||||||
|
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
|
||||||
|
"owner": "edolstra",
|
||||||
|
"repo": "flake-compat",
|
||||||
|
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "edolstra",
|
||||||
|
"repo": "flake-compat",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"flake-compat_2": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1733328505,
|
"lastModified": 1733328505,
|
||||||
|
|
@ -191,7 +207,7 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"flake-compat_2": {
|
"flake-compat_3": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1696426674,
|
"lastModified": 1696426674,
|
||||||
|
|
@ -207,7 +223,7 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"flake-compat_3": {
|
"flake-compat_4": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1696426674,
|
"lastModified": 1696426674,
|
||||||
|
|
@ -344,8 +360,8 @@
|
||||||
},
|
},
|
||||||
"git-hooks": {
|
"git-hooks": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-compat": "flake-compat_2",
|
"flake-compat": "flake-compat_3",
|
||||||
"gitignore": "gitignore",
|
"gitignore": "gitignore_2",
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"neovim-nightly-overlay",
|
"neovim-nightly-overlay",
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
|
|
@ -365,7 +381,48 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"git-hooks-nix": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-compat": "flake-compat",
|
||||||
|
"gitignore": "gitignore",
|
||||||
|
"nixpkgs": "nixpkgs_2"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1742649964,
|
||||||
|
"narHash": "sha256-DwOTp7nvfi8mRfuL1escHDXabVXFGT1VlPD1JHrtrco=",
|
||||||
|
"owner": "cachix",
|
||||||
|
"repo": "git-hooks.nix",
|
||||||
|
"rev": "dcf5072734cb576d2b0c59b2ac44f5050b5eac82",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "cachix",
|
||||||
|
"repo": "git-hooks.nix",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"gitignore": {
|
"gitignore": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"git-hooks-nix",
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1709087332,
|
||||||
|
"narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=",
|
||||||
|
"owner": "hercules-ci",
|
||||||
|
"repo": "gitignore.nix",
|
||||||
|
"rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "hercules-ci",
|
||||||
|
"repo": "gitignore.nix",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"gitignore_2": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"neovim-nightly-overlay",
|
"neovim-nightly-overlay",
|
||||||
|
|
@ -387,7 +444,7 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"gitignore_2": {
|
"gitignore_3": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"pre-commit-hooks",
|
"pre-commit-hooks",
|
||||||
|
|
@ -496,7 +553,7 @@
|
||||||
"jovian": {
|
"jovian": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nix-github-actions": "nix-github-actions",
|
"nix-github-actions": "nix-github-actions",
|
||||||
"nixpkgs": "nixpkgs_2"
|
"nixpkgs": "nixpkgs_3"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1744436521,
|
"lastModified": 1744436521,
|
||||||
|
|
@ -551,12 +608,12 @@
|
||||||
},
|
},
|
||||||
"neovim-nightly-overlay": {
|
"neovim-nightly-overlay": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-compat": "flake-compat",
|
"flake-compat": "flake-compat_2",
|
||||||
"flake-parts": "flake-parts_2",
|
"flake-parts": "flake-parts_2",
|
||||||
"git-hooks": "git-hooks",
|
"git-hooks": "git-hooks",
|
||||||
"hercules-ci-effects": "hercules-ci-effects",
|
"hercules-ci-effects": "hercules-ci-effects",
|
||||||
"neovim-src": "neovim-src",
|
"neovim-src": "neovim-src",
|
||||||
"nixpkgs": "nixpkgs_3",
|
"nixpkgs": "nixpkgs_4",
|
||||||
"treefmt-nix": "treefmt-nix_2"
|
"treefmt-nix": "treefmt-nix_2"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
|
|
@ -777,6 +834,22 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs_2": {
|
"nixpkgs_2": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1730768919,
|
||||||
|
"narHash": "sha256-8AKquNnnSaJRXZxc5YmF/WfmxiHX6MMZZasRP6RRQkE=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "a04d33c0c3f1a59a2c1cb0c6e34cd24500e5a1dc",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"ref": "nixpkgs-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs_3": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1743583204,
|
"lastModified": 1743583204,
|
||||||
"narHash": "sha256-F7n4+KOIfWrwoQjXrL2wD9RhFYLs2/GGe/MQY1sSdlE=",
|
"narHash": "sha256-F7n4+KOIfWrwoQjXrL2wD9RhFYLs2/GGe/MQY1sSdlE=",
|
||||||
|
|
@ -792,7 +865,7 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs_3": {
|
"nixpkgs_4": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1744316434,
|
"lastModified": 1744316434,
|
||||||
"narHash": "sha256-lzFCg/1C39pyY2hMB2gcuHV79ozpOz/Vu15hdjiFOfI=",
|
"narHash": "sha256-lzFCg/1C39pyY2hMB2gcuHV79ozpOz/Vu15hdjiFOfI=",
|
||||||
|
|
@ -808,7 +881,7 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs_4": {
|
"nixpkgs_5": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1744442362,
|
"lastModified": 1744442362,
|
||||||
"narHash": "sha256-i47t4DRIZgwBZw2Osbrp1OJhhO1k/n+QzRx+TrmfE9Y=",
|
"narHash": "sha256-i47t4DRIZgwBZw2Osbrp1OJhhO1k/n+QzRx+TrmfE9Y=",
|
||||||
|
|
@ -824,7 +897,7 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs_5": {
|
"nixpkgs_6": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1744232761,
|
"lastModified": 1744232761,
|
||||||
"narHash": "sha256-gbl9hE39nQRpZaLjhWKmEu5ejtQsgI5TWYrIVVJn30U=",
|
"narHash": "sha256-gbl9hE39nQRpZaLjhWKmEu5ejtQsgI5TWYrIVVJn30U=",
|
||||||
|
|
@ -840,7 +913,7 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs_6": {
|
"nixpkgs_7": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1730768919,
|
"lastModified": 1730768919,
|
||||||
"narHash": "sha256-8AKquNnnSaJRXZxc5YmF/WfmxiHX6MMZZasRP6RRQkE=",
|
"narHash": "sha256-8AKquNnnSaJRXZxc5YmF/WfmxiHX6MMZZasRP6RRQkE=",
|
||||||
|
|
@ -856,7 +929,7 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs_7": {
|
"nixpkgs_8": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1692934111,
|
"lastModified": 1692934111,
|
||||||
"narHash": "sha256-9EEE59v/esKNMR5zKbLRV9NoRPYvERw5jHQOnfr47bk=",
|
"narHash": "sha256-9EEE59v/esKNMR5zKbLRV9NoRPYvERw5jHQOnfr47bk=",
|
||||||
|
|
@ -899,7 +972,7 @@
|
||||||
"nur": {
|
"nur": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-parts": "flake-parts_4",
|
"flake-parts": "flake-parts_4",
|
||||||
"nixpkgs": "nixpkgs_5",
|
"nixpkgs": "nixpkgs_6",
|
||||||
"treefmt-nix": "treefmt-nix_3"
|
"treefmt-nix": "treefmt-nix_3"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
|
|
@ -941,9 +1014,9 @@
|
||||||
},
|
},
|
||||||
"pre-commit-hooks": {
|
"pre-commit-hooks": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-compat": "flake-compat_3",
|
"flake-compat": "flake-compat_4",
|
||||||
"gitignore": "gitignore_2",
|
"gitignore": "gitignore_3",
|
||||||
"nixpkgs": "nixpkgs_6"
|
"nixpkgs": "nixpkgs_7"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1742649964,
|
"lastModified": 1742649964,
|
||||||
|
|
@ -966,6 +1039,7 @@
|
||||||
"clan-core": "clan-core",
|
"clan-core": "clan-core",
|
||||||
"filetags": "filetags",
|
"filetags": "filetags",
|
||||||
"flake-parts": "flake-parts",
|
"flake-parts": "flake-parts",
|
||||||
|
"git-hooks-nix": "git-hooks-nix",
|
||||||
"home-manager": "home-manager",
|
"home-manager": "home-manager",
|
||||||
"impermanence": "impermanence",
|
"impermanence": "impermanence",
|
||||||
"jovian": "jovian",
|
"jovian": "jovian",
|
||||||
|
|
@ -974,7 +1048,7 @@
|
||||||
"niri": "niri",
|
"niri": "niri",
|
||||||
"nix-index-database": "nix-index-database",
|
"nix-index-database": "nix-index-database",
|
||||||
"nix-monitored": "nix-monitored",
|
"nix-monitored": "nix-monitored",
|
||||||
"nixpkgs": "nixpkgs_4",
|
"nixpkgs": "nixpkgs_5",
|
||||||
"nixvim": "nixvim",
|
"nixvim": "nixvim",
|
||||||
"nur": "nur",
|
"nur": "nur",
|
||||||
"pre-commit-hooks": "pre-commit-hooks",
|
"pre-commit-hooks": "pre-commit-hooks",
|
||||||
|
|
@ -1099,7 +1173,7 @@
|
||||||
"timers": {
|
"timers": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"naersk": "naersk",
|
"naersk": "naersk",
|
||||||
"nixpkgs": "nixpkgs_7",
|
"nixpkgs": "nixpkgs_8",
|
||||||
"utils": "utils"
|
"utils": "utils"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
|
|
|
||||||
25
flake.nix
25
flake.nix
|
|
@ -1,6 +1,5 @@
|
||||||
{
|
{
|
||||||
inputs =
|
inputs = {
|
||||||
{
|
|
||||||
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
|
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
|
||||||
master.url = "github:nixos/nixpkgs";
|
master.url = "github:nixos/nixpkgs";
|
||||||
stable.url = "github:nixos/nixpkgs/nixos-24.11";
|
stable.url = "github:nixos/nixpkgs/nixos-24.11";
|
||||||
|
|
@ -8,11 +7,11 @@
|
||||||
# New flake-parts input
|
# New flake-parts input
|
||||||
flake-parts.url = "github:hercules-ci/flake-parts";
|
flake-parts.url = "github:hercules-ci/flake-parts";
|
||||||
flake-parts.inputs.nixpkgs-lib.follows = "nixpkgs";
|
flake-parts.inputs.nixpkgs-lib.follows = "nixpkgs";
|
||||||
|
git-hooks-nix.url = "github:cachix/git-hooks.nix";
|
||||||
|
|
||||||
clan-core = {
|
clan-core = {
|
||||||
url = "git+https://git.clan.lol/clan/clan-core";
|
url = "git+https://git.clan.lol/clan/clan-core";
|
||||||
inputs.nixpkgs.follows = "nixpkgs"; # Needed if your configuration uses nixpkgs unstable.
|
inputs.nixpkgs.follows = "nixpkgs"; # Needed if your configuration uses nixpkgs unstable.
|
||||||
# New
|
|
||||||
inputs.flake-parts.follows = "flake-parts";
|
inputs.flake-parts.follows = "flake-parts";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -58,7 +57,7 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = inputs @ {flake-parts, ...}:
|
outputs = inputs @ {flake-parts, ...}:
|
||||||
flake-parts.lib.mkFlake { inherit inputs; } ({ self, pkgs, ... }: {
|
flake-parts.lib.mkFlake {inherit inputs;} ({self, ...}: {
|
||||||
# We define our own systems below. you can still use this to add system specific outputs to your flake.
|
# We define our own systems below. you can still use this to add system specific outputs to your flake.
|
||||||
# See: https://flake.parts/getting-started
|
# See: https://flake.parts/getting-started
|
||||||
systems = ["x86_64-linux"];
|
systems = ["x86_64-linux"];
|
||||||
|
|
@ -66,11 +65,25 @@
|
||||||
# import clan-core modules
|
# import clan-core modules
|
||||||
imports = [
|
imports = [
|
||||||
inputs.clan-core.flakeModules.default
|
inputs.clan-core.flakeModules.default
|
||||||
|
inputs.git-hooks-nix.flakeModule
|
||||||
];
|
];
|
||||||
|
|
||||||
perSystem = { config, inputs', pkgs, ... }: {
|
perSystem = {
|
||||||
|
config,
|
||||||
|
inputs',
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
devShells.default = pkgs.mkShell {
|
devShells.default = pkgs.mkShell {
|
||||||
packages = [ inputs'.clan-core.packages.clan-cli ];
|
inherit (config.pre-commit.devShell) shellHook nativeBuildInputs;
|
||||||
|
packages = [inputs'.clan-core.packages.clan-cli pkgs.alejandra];
|
||||||
|
};
|
||||||
|
pre-commit.settings.hooks = {
|
||||||
|
alejandra.enable = true;
|
||||||
|
check-merge-conflicts.enable = true;
|
||||||
|
flake-checker.enable = true;
|
||||||
|
deadnix.enable = true;
|
||||||
|
nil.enable = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,7 @@
|
||||||
# Edit this configuration file to define what should be installed on
|
# Edit this configuration file to define what should be installed on
|
||||||
# your system. Help is available in the configuration.nix(5) man page
|
# your system. Help is available in the configuration.nix(5) man page
|
||||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||||||
{ pkgs
|
{pkgs, ...}: {
|
||||||
, config
|
|
||||||
, inputs
|
|
||||||
, ...
|
|
||||||
}:
|
|
||||||
|
|
||||||
{
|
|
||||||
imports = [
|
imports = [
|
||||||
# Include the results of the hardware scan.
|
# Include the results of the hardware scan.
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
|
|
@ -53,6 +47,8 @@
|
||||||
stable.calibre # NOTE: breaks often in unstable
|
stable.calibre # NOTE: breaks often in unstable
|
||||||
];
|
];
|
||||||
|
|
||||||
|
networking.firewall.allowedTCPPorts = [9090];
|
||||||
|
|
||||||
home-manager.users.moritz.services.kanshi.settings = [
|
home-manager.users.moritz.services.kanshi.settings = [
|
||||||
{
|
{
|
||||||
profile.name = "default";
|
profile.name = "default";
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,4 @@
|
||||||
{ lib, pkgs, ... }:
|
{pkgs, ...}: {
|
||||||
|
|
||||||
{
|
|
||||||
# needed for zfs pool
|
# needed for zfs pool
|
||||||
networking.hostId = "1f8b8073";
|
networking.hostId = "1f8b8073";
|
||||||
disko.devices = {
|
disko.devices = {
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,13 @@
|
||||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||||
# and may be overwritten by future invocations. Please make changes
|
# and may be overwritten by future invocations. Please make changes
|
||||||
# to /etc/nixos/configuration.nix instead.
|
# to /etc/nixos/configuration.nix instead.
|
||||||
{ config, lib, pkgs, modulesPath, ... }:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
imports =
|
config,
|
||||||
[
|
lib,
|
||||||
|
modulesPath,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
imports = [
|
||||||
(modulesPath + "/installer/scan/not-detected.nix")
|
(modulesPath + "/installer/scan/not-detected.nix")
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -15,10 +15,12 @@
|
||||||
|
|
||||||
networking = {
|
networking = {
|
||||||
interfaces.enp2s0 = {
|
interfaces.enp2s0 = {
|
||||||
ipv4.addresses = [{
|
ipv4.addresses = [
|
||||||
|
{
|
||||||
address = "192.168.0.3";
|
address = "192.168.0.3";
|
||||||
prefixLength = 24;
|
prefixLength = 24;
|
||||||
}];
|
}
|
||||||
|
];
|
||||||
};
|
};
|
||||||
defaultGateway = {
|
defaultGateway = {
|
||||||
address = "192.168.0.1";
|
address = "192.168.0.1";
|
||||||
|
|
|
||||||
|
|
@ -1,27 +1,21 @@
|
||||||
{ lib, ... }:
|
{lib, ...}: rec {
|
||||||
|
mkDate = longDate:
|
||||||
rec {
|
lib.concatStringsSep "-" [
|
||||||
mkDate = longDate: lib.concatStringsSep "-" [
|
|
||||||
(builtins.substring 0 4 longDate)
|
(builtins.substring 0 4 longDate)
|
||||||
(builtins.substring 4 2 longDate)
|
(builtins.substring 4 2 longDate)
|
||||||
(builtins.substring 6 2 longDate)
|
(builtins.substring 6 2 longDate)
|
||||||
];
|
];
|
||||||
mkVersionSrc = src: "unstable-" + builtins.substring 0 7 src.rev;
|
mkVersionSrc = src: "unstable-" + builtins.substring 0 7 src.rev;
|
||||||
mkVersionInput = input:
|
mkVersionInput = input: let
|
||||||
let
|
|
||||||
date = mkDate (input.lastModifiedDate or "19700101");
|
date = mkDate (input.lastModifiedDate or "19700101");
|
||||||
rev = input.shortRev or "dirty";
|
rev = input.shortRev or "dirty";
|
||||||
in
|
in "unstable-${date}_${rev}";
|
||||||
"unstable-${date}_${rev}";
|
|
||||||
|
|
||||||
mapModules = f: dir:
|
mapModules = f: dir: let
|
||||||
let
|
filterModules = name: type: let
|
||||||
filterModules = name: type:
|
|
||||||
let
|
|
||||||
isPublic = !(lib.hasPrefix "_" name);
|
isPublic = !(lib.hasPrefix "_" name);
|
||||||
isSomething = type != null;
|
isSomething = type != null;
|
||||||
isModule =
|
isModule = let
|
||||||
let
|
|
||||||
path = "${toString dir}/${name}";
|
path = "${toString dir}/${name}";
|
||||||
isDefault = type == "directory" && builtins.pathExists "${path}/default.nix";
|
isDefault = type == "directory" && builtins.pathExists "${path}/default.nix";
|
||||||
isFile = type == "regular" && lib.hasSuffix ".nix" name && name != "default.nix";
|
isFile = type == "regular" && lib.hasSuffix ".nix" name && name != "default.nix";
|
||||||
|
|
@ -32,8 +26,7 @@ rec {
|
||||||
|
|
||||||
modulesInDir = lib.filterAttrs filterModules (builtins.readDir dir);
|
modulesInDir = lib.filterAttrs filterModules (builtins.readDir dir);
|
||||||
|
|
||||||
mkModule = name: _:
|
mkModule = name: _: let
|
||||||
let
|
|
||||||
path = "${toString dir}/${name}";
|
path = "${toString dir}/${name}";
|
||||||
normalizedName =
|
normalizedName =
|
||||||
if name == "default.nix"
|
if name == "default.nix"
|
||||||
|
|
@ -48,10 +41,8 @@ rec {
|
||||||
|
|
||||||
listModules = mapModules' (path: path);
|
listModules = mapModules' (path: path);
|
||||||
|
|
||||||
mapModulesRec = f: dir:
|
mapModulesRec = f: dir: let
|
||||||
let
|
filterDirs = name: type: let
|
||||||
filterDirs = name: type:
|
|
||||||
let
|
|
||||||
isPublic = !(lib.hasPrefix "_" name);
|
isPublic = !(lib.hasPrefix "_" name);
|
||||||
isSomething = type != null;
|
isSomething = type != null;
|
||||||
isDir = type == "directory";
|
isDir = type == "directory";
|
||||||
|
|
@ -61,18 +52,20 @@ rec {
|
||||||
|
|
||||||
subDirs = lib.filterAttrs filterDirs (builtins.readDir dir);
|
subDirs = lib.filterAttrs filterDirs (builtins.readDir dir);
|
||||||
|
|
||||||
mkSubModule = name: _:
|
mkSubModule = name: _: let
|
||||||
let
|
|
||||||
path = "${toString dir}/${name}";
|
path = "${toString dir}/${name}";
|
||||||
in
|
in
|
||||||
lib.nameValuePair name (mapModulesRec f path);
|
lib.nameValuePair name (mapModulesRec f path);
|
||||||
in
|
in
|
||||||
mapModules f dir //
|
mapModules f dir
|
||||||
(lib.mapAttrs' mkSubModule subDirs);
|
// (lib.mapAttrs' mkSubModule subDirs);
|
||||||
|
|
||||||
mapModulesRec' = f: dir:
|
mapModulesRec' = f: dir: let
|
||||||
let
|
attrValuesRec = attrs:
|
||||||
attrValuesRec = attrs: map (values: if lib.isAttrs values then attrValuesRec values else values) (lib.attrValues attrs);
|
map (values:
|
||||||
|
if lib.isAttrs values
|
||||||
|
then attrValuesRec values
|
||||||
|
else values) (lib.attrValues attrs);
|
||||||
in
|
in
|
||||||
lib.flatten (attrValuesRec (mapModulesRec f dir));
|
lib.flatten (attrValuesRec (mapModulesRec f dir));
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,10 @@
|
||||||
{ lib
|
|
||||||
, config
|
|
||||||
, ...
|
|
||||||
}:
|
|
||||||
let
|
|
||||||
cfg = config.my.ai;
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
cfg = config.my.ai;
|
||||||
|
in {
|
||||||
options.my.ai.enable = lib.mkEnableOption "AI stuff";
|
options.my.ai.enable = lib.mkEnableOption "AI stuff";
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,5 @@
|
||||||
{ lib
|
{lib, ...}:
|
||||||
, ...
|
with lib; {
|
||||||
}:
|
|
||||||
|
|
||||||
with lib;
|
|
||||||
{
|
|
||||||
options.my.shell = {
|
options.my.shell = {
|
||||||
abbreviations = mkOption {
|
abbreviations = mkOption {
|
||||||
default = {};
|
default = {};
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,5 @@
|
||||||
{ lib
|
{lib, ...}:
|
||||||
, ...
|
with lib; {
|
||||||
}:
|
|
||||||
|
|
||||||
with lib;
|
|
||||||
{
|
|
||||||
options.my.terminal = {
|
options.my.terminal = {
|
||||||
package = mkOption {
|
package = mkOption {
|
||||||
description = "Terminal emulator package to use. Gets converted to path of bin automatically.";
|
description = "Terminal emulator package to use. Gets converted to path of bin automatically.";
|
||||||
|
|
|
||||||
|
|
@ -1,36 +1,33 @@
|
||||||
{ config
|
|
||||||
, pkgs
|
|
||||||
, flavor
|
|
||||||
, rosewater
|
|
||||||
, flamingo
|
|
||||||
, pink
|
|
||||||
, mauve
|
|
||||||
, red
|
|
||||||
, maroon
|
|
||||||
, peach
|
|
||||||
, yellow
|
|
||||||
, green
|
|
||||||
, teal
|
|
||||||
, sky
|
|
||||||
, sapphire
|
|
||||||
, blue
|
|
||||||
, lavender
|
|
||||||
, text
|
|
||||||
, subtext1
|
|
||||||
, subtext0
|
|
||||||
, overlay2
|
|
||||||
, overlay1
|
|
||||||
, overlay0
|
|
||||||
, surface2
|
|
||||||
, surface1
|
|
||||||
, surface0
|
|
||||||
, base
|
|
||||||
, mantle
|
|
||||||
, crust
|
|
||||||
, ...
|
|
||||||
}:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
flavor,
|
||||||
|
rosewater,
|
||||||
|
flamingo,
|
||||||
|
pink,
|
||||||
|
mauve,
|
||||||
|
red,
|
||||||
|
maroon,
|
||||||
|
peach,
|
||||||
|
yellow,
|
||||||
|
green,
|
||||||
|
teal,
|
||||||
|
sapphire,
|
||||||
|
blue,
|
||||||
|
lavender,
|
||||||
|
text,
|
||||||
|
subtext1,
|
||||||
|
subtext0,
|
||||||
|
overlay1,
|
||||||
|
overlay0,
|
||||||
|
surface2,
|
||||||
|
surface1,
|
||||||
|
surface0,
|
||||||
|
base,
|
||||||
|
mantle,
|
||||||
|
crust,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
my.programs.tofi.settings = {
|
my.programs.tofi.settings = {
|
||||||
text-color = "#${text}";
|
text-color = "#${text}";
|
||||||
prompt-color = "#${red}";
|
prompt-color = "#${red}";
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,14 @@
|
||||||
{ config, lib, pkgs, ... }:
|
|
||||||
|
|
||||||
with lib;
|
|
||||||
let
|
|
||||||
cfg = config.my.theming;
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
config = mkIf (cfg.enable && cfg.scheme == "catppuccin-frappe")
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib; let
|
||||||
|
cfg = config.my.theming;
|
||||||
|
in {
|
||||||
|
config =
|
||||||
|
mkIf (cfg.enable && cfg.scheme == "catppuccin-frappe")
|
||||||
(import ./_catppuccin.nix
|
(import ./_catppuccin.nix
|
||||||
{
|
{
|
||||||
inherit config lib pkgs;
|
inherit config lib pkgs;
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,14 @@
|
||||||
{ config, lib, pkgs, ... }:
|
|
||||||
|
|
||||||
with lib;
|
|
||||||
let
|
|
||||||
cfg = config.my.theming;
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
config = mkIf (cfg.enable && cfg.scheme == "catppuccin-latte")
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib; let
|
||||||
|
cfg = config.my.theming;
|
||||||
|
in {
|
||||||
|
config =
|
||||||
|
mkIf (cfg.enable && cfg.scheme == "catppuccin-latte")
|
||||||
(import ./_catppuccin.nix
|
(import ./_catppuccin.nix
|
||||||
{
|
{
|
||||||
inherit config lib pkgs;
|
inherit config lib pkgs;
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,14 @@
|
||||||
{ config, lib, pkgs, ... }:
|
|
||||||
|
|
||||||
with lib;
|
|
||||||
let
|
|
||||||
cfg = config.my.theming;
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
config = mkIf (cfg.enable && cfg.scheme == "catppuccin-macchiato")
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib; let
|
||||||
|
cfg = config.my.theming;
|
||||||
|
in {
|
||||||
|
config =
|
||||||
|
mkIf (cfg.enable && cfg.scheme == "catppuccin-macchiato")
|
||||||
(import ./_catppuccin.nix
|
(import ./_catppuccin.nix
|
||||||
{
|
{
|
||||||
inherit config lib pkgs;
|
inherit config lib pkgs;
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,14 @@
|
||||||
{ config, lib, pkgs, ... }:
|
|
||||||
|
|
||||||
with lib;
|
|
||||||
let
|
|
||||||
cfg = config.my.theming;
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
config = mkIf (cfg.enable && cfg.scheme == "catppuccin-mocha")
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib; let
|
||||||
|
cfg = config.my.theming;
|
||||||
|
in {
|
||||||
|
config =
|
||||||
|
mkIf (cfg.enable && cfg.scheme == "catppuccin-mocha")
|
||||||
(import ./_catppuccin.nix
|
(import ./_catppuccin.nix
|
||||||
{
|
{
|
||||||
inherit config lib pkgs;
|
inherit config lib pkgs;
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,12 @@
|
||||||
{ config
|
|
||||||
, lib
|
|
||||||
, pkgs
|
|
||||||
, ...
|
|
||||||
}:
|
|
||||||
|
|
||||||
with lib;
|
|
||||||
let
|
|
||||||
cfg = config.my.theming;
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib; let
|
||||||
|
cfg = config.my.theming;
|
||||||
|
in {
|
||||||
imports = [
|
imports = [
|
||||||
./dracula.nix
|
./dracula.nix
|
||||||
./catppuccin-frappe.nix
|
./catppuccin-frappe.nix
|
||||||
|
|
@ -33,11 +31,9 @@ in
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
my.programs.tofi.settings = {
|
my.programs.tofi.settings = {
|
||||||
font-size = "20";
|
font-size = "20";
|
||||||
font =
|
font = let
|
||||||
let
|
|
||||||
fontBasePath = pkgs.nerd-fonts.fira-code;
|
fontBasePath = pkgs.nerd-fonts.fira-code;
|
||||||
in
|
in "${fontBasePath}/share/fonts/truetype/NerdFonts/FiraCodeNerdFont-Regular.ttf";
|
||||||
"${fontBasePath}/share/fonts/truetype/NerdFonts/FiraCodeNerdFont-Regular.ttf";
|
|
||||||
height = "360";
|
height = "360";
|
||||||
width = "720";
|
width = "720";
|
||||||
outline-width = "0";
|
outline-width = "0";
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,10 @@
|
||||||
{ config
|
{
|
||||||
, lib
|
config,
|
||||||
, pkgs
|
lib,
|
||||||
, ...
|
pkgs,
|
||||||
|
...
|
||||||
}:
|
}:
|
||||||
|
with lib; let
|
||||||
with lib;
|
|
||||||
let
|
|
||||||
cfg = config.my.theming;
|
cfg = config.my.theming;
|
||||||
|
|
||||||
background = "282a36";
|
background = "282a36";
|
||||||
|
|
@ -19,8 +18,7 @@ let
|
||||||
purple = "bd93f9";
|
purple = "bd93f9";
|
||||||
red = "ff5555";
|
red = "ff5555";
|
||||||
yellow = "f1fa8c";
|
yellow = "f1fa8c";
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
config = mkIf (cfg.enable && cfg.scheme == "dracula") {
|
config = mkIf (cfg.enable && cfg.scheme == "dracula") {
|
||||||
home-manager.users.moritz = {
|
home-manager.users.moritz = {
|
||||||
programs = {
|
programs = {
|
||||||
|
|
@ -38,8 +36,7 @@ in
|
||||||
prompt = "#${green}";
|
prompt = "#${green}";
|
||||||
spinner = "#${orange}";
|
spinner = "#${orange}";
|
||||||
};
|
};
|
||||||
kitty.extraConfig =
|
kitty.extraConfig = ''
|
||||||
''
|
|
||||||
# https://draculatheme.com/kitty
|
# https://draculatheme.com/kitty
|
||||||
foreground #f8f8f2
|
foreground #f8f8f2
|
||||||
background #282a36
|
background #282a36
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,11 @@
|
||||||
{ config
|
|
||||||
, lib
|
|
||||||
, ...
|
|
||||||
}:
|
|
||||||
|
|
||||||
with lib;
|
|
||||||
let
|
|
||||||
cfg = config.my.wallpapers;
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib; let
|
||||||
|
cfg = config.my.wallpapers;
|
||||||
|
in {
|
||||||
options.my.wallpapers.enable = mkEnableOption "wallpapers";
|
options.my.wallpapers.enable = mkEnableOption "wallpapers";
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,5 @@
|
||||||
{ lib, ... }:
|
{lib, ...}: let
|
||||||
let
|
|
||||||
myLib = import ../lib.nix {inherit lib;};
|
myLib = import ../lib.nix {inherit lib;};
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
imports = myLib.listModulesRec ./.;
|
imports = myLib.listModulesRec ./.;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,9 @@
|
||||||
{ config, lib, ... }:
|
{
|
||||||
|
config,
|
||||||
with lib;
|
lib,
|
||||||
let
|
...
|
||||||
|
}:
|
||||||
|
with lib; let
|
||||||
cfg = config.my.nixpkgs;
|
cfg = config.my.nixpkgs;
|
||||||
|
|
||||||
overlayType = mkOptionType {
|
overlayType = mkOptionType {
|
||||||
|
|
@ -10,13 +12,13 @@ let
|
||||||
check = lib.isFunction;
|
check = lib.isFunction;
|
||||||
merge = lib.mergeOneOption;
|
merge = lib.mergeOneOption;
|
||||||
};
|
};
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
options.my.nixpkgs = {
|
options.my.nixpkgs = {
|
||||||
overlays = mkOption {
|
overlays = mkOption {
|
||||||
default = [];
|
default = [];
|
||||||
type = types.listOf overlayType;
|
type = types.listOf overlayType;
|
||||||
example = literalExpression
|
example =
|
||||||
|
literalExpression
|
||||||
''
|
''
|
||||||
[
|
[
|
||||||
(self: super: {
|
(self: super: {
|
||||||
|
|
@ -41,11 +43,11 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
config.nixpkgs = {
|
config.nixpkgs = {
|
||||||
overlays =
|
overlays = let
|
||||||
let
|
|
||||||
channelOverlays = _: prev:
|
channelOverlays = _: prev:
|
||||||
mapAttrs
|
mapAttrs
|
||||||
(_: value:
|
(
|
||||||
|
_: value:
|
||||||
import value {
|
import value {
|
||||||
inherit (prev) system;
|
inherit (prev) system;
|
||||||
config.allowUnfree = true;
|
config.allowUnfree = true;
|
||||||
|
|
|
||||||
|
|
@ -1,22 +1,19 @@
|
||||||
{ config
|
|
||||||
, lib
|
|
||||||
, pkgs
|
|
||||||
, inputs
|
|
||||||
, ...
|
|
||||||
}:
|
|
||||||
|
|
||||||
let
|
|
||||||
inherit (lib) getExe;
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
inherit (lib) getExe;
|
||||||
|
in {
|
||||||
imports = [
|
imports = [
|
||||||
inputs.home-manager.nixosModules.default
|
inputs.home-manager.nixosModules.default
|
||||||
];
|
];
|
||||||
my = {
|
my = {
|
||||||
nixpkgs = {
|
nixpkgs = {
|
||||||
overlays = [
|
overlays = [
|
||||||
(_: prev:
|
(
|
||||||
{
|
_: prev: {
|
||||||
nur = import inputs.nur {
|
nur = import inputs.nur {
|
||||||
pkgs = prev;
|
pkgs = prev;
|
||||||
nurpkgs = prev;
|
nurpkgs = prev;
|
||||||
|
|
@ -91,7 +88,6 @@ in
|
||||||
wget
|
wget
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
programs = {
|
programs = {
|
||||||
mtr.enable = true;
|
mtr.enable = true;
|
||||||
command-not-found.enable = false;
|
command-not-found.enable = false;
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1,13 @@
|
||||||
{ lib
|
{
|
||||||
, config
|
lib,
|
||||||
, pkgs
|
config,
|
||||||
, inputs
|
pkgs,
|
||||||
, ...
|
inputs,
|
||||||
}:
|
...
|
||||||
|
}: let
|
||||||
let
|
|
||||||
inherit (lib) mkEnableOption mkIf mkDefault;
|
inherit (lib) mkEnableOption mkIf mkDefault;
|
||||||
cfg = config.my.profiles.desktop;
|
cfg = config.my.profiles.desktop;
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
options.my.profiles.desktop.enable = mkEnableOption "desktop profile";
|
options.my.profiles.desktop.enable = mkEnableOption "desktop profile";
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
|
@ -99,7 +97,6 @@ in
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
fonts = {
|
fonts = {
|
||||||
enableDefaultPackages = true;
|
enableDefaultPackages = true;
|
||||||
packages = [
|
packages = [
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1,13 @@
|
||||||
{ lib
|
|
||||||
, config
|
|
||||||
, inputs
|
|
||||||
, pkgs
|
|
||||||
, ...
|
|
||||||
}:
|
|
||||||
|
|
||||||
with lib;
|
|
||||||
let
|
|
||||||
cfg = config.my.profiles.gaming;
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
inputs,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib; let
|
||||||
|
cfg = config.my.profiles.gaming;
|
||||||
|
in {
|
||||||
imports = [
|
imports = [
|
||||||
inputs.jovian.nixosModules.default
|
inputs.jovian.nixosModules.default
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,13 @@
|
||||||
{ config, lib, pkgs, inputs, ... }:
|
|
||||||
|
|
||||||
with lib;
|
|
||||||
let
|
|
||||||
cfg = config.my.profiles.impermanence;
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib; let
|
||||||
|
cfg = config.my.profiles.impermanence;
|
||||||
|
in {
|
||||||
options.my.profiles.impermanence.enable = mkEnableOption "impermanence";
|
options.my.profiles.impermanence.enable = mkEnableOption "impermanence";
|
||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
|
|
@ -48,9 +51,18 @@ in
|
||||||
"Music"
|
"Music"
|
||||||
"Pictures"
|
"Pictures"
|
||||||
"Videos"
|
"Videos"
|
||||||
{ directory = ".gnupg"; mode = "0700"; }
|
{
|
||||||
{ directory = ".local/share/keyrings"; mode = "0700"; }
|
directory = ".gnupg";
|
||||||
{ directory = ".ssh"; mode = "0700"; }
|
mode = "0700";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
directory = ".local/share/keyrings";
|
||||||
|
mode = "0700";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
directory = ".ssh";
|
||||||
|
mode = "0700";
|
||||||
|
}
|
||||||
];
|
];
|
||||||
files = [
|
files = [
|
||||||
".local/share/fish/fish_history"
|
".local/share/fish/fish_history"
|
||||||
|
|
@ -62,8 +74,14 @@ in
|
||||||
users.root = {
|
users.root = {
|
||||||
home = "/root";
|
home = "/root";
|
||||||
directories = [
|
directories = [
|
||||||
{ directory = ".gnupg"; mode = "0700"; }
|
{
|
||||||
{ directory = ".ssh"; mode = "0700"; }
|
directory = ".gnupg";
|
||||||
|
mode = "0700";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
directory = ".ssh";
|
||||||
|
mode = "0700";
|
||||||
|
}
|
||||||
];
|
];
|
||||||
files = [
|
files = [
|
||||||
".local/share/nix/trusted-settings.json"
|
".local/share/nix/trusted-settings.json"
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,11 @@
|
||||||
{ lib
|
|
||||||
, config
|
|
||||||
, ...
|
|
||||||
}:
|
|
||||||
|
|
||||||
with lib;
|
|
||||||
let
|
|
||||||
cfg = config.my.profiles.personal;
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib; let
|
||||||
|
cfg = config.my.profiles.personal;
|
||||||
|
in {
|
||||||
options.my.profiles.personal.enable = mkEnableOption "personal profile";
|
options.my.profiles.personal.enable = mkEnableOption "personal profile";
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,11 @@
|
||||||
{ lib
|
|
||||||
, config
|
|
||||||
, pkgs
|
|
||||||
, ...
|
|
||||||
}:
|
|
||||||
|
|
||||||
with lib;
|
|
||||||
let
|
|
||||||
cfg = config.my.profiles.personal;
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib; let
|
||||||
|
cfg = config.my.profiles.personal;
|
||||||
|
in {
|
||||||
options.my.profiles.personal.calendar = mkEnableOption "calendar";
|
options.my.profiles.personal.calendar = mkEnableOption "calendar";
|
||||||
|
|
||||||
config = mkIf cfg.contacts {
|
config = mkIf cfg.contacts {
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,11 @@
|
||||||
{ lib
|
|
||||||
, config
|
|
||||||
, pkgs
|
|
||||||
, ...
|
|
||||||
}:
|
|
||||||
|
|
||||||
with lib;
|
|
||||||
let
|
|
||||||
cfg = config.my.profiles.personal;
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib; let
|
||||||
|
cfg = config.my.profiles.personal;
|
||||||
|
in {
|
||||||
options.my.profiles.personal.contacts = mkEnableOption "contacts";
|
options.my.profiles.personal.contacts = mkEnableOption "contacts";
|
||||||
|
|
||||||
config = mkIf cfg.contacts {
|
config = mkIf cfg.contacts {
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,10 @@
|
||||||
{ lib
|
{
|
||||||
, config
|
lib,
|
||||||
, pkgs
|
config,
|
||||||
, ...
|
pkgs,
|
||||||
|
...
|
||||||
}:
|
}:
|
||||||
|
with lib; let
|
||||||
with lib;
|
|
||||||
let
|
|
||||||
cfg = config.my.profiles.personal;
|
cfg = config.my.profiles.personal;
|
||||||
|
|
||||||
filterHtml = pkgs.writeScript "filter_html" ''
|
filterHtml = pkgs.writeScript "filter_html" ''
|
||||||
|
|
@ -15,8 +14,7 @@ let
|
||||||
-o display_image=false \
|
-o display_image=false \
|
||||||
-o display_link_number=true "$@"
|
-o display_link_number=true "$@"
|
||||||
'';
|
'';
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
options.my.profiles.personal.mail = mkEnableOption "personal email";
|
options.my.profiles.personal.mail = mkEnableOption "personal email";
|
||||||
|
|
||||||
config = mkIf cfg.mail {
|
config = mkIf cfg.mail {
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1,12 @@
|
||||||
{ lib
|
|
||||||
, config
|
|
||||||
, pkgs
|
|
||||||
, ...
|
|
||||||
}:
|
|
||||||
|
|
||||||
with lib;
|
|
||||||
let
|
|
||||||
cfg = config.my.profiles.ripping;
|
|
||||||
in
|
|
||||||
|
|
||||||
{
|
{
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib; let
|
||||||
|
cfg = config.my.profiles.ripping;
|
||||||
|
in {
|
||||||
options.my.profiles.ripping.enable = mkEnableOption "ripping profile";
|
options.my.profiles.ripping.enable = mkEnableOption "ripping profile";
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1,12 @@
|
||||||
{ lib
|
{
|
||||||
, config
|
lib,
|
||||||
, pkgs
|
config,
|
||||||
, ...
|
pkgs,
|
||||||
}:
|
...
|
||||||
|
}: let
|
||||||
let
|
|
||||||
cfg = config.my.profiles.webis;
|
cfg = config.my.profiles.webis;
|
||||||
inherit (lib) mkEnableOption mkIf;
|
inherit (lib) mkEnableOption mkIf;
|
||||||
in
|
in {
|
||||||
|
|
||||||
{
|
|
||||||
options.my.profiles.webis.enable = mkEnableOption "webis profile";
|
options.my.profiles.webis.enable = mkEnableOption "webis profile";
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,12 @@
|
||||||
{ config
|
|
||||||
, lib
|
|
||||||
, pkgs
|
|
||||||
, ...
|
|
||||||
}:
|
|
||||||
|
|
||||||
with lib;
|
|
||||||
let
|
|
||||||
cfg = config.my.profiles.yubikey;
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib; let
|
||||||
|
cfg = config.my.profiles.yubikey;
|
||||||
|
in {
|
||||||
options.my.profiles.yubikey = {
|
options.my.profiles.yubikey = {
|
||||||
enable = mkEnableOption "yubikey";
|
enable = mkEnableOption "yubikey";
|
||||||
luksSupport = {
|
luksSupport = {
|
||||||
|
|
@ -21,7 +19,6 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
services.udev.packages = [pkgs.yubikey-personalization];
|
services.udev.packages = [pkgs.yubikey-personalization];
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,11 @@
|
||||||
{ config
|
|
||||||
, lib
|
|
||||||
, ...
|
|
||||||
}:
|
|
||||||
|
|
||||||
with lib;
|
|
||||||
let
|
|
||||||
cfg = config.my.programs.adb;
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib; let
|
||||||
|
cfg = config.my.programs.adb;
|
||||||
|
in {
|
||||||
options.my.programs.adb.enable = mkEnableOption "adb";
|
options.my.programs.adb.enable = mkEnableOption "adb";
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,10 @@
|
||||||
{ config
|
{
|
||||||
, lib
|
config,
|
||||||
, pkgs
|
lib,
|
||||||
, ...
|
pkgs,
|
||||||
|
...
|
||||||
}:
|
}:
|
||||||
|
with lib; let
|
||||||
with lib;
|
|
||||||
let
|
|
||||||
cfg = config.my.programs.aider;
|
cfg = config.my.programs.aider;
|
||||||
|
|
||||||
wrapped = pkgs.writeShellApplication {
|
wrapped = pkgs.writeShellApplication {
|
||||||
|
|
@ -15,8 +14,7 @@ let
|
||||||
'';
|
'';
|
||||||
runtimeInputs = [cfg.package];
|
runtimeInputs = [cfg.package];
|
||||||
};
|
};
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
options.my.programs.aider = {
|
options.my.programs.aider = {
|
||||||
enable = mkEnableOption "ssh";
|
enable = mkEnableOption "ssh";
|
||||||
package = mkPackageOption pkgs "aider-chat" {};
|
package = mkPackageOption pkgs "aider-chat" {};
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,12 @@
|
||||||
{ config
|
|
||||||
, lib
|
|
||||||
, pkgs
|
|
||||||
, ...
|
|
||||||
}:
|
|
||||||
|
|
||||||
with lib;
|
|
||||||
let
|
|
||||||
cfg = config.my.programs.chromium;
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib; let
|
||||||
|
cfg = config.my.programs.chromium;
|
||||||
|
in {
|
||||||
options.my.programs.chromium = {
|
options.my.programs.chromium = {
|
||||||
enable = mkEnableOption "chromium";
|
enable = mkEnableOption "chromium";
|
||||||
package = mkOption {
|
package = mkOption {
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,12 @@
|
||||||
{ config
|
|
||||||
, lib
|
|
||||||
, pkgs
|
|
||||||
, ...
|
|
||||||
}:
|
|
||||||
|
|
||||||
with lib;
|
|
||||||
let
|
|
||||||
cfg = config.my.programs.code;
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib; let
|
||||||
|
cfg = config.my.programs.code;
|
||||||
|
in {
|
||||||
options.my.programs.code = {
|
options.my.programs.code = {
|
||||||
enable = mkEnableOption "code";
|
enable = mkEnableOption "code";
|
||||||
package = mkOption {
|
package = mkOption {
|
||||||
|
|
@ -17,10 +15,12 @@ in
|
||||||
};
|
};
|
||||||
extensions = mkOption {
|
extensions = mkOption {
|
||||||
type = types.listOf types.package;
|
type = types.listOf types.package;
|
||||||
default = with pkgs.vscode-extensions; [
|
default = with pkgs.vscode-extensions;
|
||||||
|
[
|
||||||
bbenoist.nix
|
bbenoist.nix
|
||||||
vscodevim.vim
|
vscodevim.vim
|
||||||
] ++ pkgs.vscode-utils.extensionsFromVscodeMarketplace [
|
]
|
||||||
|
++ pkgs.vscode-utils.extensionsFromVscodeMarketplace [
|
||||||
{
|
{
|
||||||
name = "copilot-nightly";
|
name = "copilot-nightly";
|
||||||
publisher = "GitHub";
|
publisher = "GitHub";
|
||||||
|
|
@ -42,13 +42,15 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
environment.systemPackages =
|
environment.systemPackages = let
|
||||||
let
|
|
||||||
withExtensions = pkgs.vscode-with-extensions.override {
|
withExtensions = pkgs.vscode-with-extensions.override {
|
||||||
vscode = cfg.package;
|
vscode = cfg.package;
|
||||||
vscodeExtensions = cfg.extensions;
|
vscodeExtensions = cfg.extensions;
|
||||||
};
|
};
|
||||||
maybeExtensions = if cfg.extensions == [ ] then cfg.package else withExtensions;
|
maybeExtensions =
|
||||||
|
if cfg.extensions == []
|
||||||
|
then cfg.package
|
||||||
|
else withExtensions;
|
||||||
withWayland = pkgs.symlinkJoin {
|
withWayland = pkgs.symlinkJoin {
|
||||||
name = "${maybeExtensions.name}-wayland";
|
name = "${maybeExtensions.name}-wayland";
|
||||||
paths = [maybeExtensions];
|
paths = [maybeExtensions];
|
||||||
|
|
@ -58,8 +60,10 @@ in
|
||||||
--set NIXOS_OZONE_WL 1
|
--set NIXOS_OZONE_WL 1
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
final = if cfg.wayland then withWayland else maybeExtensions;
|
final =
|
||||||
in
|
if cfg.wayland
|
||||||
[ final ];
|
then withWayland
|
||||||
|
else maybeExtensions;
|
||||||
|
in [final];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,11 @@
|
||||||
{ config
|
|
||||||
, lib
|
|
||||||
, ...
|
|
||||||
}:
|
|
||||||
|
|
||||||
with lib;
|
|
||||||
let
|
|
||||||
cfg = config.my.programs.direnv;
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib; let
|
||||||
|
cfg = config.my.programs.direnv;
|
||||||
|
in {
|
||||||
options.my.programs.direnv.enable = mkEnableOption "direnv";
|
options.my.programs.direnv.enable = mkEnableOption "direnv";
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
|
|
||||||
|
|
@ -1,16 +1,14 @@
|
||||||
{ config
|
{
|
||||||
, lib
|
config,
|
||||||
, inputs
|
lib,
|
||||||
, pkgs
|
inputs,
|
||||||
, ...
|
pkgs,
|
||||||
|
...
|
||||||
}:
|
}:
|
||||||
|
with lib; let
|
||||||
with lib;
|
|
||||||
let
|
|
||||||
cfg = config.my.programs.firefox;
|
cfg = config.my.programs.firefox;
|
||||||
arkenfox = builtins.readFile "${inputs.arkenfox-userjs}/user.js";
|
arkenfox = builtins.readFile "${inputs.arkenfox-userjs}/user.js";
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
options.my.programs.firefox = {
|
options.my.programs.firefox = {
|
||||||
enable = mkEnableOption "firefox";
|
enable = mkEnableOption "firefox";
|
||||||
arkenfox = {
|
arkenfox = {
|
||||||
|
|
@ -18,7 +16,8 @@ in
|
||||||
overrides = mkOption {
|
overrides = mkOption {
|
||||||
default = {};
|
default = {};
|
||||||
type = with types; attrsOf (oneOf [str bool int]);
|
type = with types; attrsOf (oneOf [str bool int]);
|
||||||
apply = overrides: concatStrings (
|
apply = overrides:
|
||||||
|
concatStrings (
|
||||||
mapAttrsToList
|
mapAttrsToList
|
||||||
(
|
(
|
||||||
name: value: ''
|
name: value: ''
|
||||||
|
|
@ -39,23 +38,20 @@ in
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
home-manager.users.moritz.programs.firefox = {
|
home-manager.users.moritz.programs.firefox = {
|
||||||
enable = true;
|
enable = true;
|
||||||
policies =
|
policies = let
|
||||||
let
|
|
||||||
removeExtensions = ["Google" "Amazon.de" "Bing" "Amazon" "Wikipedia (en)" "Wikipedia (de)"];
|
removeExtensions = ["Google" "Amazon.de" "Bing" "Amazon" "Wikipedia (en)" "Wikipedia (de)"];
|
||||||
convertName = name:
|
convertName = name: let
|
||||||
let
|
|
||||||
lower = toLower name;
|
lower = toLower name;
|
||||||
escaped = replaceStrings ["."] ["dot"] lower;
|
escaped = replaceStrings ["."] ["dot"] lower;
|
||||||
sanitized = head (splitString " " escaped);
|
sanitized = head (splitString " " escaped);
|
||||||
in
|
in "${sanitized}@search.mozilla.org";
|
||||||
"${sanitized}@search.mozilla.org";
|
in {
|
||||||
in
|
|
||||||
{
|
|
||||||
SearchEngines = mkIf (hasInfix "esr" cfg.package) {
|
SearchEngines = mkIf (hasInfix "esr" cfg.package) {
|
||||||
Default = "Kagi";
|
Default = "Kagi";
|
||||||
Remove = removeExtensions;
|
Remove = removeExtensions;
|
||||||
};
|
};
|
||||||
ExtensionSettings = genAttrs
|
ExtensionSettings =
|
||||||
|
genAttrs
|
||||||
(map convertName removeExtensions)
|
(map convertName removeExtensions)
|
||||||
(_: {installation_mode = "blocked";});
|
(_: {installation_mode = "blocked";});
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,21 +1,18 @@
|
||||||
{ config
|
{
|
||||||
, lib
|
config,
|
||||||
, pkgs
|
lib,
|
||||||
, ...
|
pkgs,
|
||||||
|
...
|
||||||
}:
|
}:
|
||||||
|
with lib; let
|
||||||
with lib;
|
|
||||||
let
|
|
||||||
cfg = config.my.programs.fish;
|
cfg = config.my.programs.fish;
|
||||||
shellConfig = config.my.shell;
|
shellConfig = config.my.shell;
|
||||||
exportedVariables =
|
exportedVariables = let
|
||||||
let
|
|
||||||
exportVariables =
|
exportVariables =
|
||||||
lib.mapAttrsToList (n: v: ''set -x ${n} "${v}"'') shellConfig.variables;
|
lib.mapAttrsToList (n: v: ''set -x ${n} "${v}"'') shellConfig.variables;
|
||||||
in
|
in
|
||||||
lib.concatStringsSep "\n" exportVariables;
|
lib.concatStringsSep "\n" exportVariables;
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
options.my.programs.fish.enable = mkEnableOption "fish";
|
options.my.programs.fish.enable = mkEnableOption "fish";
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
|
|
@ -29,7 +26,8 @@ in
|
||||||
programs = {
|
programs = {
|
||||||
fish = {
|
fish = {
|
||||||
enable = true;
|
enable = true;
|
||||||
plugins = [{
|
plugins = [
|
||||||
|
{
|
||||||
name = "fish-completion-sync";
|
name = "fish-completion-sync";
|
||||||
src = pkgs.fetchFromGitHub {
|
src = pkgs.fetchFromGitHub {
|
||||||
owner = "pfgray";
|
owner = "pfgray";
|
||||||
|
|
@ -37,10 +35,15 @@ in
|
||||||
rev = "ba70b6457228af520751eab48430b1b995e3e0e2";
|
rev = "ba70b6457228af520751eab48430b1b995e3e0e2";
|
||||||
sha256 = "sha256-JdOLsZZ1VFRv7zA2i/QEZ1eovOym/Wccn0SJyhiP9hI=";
|
sha256 = "sha256-JdOLsZZ1VFRv7zA2i/QEZ1eovOym/Wccn0SJyhiP9hI=";
|
||||||
};
|
};
|
||||||
}];
|
}
|
||||||
|
];
|
||||||
shellAbbrs = shellConfig.abbreviations;
|
shellAbbrs = shellConfig.abbreviations;
|
||||||
shellAliases = shellConfig.aliases;
|
shellAliases = shellConfig.aliases;
|
||||||
shellInit = /* fish */ ''
|
shellInit =
|
||||||
|
/*
|
||||||
|
fish
|
||||||
|
*/
|
||||||
|
''
|
||||||
# Vi Mode
|
# Vi Mode
|
||||||
fish_vi_key_bindings
|
fish_vi_key_bindings
|
||||||
|
|
||||||
|
|
@ -85,7 +88,11 @@ in
|
||||||
|
|
||||||
# Completions
|
# Completions
|
||||||
complete -c c -kfa '(zoxide query -l | sed "s|$HOME|~|")'
|
complete -c c -kfa '(zoxide query -l | sed "s|$HOME|~|")'
|
||||||
${optionalString config.virtualisation.podman.dockerCompat /* fish */ "complete -c docker -w podman"}
|
${optionalString config.virtualisation.podman.dockerCompat
|
||||||
|
/*
|
||||||
|
fish
|
||||||
|
*/
|
||||||
|
"complete -c docker -w podman"}
|
||||||
complete -c nom -fn "not __fish_seen_subcommand_from build shell develop" -a "build shell develop"
|
complete -c nom -fn "not __fish_seen_subcommand_from build shell develop" -a "build shell develop"
|
||||||
|
|
||||||
complete -c nom -fn "__fish_seen_subcommand_from build" -w "nix build"
|
complete -c nom -fn "__fish_seen_subcommand_from build" -w "nix build"
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,11 @@
|
||||||
{ config
|
|
||||||
, lib
|
|
||||||
, ...
|
|
||||||
}:
|
|
||||||
|
|
||||||
with lib;
|
|
||||||
let
|
|
||||||
cfg = config.my.programs.foot;
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib; let
|
||||||
|
cfg = config.my.programs.foot;
|
||||||
|
in {
|
||||||
options.my.programs.foot.enable = mkEnableOption "foot";
|
options.my.programs.foot.enable = mkEnableOption "foot";
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
|
|
||||||
|
|
@ -1,20 +1,17 @@
|
||||||
{ config
|
{
|
||||||
, lib
|
config,
|
||||||
, pkgs
|
lib,
|
||||||
, inputs
|
pkgs,
|
||||||
, ...
|
...
|
||||||
}:
|
}:
|
||||||
|
with lib; let
|
||||||
with lib;
|
|
||||||
let
|
|
||||||
cfg = config.my.programs.ghostty;
|
cfg = config.my.programs.ghostty;
|
||||||
format = pkgs.formats.keyValue {
|
format = pkgs.formats.keyValue {
|
||||||
listsAsDuplicateKeys = true;
|
listsAsDuplicateKeys = true;
|
||||||
};
|
};
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
options.my.programs.ghostty.enable = mkEnableOption "Ghostty";
|
options.my.programs.ghostty.enable = mkEnableOption "Ghostty";
|
||||||
options.my.programs.ghostty.package = (mkPackageOption pkgs "ghostty" { });
|
options.my.programs.ghostty.package = mkPackageOption pkgs "ghostty" {};
|
||||||
options.my.programs.ghostty.settings = mkOption {
|
options.my.programs.ghostty.settings = mkOption {
|
||||||
inherit (format) type;
|
inherit (format) type;
|
||||||
description = ''
|
description = ''
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,11 @@
|
||||||
{ config
|
|
||||||
, lib
|
|
||||||
, ...
|
|
||||||
}:
|
|
||||||
|
|
||||||
with lib;
|
|
||||||
let
|
|
||||||
cfg = config.my.programs.git;
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib; let
|
||||||
|
cfg = config.my.programs.git;
|
||||||
|
in {
|
||||||
options.my.programs.git = {
|
options.my.programs.git = {
|
||||||
enable = mkEnableOption "git";
|
enable = mkEnableOption "git";
|
||||||
signing = mkOption {
|
signing = mkOption {
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,10 @@
|
||||||
{ config
|
{
|
||||||
, lib
|
config,
|
||||||
, pkgs
|
lib,
|
||||||
, ...
|
pkgs,
|
||||||
|
...
|
||||||
}:
|
}:
|
||||||
|
with lib; let
|
||||||
with lib;
|
|
||||||
let
|
|
||||||
cfg = config.my.programs.gnome;
|
cfg = config.my.programs.gnome;
|
||||||
|
|
||||||
extensions = with pkgs.gnomeExtensions; [
|
extensions = with pkgs.gnomeExtensions; [
|
||||||
|
|
@ -14,8 +13,7 @@ let
|
||||||
blur-my-shell
|
blur-my-shell
|
||||||
pop-shell
|
pop-shell
|
||||||
];
|
];
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
options.my.programs.gnome.enable = mkEnableOption "gnome";
|
options.my.programs.gnome.enable = mkEnableOption "gnome";
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
|
|
@ -39,7 +37,9 @@ in
|
||||||
home-manager.users.moritz.dconf.settings = {
|
home-manager.users.moritz.dconf.settings = {
|
||||||
"org/gnome/shell" = {
|
"org/gnome/shell" = {
|
||||||
disable-user-extensions = false;
|
disable-user-extensions = false;
|
||||||
enabled-extensions = map (p: p.extensionUuid or p.uuid) extensions ++ [
|
enabled-extensions =
|
||||||
|
map (p: p.extensionUuid or p.uuid) extensions
|
||||||
|
++ [
|
||||||
"launch-new-instance@gnome-shell-extensions.gcampax.github.com"
|
"launch-new-instance@gnome-shell-extensions.gcampax.github.com"
|
||||||
"workspace-indicator@gnome-shell-extensions.gcampax.github.com"
|
"workspace-indicator@gnome-shell-extensions.gcampax.github.com"
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,11 @@
|
||||||
{ config
|
|
||||||
, lib
|
|
||||||
, ...
|
|
||||||
}:
|
|
||||||
|
|
||||||
with lib;
|
|
||||||
let
|
|
||||||
cfg = config.my.programs.gpg;
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib; let
|
||||||
|
cfg = config.my.programs.gpg;
|
||||||
|
in {
|
||||||
options.my.programs.gpg.enable = mkEnableOption "gpg";
|
options.my.programs.gpg.enable = mkEnableOption "gpg";
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,15 @@
|
||||||
{ config, lib, pkgs, ... }:
|
{
|
||||||
|
config,
|
||||||
let
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
inherit (lib) any filterAttrs mapAttrsToList mkEnableOption mkIf mkOption;
|
inherit (lib) any filterAttrs mapAttrsToList mkEnableOption mkIf mkOption;
|
||||||
|
|
||||||
cfg = config.my.programs.jetbrains;
|
cfg = config.my.programs.jetbrains;
|
||||||
isEnabled = _: value: value.enable;
|
isEnabled = _: value: value.enable;
|
||||||
anyEnabled = any (x: x) (mapAttrsToList isEnabled cfg);
|
anyEnabled = any (x: x) (mapAttrsToList isEnabled cfg);
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
options.my.programs.jetbrains = {
|
options.my.programs.jetbrains = {
|
||||||
pycharm = {
|
pycharm = {
|
||||||
enable = mkEnableOption "pycharm";
|
enable = mkEnableOption "pycharm";
|
||||||
|
|
@ -34,8 +36,7 @@ in
|
||||||
xdg.configFile."ideavim/ideavimrc" = {
|
xdg.configFile."ideavim/ideavimrc" = {
|
||||||
source = ./ideavimrc;
|
source = ./ideavimrc;
|
||||||
};
|
};
|
||||||
home.packages =
|
home.packages = let
|
||||||
let
|
|
||||||
enabledPackages = filterAttrs isEnabled cfg;
|
enabledPackages = filterAttrs isEnabled cfg;
|
||||||
in
|
in
|
||||||
mapAttrsToList (_: value: value.package) enabledPackages;
|
mapAttrsToList (_: value: value.package) enabledPackages;
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,11 @@
|
||||||
{ config
|
|
||||||
, lib
|
|
||||||
, ...
|
|
||||||
}:
|
|
||||||
|
|
||||||
with lib;
|
|
||||||
let
|
|
||||||
cfg = config.my.programs.kitty;
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib; let
|
||||||
|
cfg = config.my.programs.kitty;
|
||||||
|
in {
|
||||||
options.my.programs.kitty.enable = mkEnableOption "kitty";
|
options.my.programs.kitty.enable = mkEnableOption "kitty";
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,10 @@
|
||||||
{ config
|
{
|
||||||
, lib
|
config,
|
||||||
, pkgs
|
lib,
|
||||||
, ...
|
pkgs,
|
||||||
|
...
|
||||||
}:
|
}:
|
||||||
|
with lib; let
|
||||||
with lib;
|
|
||||||
let
|
|
||||||
cfg = config.my.programs.lazygit;
|
cfg = config.my.programs.lazygit;
|
||||||
|
|
||||||
wrapper = pkgs.writeShellApplication {
|
wrapper = pkgs.writeShellApplication {
|
||||||
|
|
@ -22,8 +21,7 @@ let
|
||||||
'';
|
'';
|
||||||
runtimeInputs = [pkgs.lazygit];
|
runtimeInputs = [pkgs.lazygit];
|
||||||
};
|
};
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
options.my.programs.lazygit.enable = mkEnableOption "lazygit";
|
options.my.programs.lazygit.enable = mkEnableOption "lazygit";
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
|
@ -44,17 +42,61 @@ in
|
||||||
key = "Type";
|
key = "Type";
|
||||||
title = "Type of change";
|
title = "Type of change";
|
||||||
options = [
|
options = [
|
||||||
{ name = "build"; description = "Changes that affect the build system or external dependencies"; value = "build"; }
|
{
|
||||||
{ name = "feat"; description = "A new feature"; value = "feat"; }
|
name = "build";
|
||||||
{ name = "fix"; description = "A bug fix"; value = "fix"; }
|
description = "Changes that affect the build system or external dependencies";
|
||||||
{ name = "chore"; description = "Other changes that don't modify src or test files"; value = "chore"; }
|
value = "build";
|
||||||
{ name = "ci"; description = "Changes to CI configuration files and scripts"; value = "ci"; }
|
}
|
||||||
{ name = "docs"; description = "Documentation only changes"; value = "docs"; }
|
{
|
||||||
{ name = "perf"; description = "A code change that improves performance"; value = "perf"; }
|
name = "feat";
|
||||||
{ name = "refactor"; description = "A code change that neither fixes a bug nor adds a feature"; value = "refactor"; }
|
description = "A new feature";
|
||||||
{ name = "revert"; description = "Reverts a previous commit"; value = "revert"; }
|
value = "feat";
|
||||||
{ name = "style"; description = "Changes that do not affect the meaning of the code"; value = "style"; }
|
}
|
||||||
{ name = "test"; description = "Adding missing tests or correcting existing tests"; value = "test"; }
|
{
|
||||||
|
name = "fix";
|
||||||
|
description = "A bug fix";
|
||||||
|
value = "fix";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "chore";
|
||||||
|
description = "Other changes that don't modify src or test files";
|
||||||
|
value = "chore";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "ci";
|
||||||
|
description = "Changes to CI configuration files and scripts";
|
||||||
|
value = "ci";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "docs";
|
||||||
|
description = "Documentation only changes";
|
||||||
|
value = "docs";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "perf";
|
||||||
|
description = "A code change that improves performance";
|
||||||
|
value = "perf";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "refactor";
|
||||||
|
description = "A code change that neither fixes a bug nor adds a feature";
|
||||||
|
value = "refactor";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "revert";
|
||||||
|
description = "Reverts a previous commit";
|
||||||
|
value = "revert";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "style";
|
||||||
|
description = "Changes that do not affect the meaning of the code";
|
||||||
|
value = "style";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "test";
|
||||||
|
description = "Adding missing tests or correcting existing tests";
|
||||||
|
value = "test";
|
||||||
|
}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
|
|
@ -68,8 +110,14 @@ in
|
||||||
key = "Breaking";
|
key = "Breaking";
|
||||||
title = "Breaking change";
|
title = "Breaking change";
|
||||||
options = [
|
options = [
|
||||||
{ name = "no"; value = ""; }
|
{
|
||||||
{ name = "yes"; value = "!"; }
|
name = "no";
|
||||||
|
value = "";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "yes";
|
||||||
|
value = "!";
|
||||||
|
}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,12 @@
|
||||||
{ config
|
|
||||||
, lib
|
|
||||||
, pkgs
|
|
||||||
, ...
|
|
||||||
}:
|
|
||||||
|
|
||||||
with lib;
|
|
||||||
let
|
|
||||||
cfg = config.my.programs.ledger;
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib; let
|
||||||
|
cfg = config.my.programs.ledger;
|
||||||
|
in {
|
||||||
options.my.programs.ledger.enable = mkEnableOption "ledger";
|
options.my.programs.ledger.enable = mkEnableOption "ledger";
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
|
@ -16,8 +14,7 @@ in
|
||||||
variables = {
|
variables = {
|
||||||
LEDGER_FILE = "/home/moritz/Nextcloud/Notes/ledger/main.ledger";
|
LEDGER_FILE = "/home/moritz/Nextcloud/Notes/ledger/main.ledger";
|
||||||
};
|
};
|
||||||
aliases =
|
aliases = let
|
||||||
let
|
|
||||||
applyCommon = _: command: "${command} --payee note --strict --explicit";
|
applyCommon = _: command: "${command} --payee note --strict --explicit";
|
||||||
in
|
in
|
||||||
mapAttrs applyCommon {
|
mapAttrs applyCommon {
|
||||||
|
|
@ -41,8 +38,7 @@ in
|
||||||
echo "$table" | xclip -selection clipboard
|
echo "$table" | xclip -selection clipboard
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
in
|
in [ledger reg-copy hledger hledger-ui hledger-web];
|
||||||
[ ledger reg-copy hledger hledger-ui hledger-web ];
|
|
||||||
home-manager.users.moritz = {
|
home-manager.users.moritz = {
|
||||||
xdg.configFile = {
|
xdg.configFile = {
|
||||||
"fish/completions/ledger.fish" = {
|
"fish/completions/ledger.fish" = {
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,12 @@
|
||||||
{ config
|
|
||||||
, lib
|
|
||||||
, pkgs
|
|
||||||
, ...
|
|
||||||
}:
|
|
||||||
|
|
||||||
with lib;
|
|
||||||
let
|
|
||||||
cfg = config.my.programs.logseq;
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib; let
|
||||||
|
cfg = config.my.programs.logseq;
|
||||||
|
in {
|
||||||
options.my.programs.logseq.enable = mkEnableOption "logseq";
|
options.my.programs.logseq.enable = mkEnableOption "logseq";
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,12 @@
|
||||||
{ config
|
|
||||||
, lib
|
|
||||||
, pkgs
|
|
||||||
, ...
|
|
||||||
}:
|
|
||||||
|
|
||||||
with lib;
|
|
||||||
let
|
|
||||||
cfg = config.my.programs.miracast;
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib; let
|
||||||
|
cfg = config.my.programs.miracast;
|
||||||
|
in {
|
||||||
options.my.programs.miracast.enable = mkEnableOption "miracast";
|
options.my.programs.miracast.enable = mkEnableOption "miracast";
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,11 @@
|
||||||
{ config, lib, ... }:
|
|
||||||
|
|
||||||
with lib;
|
|
||||||
let
|
|
||||||
cfg = config.my.programs.navi;
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib; let
|
||||||
|
cfg = config.my.programs.navi;
|
||||||
|
in {
|
||||||
options.my.programs.navi.enable = mkEnableOption "navi";
|
options.my.programs.navi.enable = mkEnableOption "navi";
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
|
|
||||||
|
|
@ -1,22 +1,22 @@
|
||||||
{ config
|
{
|
||||||
, lib
|
config,
|
||||||
, pkgs
|
lib,
|
||||||
, inputs
|
pkgs,
|
||||||
, ...
|
inputs,
|
||||||
}:
|
...
|
||||||
|
}: let
|
||||||
let
|
|
||||||
cfg = config.my.programs.niri;
|
cfg = config.my.programs.niri;
|
||||||
inherit (config.home-manager.users.moritz.lib.niri) actions;
|
inherit (config.home-manager.users.moritz.lib.niri) actions;
|
||||||
inherit (lib) mkEnableOption getExe mkIf;
|
inherit (lib) mkEnableOption getExe mkIf;
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
imports = [
|
imports = [
|
||||||
inputs.niri.nixosModules.niri
|
inputs.niri.nixosModules.niri
|
||||||
];
|
];
|
||||||
|
|
||||||
options.my.programs.niri.enable = mkEnableOption "niri";
|
options.my.programs.niri.enable = mkEnableOption "niri";
|
||||||
options.my.programs.niri.autoStart = mkEnableOption "auto start niri" // {
|
options.my.programs.niri.autoStart =
|
||||||
|
mkEnableOption "auto start niri"
|
||||||
|
// {
|
||||||
default = true;
|
default = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -95,11 +95,9 @@ in
|
||||||
command = "${lib.getExe pkgs.swaylock} -fF";
|
command = "${lib.getExe pkgs.swaylock} -fF";
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
timeouts =
|
timeouts = let
|
||||||
let
|
|
||||||
lockTimeout = 10;
|
lockTimeout = 10;
|
||||||
in
|
in [
|
||||||
[
|
|
||||||
{
|
{
|
||||||
timeout = lockTimeout * 60 - 10;
|
timeout = lockTimeout * 60 - 10;
|
||||||
command = "${pkgs.libnotify}/bin/notify-send 'Locking screen!'";
|
command = "${pkgs.libnotify}/bin/notify-send 'Locking screen!'";
|
||||||
|
|
|
||||||
|
|
@ -1,17 +1,15 @@
|
||||||
{ config
|
{
|
||||||
, lib
|
config,
|
||||||
, inputs
|
lib,
|
||||||
, self
|
inputs,
|
||||||
, pkgs
|
self,
|
||||||
, ...
|
pkgs,
|
||||||
}:
|
...
|
||||||
|
}: let
|
||||||
let
|
|
||||||
inherit (lib) mkEnableOption mkOption types;
|
inherit (lib) mkEnableOption mkOption types;
|
||||||
|
|
||||||
cfg = config.my.programs.nix;
|
cfg = config.my.programs.nix;
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
options.my.programs.nix = {
|
options.my.programs.nix = {
|
||||||
gc = {
|
gc = {
|
||||||
enable = mkEnableOption "nix-gc";
|
enable = mkEnableOption "nix-gc";
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,18 @@
|
||||||
{ config, lib, pkgs, inputs, ... }:
|
{
|
||||||
|
config,
|
||||||
let
|
lib,
|
||||||
|
pkgs,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
inherit (lib) mkEnableOption mkIf readFile;
|
inherit (lib) mkEnableOption mkIf readFile;
|
||||||
myLib = import ../../../lib.nix {inherit lib;};
|
myLib = import ../../../lib.nix {inherit lib;};
|
||||||
|
|
||||||
cfg = config.my.programs.nvim;
|
cfg = config.my.programs.nvim;
|
||||||
in
|
in {
|
||||||
{
|
imports =
|
||||||
imports = (myLib.listModulesRec ./plugins) ++ [
|
(myLib.listModulesRec ./plugins)
|
||||||
|
++ [
|
||||||
{
|
{
|
||||||
home-manager.sharedModules = [
|
home-manager.sharedModules = [
|
||||||
inputs.nixvim.homeManagerModules.nixvim
|
inputs.nixvim.homeManagerModules.nixvim
|
||||||
|
|
@ -26,7 +31,6 @@ in
|
||||||
];
|
];
|
||||||
|
|
||||||
home-manager.users.moritz = {
|
home-manager.users.moritz = {
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
xdotool # for vimtex
|
xdotool # for vimtex
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -12,13 +12,13 @@ vim.opt.number = true
|
||||||
vim.opt.relativenumber = true
|
vim.opt.relativenumber = true
|
||||||
vim.opt.scrolloff = 4 -- lines of context
|
vim.opt.scrolloff = 4 -- lines of context
|
||||||
vim.opt.shiftround = true -- round indent
|
vim.opt.shiftround = true -- round indent
|
||||||
vim.opt.shiftwidth = 0 -- use tabstop value
|
vim.opt.shiftwidth = 2
|
||||||
|
vim.opt.softtabstop = 2
|
||||||
vim.opt.shortmess:append({ c = true })
|
vim.opt.shortmess:append({ c = true })
|
||||||
vim.opt.signcolumn = "yes"
|
vim.opt.signcolumn = "yes"
|
||||||
vim.opt.smartcase = true
|
vim.opt.smartcase = true
|
||||||
vim.opt.splitbelow = true
|
vim.opt.splitbelow = true
|
||||||
vim.opt.splitright = true
|
vim.opt.splitright = true
|
||||||
vim.opt.tabstop = 2
|
|
||||||
vim.opt.termguicolors = true
|
vim.opt.termguicolors = true
|
||||||
vim.opt.undofile = true
|
vim.opt.undofile = true
|
||||||
vim.opt.undolevels = 10000
|
vim.opt.undolevels = 10000
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,12 @@
|
||||||
{ config, lib, pkgs, ... }:
|
{
|
||||||
|
config,
|
||||||
let
|
lib,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
inherit (lib) mkIf;
|
inherit (lib) mkIf;
|
||||||
|
|
||||||
cfg = config.my.ai;
|
cfg = config.my.ai;
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
home-manager.users.moritz.programs.nixvim.plugins = {
|
home-manager.users.moritz.programs.nixvim.plugins = {
|
||||||
render-markdown = {
|
render-markdown = {
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,11 @@
|
||||||
{ lib, pkgs, inputs, ... }:
|
{...}: {
|
||||||
|
|
||||||
{
|
|
||||||
home-manager.users.moritz.programs.nixvim = {
|
home-manager.users.moritz.programs.nixvim = {
|
||||||
plugins.blink-compat.enable = true;
|
plugins.blink-compat.enable = true;
|
||||||
plugins.lsp.capabilities = /* lua */ ''
|
plugins.lsp.capabilities =
|
||||||
|
/*
|
||||||
|
lua
|
||||||
|
*/
|
||||||
|
''
|
||||||
capabilities = require('blink.cmp').get_lsp_capabilities(capabilities)
|
capabilities = require('blink.cmp').get_lsp_capabilities(capabilities)
|
||||||
'';
|
'';
|
||||||
plugins.blink-cmp = {
|
plugins.blink-cmp = {
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,4 @@
|
||||||
{ config, lib, pkgs, inputs, ... }:
|
{...}: {
|
||||||
|
|
||||||
let
|
|
||||||
inherit (lib) mkEnableOption mkIf readFile;
|
|
||||||
|
|
||||||
|
|
||||||
in
|
|
||||||
{
|
|
||||||
home-manager.users.moritz.programs.nixvim = {
|
home-manager.users.moritz.programs.nixvim = {
|
||||||
colorschemes.catppuccin = {
|
colorschemes.catppuccin = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,4 @@
|
||||||
{ config, lib, pkgs, inputs, ... }:
|
{...}: {
|
||||||
|
|
||||||
let
|
|
||||||
inherit (lib) mkEnableOption mkIf readFile;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
home-manager.users.moritz.programs.nixvim = {
|
home-manager.users.moritz.programs.nixvim = {
|
||||||
plugins.comment.enable = true;
|
plugins.comment.enable = true;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,4 @@
|
||||||
{ config, lib, pkgs, inputs, ... }:
|
{...}: {
|
||||||
|
|
||||||
let
|
|
||||||
inherit (lib) mkEnableOption mkIf readFile;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
home-manager.users.moritz.programs.nixvim = {
|
home-manager.users.moritz.programs.nixvim = {
|
||||||
plugins.conform-nvim = {
|
plugins.conform-nvim = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
@ -67,8 +62,11 @@ in
|
||||||
"conform.nvim"
|
"conform.nvim"
|
||||||
];
|
];
|
||||||
keymaps = [
|
keymaps = [
|
||||||
{ key = "="; action.__raw = ''function() require("conform").format() end''; options.desc = "Format current file"; }
|
{
|
||||||
|
key = "=";
|
||||||
|
action.__raw = ''function() require("conform").format() end'';
|
||||||
|
options.desc = "Format current file";
|
||||||
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,4 @@
|
||||||
{ config, lib, pkgs, inputs, ... }:
|
{...}: {
|
||||||
|
|
||||||
let
|
|
||||||
inherit (lib) mkEnableOption mkIf readFile;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
home-manager.users.moritz.programs.nixvim = {
|
home-manager.users.moritz.programs.nixvim = {
|
||||||
plugins.crates.enable = true;
|
plugins.crates.enable = true;
|
||||||
plugins.crates.lazyLoad.settings.event = ["BufRead Cargo.toml"];
|
plugins.crates.lazyLoad.settings.event = ["BufRead Cargo.toml"];
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,4 @@
|
||||||
{ config, lib, pkgs, inputs, ... }:
|
{...}: {
|
||||||
|
|
||||||
let
|
|
||||||
inherit (lib) mkEnableOption mkIf readFile;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
home-manager.users.moritz.programs.nixvim = {
|
home-manager.users.moritz.programs.nixvim = {
|
||||||
plugins.direnv.enable = true;
|
plugins.direnv.enable = true;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,4 @@
|
||||||
{ config, lib, pkgs, inputs, ... }:
|
{...}: {
|
||||||
|
|
||||||
let
|
|
||||||
inherit (lib) mkEnableOption mkIf readFile;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
home-manager.users.moritz.programs.nixvim = {
|
home-manager.users.moritz.programs.nixvim = {
|
||||||
plugins.friendly-snippets.enable = true;
|
plugins.friendly-snippets.enable = true;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,4 @@
|
||||||
{ config, lib, pkgs, inputs, ... }:
|
{...}: {
|
||||||
|
|
||||||
let
|
|
||||||
inherit (lib) mkEnableOption mkIf readFile;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
home-manager.users.moritz.programs.nixvim = {
|
home-manager.users.moritz.programs.nixvim = {
|
||||||
plugins.fugitive.enable = true;
|
plugins.fugitive.enable = true;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,4 @@
|
||||||
{ config, lib, pkgs, inputs, ... }:
|
{...}: {
|
||||||
|
|
||||||
let
|
|
||||||
inherit (lib) mkEnableOption mkIf readFile;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
home-manager.users.moritz.programs.nixvim = {
|
home-manager.users.moritz.programs.nixvim = {
|
||||||
plugins.gitsigns.enable = true;
|
plugins.gitsigns.enable = true;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,4 @@
|
||||||
{ config, lib, pkgs, inputs, ... }:
|
{...}: {
|
||||||
|
|
||||||
let
|
|
||||||
inherit (lib) mkEnableOption mkIf readFile;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
home-manager.users.moritz.programs.nixvim = {
|
home-manager.users.moritz.programs.nixvim = {
|
||||||
plugins.helpview.enable = true;
|
plugins.helpview.enable = true;
|
||||||
performance.combinePlugins.standalonePlugins = ["helpview.nvim"];
|
performance.combinePlugins.standalonePlugins = ["helpview.nvim"];
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,4 @@
|
||||||
{ config, lib, pkgs, inputs, ... }:
|
{...}: {
|
||||||
|
|
||||||
let
|
|
||||||
inherit (lib) mkEnableOption mkIf readFile;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
home-manager.users.moritz.programs.nixvim = {
|
home-manager.users.moritz.programs.nixvim = {
|
||||||
plugins.hmts.enable = true;
|
plugins.hmts.enable = true;
|
||||||
performance.combinePlugins.standalonePlugins = ["hmts.nvim"];
|
performance.combinePlugins.standalonePlugins = ["hmts.nvim"];
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1,30 @@
|
||||||
{ config, lib, pkgs, inputs, ... }:
|
{...}: {
|
||||||
|
|
||||||
let
|
|
||||||
inherit (lib) mkEnableOption mkIf readFile;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
home-manager.users.moritz.programs.nixvim = {
|
home-manager.users.moritz.programs.nixvim = {
|
||||||
keymaps = [
|
keymaps = [
|
||||||
{ key = "<esc>"; action = "<cmd>noh<cr><esc>"; options.desc = "Escape and clear hlsearch"; mode = [ "i" "n" ]; }
|
{
|
||||||
{ key = "<"; action = "<gv"; options.desc = "Shift left"; mode = [ "v" ]; }
|
key = "<esc>";
|
||||||
{ key = ">"; action = ">gv"; options.desc = "Shift right"; mode = [ "v" ]; }
|
action = "<cmd>noh<cr><esc>";
|
||||||
{ key = "y"; action = "ygv<esc>"; options.desc = "Yank"; mode = [ "v" ]; }
|
options.desc = "Escape and clear hlsearch";
|
||||||
|
mode = ["i" "n"];
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<";
|
||||||
|
action = "<gv";
|
||||||
|
options.desc = "Shift left";
|
||||||
|
mode = ["v"];
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = ">";
|
||||||
|
action = ">gv";
|
||||||
|
options.desc = "Shift right";
|
||||||
|
mode = ["v"];
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "y";
|
||||||
|
action = "ygv<esc>";
|
||||||
|
options.desc = "Yank";
|
||||||
|
mode = ["v"];
|
||||||
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,4 @@
|
||||||
{ config, lib, pkgs, inputs, ... }:
|
{...}: {
|
||||||
|
|
||||||
let
|
|
||||||
inherit (lib) mkEnableOption mkIf readFile;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
home-manager.users.moritz.programs.nixvim = {
|
home-manager.users.moritz.programs.nixvim = {
|
||||||
plugins.lastplace.enable = true;
|
plugins.lastplace.enable = true;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,4 @@
|
||||||
{ config, lib, pkgs, inputs, ... }:
|
{pkgs, ...}: {
|
||||||
|
|
||||||
let
|
|
||||||
inherit (lib) mkEnableOption mkIf readFile;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
home-manager.users.moritz.programs.nixvim = {
|
home-manager.users.moritz.programs.nixvim = {
|
||||||
extraPlugins = with pkgs.vimPlugins; [
|
extraPlugins = with pkgs.vimPlugins; [
|
||||||
elixir-tools-nvim
|
elixir-tools-nvim
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,4 @@
|
||||||
{ config, lib, pkgs, inputs, ... }:
|
{...}: {
|
||||||
|
|
||||||
let
|
|
||||||
inherit (lib) mkEnableOption mkIf readFile;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
home-manager.users.moritz.programs.nixvim = {
|
home-manager.users.moritz.programs.nixvim = {
|
||||||
plugins = {
|
plugins = {
|
||||||
lspsaga = {
|
lspsaga = {
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,4 @@
|
||||||
{ config, lib, pkgs, inputs, ... }:
|
{...}: {
|
||||||
|
|
||||||
let
|
|
||||||
inherit (lib) mkEnableOption mkIf readFile;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
home-manager.users.moritz.programs.nixvim.plugins.lualine = {
|
home-manager.users.moritz.programs.nixvim.plugins.lualine = {
|
||||||
enable = true;
|
enable = true;
|
||||||
lazyLoad.settings.event = ["DeferredUIEnter"];
|
lazyLoad.settings.event = ["DeferredUIEnter"];
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,4 @@
|
||||||
{ config, lib, pkgs, inputs, ... }:
|
{...}: {
|
||||||
|
|
||||||
let
|
|
||||||
inherit (lib) mkEnableOption mkIf readFile;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
home-manager.users.moritz = {
|
home-manager.users.moritz = {
|
||||||
xdg.configFile."nvim/snippets" = {
|
xdg.configFile."nvim/snippets" = {
|
||||||
recursive = true;
|
recursive = true;
|
||||||
|
|
@ -12,7 +7,11 @@ in
|
||||||
programs.nixvim = {
|
programs.nixvim = {
|
||||||
plugins.luasnip = {
|
plugins.luasnip = {
|
||||||
lazyLoad.settings.event = ["InsertEnter"];
|
lazyLoad.settings.event = ["InsertEnter"];
|
||||||
lazyLoad.settings.after = /* lua */ ''
|
lazyLoad.settings.after =
|
||||||
|
/*
|
||||||
|
lua
|
||||||
|
*/
|
||||||
|
''
|
||||||
function()
|
function()
|
||||||
require("luasnip.loaders.from_lua").load({ paths = "~/.config/nvim/snippets" })
|
require("luasnip.loaders.from_lua").load({ paths = "~/.config/nvim/snippets" })
|
||||||
require("luasnip.loaders.from_snipmate").lazy_load({ paths = "~/.config/nvim/snippets" })
|
require("luasnip.loaders.from_snipmate").lazy_load({ paths = "~/.config/nvim/snippets" })
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,3 @@
|
||||||
{ config, lib, pkgs, inputs, ... }:
|
{...}: {
|
||||||
|
|
||||||
let
|
|
||||||
inherit (lib) mkEnableOption mkIf readFile;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
home-manager.users.moritz.programs.nixvim.plugins.lz-n.enable = true;
|
home-manager.users.moritz.programs.nixvim.plugins.lz-n.enable = true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,4 @@
|
||||||
{ config, lib, pkgs, inputs, ... }:
|
{...}: {
|
||||||
|
|
||||||
let
|
|
||||||
inherit (lib) mkEnableOption mkIf readFile;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
home-manager.users.moritz.programs.nixvim = {
|
home-manager.users.moritz.programs.nixvim = {
|
||||||
plugins.markdown-preview.enable = true;
|
plugins.markdown-preview.enable = true;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,4 @@
|
||||||
{ config, lib, pkgs, inputs, ... }:
|
{...}: {
|
||||||
|
|
||||||
let
|
|
||||||
inherit (lib) mkEnableOption mkIf readFile;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
home-manager.users.moritz.programs.nixvim = {
|
home-manager.users.moritz.programs.nixvim = {
|
||||||
plugins.marks = {
|
plugins.marks = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,4 @@
|
||||||
{ config, lib, pkgs, inputs, ... }:
|
{...}: {
|
||||||
|
|
||||||
let
|
|
||||||
inherit (lib) mkEnableOption mkIf readFile;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
home-manager.users.moritz.programs.nixvim = {
|
home-manager.users.moritz.programs.nixvim = {
|
||||||
plugins.mini = {
|
plugins.mini = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,4 @@
|
||||||
{ config, lib, pkgs, inputs, ... }:
|
{...}: {
|
||||||
|
|
||||||
let
|
|
||||||
inherit (lib) mkEnableOption mkIf readFile;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
home-manager.users.moritz.programs.nixvim = {
|
home-manager.users.moritz.programs.nixvim = {
|
||||||
plugins.nvim-autopairs.enable = true;
|
plugins.nvim-autopairs.enable = true;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,3 @@
|
||||||
{ config, lib, pkgs, inputs, ... }:
|
{...}: {
|
||||||
|
|
||||||
let
|
|
||||||
inherit (lib) mkEnableOption mkIf readFile;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
home-manager.users.moritz.programs.nixvim.plugins.nvim-ufo.enable = true;
|
home-manager.users.moritz.programs.nixvim.plugins.nvim-ufo.enable = true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,4 @@
|
||||||
_:
|
_: {
|
||||||
|
|
||||||
{
|
|
||||||
home-manager.users.moritz.programs.nixvim = {
|
home-manager.users.moritz.programs.nixvim = {
|
||||||
plugins.obsidian = {
|
plugins.obsidian = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
@ -21,14 +19,49 @@ _:
|
||||||
end
|
end
|
||||||
'';
|
'';
|
||||||
mappings = {
|
mappings = {
|
||||||
"<localleader>n" = { action.__raw = ''function() return vim.cmd("ObsidianNew") end''; opts.desc = "New Note"; opts.buffer = true; };
|
"<localleader>n" = {
|
||||||
"<localleader>q" = { action.__raw = ''function() return vim.cmd("ObsidianQuickSwitch") end''; opts.desc = "Quick Switch"; opts.buffer = true; };
|
action.__raw = ''function() return vim.cmd("ObsidianNew") end'';
|
||||||
"<localleader>b" = { action.__raw = ''function() return vim.cmd("ObsidianBacklinks") end''; opts.desc = "Backlinks"; opts.buffer = true; };
|
opts.desc = "New Note";
|
||||||
"<localleader>l" = { action.__raw = ''function() return vim.cmd("ObsidianLink") end''; opts.desc = "Link"; opts.buffer = true; };
|
opts.buffer = true;
|
||||||
"<localleader>e" = { action.__raw = ''function() return vim.cmd("ObsidianExtractNote") end''; opts.desc = "Extract Note"; opts.buffer = true; };
|
};
|
||||||
"<localleader>r" = { action.__raw = ''function() return vim.cmd("ObsidianRename") end''; opts.desc = "Rename"; opts.buffer = true; };
|
"<localleader>q" = {
|
||||||
"<cr>" = { action.__raw = ''function() return require("obsidian").util.smart_action() end''; opts.buffer = true; opts.expr = true; };
|
action.__raw = ''function() return vim.cmd("ObsidianQuickSwitch") end'';
|
||||||
"gf" = { action.__raw = ''function() return require("obsidian").util.gf_passthrough() end''; opts = { noremap = false; expr = true; buffer = true; }; };
|
opts.desc = "Quick Switch";
|
||||||
|
opts.buffer = true;
|
||||||
|
};
|
||||||
|
"<localleader>b" = {
|
||||||
|
action.__raw = ''function() return vim.cmd("ObsidianBacklinks") end'';
|
||||||
|
opts.desc = "Backlinks";
|
||||||
|
opts.buffer = true;
|
||||||
|
};
|
||||||
|
"<localleader>l" = {
|
||||||
|
action.__raw = ''function() return vim.cmd("ObsidianLink") end'';
|
||||||
|
opts.desc = "Link";
|
||||||
|
opts.buffer = true;
|
||||||
|
};
|
||||||
|
"<localleader>e" = {
|
||||||
|
action.__raw = ''function() return vim.cmd("ObsidianExtractNote") end'';
|
||||||
|
opts.desc = "Extract Note";
|
||||||
|
opts.buffer = true;
|
||||||
|
};
|
||||||
|
"<localleader>r" = {
|
||||||
|
action.__raw = ''function() return vim.cmd("ObsidianRename") end'';
|
||||||
|
opts.desc = "Rename";
|
||||||
|
opts.buffer = true;
|
||||||
|
};
|
||||||
|
"<cr>" = {
|
||||||
|
action.__raw = ''function() return require("obsidian").util.smart_action() end'';
|
||||||
|
opts.buffer = true;
|
||||||
|
opts.expr = true;
|
||||||
|
};
|
||||||
|
"gf" = {
|
||||||
|
action.__raw = ''function() return require("obsidian").util.gf_passthrough() end'';
|
||||||
|
opts = {
|
||||||
|
noremap = false;
|
||||||
|
expr = true;
|
||||||
|
buffer = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,4 @@
|
||||||
{ config, lib, pkgs, inputs, ... }:
|
{...}: {
|
||||||
|
|
||||||
let
|
|
||||||
inherit (lib) mkEnableOption mkIf readFile;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
home-manager.users.moritz.programs.nixvim = {
|
home-manager.users.moritz.programs.nixvim = {
|
||||||
plugins.oil.enable = true;
|
plugins.oil.enable = true;
|
||||||
performance.combinePlugins.standalonePlugins = [
|
performance.combinePlugins.standalonePlugins = [
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,4 @@
|
||||||
_:
|
_: {
|
||||||
|
|
||||||
{
|
|
||||||
home-manager.users.moritz.programs.nixvim.plugins.otter = {
|
home-manager.users.moritz.programs.nixvim.plugins.otter = {
|
||||||
enable = true;
|
enable = true;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,4 @@
|
||||||
{ config, lib, pkgs, inputs, ... }:
|
{...}: {
|
||||||
|
|
||||||
let
|
|
||||||
inherit (lib) mkEnableOption mkIf readFile;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
home-manager.users.moritz.programs.nixvim.plugins.render-markdown = {
|
home-manager.users.moritz.programs.nixvim.plugins.render-markdown = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings.latex.enable = false;
|
settings.latex.enable = false;
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,4 @@
|
||||||
_:
|
_: {
|
||||||
|
|
||||||
{
|
|
||||||
home-manager.users.moritz.programs.nixvim = {
|
home-manager.users.moritz.programs.nixvim = {
|
||||||
keymaps = [
|
keymaps = [
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,4 @@
|
||||||
_:
|
_: {
|
||||||
|
|
||||||
{
|
|
||||||
home-manager.users.moritz.programs.nixvim = {
|
home-manager.users.moritz.programs.nixvim = {
|
||||||
autoCmd = [
|
autoCmd = [
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,4 @@
|
||||||
{ config, lib, pkgs, inputs, ... }:
|
{...}: {
|
||||||
|
|
||||||
let
|
|
||||||
inherit (lib) mkEnableOption mkIf readFile;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
home-manager.users.moritz.programs.nixvim = {
|
home-manager.users.moritz.programs.nixvim = {
|
||||||
plugins.todo-comments = {
|
plugins.todo-comments = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,4 @@
|
||||||
{ config, lib, pkgs, inputs, ... }:
|
{...}: {
|
||||||
|
|
||||||
let
|
|
||||||
inherit (lib) mkEnableOption mkIf readFile;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
home-manager.users.moritz.programs.nixvim = {
|
home-manager.users.moritz.programs.nixvim = {
|
||||||
plugins.treesitter-textobjects = {
|
plugins.treesitter-textobjects = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1,9 @@
|
||||||
{ config, lib, pkgs, inputs, ... }:
|
{...}: {
|
||||||
|
|
||||||
let
|
|
||||||
inherit (lib) mkEnableOption mkIf readFile;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
home-manager.users.moritz.programs.nixvim = {
|
home-manager.users.moritz.programs.nixvim = {
|
||||||
plugins.treesitter = {
|
plugins.treesitter = {
|
||||||
enable = true;
|
enable = true;
|
||||||
folding = true;
|
folding = true;
|
||||||
nixvimInjections = true;
|
nixvimInjections = true;
|
||||||
settings.indent.enable = true;
|
|
||||||
settings.highlight.enable = true;
|
settings.highlight.enable = true;
|
||||||
settings.incremental_selection = {
|
settings.incremental_selection = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,4 @@
|
||||||
{ config, lib, pkgs, inputs, ... }:
|
{...}: {
|
||||||
|
|
||||||
let
|
|
||||||
inherit (lib) mkEnableOption mkIf readFile;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
home-manager.users.moritz.programs.nixvim = {
|
home-manager.users.moritz.programs.nixvim = {
|
||||||
plugins.ts-context-commentstring.enable = true;
|
plugins.ts-context-commentstring.enable = true;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,4 @@
|
||||||
{ pkgs, ... }:
|
{pkgs, ...}: {
|
||||||
|
|
||||||
{
|
|
||||||
home-manager.users.moritz.programs.nixvim = {
|
home-manager.users.moritz.programs.nixvim = {
|
||||||
extraPlugins = with pkgs.vimPlugins; [vim-beancount];
|
extraPlugins = with pkgs.vimPlugins; [vim-beancount];
|
||||||
performance.combinePlugins.standalonePlugins = [
|
performance.combinePlugins.standalonePlugins = [
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,4 @@
|
||||||
{ config, lib, pkgs, inputs, ... }:
|
{...}: {
|
||||||
|
|
||||||
let
|
|
||||||
inherit (lib) mkEnableOption mkIf readFile;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
home-manager.users.moritz.programs.nixvim = {
|
home-manager.users.moritz.programs.nixvim = {
|
||||||
plugins.vim-surround.enable = true;
|
plugins.vim-surround.enable = true;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,4 @@
|
||||||
{ config, lib, pkgs, inputs, ... }:
|
{pkgs, ...}: {
|
||||||
|
|
||||||
let
|
|
||||||
inherit (lib) mkEnableOption mkIf readFile;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
home-manager.users.moritz.programs.nixvim = {
|
home-manager.users.moritz.programs.nixvim = {
|
||||||
plugins.vimtex = {
|
plugins.vimtex = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,4 @@
|
||||||
{ config, lib, pkgs, inputs, ... }:
|
{...}: {
|
||||||
|
|
||||||
let
|
|
||||||
inherit (lib) mkEnableOption mkIf readFile;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
home-manager.users.moritz.programs.nixvim = {
|
home-manager.users.moritz.programs.nixvim = {
|
||||||
plugins.which-key.enable = true;
|
plugins.which-key.enable = true;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,14 @@
|
||||||
{ config
|
{
|
||||||
, lib
|
config,
|
||||||
, pkgs
|
lib,
|
||||||
, ...
|
pkgs,
|
||||||
|
...
|
||||||
}:
|
}:
|
||||||
|
with lib; let
|
||||||
with lib;
|
|
||||||
let
|
|
||||||
cfg = config.my.programs.prismlauncher;
|
cfg = config.my.programs.prismlauncher;
|
||||||
|
|
||||||
prismlauncher = pkgs.runCommandNoCC "prismlauncher"
|
prismlauncher =
|
||||||
|
pkgs.runCommandNoCC "prismlauncher"
|
||||||
{
|
{
|
||||||
nativeBuildInputs = [pkgs.makeWrapper];
|
nativeBuildInputs = [pkgs.makeWrapper];
|
||||||
} ''
|
} ''
|
||||||
|
|
@ -16,8 +16,7 @@ let
|
||||||
--set QT_STYLE_OVERRIDE "" \
|
--set QT_STYLE_OVERRIDE "" \
|
||||||
--set QT_QPA_PLATFORMTHEME "gtk3"
|
--set QT_QPA_PLATFORMTHEME "gtk3"
|
||||||
'';
|
'';
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
options.my.programs.prismlauncher.enable = mkEnableOption "prismlauncher";
|
options.my.programs.prismlauncher.enable = mkEnableOption "prismlauncher";
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,9 @@
|
||||||
{ config
|
{
|
||||||
, lib
|
config,
|
||||||
, pkgs
|
lib,
|
||||||
, ...
|
pkgs,
|
||||||
}:
|
...
|
||||||
|
}: let
|
||||||
let
|
|
||||||
inherit (lib) range filterAttrs attrNames foldl' head tail mkOption mkEnableOption intersectLists genAttrs flip getAttr;
|
inherit (lib) range filterAttrs attrNames foldl' head tail mkOption mkEnableOption intersectLists genAttrs flip getAttr;
|
||||||
inherit (lib.types) listOf enum package;
|
inherit (lib.types) listOf enum package;
|
||||||
|
|
||||||
|
|
@ -15,8 +14,7 @@ let
|
||||||
|
|
||||||
pythonPackages = version: attrNames pkgs."python${version}Packages";
|
pythonPackages = version: attrNames pkgs."python${version}Packages";
|
||||||
|
|
||||||
commonPackages =
|
commonPackages = let
|
||||||
let
|
|
||||||
packageLists = map pythonPackages (attrNames enabledVersions);
|
packageLists = map pythonPackages (attrNames enabledVersions);
|
||||||
in
|
in
|
||||||
foldl' intersectLists (head packageLists) (tail packageLists);
|
foldl' intersectLists (head packageLists) (tail packageLists);
|
||||||
|
|
@ -28,8 +26,7 @@ let
|
||||||
type = listOf (enum (pythonPackages version));
|
type = listOf (enum (pythonPackages version));
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
options.my.programs.python = {
|
options.my.programs.python = {
|
||||||
versions = genAttrs pythonVersions versionOpts;
|
versions = genAttrs pythonVersions versionOpts;
|
||||||
defaultPackages = mkOption {
|
defaultPackages = mkOption {
|
||||||
|
|
@ -46,8 +43,7 @@ in
|
||||||
users.users.moritz.packages =
|
users.users.moritz.packages =
|
||||||
(
|
(
|
||||||
let
|
let
|
||||||
mkPython = version:
|
mkPython = version: let
|
||||||
let
|
|
||||||
package = pkgs."python${version}";
|
package = pkgs."python${version}";
|
||||||
finalPythonPackages = cfg.versions.${version}.pythonPackages ++ cfg.defaultPackages;
|
finalPythonPackages = cfg.versions.${version}.pythonPackages ++ cfg.defaultPackages;
|
||||||
getPythonPackages = ps: map (flip getAttr ps) finalPythonPackages;
|
getPythonPackages = ps: map (flip getAttr ps) finalPythonPackages;
|
||||||
|
|
@ -55,6 +51,7 @@ in
|
||||||
package.withPackages getPythonPackages;
|
package.withPackages getPythonPackages;
|
||||||
in
|
in
|
||||||
map mkPython (attrNames enabledVersions)
|
map mkPython (attrNames enabledVersions)
|
||||||
) ++ cfg.extraPackages;
|
)
|
||||||
|
++ cfg.extraPackages;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,16 +1,13 @@
|
||||||
{ config
|
{
|
||||||
, lib
|
config,
|
||||||
, pkgs
|
lib,
|
||||||
, ...
|
pkgs,
|
||||||
}:
|
...
|
||||||
|
}: let
|
||||||
|
|
||||||
let
|
|
||||||
inherit (lib) mkEnableOption mkIf mkOption types;
|
inherit (lib) mkEnableOption mkIf mkOption types;
|
||||||
|
|
||||||
cfg = config.my.programs.river;
|
cfg = config.my.programs.river;
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
options.my.programs.river = {
|
options.my.programs.river = {
|
||||||
enable = mkEnableOption "river";
|
enable = mkEnableOption "river";
|
||||||
keyboardLayouts = mkOption {
|
keyboardLayouts = mkOption {
|
||||||
|
|
@ -69,7 +66,8 @@ in
|
||||||
passthrough = {
|
passthrough = {
|
||||||
"Super F11" = "enter-mode normal";
|
"Super F11" = "enter-mode normal";
|
||||||
};
|
};
|
||||||
normal = {
|
normal =
|
||||||
|
{
|
||||||
"Super Q" = "close";
|
"Super Q" = "close";
|
||||||
"Super Return" = "spawn '${config.my.terminal.package}'";
|
"Super Return" = "spawn '${config.my.terminal.package}'";
|
||||||
"Super R" = ''spawn 'exec $(tofi-run --fuzzy-match=true)' '';
|
"Super R" = ''spawn 'exec $(tofi-run --fuzzy-match=true)' '';
|
||||||
|
|
@ -108,24 +106,29 @@ in
|
||||||
"None XF86AudioPrev" = "spawn 'playerctl -p spotifyd,firefox previous'";
|
"None XF86AudioPrev" = "spawn 'playerctl -p spotifyd,firefox previous'";
|
||||||
|
|
||||||
"Super F11" = "enter-mode passthrough";
|
"Super F11" = "enter-mode passthrough";
|
||||||
} //
|
}
|
||||||
|
//
|
||||||
# tags
|
# tags
|
||||||
(
|
(
|
||||||
let
|
let
|
||||||
numbers = lib.range 1 9;
|
numbers = lib.range 1 9;
|
||||||
toTag = num: "$((1 << (${toString num} - 1)))";
|
toTag = num: "$((1 << (${toString num} - 1)))";
|
||||||
|
|
||||||
mkMappings = num:
|
mkMappings = num: let
|
||||||
let
|
|
||||||
numStr = toString num;
|
numStr = toString num;
|
||||||
tag = toTag num;
|
tag = toTag num;
|
||||||
in
|
in [
|
||||||
[
|
|
||||||
# Super+Control+[1-9] to toggle focus of tag [0-8]
|
# Super+Control+[1-9] to toggle focus of tag [0-8]
|
||||||
{ name = "Super ${numStr}"; value = "set-focused-tags ${tag}"; }
|
{
|
||||||
|
name = "Super ${numStr}";
|
||||||
|
value = "set-focused-tags ${tag}";
|
||||||
|
}
|
||||||
|
|
||||||
# Super+Shift+Control+[1-9] to toggle tag [0-8] of focused view
|
# Super+Shift+Control+[1-9] to toggle tag [0-8] of focused view
|
||||||
{ name = "Super+Shift ${numStr}"; value = "toggle-view-tags ${tag}"; }
|
{
|
||||||
|
name = "Super+Shift ${numStr}";
|
||||||
|
value = "toggle-view-tags ${tag}";
|
||||||
|
}
|
||||||
];
|
];
|
||||||
mappings = lib.flatten (map mkMappings numbers);
|
mappings = lib.flatten (map mkMappings numbers);
|
||||||
in
|
in
|
||||||
|
|
@ -147,7 +150,11 @@ in
|
||||||
set-cursor-warp = "on-focus-change";
|
set-cursor-warp = "on-focus-change";
|
||||||
keyboard-layout = "-options grp:win_space_toggle,caps:escape ${lib.concatStringsSep "," cfg.keyboardLayouts}";
|
keyboard-layout = "-options grp:win_space_toggle,caps:escape ${lib.concatStringsSep "," cfg.keyboardLayouts}";
|
||||||
};
|
};
|
||||||
extraConfig = /* bash */ ''
|
extraConfig =
|
||||||
|
/*
|
||||||
|
bash
|
||||||
|
*/
|
||||||
|
''
|
||||||
rivercarro_pid="$(pidof rivercarro)"
|
rivercarro_pid="$(pidof rivercarro)"
|
||||||
if [[ -z $rivercarro_pid ]]; then
|
if [[ -z $rivercarro_pid ]]; then
|
||||||
rivercarro -inner-gaps 4 -outer-gaps 4 &
|
rivercarro -inner-gaps 4 -outer-gaps 4 &
|
||||||
|
|
@ -198,11 +205,9 @@ in
|
||||||
command = "${lib.getExe pkgs.swaylock} -fF";
|
command = "${lib.getExe pkgs.swaylock} -fF";
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
timeouts =
|
timeouts = let
|
||||||
let
|
|
||||||
lockTimeout = 10;
|
lockTimeout = 10;
|
||||||
in
|
in [
|
||||||
[
|
|
||||||
{
|
{
|
||||||
timeout = lockTimeout * 60 - 10;
|
timeout = lockTimeout * 60 - 10;
|
||||||
command = "${pkgs.libnotify}/bin/notify-send 'Locking screen!'";
|
command = "${pkgs.libnotify}/bin/notify-send 'Locking screen!'";
|
||||||
|
|
@ -229,7 +234,6 @@ in
|
||||||
wl-clipboard # clipboard tool for wayland
|
wl-clipboard # clipboard tool for wayland
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
# additional environment variables
|
# additional environment variables
|
||||||
environment.sessionVariables =
|
environment.sessionVariables =
|
||||||
{
|
{
|
||||||
|
|
@ -241,7 +245,8 @@ in
|
||||||
QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
|
QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
|
||||||
QT_QPA_PLATFORMTHEME = "qt5ct";
|
QT_QPA_PLATFORMTHEME = "qt5ct";
|
||||||
_JAVA_AWT_WM_NONEREPARENTING = "1";
|
_JAVA_AWT_WM_NONEREPARENTING = "1";
|
||||||
} // (lib.optionalAttrs cfg.nvidiaSupport
|
}
|
||||||
|
// (lib.optionalAttrs cfg.nvidiaSupport
|
||||||
{
|
{
|
||||||
GBM_BACKEND = "nvidia-drm";
|
GBM_BACKEND = "nvidia-drm";
|
||||||
GDK_BACKEND = "wayland";
|
GDK_BACKEND = "wayland";
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,17 @@
|
||||||
{ lib, pkgs, config, ... }:
|
{
|
||||||
|
lib,
|
||||||
let
|
pkgs,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
cfg = config.my.scripts;
|
cfg = config.my.scripts;
|
||||||
inherit (lib) readFile;
|
inherit (lib) readFile;
|
||||||
|
|
||||||
fishFile =
|
fishFile = {
|
||||||
{ name
|
name,
|
||||||
, destination
|
destination,
|
||||||
, content
|
content,
|
||||||
, checkPhase ? null
|
checkPhase ? null,
|
||||||
}:
|
}:
|
||||||
pkgs.writeTextFile {
|
pkgs.writeTextFile {
|
||||||
inherit name destination;
|
inherit name destination;
|
||||||
|
|
@ -22,7 +25,8 @@ let
|
||||||
'';
|
'';
|
||||||
|
|
||||||
checkPhase =
|
checkPhase =
|
||||||
if checkPhase == null then ''
|
if checkPhase == null
|
||||||
|
then ''
|
||||||
runHook preCheck
|
runHook preCheck
|
||||||
${lib.getExe pkgs.fish} -n "$target"
|
${lib.getExe pkgs.fish} -n "$target"
|
||||||
runHook postCheck
|
runHook postCheck
|
||||||
|
|
@ -30,15 +34,15 @@ let
|
||||||
else checkPhase;
|
else checkPhase;
|
||||||
};
|
};
|
||||||
|
|
||||||
writeFishApplication =
|
writeFishApplication = {
|
||||||
{ name
|
name,
|
||||||
, text
|
text,
|
||||||
, completions ? null
|
completions ? null,
|
||||||
, runtimeInputs ? [ ]
|
runtimeInputs ? [],
|
||||||
, checkPhase ? null
|
checkPhase ? null,
|
||||||
}:
|
}: let
|
||||||
let
|
runtimeHeader =
|
||||||
runtimeHeader = lib.optionalString (runtimeInputs != [ ])
|
lib.optionalString (runtimeInputs != [])
|
||||||
''export PATH="${lib.makeBinPath runtimeInputs}:$PATH"'';
|
''export PATH="${lib.makeBinPath runtimeInputs}:$PATH"'';
|
||||||
|
|
||||||
script = fishFile {
|
script = fishFile {
|
||||||
|
|
@ -56,15 +60,21 @@ let
|
||||||
in
|
in
|
||||||
pkgs.symlinkJoin {
|
pkgs.symlinkJoin {
|
||||||
inherit name;
|
inherit name;
|
||||||
paths = [
|
paths =
|
||||||
|
[
|
||||||
script
|
script
|
||||||
] ++ lib.optional (completions != null) completions_file;
|
]
|
||||||
|
++ lib.optional (completions != null) completions_file;
|
||||||
};
|
};
|
||||||
|
|
||||||
which-nix = writeFishApplication {
|
which-nix = writeFishApplication {
|
||||||
name = "which-nix";
|
name = "which-nix";
|
||||||
runtimeInputs = with pkgs; [which coreutils-full procps];
|
runtimeInputs = with pkgs; [which coreutils-full procps];
|
||||||
text = /* fish */ ''
|
text =
|
||||||
|
/*
|
||||||
|
fish
|
||||||
|
*/
|
||||||
|
''
|
||||||
function recurse -a path;
|
function recurse -a path;
|
||||||
if not test -f "$path"
|
if not test -f "$path"
|
||||||
return
|
return
|
||||||
|
|
@ -80,7 +90,11 @@ let
|
||||||
recurse (which $arg)
|
recurse (which $arg)
|
||||||
end
|
end
|
||||||
'';
|
'';
|
||||||
completions = /* fish */ ''
|
completions =
|
||||||
|
/*
|
||||||
|
fish
|
||||||
|
*/
|
||||||
|
''
|
||||||
complete -c which-nix -fa '(__fish_complete_command)'
|
complete -c which-nix -fa '(__fish_complete_command)'
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
@ -88,7 +102,11 @@ let
|
||||||
gi = writeFishApplication {
|
gi = writeFishApplication {
|
||||||
name = "gi";
|
name = "gi";
|
||||||
runtimeInputs = with pkgs; [fzf gum curl coreutils-full];
|
runtimeInputs = with pkgs; [fzf gum curl coreutils-full];
|
||||||
text = /* fish */ ''
|
text =
|
||||||
|
/*
|
||||||
|
fish
|
||||||
|
*/
|
||||||
|
''
|
||||||
set url https://www.gitignore.io/api
|
set url https://www.gitignore.io/api
|
||||||
|
|
||||||
if test (count $argv) -eq 0
|
if test (count $argv) -eq 0
|
||||||
|
|
@ -108,7 +126,11 @@ let
|
||||||
echo "$contents" >> .gitignore
|
echo "$contents" >> .gitignore
|
||||||
end
|
end
|
||||||
'';
|
'';
|
||||||
completions = /* fish */ ''
|
completions =
|
||||||
|
/*
|
||||||
|
fish
|
||||||
|
*/
|
||||||
|
''
|
||||||
set args (curl -sL https://www.gitignore.io/api/list | string split ",")
|
set args (curl -sL https://www.gitignore.io/api/list | string split ",")
|
||||||
complete -c gi -fa "$args"
|
complete -c gi -fa "$args"
|
||||||
'';
|
'';
|
||||||
|
|
@ -117,7 +139,11 @@ let
|
||||||
tmux-switch = pkgs.writeShellApplication {
|
tmux-switch = pkgs.writeShellApplication {
|
||||||
name = "tmux-switch";
|
name = "tmux-switch";
|
||||||
runtimeInputs = with pkgs; [tmux];
|
runtimeInputs = with pkgs; [tmux];
|
||||||
text = /* bash */ ''
|
text =
|
||||||
|
/*
|
||||||
|
bash
|
||||||
|
*/
|
||||||
|
''
|
||||||
if [[ -z ''${TMUX+x} ]]; then
|
if [[ -z ''${TMUX+x} ]]; then
|
||||||
tmux attach -t "$1"
|
tmux attach -t "$1"
|
||||||
else
|
else
|
||||||
|
|
@ -143,7 +169,11 @@ let
|
||||||
tmux-new = pkgs.writeFishApplication {
|
tmux-new = pkgs.writeFishApplication {
|
||||||
name = "tn";
|
name = "tn";
|
||||||
runtimeInputs = with pkgs; [tmux];
|
runtimeInputs = with pkgs; [tmux];
|
||||||
text = /* fish */ ''
|
text =
|
||||||
|
/*
|
||||||
|
fish
|
||||||
|
*/
|
||||||
|
''
|
||||||
if ! tmux has-session -t $argv[1] 2> /dev/null
|
if ! tmux has-session -t $argv[1] 2> /dev/null
|
||||||
tmux new-session -ds $argv[1] -c $argv[2]
|
tmux new-session -ds $argv[1] -c $argv[2]
|
||||||
end
|
end
|
||||||
|
|
@ -151,17 +181,18 @@ let
|
||||||
tmux-switch $argv[1]
|
tmux-switch $argv[1]
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
options.my.scripts = {
|
options.my.scripts = {
|
||||||
enable = lib.mkEnableOption "My Scripts";
|
enable = lib.mkEnableOption "My Scripts";
|
||||||
};
|
};
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
environment.systemPackages = [
|
environment.systemPackages =
|
||||||
|
[
|
||||||
which-nix
|
which-nix
|
||||||
gi
|
gi
|
||||||
] ++ lib.optional config.my.programs.tmux.enable [
|
]
|
||||||
|
++ lib.optional config.my.programs.tmux.enable [
|
||||||
tmux-sessionizer
|
tmux-sessionizer
|
||||||
tmux-attach
|
tmux-attach
|
||||||
tmux-switch
|
tmux-switch
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1,13 @@
|
||||||
{ config
|
{
|
||||||
, lib
|
config,
|
||||||
, pkgs
|
lib,
|
||||||
, ...
|
pkgs,
|
||||||
|
...
|
||||||
}:
|
}:
|
||||||
|
with lib; let
|
||||||
with lib;
|
|
||||||
let
|
|
||||||
cfg = config.my.programs.spotify-player;
|
cfg = config.my.programs.spotify-player;
|
||||||
toml = pkgs.formats.toml {};
|
toml = pkgs.formats.toml {};
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
options.my.programs.spotify-player = {
|
options.my.programs.spotify-player = {
|
||||||
enable = mkEnableOption "spotify-player";
|
enable = mkEnableOption "spotify-player";
|
||||||
package = mkOption {
|
package = mkOption {
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,11 @@
|
||||||
{ config
|
|
||||||
, lib
|
|
||||||
, ...
|
|
||||||
}:
|
|
||||||
|
|
||||||
with lib;
|
|
||||||
let
|
|
||||||
cfg = config.my.programs.ssh;
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib; let
|
||||||
|
cfg = config.my.programs.ssh;
|
||||||
|
in {
|
||||||
options.my.programs.ssh = {
|
options.my.programs.ssh = {
|
||||||
enable = mkEnableOption "ssh";
|
enable = mkEnableOption "ssh";
|
||||||
includes = mkOption {
|
includes = mkOption {
|
||||||
|
|
|
||||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue