nix-xcfe-xrdp-chromium/flake.nix

46 lines
1.4 KiB
Nix
Raw Normal View History

2024-11-13 21:50:35 +07:00
# flake.nix
{
2024-11-13 21:56:36 +07:00
description = "Portable Ubuntu setup with XFCE, XRDP, Chromium, and swap";
2024-11-13 21:50:35 +07:00
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 {
2024-11-13 21:56:36 +07:00
# Define the dev shell environment with XFCE, XRDP, Chromium, and utilities
2024-11-13 21:50:35 +07:00
devShell.${system} = pkgs.mkShell {
buildInputs = [
pkgs.xfce
pkgs.xfce.xfce4-terminal
pkgs.xrdp
2024-11-13 21:56:36 +07:00
pkgs.chromium # Added Chromium here
2024-11-15 11:52:02 +07:00
pkgs.openssl # Ensure openssl is available for password generation
2024-11-13 21:50:35 +07:00
];
2024-11-15 11:52:02 +07:00
# Run setup.sh when entering the devShell
shellHook = ''
if [ ! -f /swapfile ]; then
bash ${./setup.sh} # Assuming setup.sh is in the same directory
fi
'';
2024-11-13 21:50:35 +07:00
};
# 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;
2024-11-13 21:56:36 +07:00
programs.chromium.enable = true; # Ensure Chromium is enabled for the user
2024-11-13 21:50:35 +07:00
};
};
}