Compare commits

..

9 commits

Author SHA1 Message Date
fau
c621860314
docs: resizing delete
Signed-off-by: fau <fau@faukah.com>
Change-Id: I6a6a69649b3ad1d5faffa80ae72730a57d0ff33a
2025-07-27 17:40:41 +02:00
fau
03067acb8d
apply statix lints
Signed-off-by: fau <fau@faukah.com>
Change-Id: I6a6a696442c7de5f519287ef8b3d80668973ef48
2025-07-27 17:40:41 +02:00
fau
6ae25f23cf
helix: refactor, set a bunch of config options
Signed-off-by: fau <fau@faukah.com>
Change-Id: I6a6a696435b4ad15f4b5a6570bb6fd3c34a29d92
2025-07-27 17:40:40 +02:00
fau
e69e385f93
niri: module: set cargoHash instead of lockFile
Signed-off-by: fau <fau@faukah.com>
Change-Id: I6a6a6964f85e6ab79c3bcbd388ad7dd2a1ee1c7c
2025-07-27 17:40:40 +02:00
fau
dc1fdbe07b
switch to Gruvbox Dark Hard
Signed-off-by: fau <fau@faukah.com>
Change-Id: I6a6a696426a5ae06361492adc245fb4436411fe8
2025-07-27 17:40:39 +02:00
fau
cffcf81824
npins: update sources
Signed-off-by: fau <fau@faukah.com>
Change-Id: I6a6a6964808d37c79ffa659ea7147908e7324483
2025-07-27 17:40:38 +02:00
1524aa6c1f
hardware: graphics: update module
Signed-off-by: Bloxx12 <charlie@charlieroot.dev>
Change-Id: I6a6a6964aff2aa0b8443da4726686024c9515490
2025-07-27 00:52:41 +02:00
347d9fcb6f
use unstable comma
Signed-off-by: Bloxx12 <charlie@charlieroot.dev>
Change-Id: I6a6a69648046cf7bdab09db39431ffcabec8d6a0
2025-07-27 00:52:41 +02:00
cc13ebdfe1
forgejo: hard-link instead of soft-link config files
Signed-off-by: Bloxx12 <charlie@charlieroot.dev>
Change-Id: I6a6a6964eaeb84f3eb32511106e80c155e1bdb71
2025-07-27 00:52:41 +02:00
15 changed files with 180 additions and 128 deletions

View file

