mirror of
https://github.com/JaxTheWolf/nixos.git
synced 2026-04-01 02:00:22 +02:00
WIP: Laptop config
This commit is contained in:
11
common/modules/default.nix
Normal file
11
common/modules/default.nix
Normal file
@@ -0,0 +1,11 @@
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./flatpak.nix
|
||||
./gnome.nix
|
||||
./packages.nix
|
||||
./programs.nix
|
||||
./services.nix
|
||||
];
|
||||
}
|
||||
49
common/modules/flatpak.nix
Normal file
49
common/modules/flatpak.nix
Normal file
@@ -0,0 +1,49 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
services.flatpak = {
|
||||
enable = true;
|
||||
update.auto.enable = true;
|
||||
remotes = [
|
||||
{
|
||||
name = "flathub";
|
||||
location = "https://dl.flathub.org/repo/flathub.flatpakrepo";
|
||||
}
|
||||
];
|
||||
packages = [
|
||||
{
|
||||
appId = "com.mattjakeman.ExtensionManager";
|
||||
origin = "flathub";
|
||||
}
|
||||
{
|
||||
appId = "com.prusa3d.PrusaSlicer";
|
||||
origin = "flathub";
|
||||
}
|
||||
{
|
||||
appId = "com.github.tchx84.Flatseal";
|
||||
origin = "flathub";
|
||||
}
|
||||
{
|
||||
appId = "org.gtk.Gtk3theme.Adwaita-dark";
|
||||
origin = "flathub";
|
||||
}
|
||||
{
|
||||
appId = "org.gtk.Gtk3theme.Flat-Remix-GTK-Red-Darkest";
|
||||
origin = "flathub";
|
||||
}
|
||||
{
|
||||
appId = "com.github.iwalton3.jellyfin-media-player";
|
||||
origin = "flathub";
|
||||
}
|
||||
{
|
||||
appId = "org.freecad.FreeCAD";
|
||||
origin = "flathub";
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
42
common/modules/gnome.nix
Normal file
42
common/modules/gnome.nix
Normal file
@@ -0,0 +1,42 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
environment = {
|
||||
gnome.excludePackages = with pkgs; [
|
||||
decibels
|
||||
epiphany
|
||||
geary
|
||||
gnome-connections
|
||||
gnome-contacts
|
||||
gnome-logs
|
||||
gnome-maps
|
||||
gnome-music
|
||||
gnome-software
|
||||
gnome-system-monitor
|
||||
snapshot
|
||||
totem
|
||||
yelp
|
||||
];
|
||||
|
||||
systemPackages = with pkgs.gnomeExtensions; [
|
||||
alphabetical-app-grid
|
||||
appindicator
|
||||
blur-my-shell
|
||||
control-monitor-brightness-and-volume-with-ddcutil
|
||||
bubblemail
|
||||
color-picker
|
||||
dash-to-dock
|
||||
# favorites-to-applications-grid
|
||||
middle-click-to-close-in-overview
|
||||
undecorate
|
||||
user-themes
|
||||
window-is-ready-remover
|
||||
solaar-extension
|
||||
];
|
||||
};
|
||||
}
|
||||
194
common/modules/packages.nix
Normal file
194
common/modules/packages.nix
Normal file
@@ -0,0 +1,194 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
czkawka-master,
|
||||
solaar-master,
|
||||
fet,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
nixpkgs = {
|
||||
config = {
|
||||
allowUnfree = true;
|
||||
permittedInsecurePackages = [
|
||||
"ventoy-gtk3-1.1.10"
|
||||
];
|
||||
};
|
||||
overlays = [
|
||||
(final: prev: {
|
||||
nautilus = prev.nautilus.overrideAttrs (nprev: {
|
||||
buildInputs =
|
||||
nprev.buildInputs
|
||||
++ (with pkgs.gst_all_1; [
|
||||
gst-plugins-good
|
||||
gst-plugins-bad
|
||||
gst-plugins-ugly
|
||||
gst-plugins-base
|
||||
]);
|
||||
});
|
||||
})
|
||||
(final: prev: {
|
||||
zenmonitor = prev.zenmonitor.overrideAttrs (oldAttrs: {
|
||||
env = (oldAttrs.env or { }) // {
|
||||
NIX_CFLAGS_COMPILE = "-std=gnu17";
|
||||
};
|
||||
});
|
||||
})
|
||||
];
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
abootimg
|
||||
android-tools
|
||||
anki
|
||||
appstream
|
||||
aspell
|
||||
aspellDicts.cs
|
||||
aspellDicts.en
|
||||
aspellDicts.es
|
||||
attic-client
|
||||
bibata-cursors
|
||||
binwalk
|
||||
brscan4
|
||||
brscan5
|
||||
btrfs-progs
|
||||
bubblemail
|
||||
bzip2
|
||||
curl
|
||||
fet.packages.${pkgs.stdenv.hostPlatform.system}.default
|
||||
ddcutil
|
||||
discord
|
||||
distrobox
|
||||
docker-buildx
|
||||
docker-compose
|
||||
dog
|
||||
element-desktop
|
||||
eza
|
||||
ffmpeg-full
|
||||
ffmpegthumbnailer
|
||||
file
|
||||
file-roller
|
||||
firmware-manager
|
||||
flat-remix-gnome
|
||||
flat-remix-gtk
|
||||
flatpak-xdg-utils
|
||||
freerdp
|
||||
fuse
|
||||
fuse3
|
||||
fwupd
|
||||
gimp
|
||||
gnome-tweaks
|
||||
gnome.gvfs
|
||||
gotop
|
||||
gparted
|
||||
gphoto2
|
||||
gst_all_1.gst-libav
|
||||
gst_all_1.gst-plugins-bad
|
||||
gst_all_1.gst-plugins-base
|
||||
gst_all_1.gst-plugins-good
|
||||
gst_all_1.gst-plugins-ugly
|
||||
gst_all_1.gst-vaapi
|
||||
gst_all_1.gstreamer
|
||||
gvfs
|
||||
gzip
|
||||
htop
|
||||
i2c-tools
|
||||
iftop
|
||||
inkscape
|
||||
iotop
|
||||
jq
|
||||
killall
|
||||
kooha
|
||||
krita
|
||||
libgsf
|
||||
libnotify
|
||||
libreoffice
|
||||
libsForQt5.qtstyleplugins
|
||||
linux-firmware
|
||||
lm_sensors
|
||||
lrzip
|
||||
lsof
|
||||
lz4
|
||||
lzip
|
||||
lzop
|
||||
mangohud
|
||||
mesa-demos
|
||||
mission-center
|
||||
ncdu
|
||||
nil
|
||||
nixfmt
|
||||
ntfs3g
|
||||
nufraw-thumbnailer
|
||||
obsidian
|
||||
openrgb-with-all-plugins
|
||||
papirus-icon-theme
|
||||
pbzip2
|
||||
pciutils
|
||||
pigz
|
||||
plymouth
|
||||
poppler-utils
|
||||
prismlauncher-unwrapped
|
||||
protonup-qt
|
||||
rquickshare
|
||||
saber
|
||||
solaar-master.packages.${pkgs.stdenv.hostPlatform.system}.default
|
||||
logitech-udev-rules
|
||||
scrcpy
|
||||
screen
|
||||
seafile-client
|
||||
smartmontools
|
||||
starship
|
||||
sushi
|
||||
telegram-desktop
|
||||
testdisk
|
||||
thunderbird
|
||||
tidal-hifi
|
||||
tldr
|
||||
trash-cli
|
||||
tree
|
||||
unrar
|
||||
unzip
|
||||
usbutils
|
||||
ventoy-full-gtk
|
||||
vesktop
|
||||
vkbasalt
|
||||
vlc
|
||||
vscode-fhs
|
||||
webp-pixbuf-loader
|
||||
wev
|
||||
wget
|
||||
which
|
||||
wine
|
||||
wireshark
|
||||
tumbler
|
||||
xz
|
||||
yt-dlp
|
||||
zip
|
||||
zram-generator
|
||||
zsh-autosuggestions
|
||||
zsh-completions
|
||||
zsh-history-substring-search
|
||||
zsh-syntax-highlighting
|
||||
zstd
|
||||
zulu
|
||||
zulu8
|
||||
zulu17
|
||||
];
|
||||
|
||||
fonts = {
|
||||
packages = with pkgs; [
|
||||
fira-code
|
||||
font-awesome
|
||||
nerd-fonts.fira-code
|
||||
nerd-fonts.fira-mono
|
||||
nerd-fonts.symbols-only
|
||||
nerd-fonts.ubuntu-mono
|
||||
noto-fonts
|
||||
noto-fonts-cjk-sans
|
||||
noto-fonts-color-emoji
|
||||
ubuntu-classic
|
||||
];
|
||||
};
|
||||
}
|
||||
53
common/modules/programs.nix
Normal file
53
common/modules/programs.nix
Normal file
@@ -0,0 +1,53 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
programs = {
|
||||
bat.enable = true;
|
||||
zsh.enable = true;
|
||||
gamemode.enable = true;
|
||||
firefox = {
|
||||
enable = true;
|
||||
languagePacks = [
|
||||
"cs"
|
||||
"en-GB"
|
||||
"en-US"
|
||||
];
|
||||
};
|
||||
|
||||
weylus.enable = true;
|
||||
gamescope.enable = true;
|
||||
|
||||
git = {
|
||||
enable = true;
|
||||
lfs.enable = true;
|
||||
};
|
||||
|
||||
nh = {
|
||||
clean = {
|
||||
enable = true;
|
||||
extraArgs = "--keep-since 7d --keep 10";
|
||||
};
|
||||
enable = true;
|
||||
flake = "/etc/nixos";
|
||||
};
|
||||
|
||||
nix-ld = {
|
||||
enable = true;
|
||||
libraries = with pkgs; [ ];
|
||||
};
|
||||
|
||||
steam = {
|
||||
dedicatedServer.openFirewall = true;
|
||||
enable = true;
|
||||
extest.enable = true;
|
||||
gamescopeSession.enable = true;
|
||||
protontricks.enable = true;
|
||||
remotePlay.openFirewall = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
82
common/modules/services.nix
Normal file
82
common/modules/services.nix
Normal file
@@ -0,0 +1,82 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
services = {
|
||||
sshd.enable = true;
|
||||
displayManager.gdm.enable = true;
|
||||
desktopManager.gnome.enable = true;
|
||||
|
||||
xserver = {
|
||||
enable = true;
|
||||
excludePackages = with pkgs; [
|
||||
xterm
|
||||
];
|
||||
xkb = {
|
||||
layout = "cz";
|
||||
variant = "";
|
||||
};
|
||||
};
|
||||
|
||||
pulseaudio.enable = false;
|
||||
pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
# If you want to use JACK applications, uncomment this
|
||||
#jack.enable = true;
|
||||
|
||||
# use the example session manager (no others are packaged yet so this is enabled by default,
|
||||
# no need to redefine it in your config for now)
|
||||
#media-session.enable = true;
|
||||
};
|
||||
|
||||
printing = {
|
||||
enable = true;
|
||||
drivers = [
|
||||
pkgs.brlaser
|
||||
];
|
||||
};
|
||||
|
||||
avahi = {
|
||||
enable = true;
|
||||
nssmdns4 = true;
|
||||
openFirewall = true;
|
||||
};
|
||||
|
||||
journald.extraConfig = ''
|
||||
SystemMaxUse=2G
|
||||
RuntimeMaxUse=1G
|
||||
SystemMaxFiles=100
|
||||
'';
|
||||
|
||||
zram-generator = {
|
||||
enable = true;
|
||||
settings = {
|
||||
"zram0" = {
|
||||
"zram-size" = "ram*1.5";
|
||||
"compression-algorithm" = "zstd";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
btrfs = {
|
||||
autoScrub = {
|
||||
enable = true;
|
||||
interval = "monthly";
|
||||
};
|
||||
};
|
||||
|
||||
fstrim = {
|
||||
enable = true;
|
||||
interval = "weekly";
|
||||
};
|
||||
|
||||
fwupd.enable = true;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user