add home manager

This commit is contained in:
uku 2023-11-13 04:22:42 +01:00
parent d418d00b2f
commit 808a6c2482
Signed by: uku
GPG key ID: 7D01D7B105E77166
3 changed files with 87 additions and 21 deletions

View file

@ -5,7 +5,13 @@
ragenix,
getchvim,
...
}: {
}: let
username = "leo";
in {
imports = [
(lib.mkAliasOptionModule ["hm"] ["home-manager" "users" username])
];
boot = {
kernelPackages = pkgs.linuxKernel.packages.linux_zen;
@ -88,13 +94,13 @@
security.rtkit.enable = true;
# Define a user account. Don't forget to set a password with passwd.
users.users.leo = {
isNormalUser = true;
description = "leo";
extraGroups = ["networkmanager" "wheel" "video"];
shell = pkgs.fish;
packages = with pkgs; let
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
};
hm = {
home.packages = with pkgs; let
inherit (pkgs.stdenv.hostPlatform) system;
in [
firefox
@ -141,26 +147,51 @@
nix-your-shell
neovide
];
services = {
gpg-agent = {
enable = true;
enableSshSupport = true;
pinentryFlavor = "gnome3";
};
};
# wayland.windowManager.hyprland.enable = true;
programs.git = {
enable = true;
userName = "uku";
userEmail = "uku3lig@gmail.com";
signing = {
key = "0D2F5CFF394C558D4F1C58937D01D7B105E77166";
signByDefault = true;
};
extraConfig = {
core.autocrlf = "input";
push.autoSetupRemote = true;
};
};
programs.gh = {
enable = true;
settings.git_protocol = "ssh";
};
};
programs = {
gnupg.agent = {
enable = true;
enableSSHSupport = true;
pinentryFlavor = "gnome3";
};
git = {
fish = {
enable = true;
interactiveShellInit = ''
nix-your-shell fish | source
'';
};
hyprland.enable = true;
fish = {
git = {
enable = true;
promptInit = ''
nix-your-shell fish | source
'';
};
direnv.enable = true;
@ -171,9 +202,8 @@
enableFishIntegration = true;
};
steam.enable = true;
seahorse.enable = true;
steam.enable = true;
thunar = {
enable = true;
@ -181,6 +211,13 @@
};
};
# Define a user account. Don't forget to set a password with passwd.
users.users.${username} = {
isNormalUser = true;
shell = pkgs.fish;
extraGroups = ["networkmanager" "wheel" "video"];
};
fonts.packages = with pkgs; [
iosevka
jetbrains-mono
@ -223,4 +260,5 @@
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "23.05"; # Did you read the comment?
hm.home.stateVersion = "23.05";
}

View file

@ -286,6 +286,26 @@
"type": "github"
}
},
"home-manager": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1699783872,
"narHash": "sha256-4zTwLT2LL45Nmo6iwKB3ls3hWodVP9DiSWxki/oewWE=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "280721186ab75a76537713ec310306f0eba3e407",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "home-manager",
"type": "github"
}
},
"lanzaboote": {
"inputs": {
"crane": "crane",
@ -432,6 +452,7 @@
"inputs": {
"flake-parts": "flake-parts",
"getchvim": "getchvim",
"home-manager": "home-manager",
"lanzaboote": "lanzaboote",
"nixpkgs": "nixpkgs",
"ragenix": "ragenix"

View file

@ -9,6 +9,11 @@
inputs.nixpkgs-lib.follows = "nixpkgs";
};
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
ragenix = {
url = "github:yaxitech/ragenix";
inputs.nixpkgs.follows = "nixpkgs";
@ -35,6 +40,7 @@
nixpkgs,
ragenix,
lanzaboote,
home-manager,
...
} @ inputs: let
mkSystem = name:
@ -50,6 +56,7 @@
ragenix.nixosModules.default
lanzaboote.nixosModules.lanzaboote
home-manager.nixosModules.home-manager
];
specialArgs = inputs;
};