This commit is contained in:
2025-10-07 21:29:52 +02:00
parent 7c533ae24b
commit cc099305dd
4 changed files with 115 additions and 113 deletions

View File

@@ -1,5 +1,5 @@
{
description = "nix base CLI env";
description = "A simple Nix flake for server configuration";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
@@ -7,18 +7,51 @@
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
flake-utils.url = "github:numtide/flake-utils";
};
outputs =
{ nixpkgs, home-manager, ... }:
let
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
in
{
homeConfigurations."root" = home-manager.lib.homeManagerConfiguration {
inherit pkgs;
modules = [ ./home.nix ];
};
};
self,
nixpkgs,
home-manager,
flake-utils,
...
}:
flake-utils.lib.eachDefaultSystem (
system:
let
pkgs = nixpkgs.legacyPackages.${system};
# This is the main entry point for a user's home configuration.
# The user should be changed to the actual username.
username = "root";
in
{
packages.default = pkgs.btop;
homeConfigurations.${username} = home-manager.lib.homeManagerConfiguration {
inherit pkgs;
modules = [
(
{ config, pkgs, ... }:
{
home.username = username;
home.homeDirectory = "/home/${username}";
home.stateVersion = "23.11"; # Please change this to your version.
home.alias = {
l = "ls -hal";
};
home.packages = [
pkgs.btop
];
}
)
];
};
}
);
}