@ -4,14 +4,14 @@ let
# https://github.com/andir/npins?tab=readme-ov-file#using-the-nixpkgs-fetchers
src = import ./npins;
pkgs = import src.nixpkgs { };
sources = mapAttrs (k: v: v { inherit pkgs; }) src;
sources = mapAttrs (_: v: v { inherit pkgs; }) src;
inherit (pkgs) lib;
inherit (lib.filesystem) listFilesRecursive;
inherit (lib.strings) hasSuffix;
mkSystem =
system: hostname:
hostname:
import (src.nixpkgs + "/nixos/lib/eval-config.nix") {
specialArgs = {
inherit sources;
@ -28,7 +28,7 @@ let
};
in
{
temperance = mkSystem "x86_64-linux" "temperance";
hermit = mkSystem "x86_64-linux" "hermit";
tower = mkSystem "aarch64-linux" "tower";
temperance = mkSystem "temperance";
hermit = mkSystem "hermit";
tower = mkSystem "tower";
}

View file

@ -1,8 +0,0 @@
## Resizing images using imagemagick
I wanted to resize an image using imagemagick.
To do this I had to run:
`magick lain.png -crop 1072x1448^ -gravity center -quality 90 sca.png`
What does this do?

View file

@ -16,7 +16,6 @@
cbonsai
cinny-desktop
cmus
comma
difftastic
dua
evince

View file

@ -11,7 +11,6 @@
calc
calibre
carapace
comma
digikam
difftastic
dnsutils

View file

@ -6,9 +6,10 @@
}:
let
inherit (lib.attrsets) mapAttrs' nameValuePair;
inherit (lib.meta) getExe;
helix = pkgs.helix.overrideAttrs (
finalAttrs: previousAttrs: {
finalAttrs: _: {
version = "25.07.2";
src = pkgs.fetchzip {
url = "https://github.com/bloxx12/helix/releases/download/${finalAttrs.version}/helix-${finalAttrs.version}-source.tar.xz";
@ -25,28 +26,6 @@ let
}
);
helix-with-plugins = pkgs.helix.overrideAttrs (
finalAttrs: previousAttrs: {
name = "helix-with-plugins";
version = "25.07.2";
src = pkgs.fetchzip {
url = "https://github.com/bloxx12/helix/releases/download/${finalAttrs.version}/helix-${finalAttrs.version}-source.tar.xz";
hash = "sha256-ZNsQwFfPXe6oewajx1tl68W60kVo7q2SuvTgy/o1HKk=";
stripRoot = false;
};
doInstallCheck = false;
cargoDeps = pkgs.rustPlatform.fetchCargoVendor {
inherit (helix) src;
hash = "sha256-3poZSvIrkx8lguxxDeNfngW6+4hH8TV/LHcZx5W5aXg=";
};
postInstall = ''
mv $out/bin/hx $out/bin/hxp
'';
}
);
toml = pkgs.formats.toml { };
languages =
@ -70,7 +49,7 @@ let
};
new-deadnix = pkgs.deadnix.overrideAttrs (
finalAttrs: previousAttrs: {
_: _: {
version = "unstable-15-07-2025";
src = pkgs.fetchFromGitHub {
owner = "astro";
@ -158,7 +137,10 @@ let
}
{
name = "nix";
language-servers = [ "nil" ];
language-servers = [
"nil"
"deadnix"
];
}
{
name = "qml";
@ -280,11 +262,11 @@ let
config.nil = {
formatting.command = [ "${getExe nixfmt}" ];
diagnostics = {
bindingEndHintMinLines = 3;
bindingEndHintMinLines = 10;
};
nix.flake = {
autoArchive = true;
# autoEvalInputs = true;
autoEvalInputs = true;
nixpkgsInputName = "nixpkgs";
};
};
@ -311,10 +293,8 @@ let
args = [ "server" ];
};
qmlls = {
command = getExe' pkgs.kdePackages.qtdeclarative "qmlls";
args = [ "-E" ];
};
qmlls.command = getExe' pkgs.kdePackages.qtdeclarative "qmlls";
basedpyright.command = "${pkgs.basedpyright}/bin/basedpyright-langserver";
vscode-css-language-server = {
@ -363,7 +343,7 @@ let
};
settings = {
theme = "nord";
theme = "gruvbox_dark_hard";
editor = {
cursorline = true;
color-modes = true;
@ -372,18 +352,28 @@ let
lsp = {
enable = true;
auto-signature-help = true;
display-inlay-hints = false;
display-inlay-hints = true;
display-messages = true;
display-progress-messages = true;
snippets = true;
};
file-picker = {
hidden = true;
hidden = false;
};
line-number = "relative";
auto-format = true;
completion-timeout = 5;
clipboard-provider = "wayland";
# Shell to use when running external commands.
shell = [
(getExe pkgs.nushell)
"-c"
];
completion-trigger-len = 1;
completion-replace = true;
mouse = true;
bufferline = "multiple";
popup-border = "none";
soft-wrap.enable = true;
word-completion = {
enable = true;
@ -397,22 +387,26 @@ let
statusline = {
left = [
"spinner"
"version-control"
"diagnostics"
"file-name"
];
right = [
"file-base-name"
"file-type"
"position"
"file-encoding"
];
diagnostics = [
"warning"
"error"
];
workspace-diagnostics = [
"warning"
"error"
];
};
gutters.layout = [
"diff"
"diagnostics"
"line-numbers"
"spacer"
];
inline-diagnostics = {
cursor-line = "hint";

View file

@ -27,7 +27,7 @@ in
directory = config.users.users.${username}.home;
clobberFiles = mkForce true;
};
extraModules = ((listFilesRecursive ./.) |> filter (hasSuffix ".hjem.nix"));
extraModules = (listFilesRecursive ./.) |> filter (hasSuffix ".hjem.nix");
specialArgs = {
inherit sources;
};

View file

@ -42,7 +42,7 @@ let
resize-overlay-duration = "0s";
shell-integration-features = "cursor,sudo,no-title";
term = "xterm-256color";
theme = "nightfox";
theme = "GruvboxDarkHard";
window-decoration = "none";
window-padding-balance = true;
window-padding-x = 8;

View file

@ -1,10 +1,36 @@
{
lib,
pkgs,
sources,
...
}:
let
nixfmt = pkgs.callPackage "${sources.nixfmt}/default.nix" { };
comma = pkgs.callPackage (
_:
pkgs.rustPlatform.buildRustPackage {
pname = "comma";
version = "unstable";
src = sources.comma;
cargoLock = {
allowBuiltinFetchGit = true;
lockFile = "${sources.comma}/Cargo.lock";
};
nativeBuildInputs = [ pkgs.makeBinaryWrapper ];
doInstallCheck = false;
postInstall = ''
wrapProgram $out/bin/comma \
--prefix PATH : ${
lib.makeBinPath [
pkgs.fzy
pkgs.nix-index-unwrapped
]
}
ln -s $out/bin/comma $out/bin/,
'';
}
) { };
in
{
environment.systemPackages =
@ -40,6 +66,7 @@ in
glow
# dua-cli
dust
iamb
kondo
# better grep
ripgrep
@ -75,5 +102,8 @@ in
unzip
zip
]
++ [ nixfmt ];
++ [
nixfmt
comma
];
}

View file

@ -1,4 +1,3 @@
{ pkgs, ... }:
{
programs = {
# We have to disable this and use nix-index instead. (Rust >>> Pearl)

View file

@ -124,7 +124,7 @@ in
'';
base-brand = fetchurl {
url = "https://codeberg.org/Codeberg-Infrastructure/forgejo/src/branch/codeberg-11/web_src/css/themes/codeberg/base-brand.css";
hash = "sha256-rYZolA7maYEjzfx7mKJtEfyK62kfpGxvQ1eaC9qlZNw=";
hash = "sha256-8gUmye/Z8H1Xe6U1CNAq907n3jt2TnPtzgpz6KhdiDU=";
};
dark-variables = fetchurl {
url = "https://codeberg.org/Codeberg-Infrastructure/forgejo/raw/branch/codeberg-11/web_src/css/themes/codeberg/dark-variables.css";
@ -140,30 +140,30 @@ in
"d '${customDir}/public/assets' 0750 ${user} ${group} - -"
"d '${customDir}/public/assets/img' 0750 ${user} ${group} - -"
# Copeberg logo, thanks Raf <3
"L+ '${customDir}/public/assets/img/logo.svg' - - - - ${img}/logo.svg"
"L+ '${customDir}/public/assets/img/logo.png' - - - - ${img}/logo.png"
"L+ '${customDir}/public/assets/img/apple-touch-icon' - - - - ${img}/logo.png"
"L+ '${customDir}/public/assets/img/favicon.svg' - - - - ${img}/logo.svg"
"L+ '${customDir}/public/assets/img/favicon.png' - - - - ${img}/logo.png"
"f '${customDir}/public/assets/img/logo.svg' - - - - ${img}/logo.svg"
"f '${customDir}/public/assets/img/logo.png' - - - - ${img}/logo.png"
"f '${customDir}/public/assets/img/apple-touch-icon' - - - - ${img}/logo.png"
"f '${customDir}/public/assets/img/favicon.svg' - - - - ${img}/logo.svg"
"f '${customDir}/public/assets/img/favicon.png' - - - - ${img}/logo.png"
# Theming shenanigans
"d '${customDir}/public/assets' 0750 ${user} ${group} - -"
"d '${customDir}/public/assets/css' 0750 ${user} ${group} - -"
"d '${customDir}/public/assets/css/codeberg' 0750 ${user} ${group} - -"
"L+ '${customDir}/public/assets/css/theme-codeberg-dark.css' - - - - ${theme-codeberg-dark}"
"L+ '${customDir}/public/assets/css/codeberg/base-brand.css' - - - - ${base-brand}"
"L+ '${customDir}/public/assets/css/codeberg/dark-variables.css' - - - - ${dark-variables}"
"f '${customDir}/public/assets/css/theme-codeberg-dark.css' - - - - ${theme-codeberg-dark}"
"f '${customDir}/public/assets/css/codeberg/base-brand.css' - - - - ${base-brand}"
"f '${customDir}/public/assets/css/codeberg/dark-variables.css' - - - - ${dark-variables}"
# Templates
"d '${customDir}/templates' 0750 ${user} ${group} - -"
"d '${customDir}/templates/repo' 0750 ${user} ${group} - -"
# Home page
"L+ '${customDir}/templates/home.tmpl' - - - - ${./templates}/home.tmpl"
"L+ '${customDir}/templates/repo/header.tmpl' - - - - ${./templates/repo}/header.tmpl"
"f '${customDir}/templates/home.tmpl' - - - - ${./templates}/home.tmpl"
"f '${customDir}/templates/repo/header.tmpl' - - - - ${./templates/repo}/header.tmpl"
# Fuck off scrapers
"L+ ${customDir}/public/robots.txt - - - - ${robots.outPath}"
"f ${customDir}/public/robots.txt - - - - ${robots.outPath}"
];
};
}

View file

@ -1,10 +1,11 @@
{
config,
lib,
pkgs,
...
}:
let
inherit (lib.modules) mkIf;
inherit (lib.modules) mkDefault mkIf;
inherit (lib.options) mkEnableOption;
cfg = config.modules.system.hardware;
@ -18,12 +19,21 @@ in
};
config = {
hardware = {
graphics.enable = true;
nvidia = mkIf cfg.nvidia.enable {
# we want the open-source drivers
open = true;
graphics = {
enable = true;
extraPackages = [ pkgs.nvidia-vaapi-driver ];
};
nvidia = mkIf cfg.nvidia.enable {
open = mkDefault true;
# Whether to enable kernel modesetting when using the NVIDIA proprietary driver.
# Enabling this causes the proprietary NVIDIA driver to provide its own
# framebuffer device, which can cause Wayland compositors to work when
# they otherwise wouldnt. .
modesetting.enable = true;
# nvidia-settings is useless on NixOS.
nvidiaSettings = false;
# fixes sleep on nvidia devices
@ -34,6 +44,27 @@ in
package = config.boot.kernelPackages.nvidiaPackages.beta;
};
};
services.xserver.videoDrivers = mkIf cfg.nvidia.enable [ "nvidia" ];
services.xserver.videoDrivers = [
"nvidia"
];
environment.systemPackages = builtins.attrValues {
inherit (pkgs)
mesa
vulkan-tools
vulkan-loader
libva
libva-utils
;
inherit (pkgs.nvtopPackages) nvidia;
};
# Nouveau is a set of free and open-source drivers for NVIDIA GPUs
# that provide 2D/3D acceleration for all NVIDIA GPUs.
# Its use is in general not recommended due to its considerably worse
# performance compared to NVIDIA's kernel modules, as it does not
# support reclocking (changing the GPU clock frequency on-demand)
# for many NVIDIA GPUs.
# I therefore disable it to save myself from headaches.
boot.blacklistedKernelModules = mkIf cfg.nvidia.enable [ "nouveau" ];
};
}

View file

@ -20,43 +20,41 @@ in
readOnly = true;
};
config.nixpkgs.pkgs = (
import sources.nixpkgs {
hostPlatform = pkgs.stdenv.hostPlatform;
overlays = [ ];
config = {
# Configuration reference:
# <https://nixos.org/manual/nixpkgs/unstable/#chap-packageconfig>
# Disallow broken packages to be built.
allowBroken = false;
config.nixpkgs.pkgs = import sources.nixpkgs {
inherit (pkgs.stdenv) hostPlatform;
overlays = [ ];
config = {
# Configuration reference:
# <https://nixos.org/manual/nixpkgs/unstable/#chap-packageconfig>
# Disallow broken packages to be built.
allowBroken = false;
allowUnsupportedSystem = true;
allowUnsupportedSystem = true;
# Warn when config contains an unrecognized attribute.
# This might be useful for getting a better configuration.
warnUndeclaredOptions = true;
# Warn when config contains an unrecognized attribute.
# This might be useful for getting a better configuration.
warnUndeclaredOptions = true;
# Allow unfree packages
allowUnfree = true;
# Allow unfree packages
allowUnfree = true;
# Permitted insecure packages in a system.
# Default to none, add more as necessary.
# Matrix also likes using deprecated libraries, which tend to go into this list.
# permittedInsecurePackages = [];
# Permitted insecure packages in a system.
# Default to none, add more as necessary.
# Matrix also likes using deprecated libraries, which tend to go into this list.
# permittedInsecurePackages = [];
# Whether to set enableParallelBuilding to true by default while
# building nixpkgs packages. Changing the default causes a mass rebuild.
enableParallelBuildingByDefault = false;
# Whether to set enableParallelBuilding to true by default while
# building nixpkgs packages. Changing the default causes a mass rebuild.
enableParallelBuildingByDefault = false;
# Whether to expose old attribute names for compatibility.
# This improves backwards compatibility,
# which I could not care less about in my configuration.
allowAliases = false;
# Whether to expose old attribute names for compatibility.
# This improves backwards compatibility,
# which I could not care less about in my configuration.
allowAliases = false;
# List of derivation warnings to display while rebuilding.
# See: <https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/check-meta.nix>
showDerivationWarnings = [ ];
};
}
);
# List of derivation warnings to display while rebuilding.
# See: <https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/check-meta.nix>
showDerivationWarnings = [ ];
};
};
}

View file

@ -30,9 +30,6 @@ let
allowBuiltinFetchGit = true;
lockFile = "${sources.niri}/Cargo.lock";
};
strictDeps = true;
doInstallCheck = false;
doCheck = false;
nativeBuildInputs = with pkgs; [

View file

@ -1,5 +1,18 @@
{
"pins": {
"comma": {
"type": "Git",
"repository": {
"type": "GitHub",
"owner": "nix-community",
"repo": "comma"
},
"branch": "master",
"submodules": false,
"revision": "393f20bc8805730b8183460235f26ae3fc171509",
"url": "https://github.com/nix-community/comma/archive/393f20bc8805730b8183460235f26ae3fc171509.tar.gz",
"hash": "sha256-OLerZuEhGTeSg7uiiEL+AV9iusBZLhwCx4pdYGTGRNU="
},
"flake-compat": {
"type": "Git",
"repository": {
@ -49,9 +62,9 @@
},
"branch": "master",
"submodules": false,
"revision": "5a776450d904b7ccd377c2a759703152b2553e98",
"url": "https://github.com/nix-community/lanzaboote/archive/5a776450d904b7ccd377c2a759703152b2553e98.tar.gz",
"hash": "sha256-9Cc0YqL9ZUpaybJsrRJfXex91QlPmQNqpTLgw/KvJGA="
"revision": "4775927ef576f6493b79b1d205e42493d6878d47",
"url": "https://github.com/nix-community/lanzaboote/archive/4775927ef576f6493b79b1d205e42493d6878d47.tar.gz",
"hash": "sha256-wGfVht5kOLc9t3GZxEr4IIq5QgHV6nB3w9qqhcVKloo="
},
"lix": {
"type": "Git",
@ -63,9 +76,9 @@
},
"branch": "main",
"submodules": false,
"revision": "43d6a79863d5e28b6a2cd98ecb22fe4ff491057e",
"url": "https://git.lix.systems/lix-project/lix/archive/43d6a79863d5e28b6a2cd98ecb22fe4ff491057e.tar.gz",
"hash": "sha256-/C+d8ET7B935H+xY9NTlw2kFiCeDq380yhv9Ez4379k="
"revision": "ef94901156c0c688ffffaa2c5caf1498119f01d4",
"url": "https://git.lix.systems/lix-project/lix/archive/ef94901156c0c688ffffaa2c5caf1498119f01d4.tar.gz",
"hash": "sha256-fCaJ29ZqevsIT1yqbpgdKeYr5GHF6sDhHlcXo2m+VuI="
},
"lix-module": {
"type": "Git",
@ -90,9 +103,9 @@
},
"branch": "master",
"submodules": false,
"revision": "a90e3124111d9c3eb64e97a5334db09a8e2a4bae",
"url": "https://github.com/nix-community/nh/archive/a90e3124111d9c3eb64e97a5334db09a8e2a4bae.tar.gz",
"hash": "sha256-KKaUEg1/ntHVsG61CkKFr2mfdsoK9Nj5FM/W1PBhe5o="
"revision": "d9a869acec8dd35efa658234c158e6fc82e7064a",
"url": "https://github.com/nix-community/nh/archive/d9a869acec8dd35efa658234c158e6fc82e7064a.tar.gz",
"hash": "sha256-OIYIlXCYOHLvapwxKwX5nixMT1pf9hTx+/oWN9PHWPk="
},
"nil": {
"type": "Git",
@ -142,8 +155,8 @@
"nixpkgs": {
"type": "Channel",
"name": "nixpkgs-unstable",
"url": "https://releases.nixos.org/nixpkgs/nixpkgs-25.11pre833298.83e677f31c84/nixexprs.tar.xz",
"hash": "sha256-GCDhyo1oW8YXwYNKSsJzwy4ilTMnRrPh+6OTWatUYn4="
"url": "https://releases.nixos.org/nixpkgs/nixpkgs-25.11pre834687.6027c30c8e98/nixexprs.tar.xz",
"hash": "sha256-Ba/cFHWBoCISrKBcqU8kH/8LJXYUj2kfFz7l7a7RwMU="
},
"npins": {
"type": "Git",
@ -166,9 +179,9 @@
},
"branch": "master",
"submodules": false,
"revision": "db77c71c216530159c2dcf5b269ebb4706b2e2dd",
"revision": "a5431dd02dc23d9ef1680e67777fed00fe5f7cda",
"url": null,
"hash": "sha256-QG14m53ZGp2Gk7xD2Q+Tf7RYCKfk/BYRaBtX3X4IKbc="
"hash": "sha256-vqkSDvh7hWhPvNjMjEDV4KbSCv2jyl2Arh73ZXe274k="
},
"spicetify-nix": {
"type": "Git",
@ -179,9 +192,9 @@
},
"branch": "master",
"submodules": false,
"revision": "51ac0aee7e7ee21ca0874b913f07f9004bc9311f",
"url": "https://github.com/Gerg-L/spicetify-nix/archive/51ac0aee7e7ee21ca0874b913f07f9004bc9311f.tar.gz",
"hash": "sha256-1AK8+W7d5eNyGRkcWHa+9oIChLJbY6jt7ujSJo+ft4M="
"revision": "26c488b60360e15db372483d826cec89ac532980",
"url": "https://github.com/Gerg-L/spicetify-nix/archive/26c488b60360e15db372483d826cec89ac532980.tar.gz",
"hash": "sha256-Ow+qyFckroPS4SQFHcFZ8mKh3HIQ2pQdC6DRjiYF9EE="
},
"systems": {
"type": "Git",

View file

@ -20,7 +20,7 @@
ralc = pkgsFor.${system}.callPackage ./nix/package.nix { };
});
devShells = mapAttrs (system: pkgs: {
devShells = mapAttrs (_: pkgs: {
default = pkgs.mkShell {
packages = with pkgs; [
cargo