diff --git a/flake.lock b/flake.lock index c86950d6..e65517fb 100644 --- a/flake.lock +++ b/flake.lock @@ -960,15 +960,16 @@ "nixpkgs": "nixpkgs_3" }, "locked": { - "lastModified": 1713946567, - "narHash": "sha256-gbffQxWoGmq9rmSwM2y4a+VGaTTuXSN+yyRoCkMuRjs=", + "lastModified": 1714022840, + "narHash": "sha256-i6xZsf7Kvp1n/Sn3nqPY1MJQx0gf80OGQw32PA/aZd8=", "owner": "Jovian-Experiments", "repo": "Jovian-NixOS", - "rev": "c3255d642c945847c61a867be15de63b8f81d5dc", + "rev": "94def3af1d45fe4b142beda3aa59a6a98e62ce9e", "type": "github" }, "original": { "owner": "Jovian-Experiments", + "ref": "development", "repo": "Jovian-NixOS", "type": "github" } diff --git a/flake.nix b/flake.nix index 1c1583e2..fc7a5d01 100644 --- a/flake.nix +++ b/flake.nix @@ -89,11 +89,11 @@ osaka-linode-01 = libx.deploy { hostname = "osaka-linode-01"; }; milan-linode-01 = libx.deploy { hostname = "milan-linode-01"; }; framework-server = libx.deploy { hostname = "framework-server"; }; - # nuc-server = libx.deploy { hostname = "nuc-server"; }; + # nuc-server = libx.deploy { hostname = "nuc-server"; }; backups-rpi4 = libx.deploy { hostname = "backups-rpi4"; system = "aarch64-linux"; }; piaware-rpi4 = libx.deploy { hostname = "piaware-rpi4"; system = "aarch64-linux"; }; - # quitman-rpi4 = libx.deploy { hostname = "quitman-rpi4"; system = "aarch64-linux"; }; - # bakersfield-rpi4 = libx.deploy { hostname = "bakersfield-rpi4"; system = "aarch64-linux"; }; + # quitman-rpi4 = libx.deploy { hostname = "quitman-rpi4"; system = "aarch64-linux"; }; + # bakersfield-rpi4 = libx.deploy { hostname = "bakersfield-rpi4"; system = "aarch64-linux"; }; }; imageConfigurations = { nixos-linode-img = libx.mkMinImage { hostname = "nixos-linode-img"; format = "linode"; }; diff --git a/home-manager/small.nix b/home-manager/small.nix index 85b06727..2a4d1e33 100644 --- a/home-manager/small.nix +++ b/home-manager/small.nix @@ -26,6 +26,11 @@ stateVersion = hmStateVersion; homeDirectory = "/home/${username}"; sessionPath = [ "$HOME/.local/bin" ]; + nix.gc = { + automatic = true; + frequency = "daily"; + options = "--delete-older-than 7d"; + }; }; nixpkgs = { diff --git a/nixos/hosts/steamdeck/default.nix b/nixos/hosts/steamdeck/default.nix index 5eaa3bbf..bd80843b 100644 --- a/nixos/hosts/steamdeck/default.nix +++ b/nixos/hosts/steamdeck/default.nix @@ -1,6 +1,6 @@ -{ inputs, config, lib, username, pkgs, ... }: { +{ inputs, config, lib, pkgs, ... }: { imports = [ - # inputs.jovian.nixosModules + inputs.jovian.nixosModules ./disks.nix ../../common/modules/boot.nix ../../common/services/tailscale-autoconnect.nix diff --git a/nixos/hosts/steamdeck/disks.nix b/nixos/hosts/steamdeck/disks.nix index dffc3ab3..50a049aa 100644 --- a/nixos/hosts/steamdeck/disks.nix +++ b/nixos/hosts/steamdeck/disks.nix @@ -2,49 +2,75 @@ services.btrfs.autoScrub.enable = true; services.btrfs.autoScrub.interval = "weekly"; - disko.devices.disk.nvme0 = { - type = "disk"; - device = "/dev/nvme0n1"; - content = { - type = "gpt"; - partitions = { - BOOT = { - priority = 1; - name = "BOOT"; - start = "0%"; - end = "550MiB"; - type = "EF00"; - content = { - type = "filesystem"; - format = "vfat"; - # https://github.com/nix-community/disko/issues/527 - mountOptions = [ "umask=0077" ]; - mountpoint = "/boot"; - }; - }; # partition 1 (ESP) - ROOT = { - start = "550MiB"; - end = "100%"; - content = { - type = "btrfs"; - extraArgs = [ "-f" ]; - subvolumes = { - "/root" = { - mountpoint = "/"; - mountOptions = [ "compress=zstd" "noatime" ]; - }; # root - "/home" = { - mountpoint = "/home"; - mountOptions = [ "compress=zstd" "noatime" ]; - }; # home - "/nix" = { - mountpoint = "/nix"; - mountOptions = [ "compress=zstd" "noatime" ]; - }; # nix - }; # subvolumes - }; # content - }; # partition 2 (/ BTRFS) - }; # partitions - }; # content - }; # disko.devices.disk.nvme0 + disko.devices = { + nvme0 = { + type = "disk"; + device = "/dev/nvme0n1"; + content = { + type = "gpt"; + partitions = { + BOOT = { + priority = 1; + name = "BOOT"; + start = "0%"; + end = "550MiB"; + type = "EF00"; + content = { + type = "filesystem"; + format = "vfat"; + # https://github.com/nix-community/disko/issues/527 + mountOptions = [ "umask=0077" ]; + mountpoint = "/boot"; + }; + }; # partition 1 (ESP) + ROOT = { + start = "550MiB"; + end = "100%"; + content = { + type = "btrfs"; + extraArgs = [ "-f" ]; + subvolumes = { + "/root" = { + mountpoint = "/"; + mountOptions = [ "compress=zstd" "noatime" ]; + }; # root + "/home" = { + mountpoint = "/home"; + mountOptions = [ "compress=zstd" "noatime" ]; + }; # home + "/nix" = { + mountpoint = "/nix"; + mountOptions = [ "compress=zstd" "noatime" ]; + }; # nix + }; # subvolumes + }; # content + }; # partition 2 (/ BTRFS) + }; # partitions + }; # content + }; # disko.devices.disk.nvme0 + + mmcblk0 = { + type = "disk"; + device = "/dev/mmcblk0"; + content = { + type = "gpt"; + partitions = { + SD_CARD = { + start = "0%"; + end = "100%"; + content = { + type = "btrfs"; + extraArgs = [ "-f" ]; + subvolumes = { + "/sd_card" = { + mountpoint = "/sd_card"; + mountOptions = [ "compress=none" "noatime" ]; + }; # sd_card + }; # subvolumes + }; # content + }; # partition 2 (SD_CARD BTRFS) + }; # partitions + }; # content + }; # disko.devices.disk.mmcblk0 + }; # disko.devices } # root