mirror of
https://github.com/tomasriveral/nixos.git
synced 2026-08-12 10:30:44 +02:00
Merge pull request #8 from tomasriveral/laptop
Refactor configuration + changed how unfree packages are handled + fixed bugs and added warning
This commit is contained in:
@@ -1,4 +1,3 @@
|
|||||||
# ~/nixos/flake.nix
|
|
||||||
{
|
{
|
||||||
description = "Nixos config flake";
|
description = "Nixos config flake";
|
||||||
|
|
||||||
@@ -20,11 +19,6 @@
|
|||||||
flake = false;
|
flake = false;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
# never got nixvim to wokrs. ):
|
|
||||||
# nixvim = {
|
|
||||||
# url = "github:nix-community/nixvim/nixos-25.11";
|
|
||||||
# };
|
|
||||||
|
|
||||||
outputs = {
|
outputs = {
|
||||||
self,
|
self,
|
||||||
nixpkgs,
|
nixpkgs,
|
||||||
@@ -35,38 +29,43 @@
|
|||||||
...
|
...
|
||||||
} @ inputs: let
|
} @ inputs: let
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
pkgs = nixpkgs.legacyPackages.${system};
|
|
||||||
|
unfreePkgs = [
|
||||||
|
"hplip"
|
||||||
|
"vivify.vim"
|
||||||
|
"cheatsheet.nvim"
|
||||||
|
];
|
||||||
|
|
||||||
|
mkUnfreePredicate = pkg:
|
||||||
|
builtins.elem (nixpkgs.lib.getName pkg) unfreePkgs;
|
||||||
|
|
||||||
pkgs-unstable = import nixpkgs-unstable {
|
pkgs-unstable = import nixpkgs-unstable {
|
||||||
inherit system;
|
inherit system;
|
||||||
config.allowUnfree = true; #hplipWithPlugins is unfree...
|
|
||||||
|
config.allowUnfreePredicate = mkUnfreePredicate;
|
||||||
};
|
};
|
||||||
|
|
||||||
in {
|
in {
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
laptop = nixpkgs.lib.nixosSystem {
|
laptop = nixpkgs.lib.nixosSystem {
|
||||||
specialArgs = {inherit inputs pkgs-unstable;};
|
specialArgs = {inherit inputs pkgs-unstable;};
|
||||||
modules = [
|
modules = [
|
||||||
./hosts/laptop/configuration.nix
|
./hosts/laptop/configuration.nix
|
||||||
|
# solves evaluation warning
|
||||||
|
/*
|
||||||
|
You have set specialArgs.pkgs, which means that options like nixpkgs.config
|
||||||
|
and nixpkgs.overlays will be ignored. If you wish to reuse an already created
|
||||||
|
pkgs, which you know is configured correctly for this NixOS configuration,
|
||||||
|
please import the `nixosModules.readOnlyPkgs` module from the nixpkgs flake or
|
||||||
|
`(modulesPath + "/misc/nixpkgs/read-only.nix"), and set `{ nixpkgs.pkgs = <your pkgs>; }`.
|
||||||
|
This properly disables the ignored options to prevent future surprises.
|
||||||
|
*/
|
||||||
|
{
|
||||||
|
nixpkgs.config.allowUnfreePredicate = mkUnfreePredicate;
|
||||||
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
# we use home-manager directly inside of configuration.nix
|
# we use home-manager directly inside of configuration.nix
|
||||||
# last time i tried to use flake i broke everything ):
|
|
||||||
# homeManagerConfigurations = {
|
|
||||||
# tomasr = home-manager.lib.homeManagerConfiguration {
|
|
||||||
# pkgs = pkgs;
|
|
||||||
# system = "x86_64-linux";
|
|
||||||
# username = "tomasr";
|
|
||||||
# homeDirectory = "/home/tomasr";
|
|
||||||
# modules = [
|
|
||||||
# ./hosts/laptop/home.nix
|
|
||||||
# #nixvim.homeModules.default
|
|
||||||
#];
|
|
||||||
# Import your Home Manager module
|
|
||||||
# configuration = ./hosts/laptop/home.nix;
|
|
||||||
|
|
||||||
# extraSpecialArgs = { inherit inputs; };
|
|
||||||
# };
|
|
||||||
#};
|
|
||||||
#};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
+20
-298
@@ -2,6 +2,7 @@
|
|||||||
# your system. Help is available in the configuration.nix(5) man page
|
# your system. Help is available in the configuration.nix(5) man page
|
||||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||||||
{
|
{
|
||||||
|
# nixd says that those attributes are not used. The are used in the imported file. Do not remove.
|
||||||
config,
|
config,
|
||||||
pkgs,
|
pkgs,
|
||||||
pkgs-unstable,
|
pkgs-unstable,
|
||||||
@@ -17,311 +18,32 @@
|
|||||||
#../../modules/nixos/ly.nix
|
#../../modules/nixos/ly.nix
|
||||||
../../modules/nixos/ly.nix
|
../../modules/nixos/ly.nix
|
||||||
../../modules/nixos/anki.nix
|
../../modules/nixos/anki.nix
|
||||||
../../modules/nixos/nixUtils.nix
|
../../modules/nixos/nixUtils.nix ../../hostsModules/laptop/nixos/nixUtils.nix
|
||||||
../../hostsModules/laptop/nixos/udev.nix
|
../../hostsModules/laptop/nixos/udev.nix
|
||||||
../../hostsModules/laptop/nixos/disk.nix
|
../../modules/nixos/disk.nix ../../hostsModules/laptop/nixos/disk.nix
|
||||||
../../modules/nixos/printer.nix
|
../../modules/nixos/printer.nix
|
||||||
../../hostsModules/laptop/nixos/ollama.nix # llm config
|
../../hostsModules/laptop/nixos/ollama.nix # llm config
|
||||||
../../modules/nixos/mullvad.nix # vpn config
|
../../modules/nixos/mullvad.nix # vpn config
|
||||||
../../hostsModules/laptop/nixos/autoUpdate.nix # auto update the flakes. Handles notification via libnotify and matrix-commander-rs
|
../../hostsModules/laptop/nixos/autoUpdate.nix # auto update the flakes. Handles notification via libnotify and matrix-commander-rs
|
||||||
|
../../hostsModules/laptop/nixos/bootloader.nix
|
||||||
|
../../hostsModules/laptop/nixos/networking.nix # firewall, ssh, networkmanager, etc.
|
||||||
|
../../modules/nixos/bluetooth.nix
|
||||||
|
../../modules/nixos/audioAndMedia.nix
|
||||||
|
../../modules/nixos/windowManager.nix
|
||||||
|
../../modules/nixos/documentation.nix
|
||||||
|
../../modules/nixos/IO.nix
|
||||||
|
../../modules/nixos/fonts.nix
|
||||||
|
../../modules/nixos/latex.nix
|
||||||
|
../../modules/nixos/development.nix
|
||||||
|
../../modules/nixos/user.nix ../../hostsModules/laptop/nixos/user.nix
|
||||||
|
../../modules/nixos/notifications.nix
|
||||||
|
../../modules/nixos/browser.nix
|
||||||
|
../../modules/nixos/theme.nix # install theming packages and some quickshell stuff
|
||||||
|
../../hostsModules/laptop/nixos/hardwareUtils.nix
|
||||||
|
../../modules/nixos/otherUtils.nix
|
||||||
|
../../modules/nixos/office.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
programs.nix-ld.enable = true; #Run unpatched dynamic binaries on NixOS. For example lets run ./a.out from gcc
|
|
||||||
|
|
||||||
documentation.man.generateCaches = true; # used for the man script
|
|
||||||
|
|
||||||
hardware.bluetooth.enable = true;
|
|
||||||
|
|
||||||
qt.enable = true;
|
|
||||||
|
|
||||||
# grub theme
|
|
||||||
boot.loader.grub = {
|
|
||||||
theme = inputs.nixos-grub-themes.packages.${pkgs.system}.nixos; # if you want to use nixos grub theme
|
|
||||||
};
|
|
||||||
|
|
||||||
nix.nixPath = [
|
|
||||||
"nixpkgs=${inputs.nixpkgs.outPath}"
|
|
||||||
"home-manager=${inputs.home-manager.outPath}"
|
|
||||||
]; #manix is unhappy without this
|
|
||||||
|
|
||||||
home-manager = {
|
|
||||||
useGlobalPkgs = true;
|
|
||||||
useUserPackages = true;
|
|
||||||
users = {
|
|
||||||
tomasr = ./home.nix;
|
|
||||||
};
|
|
||||||
extraSpecialArgs = {inherit inputs pkgs-unstable;};
|
|
||||||
};
|
|
||||||
|
|
||||||
services.dbus.enable = true;
|
|
||||||
security.polkit.enable = true;
|
|
||||||
|
|
||||||
environment.pathsToLink = [
|
|
||||||
"/share/applications"
|
|
||||||
"/share/xdg-desktop-portal"
|
|
||||||
];
|
|
||||||
xdg.portal = {
|
|
||||||
enable = true;
|
|
||||||
|
|
||||||
extraPortals = [
|
|
||||||
pkgs.xdg-desktop-portal-wlr
|
|
||||||
pkgs.xdg-desktop-portal-gtk
|
|
||||||
];
|
|
||||||
};
|
|
||||||
# removes uxterm
|
|
||||||
services.xserver.excludePackages = [pkgs.xterm];
|
|
||||||
# Bootloader.
|
|
||||||
boot.loader.systemd-boot.enable = true;
|
|
||||||
boot.loader.efi.canTouchEfiVariables = true;
|
|
||||||
|
|
||||||
#networking.Name = "nixos"; # Define your hostname.
|
|
||||||
#networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
|
||||||
|
|
||||||
# Configure network proxy if necessary
|
|
||||||
#networking.proxy.default = "http://user:password@proxy:port/";
|
|
||||||
#networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
|
||||||
|
|
||||||
# Enable networking
|
|
||||||
networking.networkmanager.enable = true;
|
|
||||||
|
|
||||||
# Set your time zone.
|
|
||||||
time.timeZone = "Europe/Zurich";
|
|
||||||
|
|
||||||
# Select internationalisation properties.
|
|
||||||
i18n.defaultLocale = "en_US.UTF-8";
|
|
||||||
|
|
||||||
# Enable the X11 windowing system.
|
|
||||||
services.xserver.enable = true;
|
|
||||||
|
|
||||||
# zsh dont want to work if it is not initialzed here.
|
|
||||||
programs.zsh.enable = true;
|
|
||||||
|
|
||||||
security.wrappers.gsr-kms-server = {
|
|
||||||
# to remove the password prompt when using gpu-screen-recorder
|
|
||||||
owner = "root";
|
|
||||||
group = "root";
|
|
||||||
capabilities = "cap_sys_admin+ep";
|
|
||||||
source = "${pkgs.gpu-screen-recorder}/bin/gsr-kms-server";
|
|
||||||
};
|
|
||||||
|
|
||||||
# Enable the GNOME Desktop Environment.
|
|
||||||
# services.displayManager.gdm.enable = true;
|
|
||||||
# services.desktopManager.gnome.enable = true;
|
|
||||||
# we dont use gnome but some utils yes -> see pckgs
|
|
||||||
#enable sddm
|
|
||||||
#services.displayManager.sddm = {
|
|
||||||
# enable = true;
|
|
||||||
# wayland.enable = true;
|
|
||||||
#};
|
|
||||||
# we use ly as the displayManager. see ../../modules/nixos/ly.nix
|
|
||||||
|
|
||||||
# enable hyprland WM
|
|
||||||
programs.hyprland = {
|
|
||||||
enable = true;
|
|
||||||
package = pkgs-unstable.hyprland; # we use the unstable branch to get the latest features
|
|
||||||
withUWSM = true;
|
|
||||||
xwayland.enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
services.upower.enable = true;
|
|
||||||
|
|
||||||
# Configure keymap in X11
|
|
||||||
services.xserver.xkb = {
|
|
||||||
layout = "ch";
|
|
||||||
variant = "fr";
|
|
||||||
};
|
|
||||||
|
|
||||||
# Configure console keymap
|
|
||||||
console.keyMap = "fr_CH";
|
|
||||||
|
|
||||||
|
|
||||||
# Enable sound with pipewire.
|
|
||||||
services.pulseaudio.enable = false;
|
|
||||||
security.rtkit.enable = true;
|
|
||||||
services.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;
|
|
||||||
};
|
|
||||||
|
|
||||||
# Enable touchpad support (enabled default in most desktopManager).
|
|
||||||
# services.xserver.libinput.enable = true;
|
|
||||||
|
|
||||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
|
||||||
users.users.tomasr = {
|
|
||||||
isNormalUser = true;
|
|
||||||
description = "Tomas Rivera";
|
|
||||||
extraGroups = ["networkmanager" "wheel"]; #wheel allow to use sudo
|
|
||||||
shell = pkgs.zsh;
|
|
||||||
};
|
|
||||||
|
|
||||||
# removes need for password for nixos-rebuild
|
|
||||||
security.sudo.extraRules = [
|
|
||||||
{
|
|
||||||
users = [ "tomasr" ];
|
|
||||||
commands = [
|
|
||||||
{
|
|
||||||
command = "/run/current-system/sw/bin/nixos-rebuild";
|
|
||||||
options = [ "NOPASSWD" ];
|
|
||||||
}
|
|
||||||
];
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
|
|
||||||
#adds nixos experimental features:
|
|
||||||
nix.settings.experimental-features = ["nix-command" "flakes"];
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Allow unfree packages
|
|
||||||
nixpkgs.config.allowUnfree = true; # Nonfree packages: hplipWithPlugin
|
|
||||||
|
|
||||||
# List packages installed in system profile. To search, run:
|
|
||||||
# $ nix search wget
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
# use pkgs-unstable if you want the package from the unstable channel
|
|
||||||
#we need to install gnome and kde utils individually as we dont use gnome
|
|
||||||
gnome-calculator
|
|
||||||
snapshot
|
|
||||||
gnome-characters
|
|
||||||
gnome-disk-utility
|
|
||||||
kdePackages.okular
|
|
||||||
kdePackages.dolphin
|
|
||||||
gnome-font-viewer
|
|
||||||
wget
|
|
||||||
#tree # shows dir in tree # we use eza now
|
|
||||||
zsh # better bash
|
|
||||||
brightnessctl # control brightness
|
|
||||||
pulseaudio # sound server
|
|
||||||
playerctl # controls media player
|
|
||||||
blueman # GTK-based Bluetooth Manager
|
|
||||||
udiskie # removable disk automounter for udisks
|
|
||||||
networkmanagerapplet # NetworkManager control applet
|
|
||||||
cliphist # Wayland clipboard manager
|
|
||||||
wl-clipboard # cli copy/past utilities for Wayland
|
|
||||||
jp # lightweight and flexible cli JSON parser
|
|
||||||
libnotify # Library that sends desktop notifications to a notification daemon
|
|
||||||
hyprkeys # keybind helper
|
|
||||||
cowsay
|
|
||||||
cmatrix
|
|
||||||
swww #wallpaper daemon
|
|
||||||
socat # Utility for bidirectional data transfer between two independent data channels (used to communicate between hyprland and swww to change wallpapers dinamically)
|
|
||||||
gcc # GNU C compiler
|
|
||||||
libreoffice
|
|
||||||
gruvbox-gtk-theme
|
|
||||||
hyprpicker
|
|
||||||
powertop
|
|
||||||
inetutils # collections of network programs such as telnet
|
|
||||||
python313Packages.pygments # used for ccat (comment of colorize plugin from oh-my-zsh)
|
|
||||||
fzf
|
|
||||||
jq # json parser used in some scripts
|
|
||||||
bottom # Cross-platform graphical process/system monitor with a customizable interface
|
|
||||||
cmatrix
|
|
||||||
tomato-c # pomodoro timer
|
|
||||||
pavucontrol # PulseAudio Volume Control
|
|
||||||
#hyprshot
|
|
||||||
xdg-utils
|
|
||||||
mailcap
|
|
||||||
pkgs-unstable.vimPluginsUpdater # used for building plugins
|
|
||||||
hyprcursor
|
|
||||||
vial # Open-source GUI and QMK fork for configuring your keyboard in real time
|
|
||||||
mplayer # Movie player that supports many video formats
|
|
||||||
chromium # used only to flash the firmware on my framework laptop 16 (keyboard.frame.work) as only chromium based browser support webHID.
|
|
||||||
capitaine-cursors-themed # cursor theme
|
|
||||||
usbutils # used for lsusb
|
|
||||||
# used for the framework 16 laptop
|
|
||||||
framework-tool
|
|
||||||
framework-tool-tui
|
|
||||||
krita # image edition
|
|
||||||
yt-dlp # some youtube downloader
|
|
||||||
vlc
|
|
||||||
(pkgs-unstable.python314.withPackages (ps:
|
|
||||||
with ps; [
|
|
||||||
matplotlib
|
|
||||||
networkx
|
|
||||||
scipy
|
|
||||||
]))
|
|
||||||
fluffychat matrix-commander-rs # matrix client
|
|
||||||
direnv
|
|
||||||
# utils for dev
|
|
||||||
pkg-config
|
|
||||||
gdb
|
|
||||||
raylib
|
|
||||||
glfw # raylib and some dependecies
|
|
||||||
rembg # background remover
|
|
||||||
#some nix tools
|
|
||||||
manix
|
|
||||||
deadnix
|
|
||||||
alejandra
|
|
||||||
cling # c interpreter used for coding
|
|
||||||
mprisence
|
|
||||||
gif-for-cli
|
|
||||||
# lsp
|
|
||||||
texlab
|
|
||||||
clang-tools
|
|
||||||
python311Packages.python-lsp-server
|
|
||||||
lua-language-server
|
|
||||||
ltex-ls-plus
|
|
||||||
pylint
|
|
||||||
black
|
|
||||||
nixd
|
|
||||||
# for caelestia
|
|
||||||
kdePackages.qtdeclarative # provides qmlls and other things
|
|
||||||
quickshell # we have it but adding it there solves "WARN qt.qpa.services: Failed to register with host portal QDBusError("org.freedesktop.portal.Error.Failed", "Could not register app ID: App info not found for 'org.quickshell'")"
|
|
||||||
gpu-screen-recorder
|
|
||||||
fuzzel
|
|
||||||
papirus-icon-theme
|
|
||||||
papirus-folders
|
|
||||||
inkscape
|
|
||||||
birdtray # thunderbird tray app
|
|
||||||
# this is more up to date
|
|
||||||
#(callPackage ../../modules/packages/vivify.nix {})
|
|
||||||
#(callPackage ../../modules/packages/sbb-tui.nix {})
|
|
||||||
pkgs-unstable.nixpkgs-review
|
|
||||||
pkgs-unstable.nixfmt-tree
|
|
||||||
pkgs-unstable.treefmt
|
|
||||||
pkgs-unstable.tor-browser
|
|
||||||
pkgs-unstable.bitwarden-desktop
|
|
||||||
];
|
|
||||||
|
|
||||||
# fonts
|
|
||||||
fonts.packages = with pkgs; [
|
|
||||||
nerd-fonts._0xproto
|
|
||||||
cinzel
|
|
||||||
times-newer-roman
|
|
||||||
];
|
|
||||||
|
|
||||||
# Some programs need SUID wrappers, can be configured further or are
|
|
||||||
# started in user sessions.
|
|
||||||
# programs.mtr.enable = true;
|
|
||||||
# programs.gnupg.agent = {
|
|
||||||
# enable = true;
|
|
||||||
# enableSSHSupport = true;
|
|
||||||
# };
|
|
||||||
|
|
||||||
# to resolve this https://wiki.nixos.org/wiki/Home_Manager#I_cannot_set_GNOME_or_Gtk_themes_via_Home_Manager
|
|
||||||
programs.dconf.enable = true;
|
|
||||||
|
|
||||||
# List services that you want to enable:
|
|
||||||
|
|
||||||
# Enable the OpenSSH daemon.
|
|
||||||
# services.openssh.enable = true;
|
|
||||||
|
|
||||||
# Open ports in the firewall.
|
|
||||||
# networking.firewall.allowedTCPPorts = [ ... ];
|
|
||||||
# networking.firewall.allowedUDPPorts = [ ... ];
|
|
||||||
# Or disable the firewall altogether.
|
|
||||||
networking.firewall.enable = false;
|
|
||||||
|
|
||||||
# This value determines the NixOS release from which the default
|
# This value determines the NixOS release from which the default
|
||||||
# settings for stateful data, like file locations and database versions
|
# settings for stateful data, like file locations and database versions
|
||||||
# on your system were taken. It‘s perfectly fine and recommended to leave
|
# on your system were taken. It‘s perfectly fine and recommended to leave
|
||||||
|
|||||||
+2
-80
@@ -44,15 +44,12 @@
|
|||||||
../../modules/home-manager/sbb-tui.nix # cff TUI app
|
../../modules/home-manager/sbb-tui.nix # cff TUI app
|
||||||
../../modules/home-manager/mullvad.nix # mullvad vpn
|
../../modules/home-manager/mullvad.nix # mullvad vpn
|
||||||
|
|
||||||
../../modules/other/desktopEntries.nix # creates .desktop files
|
../../modules/home-manager/other/desktopEntries.nix # creates .desktop files
|
||||||
|
../../modules/home-manager/other/user.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
# Required for Home Manager
|
# Required for Home Manager
|
||||||
home.username = "tomasr";
|
|
||||||
home.homeDirectory = "/home/tomasr";
|
|
||||||
home.stateVersion = "25.11"; # match your Home Manager release
|
home.stateVersion = "25.11"; # match your Home Manager release
|
||||||
|
|
||||||
# This value determines the Home Manager release that your configuration is
|
# This value determines the Home Manager release that your configuration is
|
||||||
# compatible with. This helps avoid breakage when a new Home Manager release
|
# compatible with. This helps avoid breakage when a new Home Manager release
|
||||||
# introduces backwards incompatible changes.
|
# introduces backwards incompatible changes.
|
||||||
@@ -61,81 +58,6 @@
|
|||||||
# want to update the value, then make sure to first check the Home Manager
|
# want to update the value, then make sure to first check the Home Manager
|
||||||
# release notes.
|
# release notes.
|
||||||
|
|
||||||
# The home.packages option allows you to install Nix packages into your
|
|
||||||
# environment.
|
|
||||||
home.packages = [
|
|
||||||
#scritps
|
|
||||||
(pkgs.callPackage ../../modules/scripts/dontkillsteam.nix {}) # kill app (if it is steam put it in some background
|
|
||||||
(pkgs.callPackage ../../hostsModules/laptop/scripts/batterynotify.nix {})
|
|
||||||
(pkgs.callPackage ../../hostsModules/laptop/scripts/batterywarning.nix {})
|
|
||||||
|
|
||||||
# checks if matrix-commander-rs is installed and logged in
|
|
||||||
(pkgs.callPackage ../../hostsModules/laptop/scripts/checkMatrix.nix {})
|
|
||||||
|
|
||||||
(pkgs.callPackage ../../modules/scripts/weather.nix {})
|
|
||||||
(pkgs.callPackage ../../modules/scripts/wallpaper.nix {})
|
|
||||||
(pkgs.callPackage ../../modules/scripts/mountkdrive.nix {})
|
|
||||||
(pkgs.callPackage ../../modules/scripts/colorpicker.nix {})
|
|
||||||
(pkgs.callPackage ../../modules/scripts/killall.nix {}) # kill all windows except focused window
|
|
||||||
(pkgs.callPackage ../../modules/scripts/gitnotify.nix {})
|
|
||||||
(pkgs.callPackage ../../modules/scripts/tomato.nix {})
|
|
||||||
(pkgs.callPackage ../../modules/scripts/librewolfprofiles.nix {})
|
|
||||||
(pkgs.callPackage ../../modules/scripts/btm.nix {})
|
|
||||||
(pkgs.callPackage ../../modules/scripts/manix.nix {})
|
|
||||||
(pkgs.callPackage ../../modules/scripts/man.nix {})
|
|
||||||
(pkgs.callPackage ../../modules/scripts/trimmer.nix {})
|
|
||||||
(pkgs.callPackage ../../modules/scripts/syllabes.nix {}) # python script to get number of syllabes in french
|
|
||||||
(pkgs.callPackage ../../hostsModules/laptop/qt/qtbatticon.nix {})
|
|
||||||
#pkgs
|
|
||||||
pkgs.gruvbox-gtk-theme
|
|
||||||
pkgs.biber
|
|
||||||
(pkgs.texliveMedium.withPackages (
|
|
||||||
ps:
|
|
||||||
with ps; [
|
|
||||||
# these few pkgs are used in the CV template
|
|
||||||
titlesec # allows creating custom \section
|
|
||||||
marvosym # some symboles
|
|
||||||
ebgaramond # Use the EB Garamond font
|
|
||||||
microtype # To enable letterspacing
|
|
||||||
fontaxes
|
|
||||||
# these few pkgs were used for my TM
|
|
||||||
svg
|
|
||||||
catchfile
|
|
||||||
caption
|
|
||||||
transparent
|
|
||||||
cfr-lm
|
|
||||||
svn-prov
|
|
||||||
nfssext-cfr
|
|
||||||
hyphenat
|
|
||||||
csquotes
|
|
||||||
enumitem
|
|
||||||
chngcntr
|
|
||||||
tcolorbox
|
|
||||||
pdfcol
|
|
||||||
wrapfig
|
|
||||||
tocloft
|
|
||||||
lastpage
|
|
||||||
biblatex
|
|
||||||
biblatex-iso690
|
|
||||||
libertine
|
|
||||||
minted
|
|
||||||
upquote
|
|
||||||
lipsum
|
|
||||||
footmisc
|
|
||||||
#(setq org-latex-compiler "lualatex")
|
|
||||||
#(setq org-preview-latex-default-process 'dvisvgm)
|
|
||||||
]
|
|
||||||
))
|
|
||||||
];
|
|
||||||
|
|
||||||
|
|
||||||
home.sessionVariables = {
|
|
||||||
EDITOR = "neovim";
|
|
||||||
# Git update function
|
|
||||||
# Prompts for commit message; defaults if empty
|
|
||||||
TERMINAL = "kitty";
|
|
||||||
};
|
|
||||||
|
|
||||||
# Let Home Manager install and manage itself.
|
# Let Home Manager install and manage itself.
|
||||||
programs.home-manager.enable = true;
|
programs.home-manager.enable = true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,8 +5,8 @@
|
|||||||
}: {
|
}: {
|
||||||
programs.zsh = {
|
programs.zsh = {
|
||||||
shellAliases = {
|
shellAliases = {
|
||||||
snrt = "git add -A && time sudo nixos-rebuild test --flake ~/nixos/#laptop";
|
snrt = "git -C ~/nixos add -A && time sudo nixos-rebuild test --flake ~/nixos/#laptop";
|
||||||
snrs = "git add -A && time sudo nixos-rebuild switch --flake ~/nixos/#laptop";
|
snrs = "git -C ~/nixos add -A && time sudo nixos-rebuild switch --flake ~/nixos/#laptop";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,15 @@
|
|||||||
|
{
|
||||||
|
inputs,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
# grub theme
|
||||||
|
boot.loader.grub = {
|
||||||
|
theme = inputs.nixos-grub-themes.packages.${pkgs.system}.nixos; # if you want to use nixos grub theme
|
||||||
|
};
|
||||||
|
|
||||||
|
# Bootloader.
|
||||||
|
boot.loader.systemd-boot.enable = true;
|
||||||
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
|
}
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
# used for the framework 16 laptop
|
||||||
|
framework-tool
|
||||||
|
framework-tool-tui
|
||||||
|
vial # Open-source GUI and QMK fork for configuring your keyboard in real time
|
||||||
|
];
|
||||||
|
}
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
wget
|
||||||
|
networkmanagerapplet # NetworkManager control applet
|
||||||
|
inetutils # collections of network programs such as telnet
|
||||||
|
|
||||||
|
];
|
||||||
|
#networking.Name = "nixos"; # Define your hostname.
|
||||||
|
#networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||||
|
|
||||||
|
# Configure network proxy if necessary
|
||||||
|
#networking.proxy.default = "http://user:password@proxy:port/";
|
||||||
|
#networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
||||||
|
|
||||||
|
# Enable networking
|
||||||
|
networking.networkmanager.enable = true;
|
||||||
|
|
||||||
|
# Enable the OpenSSH daemon.
|
||||||
|
# services.openssh.enable = true;
|
||||||
|
|
||||||
|
# Open ports in the firewall.
|
||||||
|
# networking.firewall.allowedTCPPorts = [ ... ];
|
||||||
|
# networking.firewall.allowedUDPPorts = [ ... ];
|
||||||
|
# Or disable the firewall altogether.
|
||||||
|
networking.firewall.enable = false;
|
||||||
|
}
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
# nixpkgs-review crashed my laptop multiple times.
|
||||||
|
nix.settings.max-jobs = 2;
|
||||||
|
nix.settings.cores = 2;
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
# configuration is in ../../../modules/nixos/user.nix
|
||||||
|
{
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
home-manager.users.tomasr = ../../../hosts/laptop/home.nix;
|
||||||
|
}
|
||||||
@@ -206,8 +206,10 @@ in {
|
|||||||
"blueman-applet" # systray app for Bluetooth
|
"blueman-applet" # systray app for Bluetooth
|
||||||
"udiskie --no-automount --smart-tray" # front-end that allows to manage removable media
|
"udiskie --no-automount --smart-tray" # front-end that allows to manage removable media
|
||||||
"nm-applet --indicator" # systray app for Network/wifi
|
"nm-applet --indicator" # systray app for Network/wifi
|
||||||
"wl-paste --type text --watch cliphist store" # clipboard store text data
|
#setups clipboard
|
||||||
"wl-paste --type image --watch cliphist store" # clipboard store image data
|
"rm -rf ~/.cache/cliphist/ && wl-paste --type text --watch cliphist store & wl-paste --type image --watch cliphist store"
|
||||||
|
#"wl-paste --type text --watch cliphist store" # clipboard store text data
|
||||||
|
#"wl-paste --type image --watch cliphist store" # clipboard store image data
|
||||||
"custom-batterynotify"
|
"custom-batterynotify"
|
||||||
"custom-batterywarning"
|
"custom-batterywarning"
|
||||||
"birdtray" # thunderbird tray app
|
"birdtray" # thunderbird tray app
|
||||||
@@ -215,7 +217,7 @@ in {
|
|||||||
"swww img ${wallpaper}"
|
"swww img ${wallpaper}"
|
||||||
"swww-daemon"
|
"swww-daemon"
|
||||||
"sleep 1 && custom-wallpaper"
|
"sleep 1 && custom-wallpaper"
|
||||||
"custom-mountkdrive"
|
"sleep 5 && custom-checkKdrive && custom-mountkdrive" # checks if the remote works and mount it
|
||||||
#"waybar"
|
#"waybar"
|
||||||
"custom-gitnotify"
|
"custom-gitnotify"
|
||||||
"custom-checkMatrix" # checks if matrix-commander-rs is connected which is important for other stuff
|
"custom-checkMatrix" # checks if matrix-commander-rs is connected which is important for other stuff
|
||||||
@@ -246,7 +248,6 @@ in {
|
|||||||
# █▄▄ █▀█ ░█░ █▄█ █▄█ ░█░ ▄█
|
# █▄▄ █▀█ ░█░ █▄█ █▄█ ░█░ ▄█
|
||||||
|
|
||||||
dwindle = {
|
dwindle = {
|
||||||
pseudotile = true;
|
|
||||||
preserve_split = true;
|
preserve_split = true;
|
||||||
};
|
};
|
||||||
scrolling = {
|
scrolling = {
|
||||||
|
|||||||
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
home.username = "tomasr";
|
||||||
|
home.homeDirectory = "/home/tomasr";
|
||||||
|
|
||||||
|
home.sessionVariables = {
|
||||||
|
EDITOR = "neovim";
|
||||||
|
TERMINAL = "kitty";
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -1,10 +1,9 @@
|
|||||||
{
|
{
|
||||||
config,
|
pkgs-unstable,
|
||||||
pkgs,
|
|
||||||
agenix,
|
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
programs.rclone = {
|
programs.rclone = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
package = pkgs-unstable.rclone;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
/nix/store/c0iwr0v7bjfka094wv6hd1hjmrkx9hm9-options.json
|
|
||||||
@@ -5,6 +5,7 @@
|
|||||||
}: {
|
}: {
|
||||||
programs.ssh = {
|
programs.ssh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
enableDefaultConfig = false; # will be removed in the futur. Removes evaluation warning
|
||||||
matchBlocks."*" = {
|
matchBlocks."*" = {
|
||||||
# equivalent to the default config
|
# equivalent to the default config
|
||||||
forwardAgent = false;
|
forwardAgent = false;
|
||||||
|
|||||||
@@ -43,6 +43,12 @@
|
|||||||
mplayer = "mplayer -volume 5";
|
mplayer = "mplayer -volume 5";
|
||||||
# these are to create the developpement shell
|
# these are to create the developpement shell
|
||||||
cenv = "nix-shell -p zsh gcc raylib libx11 libGL";
|
cenv = "nix-shell -p zsh gcc raylib libx11 libGL";
|
||||||
|
# i always write nvim wrong :(
|
||||||
|
nbim = "nvim";
|
||||||
|
nivm = "nvim";
|
||||||
|
bivm = "nvim";
|
||||||
|
nibm = "nvim";
|
||||||
|
vikm = "nvim";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,24 @@
|
|||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
# Configure keymap in X11
|
||||||
|
services.xserver.xkb = {
|
||||||
|
layout = "ch";
|
||||||
|
variant = "fr";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Configure console keymap
|
||||||
|
console.keyMap = "fr_CH";
|
||||||
|
|
||||||
|
# Enable touchpad support (enabled default in most desktopManager).
|
||||||
|
# services.xserver.libinput.enable = true;
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
wl-clipboard
|
||||||
|
cliphist
|
||||||
|
hyprkeys # keybind helper
|
||||||
|
hyprpicker
|
||||||
|
];
|
||||||
|
}
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
pkgs-unstable,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
# Enable sound with pipewire.
|
||||||
|
services.pulseaudio.enable = false;
|
||||||
|
security.rtkit.enable = true;
|
||||||
|
services.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;
|
||||||
|
};
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
kdePackages.okular
|
||||||
|
kdePackages.dolphin
|
||||||
|
pulseaudio # sound server
|
||||||
|
playerctl # controls media player
|
||||||
|
pavucontrol # PulseAudio Volume Control
|
||||||
|
mplayer # Movie player that supports many video formats
|
||||||
|
krita # image edition
|
||||||
|
yt-dlp # some youtube downloader
|
||||||
|
vlc
|
||||||
|
#mprisence # Highly customizable Discord Rich Presence for MPRIS media players on Linux
|
||||||
|
#gif-for-cli # Render gifs as ASCII art in your cli
|
||||||
|
#rembg # background remover
|
||||||
|
gpu-screen-recorder
|
||||||
|
inkscape
|
||||||
|
];
|
||||||
|
}
|
||||||
@@ -1,62 +0,0 @@
|
|||||||
{ pkgs, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
# Ensure your script is available system-wide
|
|
||||||
environment.systemPackages = [
|
|
||||||
(pkgs.callPackage ./custom-autoupdate.nix {})
|
|
||||||
];
|
|
||||||
|
|
||||||
# ----------------------------
|
|
||||||
# 🔥 Enable lingering for user services (IMPORTANT)
|
|
||||||
# ----------------------------
|
|
||||||
users.users.tomasr = {
|
|
||||||
isNormalUser = true;
|
|
||||||
|
|
||||||
# other config...
|
|
||||||
|
|
||||||
linger = true; # <-- declarative equivalent of `loginctl enable-linger`
|
|
||||||
};
|
|
||||||
|
|
||||||
# ----------------------------
|
|
||||||
# ✅ 2. Systemd USER service
|
|
||||||
# ----------------------------
|
|
||||||
systemd.user.services.custom-autoupdate = {
|
|
||||||
description = "NixOS flake auto update";
|
|
||||||
|
|
||||||
serviceConfig = {
|
|
||||||
Type = "oneshot";
|
|
||||||
|
|
||||||
ExecStart = "/run/current-system/sw/bin/custom-autoupdate";
|
|
||||||
|
|
||||||
# safety for long rebuilds
|
|
||||||
TimeoutStartSec = "45min";
|
|
||||||
TimeoutStopSec = "10min";
|
|
||||||
|
|
||||||
# avoid overlap
|
|
||||||
RemainAfterExit = true;
|
|
||||||
|
|
||||||
# 🔥 recommended reliability tweaks
|
|
||||||
Nice = 10;
|
|
||||||
IOSchedulingClass = "best-effort";
|
|
||||||
IOSchedulingPriority = 7;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# ----------------------------
|
|
||||||
# ⏱️ 3. Systemd USER timer
|
|
||||||
# ----------------------------
|
|
||||||
systemd.user.timers.custom-autoupdate = {
|
|
||||||
wantedBy = [ "timers.target" ];
|
|
||||||
|
|
||||||
timerConfig = {
|
|
||||||
OnBootSec = "10min"; # run after boot
|
|
||||||
OnUnitActiveSec = "6h"; # every 6 hours
|
|
||||||
|
|
||||||
# 🔥 ensures missed runs after shutdown happen
|
|
||||||
Persistent = true;
|
|
||||||
|
|
||||||
# avoids thundering herd on boot
|
|
||||||
RandomizedDelaySec = "30min";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
hardware.bluetooth.enable = true;
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
blueman # GTK-based Bluetooth Manager
|
||||||
|
];
|
||||||
|
}
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
# configuration for main browser is in ../home-manager/librewolf.nix
|
||||||
|
# configuration for qutebrowser is in ../home-manager/vivify.nix
|
||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
pkgs-unstable,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
chromium # used only to flash the firmware on my framework laptop 16 (keyboard.frame.work) as only chromium based browser support webHID.
|
||||||
|
pkgs-unstable.tor-browser
|
||||||
|
(pkgs.callPackage ../../modules/scripts/librewolfprofiles.nix {}) # fzf librewolf profile selector
|
||||||
|
];
|
||||||
|
}
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
pkgs-unstable,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
programs.nix-ld.enable = true; #Run unpatched dynamic binaries on NixOS. For example lets run ./a.out from gcc
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
gcc
|
||||||
|
jq # json parser used in some scripts
|
||||||
|
jp # lightweight and flexible cli JSON parser
|
||||||
|
(pkgs-unstable.python314.withPackages (ps:
|
||||||
|
with ps; [
|
||||||
|
matplotlib
|
||||||
|
networkx
|
||||||
|
scipy
|
||||||
|
]))
|
||||||
|
python313Packages.pygments # used for ccat (comment of colorize plugin from oh-my-zsh)
|
||||||
|
pkg-config
|
||||||
|
gdb
|
||||||
|
raylib
|
||||||
|
glfw # raylib and some dependecies
|
||||||
|
|
||||||
|
direnv
|
||||||
|
cling # c interpreter used for coding
|
||||||
|
# lsp
|
||||||
|
clang-tools
|
||||||
|
python311Packages.python-lsp-server
|
||||||
|
ltex-ls-plus
|
||||||
|
pylint
|
||||||
|
black
|
||||||
|
];
|
||||||
|
}
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
gnome-disk-utility
|
||||||
|
udiskie # removable disk automounter for udisks
|
||||||
|
(pkgs.callPackage ../../modules/scripts/mountkdrive.nix {})
|
||||||
|
];
|
||||||
|
|
||||||
|
# removes rclone error
|
||||||
|
programs.fuse.userAllowOther = true;
|
||||||
|
programs.fuse.enable = true;
|
||||||
|
}
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
documentation.man.generateCaches = true; # used for the man script
|
||||||
|
|
||||||
|
environment.pathsToLink = [ # see https://wiki.nixos.org/wiki/Documentation_Gaps#How_do_manpages_work?_Or:_environment.pathsToLink_and_buildEnv
|
||||||
|
"/share/applications"
|
||||||
|
"/share/xdg-desktop-portal"
|
||||||
|
];
|
||||||
|
environment.systemPackages = [
|
||||||
|
pkgs.manix
|
||||||
|
(pkgs.callPackage ../../modules/scripts/manix.nix {}) # fzf manix searcher
|
||||||
|
(pkgs.callPackage ../../modules/scripts/man.nix {}) # fzf man searcher
|
||||||
|
];
|
||||||
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
# fonts
|
||||||
|
fonts.packages = with pkgs; [
|
||||||
|
nerd-fonts._0xproto
|
||||||
|
cinzel
|
||||||
|
times-newer-roman
|
||||||
|
];
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
gnome-font-viewer
|
||||||
|
];
|
||||||
|
}
|
||||||
@@ -0,0 +1,48 @@
|
|||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
texlab
|
||||||
|
ltex-ls-plus
|
||||||
|
biber
|
||||||
|
(pkgs.texliveMedium.withPackages (
|
||||||
|
ps:
|
||||||
|
with ps; [
|
||||||
|
# these few pkgs are used in the CV template
|
||||||
|
titlesec # allows creating custom \section
|
||||||
|
marvosym # some symboles
|
||||||
|
ebgaramond # Use the EB Garamond font
|
||||||
|
microtype # To enable letterspacing
|
||||||
|
fontaxes
|
||||||
|
# these few pkgs were used for my TM
|
||||||
|
svg
|
||||||
|
catchfile
|
||||||
|
caption
|
||||||
|
transparent
|
||||||
|
cfr-lm
|
||||||
|
svn-prov
|
||||||
|
nfssext-cfr
|
||||||
|
hyphenat
|
||||||
|
csquotes
|
||||||
|
enumitem
|
||||||
|
chngcntr
|
||||||
|
tcolorbox
|
||||||
|
pdfcol
|
||||||
|
wrapfig
|
||||||
|
tocloft
|
||||||
|
lastpage
|
||||||
|
biblatex
|
||||||
|
biblatex-iso690
|
||||||
|
libertine
|
||||||
|
minted
|
||||||
|
upquote
|
||||||
|
lipsum
|
||||||
|
footmisc
|
||||||
|
#(setq org-latex-compiler "lualatex")
|
||||||
|
#(setq org-preview-latex-default-process 'dvisvgm)
|
||||||
|
]
|
||||||
|
))
|
||||||
|
];
|
||||||
|
}
|
||||||
@@ -1,8 +1,6 @@
|
|||||||
|
# some options are in ../../hostsModules/laptop/nixos/nixUtils.nix
|
||||||
{
|
{
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
pkgs-unstable,
|
pkgs-unstable,
|
||||||
libs,
|
|
||||||
inputs,
|
inputs,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
@@ -12,7 +10,23 @@
|
|||||||
dates = "weekly";
|
dates = "weekly";
|
||||||
options = "--delete-older-than 7d"; # every week delete generations older than a month
|
options = "--delete-older-than 7d"; # every week delete generations older than a month
|
||||||
};
|
};
|
||||||
# nixpkgs-review crashed my laptop multiple times.
|
|
||||||
nix.settings.max-jobs = 2;
|
#manix is unhappy without this
|
||||||
nix.settings.cores = 2;
|
nix.nixPath = [
|
||||||
|
"nixpkgs=${inputs.nixpkgs.outPath}"
|
||||||
|
"home-manager=${inputs.home-manager.outPath}"
|
||||||
|
];
|
||||||
|
|
||||||
|
#adds nixos experimental features:
|
||||||
|
nix.settings.experimental-features = ["nix-command" "flakes"];
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs-unstable; [
|
||||||
|
nixpkgs-review
|
||||||
|
nixfmt-tree
|
||||||
|
treefmt
|
||||||
|
nixd
|
||||||
|
deadnix
|
||||||
|
alejandra
|
||||||
|
vimPluginsUpdater # used for building plugins
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,20 @@
|
|||||||
|
# notifications server is set by caelestia-shell. See ../home-manager/caelestia.nix
|
||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
libnotify # Library that sends desktop notifications to a notification daemon
|
||||||
|
socat # Utility for bidirectional data transfer between two independent data channels (used to communicate between hyprland and swww to change wallpapers dinamically)
|
||||||
|
matrix-commander-rs # matrix client used to send notifications from scripts to my phone
|
||||||
|
# battery notifications
|
||||||
|
(pkgs.callPackage ../../hostsModules/laptop/scripts/batterynotify.nix {})
|
||||||
|
(pkgs.callPackage ../../hostsModules/laptop/scripts/batterywarning.nix {})
|
||||||
|
# checks if matrix-commander-rs is installed and logged in
|
||||||
|
(pkgs.callPackage ../../hostsModules/laptop/scripts/checkMatrix.nix {})
|
||||||
|
(pkgs.callPackage ../../modules/scripts/gitnotify.nix {}) # check if git is set up
|
||||||
|
(pkgs.callPackage ../../modules/scripts/checkKdrive.nix {}) # check if kdrive is set up with rclone
|
||||||
|
|
||||||
|
];
|
||||||
|
}
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
libreoffice
|
||||||
|
birdtray
|
||||||
|
];
|
||||||
|
}
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
# try to keep packages here at a minium. Preferably use a dedicated file
|
||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
pkgs-unstable,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
gnome-calculator
|
||||||
|
snapshot
|
||||||
|
gnome-characters
|
||||||
|
#tree # shows dir in tree # we use eza now
|
||||||
|
brightnessctl # control brightness
|
||||||
|
powertop
|
||||||
|
fzf
|
||||||
|
bottom # Cross-platform graphical process/system monitor with a customizable interface
|
||||||
|
tomato-c # pomodoro timer
|
||||||
|
#hyprshot
|
||||||
|
mailcap
|
||||||
|
fuzzel
|
||||||
|
usbutils # used for lsusb
|
||||||
|
(pkgs.callPackage ../../modules/scripts/dontkillsteam.nix {}) # kill app (if it is steam put it in some background
|
||||||
|
(pkgs.callPackage ../../modules/scripts/killall.nix {}) # kill all windows except focused window
|
||||||
|
(pkgs.callPackage ../../modules/scripts/tomato.nix {})
|
||||||
|
(pkgs.callPackage ../../modules/scripts/syllabes.nix {}) # python script to get number of syllabes in french
|
||||||
|
pkgs-unstable.bitwarden-desktop
|
||||||
|
fluffychat # matrix client
|
||||||
|
];
|
||||||
|
}
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
# most of the themeing are in the home-manager modules. This just installs some packages needed
|
||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
qt.enable = true;
|
||||||
|
|
||||||
|
# to resolve this https://wiki.nixos.org/wiki/Home_Manager#I_cannot_set_GNOME_or_Gtk_themes_via_Home_Manager
|
||||||
|
programs.dconf.enable = true;
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
swww #wallpaper daemon
|
||||||
|
gruvbox-gtk-theme
|
||||||
|
hyprcursor
|
||||||
|
capitaine-cursors-themed # cursor theme
|
||||||
|
kdePackages.qtdeclarative # provides qmlls and other things
|
||||||
|
quickshell # we have it but adding it there solves "WARN qt.qpa.services: Failed to register with host portal QDBusError("org.freedesktop.portal.Error.Failed", "Could not register app ID: App info not found for 'org.quickshell'")"
|
||||||
|
papirus-icon-theme
|
||||||
|
papirus-folders
|
||||||
|
(pkgs.callPackage ../../modules/scripts/wallpaper.nix {})
|
||||||
|
#(pkgs.callPackage ../../modules/scripts/colorpicker.nix {}) # old color picker
|
||||||
|
#(pkgs.callPackage ../../modules/scripts/weather.nix {}) # old cli weather
|
||||||
|
(pkgs.callPackage ../../hostsModules/laptop/qt/qtbatticon.nix {}) # custom qt tray icon for battery
|
||||||
|
];
|
||||||
|
}
|
||||||
@@ -0,0 +1,56 @@
|
|||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
pkgs-unstable,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
services.dbus.enable = true;
|
||||||
|
security.polkit.enable = true;
|
||||||
|
home-manager = {
|
||||||
|
useGlobalPkgs = true;
|
||||||
|
useUserPackages = true;
|
||||||
|
# the home manager config is set in ../../hostsModules/*/nixos/user.nix
|
||||||
|
extraSpecialArgs = {inherit inputs pkgs-unstable;};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Set your time zone.
|
||||||
|
time.timeZone = "Europe/Zurich";
|
||||||
|
|
||||||
|
# Select internationalisation properties.
|
||||||
|
i18n.defaultLocale = "en_US.UTF-8";
|
||||||
|
|
||||||
|
# zsh dont want to work if it is not initialzed here.
|
||||||
|
programs.zsh.enable = true;
|
||||||
|
|
||||||
|
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||||
|
users.users.tomasr = {
|
||||||
|
isNormalUser = true;
|
||||||
|
description = "Tomas Rivera";
|
||||||
|
extraGroups = ["networkmanager" "wheel" "fuse"]; #wheel allow to use sudo / fuse -> rclone
|
||||||
|
shell = pkgs.zsh;
|
||||||
|
};
|
||||||
|
|
||||||
|
security.wrappers.gsr-kms-server = {
|
||||||
|
# to remove the password prompt when using gpu-screen-recorder
|
||||||
|
owner = "root";
|
||||||
|
group = "root";
|
||||||
|
capabilities = "cap_sys_admin+ep";
|
||||||
|
source = "${pkgs.gpu-screen-recorder}/bin/gsr-kms-server";
|
||||||
|
};
|
||||||
|
|
||||||
|
services.upower.enable = true;
|
||||||
|
|
||||||
|
# removes need for password for nixos-rebuild
|
||||||
|
security.sudo.extraRules = [
|
||||||
|
{
|
||||||
|
users = [ "tomasr" ];
|
||||||
|
commands = [
|
||||||
|
{
|
||||||
|
command = "/run/current-system/sw/bin/nixos-rebuild";
|
||||||
|
options = [ "NOPASSWD" ];
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
@@ -0,0 +1,43 @@
|
|||||||
|
# customization is in ../home-manager/hyprland.nix
|
||||||
|
{
|
||||||
|
pkgs-unstable,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
# Enable the X11 windowing system.
|
||||||
|
services.xserver.enable = true;
|
||||||
|
|
||||||
|
# Enable the GNOME Desktop Environment.
|
||||||
|
# services.displayManager.gdm.enable = true;
|
||||||
|
# services.desktopManager.gnome.enable = true;
|
||||||
|
# we dont use gnome but some utils yes -> see pckgs
|
||||||
|
#enable sddm
|
||||||
|
#services.displayManager.sddm = {
|
||||||
|
# enable = true;
|
||||||
|
# wayland.enable = true;
|
||||||
|
#};
|
||||||
|
# we use ly as the displayManager. see ../../modules/nixos/ly.nix
|
||||||
|
|
||||||
|
# enable hyprland WM
|
||||||
|
programs.hyprland = {
|
||||||
|
enable = true;
|
||||||
|
package = pkgs-unstable.hyprland; # we use the unstable branch to get the latest features
|
||||||
|
withUWSM = true;
|
||||||
|
xwayland.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
xdg.portal = {
|
||||||
|
enable = true;
|
||||||
|
extraPortals = [
|
||||||
|
pkgs.xdg-desktop-portal-wlr
|
||||||
|
pkgs.xdg-desktop-portal-gtk
|
||||||
|
];
|
||||||
|
};
|
||||||
|
# removes uxterm
|
||||||
|
services.xserver.excludePackages = [pkgs.xterm];
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
xdg-utils
|
||||||
|
];
|
||||||
|
}
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
{
|
||||||
|
writeShellApplication,
|
||||||
|
rclone,
|
||||||
|
matrix-commander-rs,
|
||||||
|
libnotify,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
writeShellApplication {
|
||||||
|
name = "custom-checkKdrive";
|
||||||
|
runtimeInputs = [
|
||||||
|
rclone
|
||||||
|
matrix-commander-rs
|
||||||
|
libnotify
|
||||||
|
];
|
||||||
|
text = ''
|
||||||
|
set +e
|
||||||
|
|
||||||
|
output=$(rclone lsd kdrive: 2>&1)
|
||||||
|
status=$?
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
if [ $status -eq 0 ]; then
|
||||||
|
echo "kdrive OK"
|
||||||
|
else
|
||||||
|
echo "kdrive rclone failed with error: $output"
|
||||||
|
notify-send "rclone kdrive failed" "$output"
|
||||||
|
matrix-commander-rs --verbose -m "rclone kdrive failed.<br>Error: <pre>$output</pre><br><a href=\"https://matrix.to/#/@notificationbot_0000:matrix.org\">@notificationbot_0000</a>" \
|
||||||
|
--html \
|
||||||
|
-r "\!7j-78_02dHROeLj4Ns8F12eo4IiZGv4zNsQ_1-WlyIU"
|
||||||
|
fi
|
||||||
|
'';
|
||||||
|
}
|
||||||
@@ -23,6 +23,9 @@ writeShellApplication {
|
|||||||
notify-send \
|
notify-send \
|
||||||
"Git not configured" \
|
"Git not configured" \
|
||||||
"Set your identity\n or remove this warning by removing the custom-gitnotify line in\n ~/nixos/modules/home-manager/hyprland.nix"
|
"Set your identity\n or remove this warning by removing the custom-gitnotify line in\n ~/nixos/modules/home-manager/hyprland.nix"
|
||||||
|
matrix-commander-rs --verbose -m "Git not configured.<br>Set your identify or remove this warning by removing the custom-gitnotify in ~/nixos/modules/home-manager/hyprland.nix<br><a href=\"https://matrix.to/#/@notificationbot_0000:matrix.org\">@notificationbot_0000</a>" \
|
||||||
|
--html \
|
||||||
|
-r "\!7j-78_02dHROeLj4Ns8F12eo4IiZGv4zNsQ_1-WlyIU"
|
||||||
fi
|
fi
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user