diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..af0959f --- /dev/null +++ b/.editorconfig @@ -0,0 +1,10 @@ +root = true + +[*] +charset = utf-8 +end_of_line = lf +insert_final_newline = true + +[*.nix] +indent_style = space +indent_size = 2 diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..dff478a --- /dev/null +++ b/flake.lock @@ -0,0 +1,48 @@ +{ + "nodes": { + "home-manager": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1695550077, + "narHash": "sha256-xoxR/iY69/3lTnnZDP6gf3J46DUKPcf+Y1jH03tfZXE=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "a88df2fb101778bfd98a17556b3a2618c6c66091", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "home-manager", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1695360818, + "narHash": "sha256-JlkN3R/SSoMTa+CasbxS1gq+GpGxXQlNZRUh9+LIy/0=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "e35dcc04a3853da485a396bdd332217d0ac9054f", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "home-manager": "home-manager", + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..bbf9234 --- /dev/null +++ b/flake.nix @@ -0,0 +1,31 @@ +{ + description = "Home Manager configuration"; + + inputs = { + # Specify the source of Home Manager and Nixpkgs. + nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; + home-manager = { + url = "github:nix-community/home-manager"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + }; + + outputs = { nixpkgs, home-manager, ... }: + let + system = "x86_64-linux"; # change your system type here + user = "nikos"; # change your user here + pkgs = nixpkgs.legacyPackages.${system}; + in + { + homeConfigurations.${user} = home-manager.lib.homeManagerConfiguration { + inherit pkgs; + + # Specify your home configuration modules here, for example, + # the path to your home.nix. + modules = [ ./home.nix ]; + + # Optionally use extraSpecialArgs + # to pass through arguments to home.nix + }; + }; +} diff --git a/git/dot-config/git/config b/git/dot-config/git/config deleted file mode 100644 index 4be0a4b..0000000 --- a/git/dot-config/git/config +++ /dev/null @@ -1,14 +0,0 @@ -[user] - email = nikos@papadakis.xyz - name = Nikos Papadakis - signingkey = 78871F9905ADFF02 -[pull] - rebase = true -[branch] - autosetuprebase = always -[gpg] - program = gpg2 -[commit] - gpgsign = true -[init] - defaultBranch = main diff --git a/home.nix b/home.nix new file mode 100644 index 0000000..a6e760b --- /dev/null +++ b/home.nix @@ -0,0 +1,73 @@ +{ config, pkgs, ... }: + +{ + # Home Manager needs a bit of information about you and the paths it should + # manage. + home.username = "nikos"; + home.homeDirectory = "/home/nikos"; + + # This value determines the Home Manager release that your configuration is + # compatible with. This helps avoid breakage when a new Home Manager release + # introduces backwards incompatible changes. + # + # You should not change this value, even if you update Home Manager. If you do + # want to update the value, then make sure to first check the Home Manager + # release notes. + home.stateVersion = "23.05"; # Please read the comment before changing. + + # The home.packages option allows you to install Nix packages into your + # environment. + home.packages = [ + # # It is sometimes useful to fine-tune packages, for example, by applying + # # overrides. You can do that directly here, just don't forget the + # # parentheses. Maybe you want to install Nerd Fonts with a limited number of + # # fonts? + # (pkgs.nerdfonts.override { fonts = [ "FantasqueSansMono" ]; }) + + # # You can also create simple shell scripts directly inside your + # # configuration. For example, this adds a command 'my-hello' to your + # # environment: + # (pkgs.writeShellScriptBin "my-hello" '' + # echo "Hello, ${config.home.username}!" + # '') + ]; + + # Home Manager is pretty good at managing dotfiles. The primary way to manage + # plain files is through 'home.file'. + home.file = { + ".config/nvim".source = ./nvim; + }; + + # You can also manage environment variables but you will have to manually + # source + # + # ~/.nix-profile/etc/profile.d/hm-session-vars.sh + # + # or + # + # /etc/profiles/per-user/nikos/etc/profile.d/hm-session-vars.sh + # + # if you don't want to manage your shell through Home Manager. + # home.sessionVariables = { + # # EDITOR = "emacs"; + # }; + + programs.git = { + enable = true; + userName = "Nikos Papadakis"; + userEmail = "nikos@papadakis.xyz"; + signing.key = "78871F9905ADFF02"; + signing.signByDefault = true; + includes = [ + { + contents = { + init.defaultBranch = "main"; + pull.rebase = true; + }; + } + ]; + }; + + # Let Home Manager install and manage itself. + programs.home-manager.enable = true; +} diff --git a/nvim/dot-config/nvim/after/plugin/lspconfig.lua b/nvim/after/plugin/lspconfig.lua similarity index 100% rename from nvim/dot-config/nvim/after/plugin/lspconfig.lua rename to nvim/after/plugin/lspconfig.lua diff --git a/nvim/dot-config/nvim/after/plugin/lualine.lua b/nvim/after/plugin/lualine.lua similarity index 100% rename from nvim/dot-config/nvim/after/plugin/lualine.lua rename to nvim/after/plugin/lualine.lua diff --git a/nvim/dot-config/nvim/after/plugin/nvim-cmp.lua b/nvim/after/plugin/nvim-cmp.lua similarity index 100% rename from nvim/dot-config/nvim/after/plugin/nvim-cmp.lua rename to nvim/after/plugin/nvim-cmp.lua diff --git a/nvim/dot-config/nvim/after/plugin/telescope.lua b/nvim/after/plugin/telescope.lua similarity index 100% rename from nvim/dot-config/nvim/after/plugin/telescope.lua rename to nvim/after/plugin/telescope.lua diff --git a/nvim/dot-config/nvim/after/plugin/treesitter.lua b/nvim/after/plugin/treesitter.lua similarity index 100% rename from nvim/dot-config/nvim/after/plugin/treesitter.lua rename to nvim/after/plugin/treesitter.lua diff --git a/nvim/dot-config/nvim/init.lua b/nvim/init.lua similarity index 100% rename from nvim/dot-config/nvim/init.lua rename to nvim/init.lua diff --git a/nvim/dot-config/nvim/lazy-lock.json b/nvim/lazy-lock.json similarity index 100% rename from nvim/dot-config/nvim/lazy-lock.json rename to nvim/lazy-lock.json diff --git a/nvim/dot-config/nvim/lua/my/keymaps.lua b/nvim/lua/my/keymaps.lua similarity index 100% rename from nvim/dot-config/nvim/lua/my/keymaps.lua rename to nvim/lua/my/keymaps.lua diff --git a/nvim/dot-config/nvim/lua/my/resize.lua b/nvim/lua/my/resize.lua similarity index 100% rename from nvim/dot-config/nvim/lua/my/resize.lua rename to nvim/lua/my/resize.lua diff --git a/nvim/dot-config/nvim/lua/my/tab.lua b/nvim/lua/my/tab.lua similarity index 100% rename from nvim/dot-config/nvim/lua/my/tab.lua rename to nvim/lua/my/tab.lua diff --git a/nvim/dot-config/nvim/lua/my/utils.lua b/nvim/lua/my/utils.lua similarity index 100% rename from nvim/dot-config/nvim/lua/my/utils.lua rename to nvim/lua/my/utils.lua diff --git a/nvim/dot-config/nvim/lua/plugins.lua b/nvim/lua/plugins.lua similarity index 100% rename from nvim/dot-config/nvim/lua/plugins.lua rename to nvim/lua/plugins.lua diff --git a/nvim/dot-config/nvim/spell/en.utf-8.add b/nvim/spell/en.utf-8.add similarity index 100% rename from nvim/dot-config/nvim/spell/en.utf-8.add rename to nvim/spell/en.utf-8.add diff --git a/nvim/dot-config/nvim/spell/en.utf-8.add.spl b/nvim/spell/en.utf-8.add.spl similarity index 100% rename from nvim/dot-config/nvim/spell/en.utf-8.add.spl rename to nvim/spell/en.utf-8.add.spl