From 903488fa21a68a4ceee454af3e5905464b852d91 Mon Sep 17 00:00:00 2001 From: Matt Nish-Lapidus Date: Thu, 22 May 2025 22:49:45 -0400 Subject: [PATCH] up and running again --- flake.lock | 30 +++++++++++------------ flake.nix | 1 + homes/emenel/default.nix | 45 ++++++++++++++++------------------- hosts/eddie/configuration.nix | 10 ++++---- hosts/eddie/disko-config.nix | 2 +- modules/home/desktop.nix | 1 + modules/system/btrfs-conf.nix | 31 ++++++++++++++++++++++++ packages/mioctl.nix | 2 +- packages/rmpc-latest.nix | 2 +- 9 files changed, 76 insertions(+), 48 deletions(-) create mode 100644 modules/system/btrfs-conf.nix diff --git a/flake.lock b/flake.lock index 3bff5ef..3719e1f 100644 --- a/flake.lock +++ b/flake.lock @@ -88,11 +88,11 @@ "nixpkgs-stable": "nixpkgs-stable" }, "locked": { - "lastModified": 1747880714, - "narHash": "sha256-djK1m31NlLOchzyf+j6EYOHkQH0nvlvcXZ9hWBa8B68=", + "lastModified": 1747931129, + "narHash": "sha256-kiZHNTbdMRdKFZlBcx1PI5hBu8Hounl/JQdueAoufqM=", "owner": "nix-community", "repo": "emacs-overlay", - "rev": "783e12a65f2284fbaf88a77f50c167a28a7d9e1c", + "rev": "67fa10fdfd0e958dceb60ce893956aad1ed6bce4", "type": "github" }, "original": { @@ -376,11 +376,11 @@ ] }, "locked": { - "lastModified": 1747875884, - "narHash": "sha256-tdVx4kghhdy62LKuTnwE2RytOe8o88tah/yhpyuL0D4=", + "lastModified": 1747955385, + "narHash": "sha256-AKoBFaEGN02tGvBlkwVIDOGXouHvrTTfOUcvBDGxkxQ=", "owner": "nix-community", "repo": "home-manager", - "rev": "f9186c64fcc6ee5f0114547acf9e814c806a640b", + "rev": "a868570581f0dbdef7e33c8c9bb34b735dfcbacf", "type": "github" }, "original": { @@ -785,11 +785,11 @@ "xwayland-satellite-unstable": "xwayland-satellite-unstable" }, "locked": { - "lastModified": 1747913006, - "narHash": "sha256-MaZsLpgOCpegUmUsscX02TepD/X9+onKuO+GMkXX3Pk=", + "lastModified": 1747929338, + "narHash": "sha256-qGMrtBvWWKPElGpQ4ZPZVGN8HLC+laJHkwcsJB7wwGs=", "owner": "sodiboo", "repo": "niri-flake", - "rev": "8d904a38ca615be076fb86b9940972018edca932", + "rev": "5b5c0cc698a19c5a10ef1aee487cae238a4aac1e", "type": "github" }, "original": { @@ -818,11 +818,11 @@ "niri-unstable": { "flake": false, "locked": { - "lastModified": 1747903029, - "narHash": "sha256-Xv4j93I3hTe0kWdEKKXwLALmHEf1OjHF0qO7Wy4nhE0=", + "lastModified": 1747926317, + "narHash": "sha256-EBGfaeZ53SNBtsB8dnvBWfjwp+dRDCEkfYyRfwTdbls=", "owner": "YaLTeR", "repo": "niri", - "rev": "357f9157cc63e846a6d8097051a6dce6392d27c9", + "rev": "8347cc20dc87049b398ab655565d468c5c4427a0", "type": "github" }, "original": { @@ -1659,11 +1659,11 @@ ] }, "locked": { - "lastModified": 1747923575, - "narHash": "sha256-/2wm2FazQZ73pJSkT9OqvsdRu3KSUlxFlq6JCH0hP9A=", + "lastModified": 1747952334, + "narHash": "sha256-3vviUKy/BmqdVtvPHsVXDxmeb7zI3AL41MFx8yqk4+s=", "owner": "0xc000022070", "repo": "zen-browser-flake", - "rev": "04ac1a62f9374f13e851ffe97e7acd803014c05f", + "rev": "d621ed2616531c072f7b29ea93ef39cbc46bc79c", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 079f5ce..bdd211f 100644 --- a/flake.nix +++ b/flake.nix @@ -177,6 +177,7 @@ inherit system; specialArgs = configArgs; modules = [ + inputs.disko.nixosModules.disko inputs.musnix.nixosModules.musnix inputs.niri.nixosModules.niri inputs.sops-nix.nixosModules.sops diff --git a/homes/emenel/default.nix b/homes/emenel/default.nix index bae62a3..965ea57 100644 --- a/homes/emenel/default.nix +++ b/homes/emenel/default.nix @@ -1,4 +1,7 @@ { nix-config, config, lib, pkgs, inputs, ... }: +let + scpath = "/home/emenel/.config/sops-nix/secrets"; +in { imports = with nix-config.homeModules; [ @@ -51,8 +54,8 @@ WINEFSYNC = 1; PKG_CONFIG_PATH = "/home/emenel/.nix-profile/lib/pkgconfig:/home/emenel/.nix-profile/lib64/pkgconfig:/home/emenal/.nix-profile/share/pkgconfig"; GI_TYPELIB_PATH = "/run/current-system/sw/lib/girepository-1.0"; - BW_CLIENTID = "$(cat ${config.sops.defaultSymlinkPath}/bw_client_id)"; - BW_CLIENTSECRET = "$(cat ${config.sops.defaultSymlinkPath}/bw_api_key)"; + BW_CLIENTID = "$(cat ${config.sops.secrets.bw_client_id.path}/bw_client_id)"; + BW_CLIENTSECRET = "$(cat ${config.sops.secrets.bw_api_key.path}/bw_api_key)"; NIXOS_OZONE_WL = "1"; GSK_RENDERER = "ngl"; MOZ_ENABLE_WAYLAND = 1; @@ -70,18 +73,10 @@ defaultSopsFile = ./secrets.yaml; secrets = { - bw_client_id = { - path = "${config.sops.defaultSymlinkPath}/bw_client_id"; - }; - bw_api_key = { - path = "${config.sops.defaultSymlinkPath}/bw_api_key"; - }; - ssh_key = { - path = "${config.sops.defaultSymlinkPath}/ssh_key"; - }; - borg_url = { - path = "${config.sops.defaultSymlinkPath}/borg_url"; - }; + bw_client_id = {}; + bw_api_key = {}; + ssh_key = {}; + borg_url = {}; icloud = {}; }; }; @@ -106,9 +101,7 @@ "- home/emenel/.cache" "- home/emenel/.nix*" "- home/emenel/.steam*" - "- home/emenel/Dropbox" "- home/emenel/Sync" - "- home/emenel/.dropbox*" "- home/emenel/.BitwigStudio" "- home/emenel/.local/share/bitwig" ]; @@ -159,14 +152,18 @@ }; }; - # email signature - home.file.".signature".source = ./dotfiles/dot_signature; + systemd.user.tmpfiles.rules = [ + "L /home/emenel/Mounts - - - - /mnt" + ]; - #custom script executables - home.file.".local/bin" = { - source = ./dotfiles/dot_local/bin; - recursive = true; + home = { + file = { + ".signature".source = ./dotfiles/dot_signature; + ".local/bin" = { + source = ./dotfiles/dot_local/bin; + recursive = true; + }; + ".ssh/config".source = ./dotfiles/dot_ssh/config; + }; }; - - home.file.".ssh/config".source = ./dotfiles/dot_ssh/config; } diff --git a/hosts/eddie/configuration.nix b/hosts/eddie/configuration.nix index 63e75cf..aac4f4d 100644 --- a/hosts/eddie/configuration.nix +++ b/hosts/eddie/configuration.nix @@ -4,19 +4,16 @@ imports = with nix-config.nixosModules; [ ./hardware-configuration.nix - - ./fs-default.nix - # ./disko-config.nix - + ./disko-config.nix ./razer-speaker-fix.nix + btrfs-conf users-emenel nixld niri kanata filesystems-filez - filesystems-media-server sound ]; @@ -282,10 +279,11 @@ services.fstrim.enable = true; services.udisks2.enable = true; - # programs.devmon.enable = true; services.rpcbind.enable = true; # needed for NFS + systemd.tmpfiles.rules = [ "d /mnt 0770 root users" + "L /mnt/removable - - - - /run/media/emenel" ]; services.hardware.openrgb = { diff --git a/hosts/eddie/disko-config.nix b/hosts/eddie/disko-config.nix index 2c135fb..5d0991f 100644 --- a/hosts/eddie/disko-config.nix +++ b/hosts/eddie/disko-config.nix @@ -21,7 +21,7 @@ size = "100%"; content = { type = "luks"; - name = "crypted" + name = "crypted"; settings = { allowDiscards = true; }; diff --git a/modules/home/desktop.nix b/modules/home/desktop.nix index 0ac0191..c49c485 100644 --- a/modules/home/desktop.nix +++ b/modules/home/desktop.nix @@ -226,6 +226,7 @@ enable = true; automount = true; tray = "always"; + notify = false; }; }; diff --git a/modules/system/btrfs-conf.nix b/modules/system/btrfs-conf.nix new file mode 100644 index 0000000..02d3871 --- /dev/null +++ b/modules/system/btrfs-conf.nix @@ -0,0 +1,31 @@ +{ config, lib, pkgs, ... }: + +{ + services = { + btrfs = { + autoScrub = { + enable = true; + }; + }; + btrbk = { + instances."home" = { + onCalendar = "hourly"; + settings = { + timestamp_format = "long"; + snapshot_preserve_min = "18h"; + snapshot_preserve = "48h"; + volume = { + "/" = { + snapshot_dir = "/.snapshots"; + subvolume = "/home"; + }; + }; + }; + }; + }; + }; + + systemd.tmpfiles.rules = [ + "d /.snapshots 0755 root root" + ]; +} diff --git a/packages/mioctl.nix b/packages/mioctl.nix index 527364f..b9fe685 100644 --- a/packages/mioctl.nix +++ b/packages/mioctl.nix @@ -6,7 +6,7 @@ stdenv.mkDerivation { src = fetchurl { url = "https://codeberg.org/pmatilai/mioctl/archive/master.zip"; - sha256 = "sha256-GFCUqao+LC9SgparV1699D72wnD0kZeroyq5DRxdJos="; + sha256 = "sha256-duWFdF+gjExhDxUKdCEOx1hwkA4O2YROVtJLzGAYjdA="; }; nativeBuildInputs = [ makeWrapper unzip ]; diff --git a/packages/rmpc-latest.nix b/packages/rmpc-latest.nix index c05c31a..d0dba66 100644 --- a/packages/rmpc-latest.nix +++ b/packages/rmpc-latest.nix @@ -15,7 +15,7 @@ rustPlatform.buildRustPackage rec { owner = "mierak"; repo = "rmpc"; rev = "master"; - hash = "sha256-TwJKoLcJlqRtBs3lV7kfT/gyOs23V4Yp4xE7zz1fFXI="; + hash = "sha256-ERLOi+TyAq3Dkmk1UfTqqIdI/LqxAk7bFJfq+18Kqlw="; }; useFetchCargoVendor = true;