Compare commits
2 Commits
bd15987f8d
...
9d5a7994eb
| Author | SHA1 | Date | |
|---|---|---|---|
| 9d5a7994eb | |||
| 1465213c90 |
56
common/desktop-node.nix
Normal file
56
common/desktop-node.nix
Normal file
@@ -0,0 +1,56 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
# Enable Hyprland (Wayland compositor)
|
||||
programs.hyprland = {
|
||||
enable = true;
|
||||
xwayland.enable = true; # For compatibility with X11 apps if needed
|
||||
};
|
||||
|
||||
# Essential desktop services
|
||||
services.dbus.enable = true;
|
||||
|
||||
# polkit for privilege escalation
|
||||
security.polkit.enable = true;
|
||||
|
||||
# Enable sound with pipewire
|
||||
security.rtkit.enable = true;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
};
|
||||
|
||||
# XDG portal for screen sharing, file pickers, etc.
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
extraPortals = [ pkgs.xdg-desktop-portal-hyprland ];
|
||||
};
|
||||
|
||||
# Fonts
|
||||
fonts.packages = with pkgs; [
|
||||
noto-fonts
|
||||
noto-fonts-cjk-sans
|
||||
noto-fonts-emoji
|
||||
liberation_ttf
|
||||
fira-code
|
||||
fira-code-symbols
|
||||
];
|
||||
|
||||
# Enable GDM for login (can also use greetd or ly for lighter options)
|
||||
services.greetd = {
|
||||
enable = true;
|
||||
settings = {
|
||||
default_session = {
|
||||
command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time --cmd Hyprland";
|
||||
user = "greeter";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# Environment variables for Wayland
|
||||
environment.sessionVariables = {
|
||||
NIXOS_OZONE_WL = "1"; # Hint electron apps to use Wayland
|
||||
WLR_NO_HARDWARE_CURSORS = "1"; # Fix cursor rendering on some hardware
|
||||
};
|
||||
}
|
||||
37
flake.nix
37
flake.nix
@@ -54,8 +54,8 @@
|
||||
};
|
||||
};
|
||||
|
||||
mkNixos =
|
||||
system: modules:
|
||||
mkHost =
|
||||
system: profile: modules:
|
||||
nixpkgs.lib.nixosSystem {
|
||||
system = system;
|
||||
modules = [
|
||||
@@ -69,15 +69,6 @@
|
||||
disko.nixosModules.disko
|
||||
sops-nix.nixosModules.sops
|
||||
impermanence.nixosModules.impermanence
|
||||
] ++ modules;
|
||||
specialArgs = {
|
||||
inherit inputs self;
|
||||
};
|
||||
};
|
||||
|
||||
mkHMNixos =
|
||||
system: modules:
|
||||
mkNixos system ([
|
||||
home-manager.nixosModules.home-manager
|
||||
{
|
||||
home-manager = {
|
||||
@@ -91,8 +82,16 @@
|
||||
./home
|
||||
];
|
||||
};
|
||||
extraSpecialArgs = {
|
||||
inherit profile;
|
||||
};
|
||||
};
|
||||
}
|
||||
] ++ modules;
|
||||
specialArgs = {
|
||||
inherit inputs self;
|
||||
};
|
||||
};
|
||||
}] ++ modules);
|
||||
|
||||
pkgsFor =
|
||||
system:
|
||||
@@ -119,16 +118,16 @@
|
||||
in
|
||||
{
|
||||
nixosConfigurations = {
|
||||
c1 = mkHMNixos "x86_64-linux" [ ./hosts/c1 ];
|
||||
c2 = mkHMNixos "x86_64-linux" [ ./hosts/c2 ];
|
||||
c3 = mkHMNixos "x86_64-linux" [ ./hosts/c3 ];
|
||||
alo-cloud-1 = mkHMNixos "aarch64-linux" [ ./hosts/alo-cloud-1 ];
|
||||
zippy = mkHMNixos "x86_64-linux" [
|
||||
c1 = mkHost "x86_64-linux" "server" [ ./hosts/c1 ];
|
||||
c2 = mkHost "x86_64-linux" "server" [ ./hosts/c2 ];
|
||||
c3 = mkHost "x86_64-linux" "server" [ ./hosts/c3 ];
|
||||
alo-cloud-1 = mkHost "aarch64-linux" "server" [ ./hosts/alo-cloud-1 ];
|
||||
zippy = mkHost "x86_64-linux" "workstation" [
|
||||
ethereum-nix.nixosModules.default
|
||||
./hosts/zippy
|
||||
];
|
||||
chilly = mkHMNixos "x86_64-linux" [ ./hosts/chilly ];
|
||||
sparky = mkHMNixos "x86_64-linux" [ ./hosts/sparky ];
|
||||
chilly = mkHost "x86_64-linux" "workstation" [ ./hosts/chilly ];
|
||||
sparky = mkHost "x86_64-linux" "desktop" [ ./hosts/sparky ];
|
||||
};
|
||||
|
||||
deploy = {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{ pkgs, ... }:
|
||||
{ pkgs, profile ? "cli", ... }:
|
||||
{
|
||||
home = {
|
||||
packages = (import ./packages.nix { inherit pkgs; }).packages;
|
||||
packages = (import ./packages.nix { inherit pkgs profile; }).packages;
|
||||
stateVersion = "24.05"; # TODO: unify this with the references in flake.nix:inputs
|
||||
|
||||
sessionVariables = {
|
||||
|
||||
@@ -1,38 +1,7 @@
|
||||
{ pkgs }:
|
||||
{ pkgs, profile ? "workstation" }:
|
||||
let
|
||||
corePkgs = with pkgs; [
|
||||
unstable.claude-code
|
||||
unstable.codex
|
||||
unstable.chromium
|
||||
unstable.gemini-cli
|
||||
unstable.playwright
|
||||
unstable.playwright-driver.browsers
|
||||
unstable.playwright-mcp
|
||||
direnv
|
||||
fzf
|
||||
git
|
||||
mosh
|
||||
ripgrep
|
||||
tmux
|
||||
zsh
|
||||
];
|
||||
|
||||
pythonEnv = pkgs.unstable.python3.withPackages (ps: [
|
||||
# unstable only
|
||||
# ps.aider-chat
|
||||
ps.google-generativeai
|
||||
ps.ipython
|
||||
ps.llm
|
||||
ps.llm-gemini
|
||||
]);
|
||||
|
||||
fishPkgs = with pkgs.fishPlugins; [
|
||||
pure
|
||||
# don't add failed commands to history
|
||||
sponge
|
||||
transient-fish
|
||||
];
|
||||
profilePackages = import ./profiles/${profile}.nix { inherit pkgs; };
|
||||
in
|
||||
{
|
||||
packages = corePkgs ++ [ pythonEnv ] ++ fishPkgs;
|
||||
packages = profilePackages.packages;
|
||||
}
|
||||
|
||||
12
home/profiles/desktop.nix
Normal file
12
home/profiles/desktop.nix
Normal file
@@ -0,0 +1,12 @@
|
||||
{ pkgs }:
|
||||
let
|
||||
workstationProfile = import ./workstation.nix { inherit pkgs; };
|
||||
|
||||
desktopPkgs = with pkgs; [
|
||||
unstable.chromium
|
||||
foot # Wayland-native terminal emulator
|
||||
];
|
||||
in
|
||||
{
|
||||
packages = workstationProfile.packages ++ desktopPkgs;
|
||||
}
|
||||
22
home/profiles/server.nix
Normal file
22
home/profiles/server.nix
Normal file
@@ -0,0 +1,22 @@
|
||||
{ pkgs }:
|
||||
let
|
||||
corePkgs = with pkgs; [
|
||||
direnv
|
||||
fzf
|
||||
git
|
||||
mosh
|
||||
ripgrep
|
||||
tmux
|
||||
zsh
|
||||
];
|
||||
|
||||
fishPkgs = with pkgs.fishPlugins; [
|
||||
pure
|
||||
# don't add failed commands to history
|
||||
sponge
|
||||
transient-fish
|
||||
];
|
||||
in
|
||||
{
|
||||
packages = corePkgs ++ fishPkgs;
|
||||
}
|
||||
20
home/profiles/workstation.nix
Normal file
20
home/profiles/workstation.nix
Normal file
@@ -0,0 +1,20 @@
|
||||
{ pkgs }:
|
||||
let
|
||||
serverProfile = import ./server.nix { inherit pkgs; };
|
||||
|
||||
cliPkgs = with pkgs; [
|
||||
unstable.claude-code
|
||||
unstable.codex
|
||||
unstable.gemini-cli
|
||||
];
|
||||
|
||||
pythonEnv = pkgs.unstable.python3.withPackages (ps: [
|
||||
ps.google-generativeai
|
||||
ps.ipython
|
||||
ps.llm
|
||||
ps.llm-gemini
|
||||
]);
|
||||
in
|
||||
{
|
||||
packages = serverProfile.packages ++ cliPkgs ++ [ pythonEnv ];
|
||||
}
|
||||
@@ -5,6 +5,7 @@
|
||||
../../common/global
|
||||
../../common/base-node.nix
|
||||
../../common/dev-node.nix
|
||||
../../common/desktop-node.nix
|
||||
./hardware.nix
|
||||
];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user