From 90d6a12a77317a132bb0ff6645a4e2da7abafba3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?c=C4=83t=C4=83lin?= Date: Sun, 29 Dec 2024 15:02:11 +0100 Subject: [PATCH] add flake --- nix/configuration.nix | 2 +- nix/flake.lock | 138 ++++++++++++++++++++++++++++++++++++++++++ nix/flake.nix | 24 ++++++++ nix/packages.nix | 6 +- resticprofile.toml | 2 +- 5 files changed, 169 insertions(+), 3 deletions(-) create mode 100644 nix/flake.lock create mode 100644 nix/flake.nix diff --git a/nix/configuration.nix b/nix/configuration.nix index ae3e1d9..e56505c 100644 --- a/nix/configuration.nix +++ b/nix/configuration.nix @@ -133,7 +133,7 @@ ''; }; - + nix.settings.experimental-features = [ "nix-command" "flakes" ]; services.openssh.enable = true; virtualisation.docker.enable = true; networking.nameservers = [ "192.168.1.7" "1.1.1.1" ]; diff --git a/nix/flake.lock b/nix/flake.lock new file mode 100644 index 0000000..0126f35 --- /dev/null +++ b/nix/flake.lock @@ -0,0 +1,138 @@ +{ + "nodes": { + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1705309234, + "narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "ghostty": { + "inputs": { + "nixpkgs-stable": "nixpkgs-stable", + "nixpkgs-unstable": "nixpkgs-unstable", + "zig": "zig" + }, + "locked": { + "lastModified": 1735255310, + "narHash": "sha256-iAKNXAEfX+f+ETIgNPxCoNtmFpQsdEG3YYGhEPvohHI=", + "owner": "ghostty-org", + "repo": "ghostty", + "rev": "35b9ceee2116331b83c0c86269394e2545070b0f", + "type": "github" + }, + "original": { + "owner": "ghostty-org", + "repo": "ghostty", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1735141468, + "narHash": "sha256-VIAjBr1qGcEbmhLwQJD6TABppPMggzOvqFsqkDoMsAY=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "4005c3ff7505313cbc21081776ad0ce5dfd7a3ce", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-24.11", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-stable": { + "locked": { + "lastModified": 1733423277, + "narHash": "sha256-TxabjxEgkNbCGFRHgM/b9yZWlBj60gUOUnRT/wbVQR8=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "e36963a147267afc055f7cf65225958633e536bf", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "release-24.11", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-unstable": { + "locked": { + "lastModified": 1733229606, + "narHash": "sha256-FLYY5M0rpa5C2QAE3CKLYAM6TwbKicdRK6qNrSHlNrE=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "566e53c2ad750c84f6d31f9ccb9d00f823165550", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "ghostty": "ghostty", + "nixpkgs": "nixpkgs" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "zig": { + "inputs": { + "flake-compat": [ + "ghostty" + ], + "flake-utils": "flake-utils", + "nixpkgs": [ + "ghostty", + "nixpkgs-stable" + ] + }, + "locked": { + "lastModified": 1717848532, + "narHash": "sha256-d+xIUvSTreHl8pAmU1fnmkfDTGQYCn2Rb/zOwByxS2M=", + "owner": "mitchellh", + "repo": "zig-overlay", + "rev": "02fc5cc555fc14fda40c42d7c3250efa43812b43", + "type": "github" + }, + "original": { + "owner": "mitchellh", + "repo": "zig-overlay", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/nix/flake.nix b/nix/flake.nix new file mode 100644 index 0000000..b586d90 --- /dev/null +++ b/nix/flake.nix @@ -0,0 +1,24 @@ +{ + description = "NixOS flake"; + + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11"; + ghostty = { + url = "github:ghostty-org/ghostty"; + }; + }; + + outputs = { self, nixpkgs, ghostty, ... }@inputs: { + nixosConfigurations.limgrave = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + modules = [ + ./configuration.nix + { + environment.systemPackages = [ + ghostty.packages.x86_64-linux.default + ]; + } + ]; + }; + }; +} \ No newline at end of file diff --git a/nix/packages.nix b/nix/packages.nix index aaad315..1d41c36 100644 --- a/nix/packages.nix +++ b/nix/packages.nix @@ -55,4 +55,8 @@ pkgs: with pkgs; [ resticprofile gnupg awscli2 -] \ No newline at end of file + r2modman + kor + exiftool + chatterino2 +] diff --git a/resticprofile.toml b/resticprofile.toml index eabcd1b..b9abed0 100644 --- a/resticprofile.toml +++ b/resticprofile.toml @@ -43,7 +43,7 @@ schedule = "daily" [default.forget] verbose = true -schedule = "daily" +schedule = "02:00" keep-daily = "3" keep-last = "3" keep-monthly = "2"