46 lines
1.4 KiB
Nix
46 lines
1.4 KiB
Nix
# flake.nix
|
|
{
|
|
description = "Portable Ubuntu setup with XFCE, XRDP, Chromium, and swap";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "github:NixOS/nixpkgs";
|
|
home-manager.url = "github:nix-community/home-manager";
|
|
};
|
|
|
|
outputs = { self, nixpkgs, home-manager }:
|
|
let
|
|
system = "x86_64-linux";
|
|
pkgs = import nixpkgs { inherit system; };
|
|
in {
|
|
# Define the dev shell environment with XFCE, XRDP, Chromium, and utilities
|
|
devShell.${system} = pkgs.mkShell {
|
|
buildInputs = [
|
|
pkgs.xfce
|
|
pkgs.xfce.xfce4-terminal
|
|
pkgs.xrdp
|
|
pkgs.chromium # Added Chromium here
|
|
pkgs.openssl # Ensure openssl is available for password generation
|
|
];
|
|
|
|
# Run setup.sh when entering the devShell
|
|
shellHook = ''
|
|
if [ ! -f /swapfile ]; then
|
|
bash ${./setup.sh} # Assuming setup.sh is in the same directory
|
|
fi
|
|
'';
|
|
};
|
|
|
|
# Configuration for Home Manager, setting up XFCE and XRDP
|
|
homeConfigurations.gabriel = home-manager.lib.homeManagerConfiguration {
|
|
pkgs = import nixpkgs { inherit system; };
|
|
home.username = "gabriel";
|
|
home.homeDirectory = "/home/gabriel";
|
|
|
|
programs.bash.enable = true;
|
|
programs.xfce.enable = true;
|
|
services.xrdp.enable = true;
|
|
programs.chromium.enable = true; # Ensure Chromium is enabled for the user
|
|
};
|
|
};
|
|
}
|