From 6fc9fc7506367df60088f710d85e4c5d022a569b Mon Sep 17 00:00:00 2001 From: Hactarus <859868+Hactarus@users.noreply.github.com> Date: Thu, 12 Oct 2023 00:23:52 +0200 Subject: [PATCH] init nix --- flake.nix | 27 +++++++++++++++++++++++++++ home.nix | 9 +++++++++ nix/.config/nix/registry.json | 4 ++++ 3 files changed, 40 insertions(+) create mode 100644 flake.nix create mode 100644 home.nix create mode 100644 nix/.config/nix/registry.json diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..dc6363a --- /dev/null +++ b/flake.nix @@ -0,0 +1,27 @@ +{ + description = "Dotfile manager"; + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; + + home-manager = { + url = "github:nix-community/home-manager"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + + flake-utils.url = "github:numtide/flake-utils"; + }; + dotfiles = { + url = "git.ood.ovh:hactarus/dotfiles"; + flake = false; + }; + outputs = { self, nixpkgs, home-manager, ... }@inputs: { + homeConfigurations.foodogsquared = home-manager.lib.homeManagerConfiguration { + # The home-manager configuration. + modules = [ ./home.nix ]; + + extraSpecialArgs = { + inherit (inputs) dotfiles; + }; + }; + }; +} \ No newline at end of file diff --git a/home.nix b/home.nix new file mode 100644 index 0000000..80390b6 --- /dev/null +++ b/home.nix @@ -0,0 +1,9 @@ +{ config, options, lib, pkgs, dotfiles, ... }: + +{ + xdg.configFile = { + doom.source = "${dotfiles}/emacs"; + wezterm.source = "${dotfiles}/wezterm"; + nvim.source = "${dotfiles}/nvim"; + }; +} \ No newline at end of file diff --git a/nix/.config/nix/registry.json b/nix/.config/nix/registry.json new file mode 100644 index 0000000..c117a14 --- /dev/null +++ b/nix/.config/nix/registry.json @@ -0,0 +1,4 @@ +{ + "flakes": null, + "version": 2 +} \ No newline at end of file