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, ragenix,
getchvim, getchvim,
... ...
}: { }: let
username = "leo";
in {
imports = [
(lib.mkAliasOptionModule ["hm"] ["home-manager" "users" username])
];
boot = { boot = {
kernelPackages = pkgs.linuxKernel.packages.linux_zen; kernelPackages = pkgs.linuxKernel.packages.linux_zen;
@ -88,13 +94,13 @@
security.rtkit.enable = true; security.rtkit.enable = true;
# Define a user account. Don't forget to set a password with passwd. home-manager = {
users.users.leo = { useGlobalPkgs = true;
isNormalUser = true; useUserPackages = true;
description = "leo"; };
extraGroups = ["networkmanager" "wheel" "video"];
shell = pkgs.fish; hm = {
packages = with pkgs; let home.packages = with pkgs; let
inherit (pkgs.stdenv.hostPlatform) system; inherit (pkgs.stdenv.hostPlatform) system;
in [ in [
firefox firefox
@ -141,26 +147,51 @@
nix-your-shell nix-your-shell
neovide 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 = { programs = {
gnupg.agent = { fish = {
enable = true;
enableSSHSupport = true;
pinentryFlavor = "gnome3";
};
git = {
enable = true; enable = true;
interactiveShellInit = ''
nix-your-shell fish | source
'';
}; };
hyprland.enable = true; hyprland.enable = true;
fish = { git = {
enable = true; enable = true;
promptInit = ''
nix-your-shell fish | source
'';
}; };
direnv.enable = true; direnv.enable = true;
@ -171,9 +202,8 @@
enableFishIntegration = true; enableFishIntegration = true;
}; };
steam.enable = true;
seahorse.enable = true; seahorse.enable = true;
steam.enable = true;
thunar = { thunar = {
enable = true; 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; [ fonts.packages = with pkgs; [
iosevka iosevka
jetbrains-mono jetbrains-mono
@ -223,4 +260,5 @@
# Before changing this value read the documentation for this option # Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "23.05"; # Did you read the comment? system.stateVersion = "23.05"; # Did you read the comment?
hm.home.stateVersion = "23.05";
} }

View file

@ -286,6 +286,26 @@
"type": "github" "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": { "lanzaboote": {
"inputs": { "inputs": {
"crane": "crane", "crane": "crane",
@ -432,6 +452,7 @@
"inputs": { "inputs": {
"flake-parts": "flake-parts", "flake-parts": "flake-parts",
"getchvim": "getchvim", "getchvim": "getchvim",
"home-manager": "home-manager",
"lanzaboote": "lanzaboote", "lanzaboote": "lanzaboote",
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs",
"ragenix": "ragenix" "ragenix": "ragenix"

View file

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