Add home-manager config from laptop

This commit is contained in:
Julian Mutter 2024-01-26 12:33:59 +01:00
parent 1b05d9051b
commit 548b1ac34f
3 changed files with 217 additions and 0 deletions

83
home-manager/flake.lock generated Normal file
View File

@ -0,0 +1,83 @@
{
"nodes": {
"alacritty-theme": {
"flake": false,
"locked": {
"lastModified": 1705174680,
"narHash": "sha256-MjwNMrUJnJNR5NfPxMybuuPg1EOkI//nya+5oVmok0Q=",
"owner": "alacritty",
"repo": "alacritty-theme",
"rev": "8b89ed47321b48115c397723e8d7679016d9344b",
"type": "github"
},
"original": {
"owner": "alacritty",
"repo": "alacritty-theme",
"type": "github"
}
},
"home-manager": {
"inputs": {
"nixpkgs": [
"nixpkgs-stable"
]
},
"locked": {
"lastModified": 1704980875,
"narHash": "sha256-IPZmMjk5f4TBbEpzUFBc3OC1W6OwDNEXk2w/0uVXX1o=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "5f0ab0eedc6ede69beb8f45561ffefa54edc6e65",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "release-23.11",
"repo": "home-manager",
"type": "github"
}
},
"nixpkgs-stable": {
"locked": {
"lastModified": 1704874635,
"narHash": "sha256-YWuCrtsty5vVZvu+7BchAxmcYzTMfolSPP5io8+WYCg=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "3dc440faeee9e889fe2d1b4d25ad0f430d449356",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-23.11",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-unstable": {
"locked": {
"lastModified": 1704722960,
"narHash": "sha256-mKGJ3sPsT6//s+Knglai5YflJUF2DGj7Ai6Ynopz0kI=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "317484b1ead87b9c1b8ac5261a8d2dd748a0492d",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"alacritty-theme": "alacritty-theme",
"home-manager": "home-manager",
"nixpkgs-stable": "nixpkgs-stable",
"nixpkgs-unstable": "nixpkgs-unstable"
}
}
},
"root": "root",
"version": 7
}

53
home-manager/flake.nix Normal file
View File

@ -0,0 +1,53 @@
{
description = "Home Manager configuration of julian";
inputs = {
# Specify the source of Home Manager and Nixpkgs.
nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-23.11";
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
home-manager = {
url = "github:nix-community/home-manager/release-23.11";
inputs.nixpkgs.follows = "nixpkgs-stable";
};
alacritty-theme = {
url = "github:alacritty/alacritty-theme";
flake = false;
};
};
outputs = { nixpkgs-stable, nixpkgs-unstable, home-manager, ... }@inputs:
let
system = "x86_64-linux";
unstable-overlay = final: prev: {
unstable = import nixpkgs-unstable {
inherit system;
config.allowUnfree = true;
# my = self.
};
};
# pkgs-unstable = nixpkgs-unstable.legacyPackages.${system};
# pkgs-stable = nixpkgs-stable.legacyPackages.${system};
pkgs = import nixpkgs-stable {
inherit system;
config.allowUnfree = true;
overlays = [ unstable-overlay ];
};
in {
homeConfigurations."julian" = home-manager.lib.homeManagerConfiguration {
# pkgs = pkgs;
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
extraSpecialArgs = { inherit inputs; };
};
};
}

81
home-manager/home.nix Normal file
View File

@ -0,0 +1,81 @@
{ config, pkgs, inputs, ... }:
{
# Home Manager needs a bit of information about you and the paths it should
# manage.
home.username = "julian";
home.homeDirectory = "/home/julian";
# 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.11"; # Please read the comment before changing.
# The home.packages option allows you to install Nix packages into your
# environment.
home.packages = with pkgs; [
# Code formatters for use with doom emacs
nixfmt
dockfmt
google-java-format
# unstable.rustup
rustc
cargo
rust-analyzer
lazygit
# zoom-us
# unstable.emacs
# kitty
# wezterm
# pkgs.hello
# (pkgs.nerdfonts.override { fonts = [ "FantasqueSansMono" ]; })
# (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 = {
# # Building this configuration will create a copy of 'dotfiles/screenrc' in
# # the Nix store. Activating the configuration will then make '~/.screenrc' a
# # symlink to the Nix store copy.
# ".screenrc".source = dotfiles/screenrc;
# # You can also set the file content immediately.
# ".gradle/gradle.properties".text = ''
# org.gradle.console=verbose
# org.gradle.daemon.idletimeout=3600000
# '';
# ".config/alacritty/dracula".source = "${inputs.dracula-alacritty}";
".config/alacritty/theme".source = "${inputs.alacritty-theme}";
};
# Home Manager can also manage your environment variables through
# 'home.sessionVariables'. If you don't want to manage your shell through Home
# Manager then you have to manually source 'hm-session-vars.sh' located at
# either
#
# ~/.nix-profile/etc/profile.d/hm-session-vars.sh
#
# or
#
# /etc/profiles/per-user/julian/etc/profile.d/hm-session-vars.sh
#
home.sessionVariables = {
# EDITOR = "emacs";
};
# Let Home Manager install and manage itself.
programs.home-manager.enable = true;
}