home: use home-manager
This commit is contained in:
parent
111c6b1e34
commit
83ae5ba8d2
3 changed files with 112 additions and 1 deletions
22
flake.lock
generated
22
flake.lock
generated
|
|
@ -49,6 +49,27 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"hm": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1624228557,
|
||||||
|
"narHash": "sha256-wwOqe73BsrXfRv1PhyXQFNC8iTET50KvE/HitdkRgxs=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "home-manager",
|
||||||
|
"rev": "35a24648d155843a4d162de98c17b1afd5db51e4",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
|
"ref": "release-21.05",
|
||||||
|
"repo": "home-manager",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1618628710,
|
"lastModified": 1618628710,
|
||||||
|
|
@ -96,6 +117,7 @@
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"agenix": "agenix",
|
"agenix": "agenix",
|
||||||
|
"hm": "hm",
|
||||||
"nixpkgs": "nixpkgs_2",
|
"nixpkgs": "nixpkgs_2",
|
||||||
"snm": "snm",
|
"snm": "snm",
|
||||||
"utils": "utils_2"
|
"utils": "utils_2"
|
||||||
|
|
|
||||||
13
flake.nix
13
flake.nix
|
|
@ -3,6 +3,11 @@
|
||||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-21.05-small";
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-21.05-small";
|
||||||
utils.url = "github:gytis-ivaskevicius/flake-utils-plus/staging";
|
utils.url = "github:gytis-ivaskevicius/flake-utils-plus/staging";
|
||||||
|
|
||||||
|
hm = {
|
||||||
|
url = "github:nix-community/home-manager/release-21.05";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
|
||||||
# simple mailserver
|
# simple mailserver
|
||||||
snm = {
|
snm = {
|
||||||
url = "gitlab:simple-nixos-mailserver/nixos-mailserver";
|
url = "gitlab:simple-nixos-mailserver/nixos-mailserver";
|
||||||
|
|
@ -13,7 +18,7 @@
|
||||||
# age for nix to store encrypted passwords conveniently
|
# age for nix to store encrypted passwords conveniently
|
||||||
agenix.url = "github:ryantm/agenix";
|
agenix.url = "github:ryantm/agenix";
|
||||||
};
|
};
|
||||||
outputs = { self, nixpkgs, agenix, ... }@inputs: {
|
outputs = { self, hm, nixpkgs, agenix, ... }@inputs: {
|
||||||
inherit self inputs;
|
inherit self inputs;
|
||||||
nixosConfigurations."thrall" = nixpkgs.lib.nixosSystem {
|
nixosConfigurations."thrall" = nixpkgs.lib.nixosSystem {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
|
|
@ -22,6 +27,12 @@
|
||||||
./modules/security.nix
|
./modules/security.nix
|
||||||
./hosts/thrall
|
./hosts/thrall
|
||||||
agenix.nixosModules.age
|
agenix.nixosModules.age
|
||||||
|
hm.nixosModules.home-manager
|
||||||
|
{
|
||||||
|
home-manager.useGlobalPkgs = true;
|
||||||
|
home-manager.useUserPackages = true;
|
||||||
|
home-manager.users.alex = import ./home/cli.nix;
|
||||||
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
78
home/cli.nix
Normal file
78
home/cli.nix
Normal file
|
|
@ -0,0 +1,78 @@
|
||||||
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
|
# minimal config, suitable for servers
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
# shell config
|
||||||
|
#./modules/shell
|
||||||
|
];
|
||||||
|
|
||||||
|
programs.home-manager.enable = true;
|
||||||
|
home = {
|
||||||
|
username = "alex";
|
||||||
|
homeDirectory = "/home/alex";
|
||||||
|
stateVersion = "21.05";
|
||||||
|
};
|
||||||
|
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
# archives
|
||||||
|
#p7zip
|
||||||
|
#unrar
|
||||||
|
# nix tools
|
||||||
|
nix-index
|
||||||
|
nixpkgs-fmt
|
||||||
|
# misc
|
||||||
|
fd # better find
|
||||||
|
file # info about files
|
||||||
|
gotop
|
||||||
|
ripgrep # better grep
|
||||||
|
];
|
||||||
|
home.extraOutputsToInstall = [ "doc" "info" "devdoc" ];
|
||||||
|
|
||||||
|
xdg.enable = true;
|
||||||
|
|
||||||
|
programs = {
|
||||||
|
direnv = {
|
||||||
|
enable = true;
|
||||||
|
nix-direnv = {
|
||||||
|
enable = true;
|
||||||
|
enableFlakes = true;
|
||||||
|
};
|
||||||
|
enableZshIntegration = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
gh = {
|
||||||
|
enable = true;
|
||||||
|
gitProtocol = "ssh";
|
||||||
|
};
|
||||||
|
|
||||||
|
git = {
|
||||||
|
enable = true;
|
||||||
|
ignores = [ "*~" "*.swp" "result" ];
|
||||||
|
userEmail = "me@jakalx.net";
|
||||||
|
userName = "Alexander Kobjolke";
|
||||||
|
};
|
||||||
|
|
||||||
|
gpg = {
|
||||||
|
enable = true;
|
||||||
|
settings = { homedir = "~/.local/share/gnupg"; };
|
||||||
|
};
|
||||||
|
|
||||||
|
password-store = {
|
||||||
|
enable = true;
|
||||||
|
package = pkgs.pass.withExtensions (exts: [ exts.pass-otp ]);
|
||||||
|
settings = { PASSWORD_STORE_DIR = "$HOME/.local/share/password-store"; };
|
||||||
|
};
|
||||||
|
|
||||||
|
ssh.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
services.gpg-agent = {
|
||||||
|
enable = true;
|
||||||
|
enableSshSupport = true;
|
||||||
|
defaultCacheTtl = 300;
|
||||||
|
defaultCacheTtlSsh = 300;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue