Commit 3c57534a authored by Christopher League's avatar Christopher League
Browse files

Nix entry point for LXQT on QEMU

parents
result
*.qcow2
default:
qemu:
nixos-rebuild -I nixos-config=qemu.nix build-vm
clean:
$(RM) vm/*.qcow2 vm/result
{pkgs, lib, ...}:
let
home-manager = builtins.fetchTarball
{ url = "https://github.com/rycee/home-manager/archive/e68d6e7924925b28ddd46bd7748be7aa3e5c57bd.tar.gz";
sha256 = "0ak46iqm0fcwmjggqrp6xk9yh9q8wwj26bdgikmibs0v71wa9w4r";
};
in
{
imports = [
<nixpkgs/nixos/modules/virtualisation/qemu-vm.nix>
"${home-manager}/nixos"
];
config = {
virtualisation = {
memorySize = 1536;
writableStoreUseTmpfs = false;
};
powerManagement.enable = false;
sound.enable = false;
services.xserver.enable = true;
services.xserver.displayManager.slim = {
enable = true;
autoLogin = true;
defaultUser = "student";
};
services.xserver.desktopManager.lxqt.enable = true;
users.extraUsers.root.initialPassword = lib.mkDefault "root";
users.extraUsers.student = {
isNormalUser = true;
initialPassword = lib.mkDefault "student";
extraGroups = ["wheel"];
};
home-manager.users.student =
let
skel = pkgs.callPackage ./skel {};
rsync-skel =
"--copy-links --chmod u+w --verbose --recursive ${skel}/ $HOME";
in
{
home.file.".HM-HERE".text = "LIUCS!\n";
programs.bash.enable = true;
programs.bash.shellAliases = {
# Could suggest/enforce running `sudo poweroff` after this
liucs-factory-config = "rsync ${rsync-skel}";
};
home.activation.copyDotFiles = {
before = [];
after = [];
data = "$DRY_RUN_CMD rsync --ignore-existing ${rsync-skel}";
};
};
nixpkgs.config.allowUnfree = true;
environment.systemPackages = with pkgs; [
tmux
firefox
vscode
elementary-icon-theme
elementary-xfce-icon-theme
gnome3.adwaita-icon-theme
arc-icon-theme
faba-icon-theme
hicolor-icon-theme
maia-icon-theme
moka-icon-theme
numix-icon-theme
numix-icon-theme-circle
numix-icon-theme-square
paper-icon-theme
papirus-icon-theme
tango-icon-theme
];
};
}
{pkgs}:
let
userfile = name:
pkgs.writeText name ''
[General]
__userfile__=true
'';
in
pkgs.linkFarm "skel" [
{ name = ".config/pcmanfm-qt/lxqt/settings.conf";
path = pkgs.callPackage lxqt/pcmanfm.nix {};
}
{ name = ".config/lxqt/panel.conf";
path = pkgs.callPackage lxqt/panel.nix {};
}
{ name = ".config/lxqt/lxqt.conf";
path = pkgs.callPackage lxqt/lxqt.nix {};
}
{ name = ".config/lxqt/lxqt-powermanagement.conf";
path = pkgs.callPackage lxqt/powermgt.nix {};
}
{ name = ".config/lxqt/session.conf";
path = pkgs.callPackage lxqt/session.nix {};
}
{ name = ".config/lxqt/lxqt-runner.conf";
path = userfile "runner.conf";
}
{ name = ".config/lxqt/notifications.conf";
path = userfile "notifications.conf";
}
{ name = ".config/lxqt/power.conf";
path = userfile "power.conf";
}
]
{pkgs}:
pkgs.writeText "lxqt.conf" ''
[General]
__userfile__=true
icon_theme=elementary-xfce
theme=light
[Qt]
style=Fusion
''
{pkgs}:
pkgs.writeText "panel.conf" ''
[General]
__userfile__=true
[desktopswitch]
alignment=Right
type=desktopswitch
[mainmenu]
alignment=Left
type=mainmenu
[panel1]
alignment=-1
animation-duration=0
background-color=@Variant(\0\0\0\x43\0\xff\xff\0\0\0\0\0\0\0\0)
background-image=
desktop=0
font-color=@Variant(\0\0\0\x43\0\xff\xff\0\0\0\0\0\0\0\0)
hidable=false
iconSize=22
lineCount=1
lockPanel=false
opacity=100
panelSize=32
plugins=mainmenu, quicklaunch, showdesktop, taskbar, statusnotifier, tray, desktopswitch
position=Bottom
reserve-space=true
show-delay=0
width=100
width-percent=true
[quicklaunch]
alignment=Left
apps\1\desktop=${pkgs.lxqt.qterminal}/share/applications/qterminal.desktop
apps\2\desktop=${pkgs.firefox}/share/applications/firefox.desktop
apps\size=2
type=quicklaunch
[showdesktop]
alignment=Left
type=showdesktop
[statusnotifier]
alignment=Right
type=statusnotifier
[taskbar]
alignment=Left
type=taskbar
[tray]
alignment=Right
type=tray
''
{pkgs}:
pkgs.writeText "pcmanfm.conf" ''
[Behavior]
AutoSelectionDelay=600
BookmarkOpenMethod=current_tab
ConfirmDelete=true
ConfirmTrash=false
NoUsbTrash=false
QuickExec=false
SelectNewFiles=false
SingleClick=false
UseTrash=true
[Desktop]
BgColor=#154ca3
DesktopCellMargins=@Size(3 1)
DesktopIconSize=48
FgColor=#ffffff
Font="Sans Serif,10,-1,5,50,0,0,0,0,0"
HideItems=false
LastSlide=
ShadowColor=#000000
ShowHidden=false
ShowWmMenu=false
SlideShowInterval=0
SortColumn=name
SortFolderFirst=true
SortOrder=ascending
Wallpaper=
WallpaperDirectory=
WallpaperMode=stretch
WallpaperRandomize=false
[FolderView]
BackupAsHidden=false
BigIconSize=48
FolderViewCellMargins=@Size(3 3)
Mode=icon
ShadowHidden=false
ShowFilter=false
ShowFullNames=false
ShowHidden=false
SidePaneIconSize=24
SmallIconSize=24
SortCaseSensitive=false
SortColumn=name
SortFolderFirst=true
SortOrder=ascending
ThumbnailIconSize=128
[Places]
PlacesApplications=true
PlacesComputer=true
PlacesDesktop=true
PlacesHome=true
PlacesNetwork=true
PlacesRoot=true
PlacesTrash=true
[Search]
searchContentCaseInsensitive=false
searchContentRegexp=true
searchNameCaseInsensitive=false
searchNameRegexp=true
searchRecursive=false
searchhHidden=false
[System]
Archiver=file-roller
FallbackIconThemeName=oxygen
OnlyUserTemplates=false
SIUnit=false
SuCommand=lxqt-sudo %s
TemplateRunApp=false
TemplateTypeOnce=false
Terminal=xterm
[Thumbnail]
MaxThumbnailFileSize=4096
ShowThumbnails=true
ThumbnailLocalFilesOnly=true
[Volume]
AutoRun=true
CloseOnUnmount=true
MountOnStartup=true
MountRemovable=true
[Window]
AlwaysShowTabs=false
FixedHeight=480
FixedWidth=640
FullWidthTabBar=true
LastWindowHeight=480
LastWindowMaximized=false
LastWindowWidth=640
PathBarButtons=true
RememberWindowSize=true
ShowMenuBar=true
ShowTabClose=true
SidePaneMode=places
SplitterPos=150
''
{pkgs}:
pkgs.writeText "powermgt.conf" ''
[General]
__userfile__=true
enableBatteryWatcher=false
enableIdlenessWatcher=false
enableLidWatcher=false
runCheckLevel=1
''
{pkgs}:
pkgs.writeText "lxqt.conf" ''
[General]
__userfile__=true
[Mouse]
cursor_theme=Adwaita
''
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment