diff --git a/flake.lock b/flake.lock index f1e3212..e54ee00 100644 --- a/flake.lock +++ b/flake.lock @@ -34,6 +34,24 @@ "type": "github" } }, + "flake-utils_2": { + "inputs": { + "systems": "systems_2" + }, + "locked": { + "lastModified": 1705309234, + "narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, "home-manager": { "inputs": { "nixpkgs": [ @@ -174,7 +192,29 @@ "nixpkgs": "nixpkgs", "nixpkgs-unstable": "nixpkgs-unstable", "pkg-android-tools": "pkg-android-tools", - "systems": "systems_2" + "rust-overlay": "rust-overlay", + "systems": "systems_3" + } + }, + "rust-overlay": { + "inputs": { + "flake-utils": "flake-utils_2", + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1708049456, + "narHash": "sha256-8qGWZTQPPBhcF5dsl1KSWF+H7RX8C3BZGvqYWKBtLjQ=", + "owner": "oxalica", + "repo": "rust-overlay", + "rev": "4ee92bf124fbc4e157cbce1bc2a35499866989fc", + "type": "github" + }, + "original": { + "owner": "oxalica", + "repo": "rust-overlay", + "type": "github" } }, "systems": { @@ -206,6 +246,21 @@ "repo": "default", "type": "github" } + }, + "systems_3": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } } }, "root": "root", diff --git a/flake.nix b/flake.nix index 977dcac..087a0d1 100644 --- a/flake.nix +++ b/flake.nix @@ -33,6 +33,11 @@ url = "github:hyprwm/contrib"; inputs.nixpkgs.follows = "nixpkgs"; }; + + rust-overlay = { + url = "github:oxalica/rust-overlay"; + inputs.nixpkgs.follows = "nixpkgs"; + }; }; outputs = { self, nixpkgs, nixpkgs-unstable, ... }@inputs: diff --git a/home/default.nix b/home/default.nix index 2924e26..59c8610 100644 --- a/home/default.nix +++ b/home/default.nix @@ -20,5 +20,11 @@ in readOnly = true; internal = true; }; + graphical = lib.mkOption { + description = "Whether to enable graphical home-manager applications"; + type = lib.types.bool; + default = (osConfig ? services && osConfig.services.xserver.enable); + example = true; + }; }; } diff --git a/home/package-sets/communication.nix b/home/package-sets/communication.nix new file mode 100644 index 0000000..5a8766c --- /dev/null +++ b/home/package-sets/communication.nix @@ -0,0 +1,19 @@ +{ pkgs, lib, config, osConfig ? {}, ... }: +let + cfg = config.nixfiles.packageSets.communication; +in +{ + options.nixfiles.packageSets.communication = { + enable = lib.mkEnableOption "communication package set"; + }; + config = lib.mkIf cfg.enable { + home.packages = with pkgs; lib.optionals config.nixfiles.graphical [ + element-desktop-wayland + telegram-desktop + signal-desktop + thunderbird + ] ++ [ + irssi + ]; + }; +} diff --git a/home/package-sets/default.nix b/home/package-sets/default.nix index cbe4b9e..07fb64d 100644 --- a/home/package-sets/default.nix +++ b/home/package-sets/default.nix @@ -1,5 +1,7 @@ {...}: { imports = [ + ./communication.nix + ./dev.nix ]; } diff --git a/home/package-sets/dev.nix b/home/package-sets/dev.nix new file mode 100644 index 0000000..cc4e49f --- /dev/null +++ b/home/package-sets/dev.nix @@ -0,0 +1,24 @@ +{ pkgs, lib, config, osConfig ? {}, ... }: +let + cfg = config.nixfiles.packageSets.dev; +in +{ + options.nixfiles.packageSets.dev = { + enable = lib.mkEnableOption "development package set"; + }; + config = lib.mkIf cfg.enable { + home.packages = with pkgs; [ + neovim + rg + fd + bat + + # none of these need to be in my PATH since i can use nix shells but it's + # nice to have a repl and some generic tools globally available + rust-bin.stable.latest.default + python311Packages.ptpython + python311 + lua + ]; + }; +}