Compare commits

...

2 commits

Author SHA1 Message Date
ca77e23d40
feat: open port for calibre 2025-04-13 17:55:07 +02:00
b56603be15
feat: add pre-commit hooks 2025-04-13 17:55:06 +02:00
5 changed files with 175 additions and 79 deletions

3
.gitignore vendored
View file

@ -1,2 +1,5 @@
### direnv ###
.direnv
### pre-commit ###
.pre-commit-config.yaml

3
alejandra.toml Normal file
View file

@ -0,0 +1,3 @@
# (experimental) Configuration options for Alejandra
indentation = "TwoSpaces" # Or: FourSpaces, Tabs

112
flake.lock generated
View file

@ -176,6 +176,22 @@
}
},
"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,
"locked": {
"lastModified": 1733328505,
@ -191,7 +207,7 @@
"type": "github"
}
},
"flake-compat_2": {
"flake-compat_3": {
"flake": false,
"locked": {
"lastModified": 1696426674,
@ -207,7 +223,7 @@
"type": "github"
}
},
"flake-compat_3": {
"flake-compat_4": {
"flake": false,
"locked": {
"lastModified": 1696426674,
@ -344,8 +360,8 @@
},
"git-hooks": {
"inputs": {
"flake-compat": "flake-compat_2",
"gitignore": "gitignore",
"flake-compat": "flake-compat_3",
"gitignore": "gitignore_2",
"nixpkgs": [
"neovim-nightly-overlay",
"nixpkgs"
@ -365,7 +381,48 @@
"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": {
"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": {
"nixpkgs": [
"neovim-nightly-overlay",
@ -387,7 +444,7 @@
"type": "github"
}
},
"gitignore_2": {
"gitignore_3": {
"inputs": {
"nixpkgs": [
"pre-commit-hooks",
@ -496,7 +553,7 @@
"jovian": {
"inputs": {
"nix-github-actions": "nix-github-actions",
"nixpkgs": "nixpkgs_2"
"nixpkgs": "nixpkgs_3"
},
"locked": {
"lastModified": 1744436521,
@ -551,12 +608,12 @@
},
"neovim-nightly-overlay": {
"inputs": {
"flake-compat": "flake-compat",
"flake-compat": "flake-compat_2",
"flake-parts": "flake-parts_2",
"git-hooks": "git-hooks",
"hercules-ci-effects": "hercules-ci-effects",
"neovim-src": "neovim-src",
"nixpkgs": "nixpkgs_3",
"nixpkgs": "nixpkgs_4",
"treefmt-nix": "treefmt-nix_2"
},
"locked": {
@ -777,6 +834,22 @@
}
},
"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": {
"lastModified": 1743583204,
"narHash": "sha256-F7n4+KOIfWrwoQjXrL2wD9RhFYLs2/GGe/MQY1sSdlE=",
@ -792,7 +865,7 @@
"type": "github"
}
},
"nixpkgs_3": {
"nixpkgs_4": {
"locked": {
"lastModified": 1744316434,
"narHash": "sha256-lzFCg/1C39pyY2hMB2gcuHV79ozpOz/Vu15hdjiFOfI=",
@ -808,7 +881,7 @@
"type": "github"
}
},
"nixpkgs_4": {
"nixpkgs_5": {
"locked": {
"lastModified": 1744442362,
"narHash": "sha256-i47t4DRIZgwBZw2Osbrp1OJhhO1k/n+QzRx+TrmfE9Y=",
@ -824,7 +897,7 @@
"type": "github"
}
},
"nixpkgs_5": {
"nixpkgs_6": {
"locked": {
"lastModified": 1744232761,
"narHash": "sha256-gbl9hE39nQRpZaLjhWKmEu5ejtQsgI5TWYrIVVJn30U=",
@ -840,7 +913,7 @@
"type": "github"
}
},
"nixpkgs_6": {
"nixpkgs_7": {
"locked": {
"lastModified": 1730768919,
"narHash": "sha256-8AKquNnnSaJRXZxc5YmF/WfmxiHX6MMZZasRP6RRQkE=",
@ -856,7 +929,7 @@
"type": "github"
}
},
"nixpkgs_7": {
"nixpkgs_8": {
"locked": {
"lastModified": 1692934111,
"narHash": "sha256-9EEE59v/esKNMR5zKbLRV9NoRPYvERw5jHQOnfr47bk=",
@ -899,7 +972,7 @@
"nur": {
"inputs": {
"flake-parts": "flake-parts_4",
"nixpkgs": "nixpkgs_5",
"nixpkgs": "nixpkgs_6",
"treefmt-nix": "treefmt-nix_3"
},
"locked": {
@ -941,9 +1014,9 @@
},
"pre-commit-hooks": {
"inputs": {
"flake-compat": "flake-compat_3",
"gitignore": "gitignore_2",
"nixpkgs": "nixpkgs_6"
"flake-compat": "flake-compat_4",
"gitignore": "gitignore_3",
"nixpkgs": "nixpkgs_7"
},
"locked": {
"lastModified": 1742649964,
@ -966,6 +1039,7 @@
"clan-core": "clan-core",
"filetags": "filetags",
"flake-parts": "flake-parts",
"git-hooks-nix": "git-hooks-nix",
"home-manager": "home-manager",
"impermanence": "impermanence",
"jovian": "jovian",
@ -974,7 +1048,7 @@
"niri": "niri",
"nix-index-database": "nix-index-database",
"nix-monitored": "nix-monitored",
"nixpkgs": "nixpkgs_4",
"nixpkgs": "nixpkgs_5",
"nixvim": "nixvim",
"nur": "nur",
"pre-commit-hooks": "pre-commit-hooks",
@ -1099,7 +1173,7 @@
"timers": {
"inputs": {
"naersk": "naersk",
"nixpkgs": "nixpkgs_7",
"nixpkgs": "nixpkgs_8",
"utils": "utils"
},
"locked": {

134
flake.nix
View file

@ -1,76 +1,90 @@
{
inputs =
{
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
master.url = "github:nixos/nixpkgs";
stable.url = "github:nixos/nixpkgs/nixos-24.11";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
master.url = "github:nixos/nixpkgs";
stable.url = "github:nixos/nixpkgs/nixos-24.11";
# New flake-parts input
flake-parts.url = "github:hercules-ci/flake-parts";
flake-parts.inputs.nixpkgs-lib.follows = "nixpkgs";
# New flake-parts input
flake-parts.url = "github:hercules-ci/flake-parts";
flake-parts.inputs.nixpkgs-lib.follows = "nixpkgs";
git-hooks-nix.url = "github:cachix/git-hooks.nix";
clan-core = {
url = "git+https://git.clan.lol/clan/clan-core";
inputs.nixpkgs.follows = "nixpkgs"; # Needed if your configuration uses nixpkgs unstable.
# New
inputs.flake-parts.follows = "flake-parts";
};
home-manager.inputs.nixpkgs.follows = "nixpkgs";
home-manager.url = "github:nix-community/home-manager";
impermanence.url = "github:nix-community/impermanence";
pre-commit-hooks.url = "github:cachix/pre-commit-hooks.nix";
nur.url = "github:nix-community/NUR";
nix-index-database.url = "github:Mic92/nix-index-database";
nix-index-database.inputs.nixpkgs.follows = "nixpkgs";
nix-monitored.url = "github:ners/nix-monitored";
nix-monitored.inputs.nixpkgs.follows = "nixpkgs";
jovian.url = "github:Jovian-Experiments/Jovian-NixOS";
# Programs
timers.url = "git+https://gitea.moritzboeh.me/moritz/timers.git";
filetags.url = "git+https://gitea.moritzboeh.me/moritz/filetags.git";
# Neovim
neovim-nightly-overlay.url = "github:nix-community/neovim-nightly-overlay";
nixvim.url = "github:nix-community/nixvim";
nixvim.inputs.flake-parts.follows = "flake-parts";
nixvim.inputs.nixpkgs.follows = "nixpkgs";
# Niri
niri.url = "github:sodiboo/niri-flake";
niri.inputs.nixpkgs.follows = "nixpkgs";
# Laptop
asus-touchpad-numpad-driver.url = "github:MoritzBoehme/asus-touchpad-numpad-driver/german-layout";
asus-touchpad-numpad-driver.flake = false;
# Firefox user.js
arkenfox-userjs.url = "github:arkenfox/user.js";
arkenfox-userjs.flake = false;
clan-core = {
url = "git+https://git.clan.lol/clan/clan-core";
inputs.nixpkgs.follows = "nixpkgs"; # Needed if your configuration uses nixpkgs unstable.
inputs.flake-parts.follows = "flake-parts";
};
outputs = inputs@{ flake-parts, ... }:
flake-parts.lib.mkFlake { inherit inputs; } ({ self, pkgs, ... }: {
home-manager.inputs.nixpkgs.follows = "nixpkgs";
home-manager.url = "github:nix-community/home-manager";
impermanence.url = "github:nix-community/impermanence";
pre-commit-hooks.url = "github:cachix/pre-commit-hooks.nix";
nur.url = "github:nix-community/NUR";
nix-index-database.url = "github:Mic92/nix-index-database";
nix-index-database.inputs.nixpkgs.follows = "nixpkgs";
nix-monitored.url = "github:ners/nix-monitored";
nix-monitored.inputs.nixpkgs.follows = "nixpkgs";
jovian.url = "github:Jovian-Experiments/Jovian-NixOS";
# Programs
timers.url = "git+https://gitea.moritzboeh.me/moritz/timers.git";
filetags.url = "git+https://gitea.moritzboeh.me/moritz/filetags.git";
# Neovim
neovim-nightly-overlay.url = "github:nix-community/neovim-nightly-overlay";
nixvim.url = "github:nix-community/nixvim";
nixvim.inputs.flake-parts.follows = "flake-parts";
nixvim.inputs.nixpkgs.follows = "nixpkgs";
# Niri
niri.url = "github:sodiboo/niri-flake";
niri.inputs.nixpkgs.follows = "nixpkgs";
# Laptop
asus-touchpad-numpad-driver.url = "github:MoritzBoehme/asus-touchpad-numpad-driver/german-layout";
asus-touchpad-numpad-driver.flake = false;
# Firefox user.js
arkenfox-userjs.url = "github:arkenfox/user.js";
arkenfox-userjs.flake = false;
};
outputs = inputs @ {flake-parts, ...}:
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.
# See: https://flake.parts/getting-started
systems = [ "x86_64-linux" ];
systems = ["x86_64-linux"];
# import clan-core modules
imports = [
inputs.clan-core.flakeModules.default
inputs.git-hooks-nix.flakeModule
];
perSystem = { config, inputs', pkgs, ... }: {
devShells.default = pkgs.mkShell {
packages = [ inputs'.clan-core.packages.clan-cli ];
perSystem = {
config,
inputs',
pkgs,
...
}: {
devShells.default =
pkgs.mkShell {
packages = [inputs'.clan-core.packages.clan-cli pkgs.alejandra];
}
// config.pre-commit.devShell;
pre-commit.settings.hooks = {
alejandra.enable = true;
check-merge-conflicts.enable = true;
flake-checker.enable = true;
deadnix.enable = true;
nil.enable = true;
};
};

View file

@ -53,6 +53,8 @@
stable.calibre # NOTE: breaks often in unstable
];
networking.firewall.allowedTCPPorts = [9090];
home-manager.users.moritz.services.kanshi.settings = [
{
profile.name = "default";