This commit is contained in:
Nikos Papadakis 2023-09-24 15:07:57 +03:00
parent 9622e5b39e
commit 0d3701765e
Signed by untrusted user who does not match committer: nikos
GPG key ID: 78871F9905ADFF02
19 changed files with 162 additions and 14 deletions

10
.editorconfig Normal file
View file

@ -0,0 +1,10 @@
root = true
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
[*.nix]
indent_style = space
indent_size = 2

48
flake.lock Normal file
View file

@ -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
}

31
flake.nix Normal file
View file

@ -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
};
};
}

View file

@ -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

73
home.nix Normal file
View file

@ -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;
}