Initial version.
This commit is contained in:
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
result
|
||||
63
flake.lock
generated
Normal file
63
flake.lock
generated
Normal file
@@ -0,0 +1,63 @@
|
||||
{
|
||||
"nodes": {
|
||||
"home-manager": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
],
|
||||
"utils": "utils"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1657396086,
|
||||
"narHash": "sha256-4cQ6hEuewWoFkTBlu211JGxPQQ1Zyli8oEq1cu7cVeA=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "c645cc9f82c7753450d1fa4d1bc73b64960a9d7a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1657447894,
|
||||
"narHash": "sha256-Z3MYLl28PFpXNqQnTMU1s0y0DKcQgdc44op97RMkEK4=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "264e1b24b373fcd6a64b3566dbce9b0ad499bca5",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"home-manager": "home-manager",
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
},
|
||||
"utils": {
|
||||
"locked": {
|
||||
"lastModified": 1653893745,
|
||||
"narHash": "sha256-0jntwV3Z8//YwuOjzhV2sgJJPt+HY6KhU7VZUL0fKZQ=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "1ed9fb1935d260de5fe1c2f7ee0ebaae17ed2fa1",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
||||
41
flake.nix
Normal file
41
flake.nix
Normal file
@@ -0,0 +1,41 @@
|
||||
{
|
||||
description = "Home Manager configuration for ppetru";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs-24.05";
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, home-manager }:
|
||||
let
|
||||
username = "ppetru";
|
||||
system = "x64_64-linux";
|
||||
stateVersion = "24.05";
|
||||
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
|
||||
config = {
|
||||
allowUnfree = true;
|
||||
};
|
||||
};
|
||||
|
||||
homeDirPrefix = if pkgs.stdenv.hostPlatform.isDarwin then "/Users" else "/home";
|
||||
homeDirectory = "/${homeDirPrefix}/${username}";
|
||||
|
||||
home = (import ./home.nix {
|
||||
inherit homeDirectory pkgs stateVersion system username;
|
||||
});
|
||||
in {
|
||||
homeConfigurations.${username} = home-manager.lib.homeManagerConfiguration {
|
||||
inherit pkgs;
|
||||
|
||||
modules = [
|
||||
home
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
28
home.nix
Normal file
28
home.nix
Normal file
@@ -0,0 +1,28 @@
|
||||
{ homeDirectory
|
||||
, pkgs
|
||||
, stateVersion
|
||||
, system
|
||||
, username }:
|
||||
|
||||
let
|
||||
packages = import ./packages.nix { inherit pkgs; };
|
||||
in {
|
||||
home = {
|
||||
inherit homeDirectory packages stateVersion username;
|
||||
|
||||
shellAliases = {
|
||||
reload-home-manager-config = "home-manager switch --flake ${builtins.toString ./.}";
|
||||
};
|
||||
};
|
||||
|
||||
nixpkgs = {
|
||||
config = {
|
||||
inherit system;
|
||||
allowUnfree = true;
|
||||
allowUnsupportedSystem = true;
|
||||
experimental-features = "nix-command flakes";
|
||||
};
|
||||
};
|
||||
|
||||
programs = import ./programs.nix;
|
||||
}
|
||||
8
packages.nix
Normal file
8
packages.nix
Normal file
@@ -0,0 +1,8 @@
|
||||
{ pkgs }:
|
||||
|
||||
let
|
||||
nixTools = with pkgs; [
|
||||
tmux
|
||||
zsh
|
||||
];
|
||||
in nixTools
|
||||
5
programs.nix
Normal file
5
programs.nix
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
home-manager = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user