mirror of
https://github.com/tomasriveral/nixos.git
synced 2026-08-12 02:28:37 +02:00
Merge branch 'main' into laptop
This commit is contained in:
@@ -56,7 +56,10 @@
|
|||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
unfreePkgs = [
|
unfreePkgs = [
|
||||||
"hplip"
|
"hplip"
|
||||||
"vivify.vim"
|
"nvidia-x11"
|
||||||
|
"nvidia-settings"
|
||||||
|
"steam"
|
||||||
|
"steam-unwrapped"
|
||||||
"cheatsheet.nvim"
|
"cheatsheet.nvim"
|
||||||
];
|
];
|
||||||
mkUnfreePredicate = pkg:
|
mkUnfreePredicate = pkg:
|
||||||
|
|||||||
@@ -5,5 +5,9 @@ _: {
|
|||||||
supertuxkart # fuck mariokart
|
supertuxkart # fuck mariokart
|
||||||
# my favorite italian plumber is free software
|
# my favorite italian plumber is free software
|
||||||
];
|
];
|
||||||
|
programs.steam = {
|
||||||
|
enable = true;
|
||||||
|
protontricks.enable = true;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,9 +2,9 @@ _: {
|
|||||||
flake.homeModules.git = _: {
|
flake.homeModules.git = _: {
|
||||||
programs.git = {
|
programs.git = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
/*settings = {
|
||||||
init.defaultBranch = "main";
|
init.defaultBranch = "main";
|
||||||
};
|
};*/
|
||||||
};
|
};
|
||||||
programs.gh = {
|
programs.gh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|||||||
@@ -51,7 +51,7 @@
|
|||||||
flake.homeModules.hyprland-desktop = _: {
|
flake.homeModules.hyprland-desktop = _: {
|
||||||
wayland.windowManager.hyprland.settings = {
|
wayland.windowManager.hyprland.settings = {
|
||||||
monitor = [
|
monitor = [
|
||||||
", highres@highrr, auto, 1"
|
", highres@highrr, auto, 0.75"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
};
|
};
|
||||||
systemd.user.services.kdrive-sync = {
|
systemd.user.services.kdrive-sync = {
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
ExecStart = "${pkgs.rclone}/bin/rclone bisync ...";
|
ExecStart = "${self.packages.${pkgs.system}.custom-synckdrive-desktop}/bin/custom-synckdrive";
|
||||||
|
|
||||||
Nice = 19; # lowest CPU scheduling priority
|
Nice = 19; # lowest CPU scheduling priority
|
||||||
IOSchedulingClass = "idle";
|
IOSchedulingClass = "idle";
|
||||||
@@ -97,6 +97,17 @@
|
|||||||
fi
|
fi
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
/*
|
||||||
|
Before setting up we must:
|
||||||
|
* setup the rclone remote
|
||||||
|
`rclone config` choose Webdaw and see login information in bitwarden.
|
||||||
|
* give the good permissions for the hdd
|
||||||
|
`sudo chown -R tomasr:users /home/tomasr/hdd`
|
||||||
|
* Run the bisync once completly
|
||||||
|
`rclone bisync ~/hdd/kdrive/ kdrive: --resync`
|
||||||
|
|
||||||
|
Note : only use the --resync flag once
|
||||||
|
*/
|
||||||
packages.custom-synckdrive-desktop = pkgs.writeShellApplication {
|
packages.custom-synckdrive-desktop = pkgs.writeShellApplication {
|
||||||
name = "custom-synckdrive";
|
name = "custom-synckdrive";
|
||||||
runtimeInputs = with pkgs; [
|
runtimeInputs = with pkgs; [
|
||||||
@@ -105,11 +116,11 @@
|
|||||||
];
|
];
|
||||||
text = ''
|
text = ''
|
||||||
REMOTE_NAME="kdrive"
|
REMOTE_NAME="kdrive"
|
||||||
MOUNT_POINT="/data/kdrive"
|
MOUNT_POINT="/home/tomasr/hdd/kdrive"
|
||||||
|
|
||||||
if rclone listremotes | rg "^''${REMOVE_NAME}:"; then
|
if rclone listremotes | rg "^''${REMOTE_NAME}:"; then
|
||||||
echo "Syncing ''${Syncing} ''${REMOVE_NAME}..."
|
echo "Syncing ''${REMOTE_NAME}..."
|
||||||
rclone sync "''${REMOVE_NAME}:" "$MOUNT_POINT" --allow-non-empty &
|
rclone bisync "''${REMOTE_NAME}:" "$MOUNT_POINT" &
|
||||||
else
|
else
|
||||||
notify-send "rclone sync failed" \
|
notify-send "rclone sync failed" \
|
||||||
"Remote ''${REMOTE_NAME} not found.\nConfigure rclone and create the dir ~/kdrive/ or comment out the exec line in hyprland.nix."
|
"Remote ''${REMOTE_NAME} not found.\nConfigure rclone and create the dir ~/kdrive/ or comment out the exec line in hyprland.nix."
|
||||||
|
|||||||
@@ -33,4 +33,49 @@ _: {
|
|||||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
};
|
};
|
||||||
|
flake.nixosModules.hardware-configuration-desktop = # Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||||
|
# and may be overwritten by future invocations. Please make changes
|
||||||
|
# to /etc/nixos/configuration.nix instead.
|
||||||
|
{ config, lib, pkgs, modulesPath, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports =
|
||||||
|
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||||
|
];
|
||||||
|
|
||||||
|
boot.initrd.availableKernelModules = [ "vmd" "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ];
|
||||||
|
boot.initrd.kernelModules = [ ];
|
||||||
|
boot.kernelModules = [ "kvm-intel" ];
|
||||||
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
|
fileSystems."/" =
|
||||||
|
{ device = "/dev/disk/by-uuid/14bcd132-b4a3-46f2-ac35-3497340de4b2";
|
||||||
|
fsType = "btrfs";
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/home" =
|
||||||
|
{ device = "/dev/disk/by-uuid/14bcd132-b4a3-46f2-ac35-3497340de4b2";
|
||||||
|
fsType = "btrfs";
|
||||||
|
options = [ "subvol=home" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/nix" =
|
||||||
|
{ device = "/dev/disk/by-uuid/14bcd132-b4a3-46f2-ac35-3497340de4b2";
|
||||||
|
fsType = "btrfs";
|
||||||
|
options = [ "subvol=nix" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/boot" =
|
||||||
|
{ device = "/dev/disk/by-uuid/BAB4-34F6";
|
||||||
|
fsType = "vfat";
|
||||||
|
options = [ "fmask=0077" "dmask=0077" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
swapDevices =
|
||||||
|
[ { device = "/dev/disk/by-uuid/ce6f9a68-0517-4f8a-b375-66f2173efe59"; }
|
||||||
|
];
|
||||||
|
|
||||||
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
|
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,8 @@
|
|||||||
|
_: {
|
||||||
|
flake.nixosModules.hdd = {
|
||||||
|
fileSystems."/home/tomasr/hdd" = {
|
||||||
|
device = "/dev/disk/by-uuid/cbe24588-e04f-4ffc-ba44-6fe6ec6d6850";
|
||||||
|
fsType = "ext4";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
_: {
|
||||||
|
flake.nixosModules.nvidia = _: {
|
||||||
|
hardware.graphics.enable = true;
|
||||||
|
services.xserver.videoDrivers = [ "nvidia" ];
|
||||||
|
hardware.nvidia.open = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -27,15 +27,18 @@
|
|||||||
documentation
|
documentation
|
||||||
disk # this only installs some disk utilities. disko will format the drives
|
disk # this only installs some disk utilities. disko will format the drives
|
||||||
fonts
|
fonts
|
||||||
#hardware-configuration-desktop
|
games
|
||||||
|
hardware-configuration-desktop
|
||||||
|
hdd
|
||||||
hyprland
|
hyprland
|
||||||
IO
|
IO
|
||||||
#kdrive-desktop # we will setup this later
|
kdrive-desktop # we will setup this later
|
||||||
latex
|
latex
|
||||||
ly
|
ly
|
||||||
mullvad
|
mullvad
|
||||||
networking
|
networking
|
||||||
notifications
|
notifications
|
||||||
|
nvidia
|
||||||
office
|
office
|
||||||
#ollama
|
#ollama
|
||||||
otherUtils
|
otherUtils
|
||||||
@@ -50,11 +53,11 @@
|
|||||||
inputs.caelestia-shell.homeManagerModules.default
|
inputs.caelestia-shell.homeManagerModules.default
|
||||||
anki
|
anki
|
||||||
caelestia
|
caelestia
|
||||||
|
caelestia-desktop
|
||||||
cursor
|
cursor
|
||||||
development
|
development
|
||||||
eza
|
eza
|
||||||
fastfetch
|
fastfetch
|
||||||
git
|
|
||||||
gtk
|
gtk
|
||||||
hyprland
|
hyprland
|
||||||
hyprland-desktop
|
hyprland-desktop
|
||||||
@@ -62,6 +65,7 @@
|
|||||||
librewolf
|
librewolf
|
||||||
mullvad
|
mullvad
|
||||||
neovim
|
neovim
|
||||||
|
nix-git-cherry-picker-desktop
|
||||||
notewrapper
|
notewrapper
|
||||||
oh-my-zsh
|
oh-my-zsh
|
||||||
ripgrep
|
ripgrep
|
||||||
|
|||||||
@@ -24,6 +24,7 @@
|
|||||||
gnumake
|
gnumake
|
||||||
go
|
go
|
||||||
direnv
|
direnv
|
||||||
|
git gh
|
||||||
cling # c interpreter used for coding
|
cling # c interpreter used for coding
|
||||||
# lsp
|
# lsp
|
||||||
clang-tools
|
clang-tools
|
||||||
|
|||||||
@@ -15,4 +15,20 @@
|
|||||||
force = true;
|
force = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
flake.homeModules.nix-git-cherry-picker-desktop = {pkgs, ...}: {
|
||||||
|
home.packages = [
|
||||||
|
inputs.nix-git-cherry-picker.packages.${pkgs.system}.default
|
||||||
|
];
|
||||||
|
};
|
||||||
|
home.file-".config/nix-git-cherry-picker/config.json" = {
|
||||||
|
enable = true;
|
||||||
|
text = ''
|
||||||
|
{
|
||||||
|
"localBranch": "desktop",
|
||||||
|
"remoteBranch": "laptop",
|
||||||
|
"nixConfigPath": "/home/tomasr/nixos/"
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
force = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user