Skip to content

Commit

Permalink
Update NixOS profiles
Browse files Browse the repository at this point in the history
  • Loading branch information
yousiki committed Mar 20, 2024
1 parent 54380fc commit c787657
Show file tree
Hide file tree
Showing 6 changed files with 132 additions and 2 deletions.
30 changes: 30 additions & 0 deletions cells/common/profiles/core.nix
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,34 @@ in {
(n: v: {flake = v;})
(l.removeAttrs inputs ["nixpkgs" "cells" "self"]);
};

# Basic packages for both NixOS and Darwin.
environment.systemPackages = with pkgs; [
alejandra
curl
duf
eza
fd
fzf
gdu
gh
git
helix
home-manager
htop
jq
man
neofetch
nodejs
nvfetcher
ripgrep
rsync
tmux
vim
wget
zellij
];

programs.fish.enable = true;
programs.zsh.enable = true;
}
5 changes: 3 additions & 2 deletions cells/nixos/hosts/hakase/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@
inputs.nixos-hardware.nixosModules.common-pc-hdd
inputs.nixos-hardware.nixosModules.common-pc-ssd

inputs.cells.common.commonProfiles.core

inputs.cells.nixos.nixosProfiles.core
inputs.cells.nixos.nixosProfiles.desktop
inputs.cells.nixos.nixosProfiles.nvidia
inputs.cells.nixos.nixosProfiles.server
];

bee = rec {
Expand Down
11 changes: 11 additions & 0 deletions cells/nixos/profiles/core.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,16 @@
inputs,
cell,
}: {...}: {
imports = [
inputs.cells.common.commonProfiles.core
];

# Enable podman.
virtualisation.podman = {
enable = true;
autoPrune.enable = true;
dockerSocket.enable = true;
};

system.stateVersion = "24.05";
}
57 changes: 57 additions & 0 deletions cells/nixos/profiles/desktop.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
{
inputs,
cell,
}: {pkgs, ...}: {
services.xserver.enable = true;
services.xserver.displayManager.sddm.enable = true;
services.desktopManager.plasma6.enable = true;

security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
jack.enable = true;
};

environment.systemPackages = with pkgs; [
_1password-gui
brave
clapper
cloudflare-warp
discord
dolphin
dragon
firefox
google-chrome
handbrake
haruna
kitty
motrix
mpv
qbittorrent
qq
spotify
steam
vlc
vscode
wezterm
zotero
];

fonts.fontDir.enable = true;
fonts.packages = with pkgs; [
lxgw-neoxihei
lxgw-wenkai
nerdfonts
noto-fonts-cjk
noto-fonts-cjk-sans
noto-fonts-cjk-serif
source-han-mono
source-han-sans
source-han-serif
wqy_microhei
wqy_zenhei
];
}
21 changes: 21 additions & 0 deletions cells/nixos/profiles/nvidia.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
inputs,
cell,
}: {pkgs, ...}: {
services.xserver.videoDrivers = ["nvidia"];

hardware.nvidia = {
modesetting.enable = true;
nvidiaSettings = true;
open = false;
};

hardware.opengl = {
enable = true;
driSupport = true;
driSupport32Bit = true;
};

virtualisation.containers.cdi.dynamic.nvidia.enable = true;
virtualisation.docker.enableNvidia = true;
}
10 changes: 10 additions & 0 deletions cells/nixos/profiles/server.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
inputs,
cell,
}: {...}: {
imports = [
inputs.nixos-vscode-server.nixosModules.default
];

services.vscode-server.enable = true;
}

0 comments on commit c787657

Please sign in to comment.