mirror of
https://github.com/cupcakearmy/nix-cli.git
synced 2025-12-07 22:35:03 +00:00
58 lines
1.3 KiB
Nix
58 lines
1.3 KiB
Nix
{
|
|
description = "A simple Nix flake for server configuration";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
|
home-manager = {
|
|
url = "github:nix-community/home-manager";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
flake-utils.url = "github:numtide/flake-utils";
|
|
};
|
|
|
|
outputs =
|
|
{
|
|
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
|
|
];
|
|
}
|
|
)
|
|
];
|
|
};
|
|
}
|
|
);
|
|
}
|
|
|