about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--config.nix11
-rw-r--r--home.nix30
-rwxr-xr-xprograms/git.nix20
3 files changed, 61 insertions, 0 deletions
diff --git a/config.nix b/config.nix
new file mode 100644
index 0000000..ae9eaad
--- /dev/null
+++ b/config.nix
@@ -0,0 +1,11 @@
+{
+  allowUnfree = true;
+  packageOverrides = pkgs: {
+    nur = import (builtins.fetchTarball {
+      url = "https://github.com/nix-community/NUR/archive/b42e8200dc093babc67634d58ea2cc88c22ad786.tar.gz";
+      sha256 = "1msijla8ak2dg17xxkj3y3p2877k5icp9va35vsxza4n5inqk5z1";
+    }) {
+      inherit pkgs;
+    };
+  };
+}
diff --git a/home.nix b/home.nix
new file mode 100644
index 0000000..d550141
--- /dev/null
+++ b/home.nix
@@ -0,0 +1,30 @@
+{ config, pkgs, ... }:
+
+{
+  # Let Home Manager install and manage itself.
+  programs.home-manager.enable = true;
+
+  # Home Manager needs a bit of information about you and the
+  # paths it should manage.
+  home.username = "pn";
+  home.homeDirectory = "/Users/pn";
+
+  imports = [
+    ./programs/git.nix
+  ];
+
+  home.packages = with pkgs; [
+    gnupg
+    nur.repos.pn.larbs-mail
+  ];
+
+  # 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 can update Home Manager without changing this value. See
+  # the Home Manager release notes for a list of state version
+  # changes in each release.
+  home.stateVersion = "20.09";
+}
diff --git a/programs/git.nix b/programs/git.nix
new file mode 100755
index 0000000..f773a82
--- /dev/null
+++ b/programs/git.nix
@@ -0,0 +1,20 @@
+{
+  programs.git = {
+    enable = true;
+    userName = "Patryk Niedźwiedziński";
+    userEmail = "pniedzwiedzinski19@gmail.com";
+    signing = {
+      key = "pniedzwiedzinski19@gmail.com";
+      signByDefault = true;
+    };
+    aliases = {
+      lg = "log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative";
+    };
+
+    extraConfig = {
+      url."ssh://git@github.com/".insteadOf = "https://github.com/";
+      url."ssh://git@gitlab.com/".insteadOf = "https://gitlab.com/";
+      url."ssh://git@bitbucket.org/".insteadOf = "https://bitbucket.org/";
+    };
+  };
+}