mirror of
https://github.com/cupcakearmy/nix-cli.git
synced 2025-12-09 23:35:02 +00:00
v2
This commit is contained in:
55
flake.nix
55
flake.nix
@@ -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
|
||||
];
|
||||
}
|
||||
)
|
||||
];
|
||||
};
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user