Skip to content

Commit

Permalink
Flake update, fix zfs, format
Browse files Browse the repository at this point in the history
  • Loading branch information
joinemm committed Dec 16, 2024
1 parent 11a0ed2 commit 193fe4e
Show file tree
Hide file tree
Showing 12 changed files with 67 additions and 77 deletions.
2 changes: 1 addition & 1 deletion aoc2024/day1.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
let
lib = import <nixpkgs/lib>;

divWith = f: lib.sort (a: b: a < b) (map (x: f x) nums);
divWith = f: lib.sort (a: b: a < b) (map f nums);
abs = x: if x < 0 then (-x) else x;
sum = x: lib.foldl (a: b: a + b) 0 x;

Expand Down
103 changes: 43 additions & 60 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";

# nixpkgs that still has the 6.10 kernel because zfs is lagging behind
nixpkgs-old.url = "github:NixOS/nixpkgs/dd50f99e26d30c115ae970e51103f89fde5d2b44";

treefmt-nix = {
url = "github:numtide/treefmt-nix";
inputs.nixpkgs.follows = "nixpkgs";
Expand Down
3 changes: 1 addition & 2 deletions hosts/carbon/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
(with self.nixosModules; [
laptop
kanata
zfs
])
(with inputs.nixos-hardware.nixosModules; [
lenovo-thinkpad-x1-11th-gen
Expand All @@ -35,8 +36,6 @@
hostId = "c08d7d71";
};

boot.kernelPackages = inputs.nixpkgs-old.legacyPackages.${pkgs.system}.linuxPackages_6_10;

hardware.graphics = {
extraPackages = with pkgs; [
intel-compute-runtime
Expand Down
5 changes: 1 addition & 4 deletions hosts/cobalt/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
inputs,
lib,
user,
pkgs,
self,
...
}:
Expand All @@ -15,6 +14,7 @@
(with self.nixosModules; [
desktop
virtualization
zfs
])
(with inputs.nixos-hardware.nixosModules; [
common-cpu-amd
Expand Down Expand Up @@ -49,9 +49,6 @@
];
};

# latest ZFS compatible kernel
boot.kernelPackages = inputs.nixpkgs-old.legacyPackages.${pkgs.system}.linuxPackages_6_10;

# Sample rates for Topping D10 USB DAC
services.pipewire.extraConfig = {
pipewire."99-topping-D10" = {
Expand Down
3 changes: 2 additions & 1 deletion hosts/nickel/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,8 @@
locations."/".proxyPass = "http://127.0.0.1:${toString config.services.immich.port}";
};
"scrutiny.${labDomain}" = labCert // {
locations."/".proxyPass = "http://127.0.0.1:${toString config.services.scrutiny.settings.web.listen.port}";
locations."/".proxyPass =
"http://127.0.0.1:${toString config.services.scrutiny.settings.web.listen.port}";
};
};

Expand Down
1 change: 1 addition & 0 deletions modules/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ let
./virtualization.nix
./dev.nix
./gc.nix
./zfs.nix
]
);
in
Expand Down
2 changes: 2 additions & 0 deletions modules/home/common.nix
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@
(btop.override { rocmSupport = true; })
onefetch
immich-go
czkawka
exif

# utils
tree
Expand Down
4 changes: 2 additions & 2 deletions modules/home/neovim.nix
Original file line number Diff line number Diff line change
Expand Up @@ -173,9 +173,9 @@
};
};

nvim-colorizer = {
colorizer = {
enable = true;
userDefaultOptions.names = false;
settings.user_default_options.names = false;
};
fidget.enable = true;
lightline.enable = true;
Expand Down
2 changes: 0 additions & 2 deletions modules/laptop.nix
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@
percentageLow = 10;
percentageCritical = 5;
percentageAction = 2;
# zfs doesn't support Hibernation
criticalPowerAction = "HybridSleep";
};

# Enable the auto-cpufreq daemon
Expand Down
6 changes: 4 additions & 2 deletions modules/remotebuild.nix
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@
};

programs.ssh.knownHosts = {
"hetzarm.vedenemo.dev".publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILx4zU4gIkTY/1oKEOkf9gTJChdx/jR3lDgZ7p/c7LEK";
"builder.vedenemo.dev".publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHSI8s/wefXiD2h3I3mIRdK+d9yDGMn0qS5fpKDnSGqj";
"hetzarm.vedenemo.dev".publicKey =
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILx4zU4gIkTY/1oKEOkf9gTJChdx/jR3lDgZ7p/c7LEK";
"builder.vedenemo.dev".publicKey =
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHSI8s/wefXiD2h3I3mIRdK+d9yDGMn0qS5fpKDnSGqj";
};
}
10 changes: 10 additions & 0 deletions modules/zfs.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{ pkgs, ... }:
{
boot = {
kernelPackages = pkgs.linuxPackages_6_11;
zfs.package = pkgs.zfsUnstable;
};

# zfs doesn't support Hibernation
services.upower.criticalPowerAction = "HybridSleep";
}

0 comments on commit 193fe4e

Please sign in to comment.