home-manager and just optimizations

This commit is contained in:
randogoth 2026-02-02 21:30:08 +02:00
parent d1713bdc99
commit 280f83488b
6 changed files with 102 additions and 39 deletions

18
templates/home-flake.nix Normal file
View file

@ -0,0 +1,18 @@
{
description = "Home Manager configuration of admin";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { nixpkgs, home-manager, ... }: {
homeConfigurations."admin" = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.x86_64-linux;
modules = [ ./home.nix ];
};
};
}

76
templates/home-home.nix Normal file
View file

@ -0,0 +1,76 @@
{ config, pkgs, ... }:
{
home.username = "admin";
home.homeDirectory = "/home/admin";
home.stateVersion = "25.05";
nixpkgs.config.allowUnfree = true;
programs.vscode = {
enable = true;
# Choose between VS Code and Codium:
# package = pkgs.vscode;
package = pkgs.vscodium;
# You can declaratively enable extensions here:
profiles.default.extensions = with pkgs.vscode-extensions; [
dracula-theme.theme-dracula
yzhang.markdown-all-in-one
];
};
# programs.emacs.enable = true
# programs.vim.enable = true
# programs.neovim.enable = true
home.packages = with pkgs; [
# decibels # default GNOME audio player
gnome-calendar # default GNOME calendar
# gnome-contacts # default GNOME contacts
firefox # Mozilla web browser
# google-chrome # web browser from Google
# chromium # open source web browser from Google
# brave # privacy oriented web browser
# opera # fast alternative web browser
# vivaldi # powerful and personal web browser
thunderbird # full-featured Mozilla e-mail client
# geary # default GNOME email client
ptyxis # container aware GNOME terminal
# alacritty # GPU accelerated terminal emulator
# kitty # GPU accelerated terminal emulator
jetbrains-toolbox # fresh versions of Android Studio and other tools
# devpod # open-source code spaces
];
home.file = {
".justfile".text = ''
[no-cd]
manage:
$EDITOR ~/.config/home-manager/home.nix
[no-cd]
switch:
home-manager switch --flake ~/.config/home-manager#$USER
[no-cd]
rebuild:
sudo nixos-rebuild switch --flake /etc/nixos#local-$HOSTNAME
[no-cd]
clean:
nix-collect-garbage -d
'';
};
home.sessionVariables = { };
programs.home-manager.enable = true;
}