From 045bea8c88331068ad32a35308c6a26994ba0b1f Mon Sep 17 00:00:00 2001 From: Evar Date: Wed, 25 Jun 2025 05:05:30 -0400 Subject: [PATCH] home: use remote home manager config --- flake.lock | 94 +++++++++++++++++++++++++++++++++++++++++++++++- flake.nix | 17 +++++++-- home/default.nix | 34 +++++------------- 3 files changed, 116 insertions(+), 29 deletions(-) diff --git a/flake.lock b/flake.lock index bf2dbd5..416dee4 100644 --- a/flake.lock +++ b/flake.lock @@ -80,6 +80,45 @@ "type": "github" } }, + "doomemacs": { + "flake": false, + "locked": { + "lastModified": 1749895289, + "narHash": "sha256-b1Hl70p4OOWkcTtXRiJ3Ker9gzOjAoZfwNqxlmE1s7g=", + "owner": "doomemacs", + "repo": "doomemacs", + "rev": "e6c755305358412a71a990fc2cf592c629edde1e", + "type": "github" + }, + "original": { + "owner": "doomemacs", + "repo": "doomemacs", + "type": "github" + } + }, + "emacs-overlay": { + "inputs": { + "nixpkgs": [ + "nix-doom-emacs-unstraightened" + ], + "nixpkgs-stable": [ + "nix-doom-emacs-unstraightened" + ] + }, + "locked": { + "lastModified": 1750753596, + "narHash": "sha256-/XQ4k8fUYrYe+utV0aCSHT9wB0wyw/E2IzwHxYySvGc=", + "owner": "nix-community", + "repo": "emacs-overlay", + "rev": "b13d55077455690a9b4e25e4077012f3ac724e2c", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "emacs-overlay", + "type": "github" + } + }, "flake-parts": { "inputs": { "nixpkgs-lib": [ @@ -121,7 +160,7 @@ }, "flake-utils": { "inputs": { - "systems": "systems_2" + "systems": "systems_3" }, "locked": { "lastModified": 1681202837, @@ -193,6 +232,27 @@ "type": "github" } }, + "nix-doom-emacs-unstraightened": { + "inputs": { + "doomemacs": "doomemacs", + "emacs-overlay": "emacs-overlay", + "nixpkgs": [], + "systems": "systems_2" + }, + "locked": { + "lastModified": 1750754709, + "narHash": "sha256-NzU+nM97aF0ECj0FYXx55fxbkxC0LnzQxBZS7oweJXA=", + "owner": "marienz", + "repo": "nix-doom-emacs-unstraightened", + "rev": "12f1fb5974ac524a43f8467fdbb54ced5cef7ffd", + "type": "github" + }, + "original": { + "owner": "marienz", + "repo": "nix-doom-emacs-unstraightened", + "type": "github" + } + }, "nix-index-database": { "inputs": { "nixpkgs": [ @@ -228,6 +288,21 @@ "type": "github" } }, + "nix-templates": { + "locked": { + "lastModified": 1750839034, + "narHash": "sha256-8pimAU3boBi8rr8JVHrldIsXzi1OmyAbXqioNc3ENTg=", + "ref": "refs/heads/main", + "rev": "ddf6814856b643f7bdbbd704549d888a96612cd2", + "revCount": 6, + "type": "git", + "url": "https://git.xnia.org/evar/nix-templates" + }, + "original": { + "type": "git", + "url": "https://git.xnia.org/evar/nix-templates" + } + }, "nixos-facter-modules": { "locked": { "lastModified": 1743671943, @@ -344,8 +419,10 @@ "home-manager": "home-manager", "impermanence": "impermanence", "muse-sounds-manager": "muse-sounds-manager", + "nix-doom-emacs-unstraightened": "nix-doom-emacs-unstraightened", "nix-index-database": "nix-index-database", "nix-std": "nix-std", + "nix-templates": "nix-templates", "nixos-facter-modules": "nixos-facter-modules", "nixos-hardware": "nixos-hardware", "nixpkgs": "nixpkgs_3", @@ -382,6 +459,21 @@ "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" + } + }, "vscode-server": { "inputs": { "flake-utils": "flake-utils", diff --git a/flake.nix b/flake.nix index 2e06ed7..463a8e8 100644 --- a/flake.nix +++ b/flake.nix @@ -1,5 +1,15 @@ { inputs = { + nix-doom-emacs-unstraightened = { + url = "github:marienz/nix-doom-emacs-unstraightened"; + # Optional, to download less. Neither the module nor the overlay uses this input. + inputs.nixpkgs.follows = ""; + }; + nix-templates = { + url = "git+https://git.xnia.org/evar/nix-templates"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; flake-parts.url = "github:hercules-ci/flake-parts"; vscode-server.url = "github:nix-community/nixos-vscode-server"; @@ -28,9 +38,10 @@ }; }; - outputs = inputs @ {flake-parts, ...}: - flake-parts.lib.mkFlake {inherit inputs;} { - systems = ["x86_64-linux"]; + outputs = + inputs@{ flake-parts, ... }: + flake-parts.lib.mkFlake { inherit inputs; } { + systems = [ "x86_64-linux" ]; imports = [ ./systems ./dev-shell diff --git a/home/default.nix b/home/default.nix index d76f4ae..cbd37be 100644 --- a/home/default.nix +++ b/home/default.nix @@ -1,39 +1,23 @@ { pkgs, + inputs, ... -}: let - variables = { - # VISUAL = "emacs"; - EDITOR = "nvim"; - }; -in { +}: +{ imports = [ - ./xdg.nix - ./terminal.nix - ./desktop.nix - # ./emacs.nix - ./apps.nix - ./git.nix + inputs.nix-templates.homeManagerModules.default + inputs.nix-templates.homeManagerModules.home + inputs.nix-templates.homeManagerModules.dev + + # ./xdg.nix ./vm.nix ]; - home.sessionVariables = variables; - systemd.user.sessionVariables = variables; - - xdg.enable = true; # TODO: what is this? - - fonts.fontconfig.enable = true; # allows adding fonts from home manager config - home.packages = with pkgs; [ - noto-fonts-cjk-sans - noto-fonts-cjk-serif - noto-fonts-color-emoji - ]; - - # programs.ssh programs.ssh = { enable = true; addKeysToAgent = "1h"; }; + services.ssh-agent.enable = true; programs.yt-dlp.enable = true;