Skip to content

Commit

Permalink
Merge pull request #289 from barrucadu/nixos-2405
Browse files Browse the repository at this point in the history
Upgrade to NixOS 24.05
  • Loading branch information
barrucadu authored Jun 13, 2024
2 parents 0552e14 + da2b169 commit cf8786b
Show file tree
Hide file tree
Showing 11 changed files with 27 additions and 22 deletions.
26 changes: 13 additions & 13 deletions flake.lock

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

2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11";
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05";
sops-nix = {
url = "github:Mic92/sops-nix";
inputs.nixpkgs.follows = "nixpkgs";
Expand Down
2 changes: 1 addition & 1 deletion hosts/carcosa/configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ in
###############################################################################

networking.hostId = "f62895cc";
boot.supportedFilesystems = [ "zfs" ];
boot.supportedFilesystems = { zfs = true; };

# Bootloader
boot.loader.grub.enable = true;
Expand Down
3 changes: 2 additions & 1 deletion hosts/nyarlathotep/configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ in
###############################################################################

networking.hostId = "4a592971"; # ZFS needs one of these
boot.supportedFilesystems = [ "zfs" ];
boot.supportedFilesystems = { zfs = true; };

# Bootloader
boot.loader.systemd-boot.enable = true;
Expand Down Expand Up @@ -387,6 +387,7 @@ in
description = "barrucadu/prometheus-awair-exporter metrics exporter";
wantedBy = [ "multi-user.target" ];
after = [ "network-online.target" ];
wants = [ "network-online.target" ];
serviceConfig = {
ExecStart = "${pkgs.nixfiles.prometheus-awair-exporter}/bin/prometheus-awair-exporter --address 127.0.0.1:${toString prometheusAwairExporterPort} --sensor living-room:10.0.20.117 --sensor bedroom:10.0.20.187";
DynamicUser = "true";
Expand Down
1 change: 1 addition & 0 deletions shared/bookdb/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ in
description = "barrucadu/bookdb webapp";
wantedBy = [ "multi-user.target" ];
after = [ "network-online.target" "${backend}-bookdb-db.service" ];
wants = [ "network-online.target" ];
requires = [ "${backend}-bookdb-db.service" ];
path = [ pkgs.imagemagick ];
serviceConfig = {
Expand Down
1 change: 1 addition & 0 deletions shared/bookmarks/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ in
description = "barrucadu/bookmarks webapp";
wantedBy = [ "multi-user.target" ];
after = [ "network-online.target" "${backend}-bookmarks-db.service" ];
wants = [ "network-online.target" ];
requires = [ "${backend}-bookmarks-db.service" ];
serviceConfig = {
ExecStart = "${pkgs.nixfiles.bookmarks}/bin/bookmarks ${optionalString (!cfg.readOnly) "--allow-writes"}";
Expand Down
9 changes: 4 additions & 5 deletions shared/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ in
#############################################################################

# The NixOS release to be compatible with for stateful data such as databases.
system.stateVersion = "23.11";
system.stateVersion = "24.05";

# Only keep the last 500MiB of systemd journal.
services.journald.extraConfig = "SystemMaxUse=500M";
Expand All @@ -56,10 +56,8 @@ in
nix.gc.options = "--delete-older-than 30d";
nix.optimise.automatic = true;

# Enable flakes & pin nixpkgs to the same version that built the
# system
# Enable flakes
nix.extraOptions = "experimental-features = nix-command flakes";
nix.registry.nixpkgs.flake = flakeInputs.nixpkgs;

# Clear out /tmp after a fortnight and give all normal users a ~/tmp
# cleaned out weekly.
Expand Down Expand Up @@ -99,7 +97,7 @@ in

# Keyboard
console.keyMap = "uk";
services.xserver.layout = "gb";
services.xserver.xkb.layout = "gb";

#############################################################################
## Firewall
Expand Down Expand Up @@ -175,6 +173,7 @@ in
# Only pubkey auth
settings.PasswordAuthentication = false;
settings.KbdInteractiveAuthentication = false;
authorizedKeysInHomedir = true;
};

# Start ssh-agent as a systemd user service
Expand Down
1 change: 1 addition & 0 deletions shared/pleroma/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ in
systemd.services.pleroma = {
wantedBy = [ "multi-user.target" ];
after = [ "network-online.target" "${backend}-pleroma-db.service" ];
wants = [ "network-online.target" ];
requires = [ "${backend}-pleroma-db.service" ];
environment = {
DOMAIN = cfg.domain;
Expand Down
1 change: 1 addition & 0 deletions shared/resolved/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ in
description = "barrucadu/resolved nameserver";
wantedBy = [ "multi-user.target" ];
after = [ "network-online.target" ];
wants = [ "network-online.target" ];
serviceConfig = {
AmbientCapabilities = "CAP_NET_BIND_SERVICE";
ExecStart = concatStringsSep " " [
Expand Down
1 change: 1 addition & 0 deletions shared/rtorrent/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ in
enable = true;
wantedBy = [ "multi-user.target" ];
after = [ "network-online.target" ];
wants = [ "network-online.target" ];
serviceConfig = {
ExecStart = "${pkgs.rtorrent}/bin/rtorrent -n -o system.daemon.set=true -o import=${rtorrentrc}";
User = cfg.user;
Expand Down
2 changes: 1 addition & 1 deletion tools/provision-machine.sh
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ cat <<EOF > /mnt/persist/etc/nixos/hosts/new/header.nix
with lib;
{
networking.hostId = "$(head -c 4 /dev/urandom | xxd -p)";
boot.supportedFilesystems = [ "zfs" ];
boot.supportedFilesystems = { zfs = true; };
###############################################################################
## GENERATED CONFIG BELOW THIS LINE
Expand Down

0 comments on commit cf8786b

Please sign in to comment.