properly reformat all files
This commit is contained in:
parent
d670e245e4
commit
725588ec9b
63
flake.nix
63
flake.nix
@ -1,36 +1,41 @@
|
|||||||
{
|
{
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11";
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11";
|
||||||
|
|
||||||
home-manager.url = "github:nix-community/home-manager/release-24.11";
|
home-manager.url = "github:nix-community/home-manager/release-24.11";
|
||||||
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
|
||||||
stylix.url = "github:danth/stylix";
|
stylix.url = "github:danth/stylix";
|
||||||
apple-fonts.url = "github:Lyndeno/apple-fonts.nix";
|
apple-fonts.url = "github:Lyndeno/apple-fonts.nix";
|
||||||
apple-emoji.url = "github:oxcl/apple-emoji-nix";
|
apple-emoji.url = "github:oxcl/apple-emoji-nix";
|
||||||
|
|
||||||
ags.url = "github:Aylur/ags";
|
ags.url = "github:Aylur/ags";
|
||||||
|
|
||||||
fingerprint-sensor.url = "github:ahbnr/nixos-06cb-009a-fingerprint-sensor/24.11";
|
|
||||||
fingerprint-sensor.inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
|
|
||||||
hyprspace.url = "github:KZDKM/Hyprspace";
|
fingerprint-sensor.url = "github:ahbnr/nixos-06cb-009a-fingerprint-sensor/24.11";
|
||||||
};
|
fingerprint-sensor.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
|
||||||
outputs = { self, nixpkgs, ... }: let
|
hyprspace.url = "github:KZDKM/Hyprspace";
|
||||||
forAllSystems = nixpkgs.lib.genAttrs [
|
};
|
||||||
"aarch64-linux"
|
|
||||||
"x86_64-linux"
|
outputs =
|
||||||
"aarch64-darwin"
|
{ self, nixpkgs, ... }:
|
||||||
];
|
let
|
||||||
in {
|
forAllSystems = nixpkgs.lib.genAttrs [
|
||||||
nixosConfigurations = import ./hosts { inherit self; };
|
"aarch64-linux"
|
||||||
devShells = forAllSystems ( system:
|
"x86_64-linux"
|
||||||
let
|
"aarch64-darwin"
|
||||||
pkgs = nixpkgs.legacyPackages.${system};
|
];
|
||||||
in {
|
in
|
||||||
ddt4all = import ./shells/ddt4all.nix { inherit pkgs; };
|
{
|
||||||
}
|
nixosConfigurations = import ./hosts { inherit self; };
|
||||||
);
|
devShells = forAllSystems (
|
||||||
};
|
system:
|
||||||
|
let
|
||||||
|
pkgs = nixpkgs.legacyPackages.${system};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
ddt4all = import ./shells/ddt4all.nix { inherit pkgs; };
|
||||||
|
}
|
||||||
|
);
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
@ -1,30 +1,35 @@
|
|||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
# DO NOT change this unless you know what you're doing!
|
# DO NOT change this unless you know what you're doing!
|
||||||
system.stateVersion = "24.11";
|
system.stateVersion = "24.11";
|
||||||
|
|
||||||
# Enable cache
|
# Enable cache
|
||||||
nix.settings = {
|
nix.settings = {
|
||||||
substituters = ["https://cache.nixos.org" "https://hyprland.cachix.org"];
|
substituters = [
|
||||||
trusted-public-keys = ["hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="];
|
"https://cache.nixos.org"
|
||||||
};
|
"https://hyprland.cachix.org"
|
||||||
|
];
|
||||||
|
trusted-public-keys = [ "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=" ];
|
||||||
|
};
|
||||||
|
|
||||||
nixpkgs.config = {
|
nixpkgs.config = {
|
||||||
allowInsecurePredicate = pkg: builtins.elem (pkgs.lib.getName pkg) [
|
allowInsecurePredicate =
|
||||||
"olm"
|
pkg:
|
||||||
];
|
builtins.elem (pkgs.lib.getName pkg) [
|
||||||
};
|
"olm"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
alacritty
|
alacritty
|
||||||
vim
|
vim
|
||||||
unzip
|
unzip
|
||||||
networkmanager
|
networkmanager
|
||||||
];
|
];
|
||||||
|
|
||||||
services.automatic-timezoned.enable = true;
|
services.automatic-timezoned.enable = true;
|
||||||
|
|
||||||
boot.loader.grub.enable = false;
|
boot.loader.grub.enable = false;
|
||||||
boot.loader.systemd-boot.enable = true;
|
boot.loader.systemd-boot.enable = true;
|
||||||
}
|
}
|
||||||
|
@ -1,29 +1,38 @@
|
|||||||
{ self, ... }:
|
{ self, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
inherit (self) inputs;
|
inherit (self) inputs;
|
||||||
homeDir = self + /profiles;
|
homeDir = self + /profiles;
|
||||||
|
|
||||||
mkSystem = {
|
mkSystem =
|
||||||
system,
|
{
|
||||||
hostname,
|
system,
|
||||||
useHomeManager ? true,
|
hostname,
|
||||||
modules ? []
|
useHomeManager ? true,
|
||||||
}: inputs.nixpkgs.lib.nixosSystem {
|
modules ? [ ],
|
||||||
specialArgs = { inherit inputs; };
|
}:
|
||||||
modules = [
|
inputs.nixpkgs.lib.nixosSystem {
|
||||||
./base-configuration.nix
|
specialArgs = { inherit inputs; };
|
||||||
./${hostname}
|
modules =
|
||||||
homeDir
|
[
|
||||||
] ++ (
|
./base-configuration.nix
|
||||||
if useHomeManager then [
|
./${hostname}
|
||||||
inputs.home-manager.nixosModules.home-manager
|
homeDir
|
||||||
] else [ ]
|
]
|
||||||
) ++ modules;
|
++ (
|
||||||
};
|
if useHomeManager then
|
||||||
in {
|
[
|
||||||
hulk = mkSystem {
|
inputs.home-manager.nixosModules.home-manager
|
||||||
system = "x86_64-linux";
|
]
|
||||||
hostname = "hulk";
|
else
|
||||||
};
|
[ ]
|
||||||
|
)
|
||||||
|
++ modules;
|
||||||
|
};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
hulk = mkSystem {
|
||||||
|
system = "x86_64-linux";
|
||||||
|
hostname = "hulk";
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
@ -1,25 +1,28 @@
|
|||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
./modules.nix
|
./modules.nix
|
||||||
./users.nix
|
./users.nix
|
||||||
./networking.nix
|
./networking.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
nix.settings.experimental-features = [
|
||||||
nix.settings.auto-optimise-store = true;
|
"nix-command"
|
||||||
nix.gc = {
|
"flakes"
|
||||||
automatic = true;
|
];
|
||||||
dates = "weekly";
|
nix.settings.auto-optimise-store = true;
|
||||||
options = "--delete-older-than 7d";
|
nix.gc = {
|
||||||
};
|
automatic = true;
|
||||||
|
dates = "weekly";
|
||||||
|
options = "--delete-older-than 7d";
|
||||||
|
};
|
||||||
|
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
|
||||||
swapDevices = [
|
swapDevices = [
|
||||||
{
|
{
|
||||||
device = "/swap";
|
device = "/swap";
|
||||||
size = 8192;
|
size = 8192;
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
@ -1,28 +1,42 @@
|
|||||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||||
# and may be overwritten by future invocations. Please make changes
|
# and may be overwritten by future invocations. Please make changes
|
||||||
# to /etc/nixos/configuration.nix instead.
|
# to /etc/nixos/configuration.nix instead.
|
||||||
{ config, lib, pkgs, modulesPath, ... }:
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
modulesPath,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports =
|
imports = [
|
||||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
(modulesPath + "/installer/scan/not-detected.nix")
|
||||||
];
|
];
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usb_storage" "sd_mod" ];
|
boot.initrd.availableKernelModules = [
|
||||||
|
"xhci_pci"
|
||||||
|
"ahci"
|
||||||
|
"usb_storage"
|
||||||
|
"sd_mod"
|
||||||
|
];
|
||||||
boot.initrd.kernelModules = [ ];
|
boot.initrd.kernelModules = [ ];
|
||||||
boot.kernelModules = [ ];
|
boot.kernelModules = [ ];
|
||||||
boot.extraModulePackages = [ ];
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
fileSystems."/" =
|
fileSystems."/" = {
|
||||||
{ device = "/dev/disk/by-uuid/9c4c982e-0ea2-46c7-b7d6-e5a94f8562d3";
|
device = "/dev/disk/by-uuid/9c4c982e-0ea2-46c7-b7d6-e5a94f8562d3";
|
||||||
fsType = "ext4";
|
fsType = "ext4";
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/boot" =
|
fileSystems."/boot" = {
|
||||||
{ device = "/dev/disk/by-uuid/A399-E37C";
|
device = "/dev/disk/by-uuid/A399-E37C";
|
||||||
fsType = "vfat";
|
fsType = "vfat";
|
||||||
options = [ "fmask=0022" "dmask=0022" ];
|
options = [
|
||||||
};
|
"fmask=0022"
|
||||||
|
"dmask=0022"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
swapDevices = [ ];
|
swapDevices = [ ];
|
||||||
|
|
||||||
|
@ -1,59 +1,59 @@
|
|||||||
{ pkgs, inputs, ... }:
|
{ pkgs, inputs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
# Utilities
|
# Utilities
|
||||||
../../modules/nixos/nvidia-support.nix
|
../../modules/nixos/nvidia-support.nix
|
||||||
../../modules/nixos/fingerprint.nix
|
../../modules/nixos/fingerprint.nix
|
||||||
../../modules/nixos/apple-style.nix
|
../../modules/nixos/apple-style.nix
|
||||||
../../modules/nixos/bluetooth.nix
|
../../modules/nixos/bluetooth.nix
|
||||||
../../modules/nixos/greetd.nix
|
../../modules/nixos/greetd.nix
|
||||||
../../modules/nixos/audio.nix
|
../../modules/nixos/audio.nix
|
||||||
|
|
||||||
# Apps/services
|
# Apps/services
|
||||||
../../modules/nixos/nordvpn.nix
|
../../modules/nixos/nordvpn.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
modules.apple-style.enable = true;
|
||||||
|
modules.bluetooth.enable = true;
|
||||||
|
modules.nvidia.enable = true;
|
||||||
|
modules.nordvpn.enable = true;
|
||||||
|
modules.audio.enable = true;
|
||||||
|
modules.fingerprint-fix = {
|
||||||
|
enable = true;
|
||||||
|
calibDataFile = ./calib-data.bin;
|
||||||
|
};
|
||||||
|
|
||||||
|
services = {
|
||||||
|
tlp.enable = false;
|
||||||
|
gvfs.enable = true;
|
||||||
|
upower.enable = true;
|
||||||
|
power-profiles-daemon.enable = true;
|
||||||
|
xserver.displayManager = {
|
||||||
|
gdm.enable = true;
|
||||||
|
startx.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
printing = {
|
||||||
|
enable = true;
|
||||||
|
drivers = with pkgs; [ hplipWithPlugin ];
|
||||||
|
};
|
||||||
|
|
||||||
|
udev.extraRules = ''
|
||||||
|
SUBSYSTEM=="backlight", KERNEL=="intel_backlight", MODE="0666", RUN+="${pkgs.coreutils}/bin/chmod a+w /sys/class/backlight/%k/brightness"
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
programs = {
|
||||||
|
adb.enable = true;
|
||||||
|
thunar.enable = true;
|
||||||
|
hyprland.enable = true;
|
||||||
|
|
||||||
|
thunar.plugins = with pkgs.xfce; [
|
||||||
|
thunar-archive-plugin
|
||||||
|
thunar-volman
|
||||||
];
|
];
|
||||||
|
|
||||||
modules.apple-style.enable = true;
|
light.enable = true;
|
||||||
modules.bluetooth.enable = true;
|
};
|
||||||
modules.nvidia.enable = true;
|
|
||||||
modules.nordvpn.enable = true;
|
|
||||||
modules.audio.enable = true;
|
|
||||||
modules.fingerprint-fix = {
|
|
||||||
enable = true;
|
|
||||||
calibDataFile = ./calib-data.bin;
|
|
||||||
};
|
|
||||||
|
|
||||||
services = {
|
|
||||||
tlp.enable = false;
|
|
||||||
gvfs.enable = true;
|
|
||||||
upower.enable = true;
|
|
||||||
power-profiles-daemon.enable = true;
|
|
||||||
xserver.displayManager = {
|
|
||||||
gdm.enable = true;
|
|
||||||
startx.enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
printing = {
|
|
||||||
enable = true;
|
|
||||||
drivers = with pkgs; [ hplipWithPlugin ];
|
|
||||||
};
|
|
||||||
|
|
||||||
udev.extraRules = ''
|
|
||||||
SUBSYSTEM=="backlight", KERNEL=="intel_backlight", MODE="0666", RUN+="${pkgs.coreutils}/bin/chmod a+w /sys/class/backlight/%k/brightness"
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
programs = {
|
|
||||||
adb.enable = true;
|
|
||||||
thunar.enable = true;
|
|
||||||
hyprland.enable = true;
|
|
||||||
|
|
||||||
thunar.plugins = with pkgs.xfce; [
|
|
||||||
thunar-archive-plugin
|
|
||||||
thunar-volman
|
|
||||||
];
|
|
||||||
|
|
||||||
light.enable = true;
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
@ -1,12 +1,13 @@
|
|||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
networkManagerEnabled = true;
|
networkManagerEnabled = true;
|
||||||
wirelessEnabled = false;
|
wirelessEnabled = false;
|
||||||
in {
|
in
|
||||||
networking.networkmanager.enable = pkgs.lib.mkIf networkManagerEnabled true;
|
{
|
||||||
networking.networkmanager.wifi.powersave = pkgs.lib.mkIf networkManagerEnabled true;
|
networking.networkmanager.enable = pkgs.lib.mkIf networkManagerEnabled true;
|
||||||
|
networking.networkmanager.wifi.powersave = pkgs.lib.mkIf networkManagerEnabled true;
|
||||||
|
|
||||||
networking.wireless.enable = pkgs.lib.mkIf wirelessEnabled true;
|
networking.wireless.enable = pkgs.lib.mkIf wirelessEnabled true;
|
||||||
networking.wireless.userControlled.enable = pkgs.lib.mkIf wirelessEnabled true;
|
networking.wireless.userControlled.enable = pkgs.lib.mkIf wirelessEnabled true;
|
||||||
}
|
}
|
||||||
|
@ -1,16 +1,23 @@
|
|||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
username = "sadorowo";
|
username = "sadorowo";
|
||||||
fullname = "Franek";
|
fullname = "Franek";
|
||||||
preferredShell = pkgs.fish;
|
preferredShell = pkgs.fish;
|
||||||
in {
|
in
|
||||||
users.users.${username} = {
|
{
|
||||||
isNormalUser = true;
|
users.users.${username} = {
|
||||||
description = fullname;
|
isNormalUser = true;
|
||||||
home = "/home/${username}";
|
description = fullname;
|
||||||
extraGroups = [ "wheel" "networkmanager" "plugdev" "adbusers" "nordvpn" ];
|
home = "/home/${username}";
|
||||||
shell = preferredShell;
|
extraGroups = [
|
||||||
ignoreShellProgramCheck = true; # Will do it later in profile configuration
|
"wheel"
|
||||||
};
|
"networkmanager"
|
||||||
|
"plugdev"
|
||||||
|
"adbusers"
|
||||||
|
"nordvpn"
|
||||||
|
];
|
||||||
|
shell = preferredShell;
|
||||||
|
ignoreShellProgramCheck = true; # Will do it later in profile configuration
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
@ -1,91 +1,96 @@
|
|||||||
{ lib, pkgs, ... }:
|
{ lib, pkgs, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
pname = "nordvpn";
|
pname = "nordvpn";
|
||||||
version = "3.20.1";
|
version = "3.20.1";
|
||||||
|
|
||||||
nordVPNBase = pkgs.stdenv.mkDerivation rec {
|
nordVPNBase = pkgs.stdenv.mkDerivation rec {
|
||||||
inherit pname version;
|
inherit pname version;
|
||||||
|
|
||||||
src = pkgs.fetchurl {
|
src = pkgs.fetchurl {
|
||||||
url = "https://repo.nordvpn.com/deb/nordvpn/debian/pool/main/n/nordvpn/nordvpn_${version}_amd64.deb";
|
url = "https://repo.nordvpn.com/deb/nordvpn/debian/pool/main/n/nordvpn/nordvpn_${version}_amd64.deb";
|
||||||
hash = "sha256-RJoI3G4Tr3272CZ/lI9HEfKXdwuwPzWlrOKm9taIjuU=";
|
hash = "sha256-RJoI3G4Tr3272CZ/lI9HEfKXdwuwPzWlrOKm9taIjuU=";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = with pkgs; [ libxml2 libidn2 ];
|
buildInputs = with pkgs; [
|
||||||
nativeBuildInputs = with pkgs; [
|
libxml2
|
||||||
dpkg
|
libidn2
|
||||||
autoPatchelfHook
|
];
|
||||||
stdenv.cc.cc.lib
|
nativeBuildInputs = with pkgs; [
|
||||||
libnl
|
dpkg
|
||||||
libcap_ng
|
autoPatchelfHook
|
||||||
];
|
stdenv.cc.cc.lib
|
||||||
|
libnl
|
||||||
|
libcap_ng
|
||||||
|
];
|
||||||
|
|
||||||
dontConfigure = true;
|
dontConfigure = true;
|
||||||
dontBuild = true;
|
dontBuild = true;
|
||||||
|
|
||||||
unpackPhase = ''
|
unpackPhase = ''
|
||||||
runHook preUnpack
|
runHook preUnpack
|
||||||
dpkg --extract $src .
|
dpkg --extract $src .
|
||||||
runHook postUnpack
|
runHook postUnpack
|
||||||
'';
|
'';
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
runHook preInstall
|
runHook preInstall
|
||||||
mkdir -p $out
|
mkdir -p $out
|
||||||
mv usr/* $out/
|
mv usr/* $out/
|
||||||
mv var/ $out/
|
mv var/ $out/
|
||||||
mv etc/ $out/
|
mv etc/ $out/
|
||||||
runHook postInstall
|
runHook postInstall
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
nordVPNfhs = pkgs.buildFHSEnvChroot {
|
nordVPNfhs = pkgs.buildFHSEnvChroot {
|
||||||
name = "nordvpnd";
|
name = "nordvpnd";
|
||||||
runScript = "nordvpnd";
|
runScript = "nordvpnd";
|
||||||
|
|
||||||
targetPkgs = pkgs: with pkgs; [
|
targetPkgs =
|
||||||
nordVPNBase
|
pkgs: with pkgs; [
|
||||||
sysctl
|
nordVPNBase
|
||||||
iptables
|
sysctl
|
||||||
iproute2
|
iptables
|
||||||
procps
|
iproute2
|
||||||
cacert
|
procps
|
||||||
libxml2
|
cacert
|
||||||
libidn2
|
libxml2
|
||||||
zlib
|
libidn2
|
||||||
wireguard-tools
|
zlib
|
||||||
];
|
wireguard-tools
|
||||||
};
|
];
|
||||||
|
};
|
||||||
|
|
||||||
preScript = pkgs.writeShellScript "nordvpn-start" ''
|
preScript = pkgs.writeShellScript "nordvpn-start" ''
|
||||||
mkdir -m 700 -p /var/lib/nordvpn;
|
mkdir -m 700 -p /var/lib/nordvpn;
|
||||||
if [ -z "$(ls -A /var/lib/nordvpn)" ]; then
|
if [ -z "$(ls -A /var/lib/nordvpn)" ]; then
|
||||||
cp -r ${nordVPNBase}/var/lib/nordvpn/* /var/lib/nordvpn;
|
cp -r ${nordVPNBase}/var/lib/nordvpn/* /var/lib/nordvpn;
|
||||||
fi
|
fi
|
||||||
'';
|
'';
|
||||||
in pkgs.stdenv.mkDerivation rec {
|
in
|
||||||
inherit pname version;
|
pkgs.stdenv.mkDerivation rec {
|
||||||
|
inherit pname version;
|
||||||
|
|
||||||
dontUnpack = true;
|
dontUnpack = true;
|
||||||
dontConfigure = true;
|
dontConfigure = true;
|
||||||
dontBuild = true;
|
dontBuild = true;
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
runHook preInstall
|
runHook preInstall
|
||||||
mkdir -p $out/bin $out/share
|
mkdir -p $out/bin $out/share
|
||||||
ln -s ${nordVPNBase}/bin/nordvpn $out/bin
|
ln -s ${nordVPNBase}/bin/nordvpn $out/bin
|
||||||
ln -s ${nordVPNfhs}/bin/nordvpnd $out/bin
|
ln -s ${nordVPNfhs}/bin/nordvpnd $out/bin
|
||||||
ln -s ${nordVPNBase}/share/* $out/share/
|
ln -s ${nordVPNBase}/share/* $out/share/
|
||||||
ln -s ${nordVPNBase}/var $out/
|
ln -s ${nordVPNBase}/var $out/
|
||||||
runHook postInstall
|
runHook postInstall
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "CLI client for NordVPN";
|
description = "CLI client for NordVPN";
|
||||||
homepage = "https://www.nordvpn.com";
|
homepage = "https://www.nordvpn.com";
|
||||||
license = licenses.unfreeRedistributable;
|
license = licenses.unfreeRedistributable;
|
||||||
maintainers = with maintainers; [dr460nf1r3];
|
maintainers = with maintainers; [ dr460nf1r3 ];
|
||||||
platforms = ["x86_64-linux"];
|
platforms = [ "x86_64-linux" ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -1,73 +1,85 @@
|
|||||||
{ pkgs, config, lib, ... }:
|
{
|
||||||
|
pkgs,
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
{
|
{
|
||||||
options.modules.hyprland = {
|
options.modules.hyprland = {
|
||||||
enable = lib.mkEnableOption "Enable Hyprland";
|
enable = lib.mkEnableOption "Enable Hyprland";
|
||||||
additionalPackages = lib.mkOption {
|
additionalPackages = lib.mkOption {
|
||||||
type = lib.types.listOf lib.types.package;
|
type = lib.types.listOf lib.types.package;
|
||||||
description = "Additional Hyprland-related packages to install";
|
description = "Additional Hyprland-related packages to install";
|
||||||
default = [];
|
default = [ ];
|
||||||
};
|
};
|
||||||
|
|
||||||
additionalConfig = lib.mkOption {
|
additionalConfig = lib.mkOption {
|
||||||
type = lib.types.attrs;
|
type = lib.types.attrs;
|
||||||
description = "Additional options for Hyprland config";
|
description = "Additional options for Hyprland config";
|
||||||
default = [];
|
default = [ ];
|
||||||
};
|
};
|
||||||
|
|
||||||
plugins = lib.mkOption {
|
plugins = lib.mkOption {
|
||||||
type = lib.types.listOf lib.types.package;
|
type = lib.types.listOf lib.types.package;
|
||||||
description = "Additional plugins for Hyprland";
|
description = "Additional plugins for Hyprland";
|
||||||
default = [];
|
default = [ ];
|
||||||
};
|
};
|
||||||
|
|
||||||
sourceFiles = lib.mkOption {
|
sourceFiles = lib.mkOption {
|
||||||
type = lib.types.listOf lib.types.str;
|
type = lib.types.listOf lib.types.str;
|
||||||
description = "Config files to source";
|
description = "Config files to source";
|
||||||
default = [];
|
default = [ ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = lib.mkIf config.modules.hyprland.enable {
|
config = lib.mkIf config.modules.hyprland.enable {
|
||||||
home.packages = with pkgs; [
|
home.packages =
|
||||||
hyprlock hypridle wl-clipboard cliphist swww
|
with pkgs;
|
||||||
] ++ config.modules.hyprland.additionalPackages;
|
[
|
||||||
|
hyprlock
|
||||||
|
hypridle
|
||||||
|
wl-clipboard
|
||||||
|
cliphist
|
||||||
|
swww
|
||||||
|
]
|
||||||
|
++ config.modules.hyprland.additionalPackages;
|
||||||
|
|
||||||
wayland.windowManager.hyprland = {
|
wayland.windowManager.hyprland = {
|
||||||
enable = true;
|
enable = true;
|
||||||
xwayland.enable = true;
|
xwayland.enable = true;
|
||||||
plugins = config.modules.hyprland.plugins;
|
plugins = config.modules.hyprland.plugins;
|
||||||
settings = config.modules.hyprland.additionalConfig // {
|
settings = config.modules.hyprland.additionalConfig // {
|
||||||
source = config.modules.hyprland.sourceFiles;
|
source = config.modules.hyprland.sourceFiles;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
xdg.portal = {
|
xdg.portal = {
|
||||||
enable = true;
|
enable = true;
|
||||||
config.common.default = "*";
|
config.common.default = "*";
|
||||||
extraPortals = with pkgs; [
|
extraPortals = with pkgs; [
|
||||||
xdg-desktop-portal-gtk
|
xdg-desktop-portal-gtk
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
systemd.user.services.authentication-agent = {
|
systemd.user.services.authentication-agent = {
|
||||||
Unit = {
|
Unit = {
|
||||||
Description = "GNOME Authentication Agent";
|
Description = "GNOME Authentication Agent";
|
||||||
After = [ "graphical-session.target" ];
|
After = [ "graphical-session.target" ];
|
||||||
Wants = [ "graphical-session.target" ];
|
Wants = [ "graphical-session.target" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
Install = {
|
Install = {
|
||||||
WantedBy = [ "graphical-session.target" ];
|
WantedBy = [ "graphical-session.target" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
Service = {
|
Service = {
|
||||||
Type = "simple";
|
Type = "simple";
|
||||||
ExecStart = "${pkgs.hyprpolkitagent}/libexec/hyprpolkitagent";
|
ExecStart = "${pkgs.hyprpolkitagent}/libexec/hyprpolkitagent";
|
||||||
Restart = "on-failure";
|
Restart = "on-failure";
|
||||||
RestartSec = 1;
|
RestartSec = 1;
|
||||||
TimeoutStopSec = 10;
|
TimeoutStopSec = 10;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -1,45 +1,50 @@
|
|||||||
{ config, pkgs, lib, ... }:
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
{
|
{
|
||||||
options.modules.darkman = {
|
options.modules.darkman = {
|
||||||
enable = lib.mkEnableOption "Darkman service and integration";
|
enable = lib.mkEnableOption "Darkman service and integration";
|
||||||
customLightModeScript = lib.mkOption {
|
customLightModeScript = lib.mkOption {
|
||||||
type = lib.types.str;
|
type = lib.types.str;
|
||||||
description = "Path to custom light mode script";
|
description = "Path to custom light mode script";
|
||||||
};
|
};
|
||||||
|
|
||||||
customDarkModeScript = lib.mkOption {
|
customDarkModeScript = lib.mkOption {
|
||||||
type = lib.types.str;
|
type = lib.types.str;
|
||||||
description = "Path to custom dark mode script";
|
description = "Path to custom dark mode script";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = lib.mkIf config.modules.darkman.enable {
|
config = lib.mkIf config.modules.darkman.enable {
|
||||||
home.packages = with pkgs; [ dconf ];
|
home.packages = with pkgs; [ dconf ];
|
||||||
|
|
||||||
services.darkman = {
|
services.darkman = {
|
||||||
enable = true;
|
enable = true;
|
||||||
darkModeScripts = {
|
darkModeScripts = {
|
||||||
theme = ''
|
theme = ''
|
||||||
${pkgs.dconf}/bin/dconf write\
|
${pkgs.dconf}/bin/dconf write\
|
||||||
/org/gnome/desktop/interface/color-scheme "'prefer-dark'"
|
/org/gnome/desktop/interface/color-scheme "'prefer-dark'"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
custom = config.modules.darkman.customDarkModeScript;
|
custom = config.modules.darkman.customDarkModeScript;
|
||||||
pywalfox = "command -v pywalfox &>/dev/null && pywalfox dark && pywalfox update";
|
pywalfox = "command -v pywalfox &>/dev/null && pywalfox dark && pywalfox update";
|
||||||
};
|
};
|
||||||
|
|
||||||
lightModeScripts = {
|
lightModeScripts = {
|
||||||
theme = ''
|
theme = ''
|
||||||
${pkgs.dconf}/bin/dconf write\
|
${pkgs.dconf}/bin/dconf write\
|
||||||
/org/gnome/desktop/interface/color-scheme "'prefer-light'"
|
/org/gnome/desktop/interface/color-scheme "'prefer-light'"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
custom = config.modules.darkman.customLightModeScript;
|
custom = config.modules.darkman.customLightModeScript;
|
||||||
pywalfox = "command -v pywalfox &>/dev/null && pywalfox light && pywalfox update";
|
pywalfox = "command -v pywalfox &>/dev/null && pywalfox light && pywalfox update";
|
||||||
};
|
};
|
||||||
|
|
||||||
settings.usegeoclue = true;
|
settings.usegeoclue = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -1,77 +1,77 @@
|
|||||||
{ config, lib, ... }:
|
{ config, lib, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
options.modules.fish = {
|
options.modules.fish = {
|
||||||
enable = lib.mkEnableOption "Fish integration";
|
enable = lib.mkEnableOption "Fish integration";
|
||||||
enableDefaultAliases = lib.mkOption {
|
enableDefaultAliases = lib.mkOption {
|
||||||
type = lib.types.bool;
|
type = lib.types.bool;
|
||||||
default = true;
|
default = true;
|
||||||
description = "Enable default aliases and abbreviations";
|
description = "Enable default aliases and abbreviations";
|
||||||
};
|
};
|
||||||
|
|
||||||
enableStarship = lib.mkOption {
|
enableStarship = lib.mkOption {
|
||||||
type = lib.types.bool;
|
type = lib.types.bool;
|
||||||
default = false;
|
default = false;
|
||||||
description = "Enable Starship prompt";
|
description = "Enable Starship prompt";
|
||||||
};
|
};
|
||||||
|
|
||||||
functions = lib.mkOption {
|
functions = lib.mkOption {
|
||||||
type = with lib.types; attrsOf str;
|
type = with lib.types; attrsOf str;
|
||||||
description = "Fish function definitions";
|
description = "Fish function definitions";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = lib.mkIf config.modules.fish.enable {
|
config = lib.mkIf config.modules.fish.enable {
|
||||||
programs.nix-index = {
|
programs.nix-index = {
|
||||||
enable = true;
|
enable = true;
|
||||||
enableFishIntegration = true;
|
enableFishIntegration = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.starship = lib.mkIf config.modules.fish.enableStarship {
|
programs.starship = lib.mkIf config.modules.fish.enableStarship {
|
||||||
enable = true;
|
enable = true;
|
||||||
enableFishIntegration = true;
|
enableFishIntegration = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.fish = {
|
programs.fish = {
|
||||||
enable = true;
|
enable = true;
|
||||||
interactiveShellInit = ''
|
interactiveShellInit = ''
|
||||||
set fish_greeting
|
set fish_greeting
|
||||||
cat ~/.cache/wal/sequences
|
cat ~/.cache/wal/sequences
|
||||||
'';
|
'';
|
||||||
|
|
||||||
shellAliases = lib.mkIf config.modules.fish.enableDefaultAliases {
|
shellAliases = lib.mkIf config.modules.fish.enableDefaultAliases {
|
||||||
".." = "cd ..";
|
".." = "cd ..";
|
||||||
"..." = "cd ../..";
|
"..." = "cd ../..";
|
||||||
"...." = "cd ../../../";
|
"...." = "cd ../../../";
|
||||||
"....." = "cd ../../../../";
|
"....." = "cd ../../../../";
|
||||||
|
|
||||||
"cp" = "cp -v";
|
|
||||||
"ddf" = "df -h";
|
|
||||||
"etc" = "erd -H";
|
|
||||||
"mkdir" = "mkdir -p";
|
|
||||||
"mv" = "mv -v";
|
|
||||||
"rm" = "rm -v";
|
|
||||||
"rr" = "rm -rf";
|
|
||||||
|
|
||||||
"neofetch" = "fastfetch";
|
"cp" = "cp -v";
|
||||||
};
|
"ddf" = "df -h";
|
||||||
|
"etc" = "erd -H";
|
||||||
|
"mkdir" = "mkdir -p";
|
||||||
|
"mv" = "mv -v";
|
||||||
|
"rm" = "rm -v";
|
||||||
|
"rr" = "rm -rf";
|
||||||
|
|
||||||
shellAbbrs = lib.mkIf config.modules.fish.enableDefaultAliases {
|
"neofetch" = "fastfetch";
|
||||||
gaa = "git add -A";
|
};
|
||||||
ga = "git add";
|
|
||||||
gbd = "git branch --delete";
|
shellAbbrs = lib.mkIf config.modules.fish.enableDefaultAliases {
|
||||||
gb = "git branch";
|
gaa = "git add -A";
|
||||||
gc = "git commit";
|
ga = "git add";
|
||||||
gcm = "git commit -m";
|
gbd = "git branch --delete";
|
||||||
gcob = "git checkout -b";
|
gb = "git branch";
|
||||||
gco = "git checkout";
|
gc = "git commit";
|
||||||
gd = "git diff";
|
gcm = "git commit -m";
|
||||||
gl = "git log";
|
gcob = "git checkout -b";
|
||||||
gp = "git push";
|
gco = "git checkout";
|
||||||
gs = "git status";
|
gd = "git diff";
|
||||||
};
|
gl = "git log";
|
||||||
|
gp = "git push";
|
||||||
functions = config.modules.fish.functions;
|
gs = "git status";
|
||||||
};
|
};
|
||||||
};
|
|
||||||
|
functions = config.modules.fish.functions;
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
@ -1,23 +1,35 @@
|
|||||||
{ config, lib, pkgs, inputs, ... }:
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
{
|
{
|
||||||
options.modules.apple-style.enable = lib.mkEnableOption "Enable Apple fonts and emojis";
|
options.modules.apple-style.enable = lib.mkEnableOption "Enable Apple fonts and emojis";
|
||||||
|
|
||||||
config = lib.mkIf config.modules.apple-style.enable {
|
config = lib.mkIf config.modules.apple-style.enable {
|
||||||
fonts.fontDir.enable = true;
|
fonts.fontDir.enable = true;
|
||||||
fonts.packages = [
|
fonts.packages = [
|
||||||
inputs.apple-emoji.packages.${pkgs.system}.apple-emoji-nix
|
inputs.apple-emoji.packages.${pkgs.system}.apple-emoji-nix
|
||||||
inputs.apple-fonts.packages.${pkgs.system}.sf-pro-nerd
|
inputs.apple-fonts.packages.${pkgs.system}.sf-pro-nerd
|
||||||
inputs.apple-fonts.packages.${pkgs.system}.sf-mono-nerd
|
inputs.apple-fonts.packages.${pkgs.system}.sf-mono-nerd
|
||||||
];
|
];
|
||||||
|
|
||||||
fonts.fontconfig.enable = true;
|
fonts.fontconfig.enable = true;
|
||||||
fonts.enableDefaultPackages = false;
|
fonts.enableDefaultPackages = false;
|
||||||
fonts.fontconfig.defaultFonts = {
|
fonts.fontconfig.defaultFonts = {
|
||||||
sansSerif = [ "SFProText Nerd Font" "SFProDisplay Nerd Font" ];
|
sansSerif = [
|
||||||
serif = [ "SFProText Nerd Font" "SFProDisplay Nerd Font" ];
|
"SFProText Nerd Font"
|
||||||
monospace = [ "SFMono Nerd Font" ];
|
"SFProDisplay Nerd Font"
|
||||||
emoji = [ "Apple Color Emoji" ];
|
];
|
||||||
};
|
serif = [
|
||||||
};
|
"SFProText Nerd Font"
|
||||||
|
"SFProDisplay Nerd Font"
|
||||||
|
];
|
||||||
|
monospace = [ "SFMono Nerd Font" ];
|
||||||
|
emoji = [ "Apple Color Emoji" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
@ -1,15 +1,15 @@
|
|||||||
{ config, lib, ... }:
|
{ config, lib, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
options.modules.audio.enable = lib.mkEnableOption "Enable Pipewire audio";
|
options.modules.audio.enable = lib.mkEnableOption "Enable Pipewire audio";
|
||||||
|
|
||||||
config = lib.mkIf config.modules.audio.enable {
|
config = lib.mkIf config.modules.audio.enable {
|
||||||
services.pipewire = {
|
services.pipewire = {
|
||||||
enable = true;
|
enable = true;
|
||||||
alsa.enable = true;
|
alsa.enable = true;
|
||||||
alsa.support32Bit = true;
|
alsa.support32Bit = true;
|
||||||
pulse.enable = true;
|
pulse.enable = true;
|
||||||
jack.enable = true;
|
jack.enable = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -1,19 +1,24 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
{
|
{
|
||||||
options.modules.bluetooth.enable = lib.mkEnableOption "Enable Bluetooth";
|
options.modules.bluetooth.enable = lib.mkEnableOption "Enable Bluetooth";
|
||||||
|
|
||||||
config = lib.mkIf config.modules.bluetooth.enable {
|
config = lib.mkIf config.modules.bluetooth.enable {
|
||||||
environment.systemPackages = with pkgs; [ bluez ];
|
environment.systemPackages = with pkgs; [ bluez ];
|
||||||
|
|
||||||
# add compatibility layer
|
# add compatibility layer
|
||||||
systemd.services.bluetooth.serviceConfig.ExecStart = lib.mkForce [
|
systemd.services.bluetooth.serviceConfig.ExecStart = lib.mkForce [
|
||||||
""
|
""
|
||||||
"${pkgs.bluez}/libexec/bluetooth/bluetoothd -f /etc/bluetooth/main.conf -C"
|
"${pkgs.bluez}/libexec/bluetooth/bluetoothd -f /etc/bluetooth/main.conf -C"
|
||||||
];
|
];
|
||||||
|
|
||||||
hardware.bluetooth.enable = true;
|
hardware.bluetooth.enable = true;
|
||||||
hardware.bluetooth.powerOnBoot = true;
|
hardware.bluetooth.powerOnBoot = true;
|
||||||
services.blueman.enable = true;
|
services.blueman.enable = true;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -1,37 +1,50 @@
|
|||||||
{ config, lib, pkgs, inputs, ... }:
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
{
|
{
|
||||||
options.modules.fingerprint-fix = {
|
options.modules.fingerprint-fix = {
|
||||||
enable = lib.mkEnableOption "Enable support for fingerprint for P51S-like ThinkPads.";
|
enable = lib.mkEnableOption "Enable support for fingerprint for P51S-like ThinkPads.";
|
||||||
calibDataFile = lib.mkOption {
|
calibDataFile = lib.mkOption {
|
||||||
description = "Path to calibration data file.";
|
description = "Path to calibration data file.";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
inputs.fingerprint-sensor.nixosModules."06cb-009a-fingerprint-sensor"
|
inputs.fingerprint-sensor.nixosModules."06cb-009a-fingerprint-sensor"
|
||||||
];
|
];
|
||||||
|
|
||||||
config = lib.mkIf config.modules.fingerprint-fix.enable {
|
config = lib.mkIf config.modules.fingerprint-fix.enable {
|
||||||
# Needed because we're getting TLS error with open-fprintd-resume
|
# Needed because we're getting TLS error with open-fprintd-resume
|
||||||
systemd.services.validity-restart = let
|
systemd.services.validity-restart =
|
||||||
targets = [ "suspend.target" "hibernate.target" "hybrid-sleep.target" "suspend-then-hibernate.target" ];
|
let
|
||||||
in {
|
targets = [
|
||||||
description = "Restart.modules.to fix fingerprint integration";
|
"suspend.target"
|
||||||
wantedBy = targets;
|
"hibernate.target"
|
||||||
after = targets;
|
"hybrid-sleep.target"
|
||||||
serviceConfig.ExecStart = "systemctl restart open-fprintd python3-validity";
|
"suspend-then-hibernate.target"
|
||||||
};
|
];
|
||||||
|
in
|
||||||
|
{
|
||||||
|
description = "Restart.modules.to fix fingerprint integration";
|
||||||
|
wantedBy = targets;
|
||||||
|
after = targets;
|
||||||
|
serviceConfig.ExecStart = "systemctl restart open-fprintd python3-validity";
|
||||||
|
};
|
||||||
|
|
||||||
services."06cb-009a-fingerprint-sensor" = {
|
services."06cb-009a-fingerprint-sensor" = {
|
||||||
enable = true;
|
enable = true;
|
||||||
backend = "python-validity";
|
backend = "python-validity";
|
||||||
calib-data-file = config.modules.fingerprint-fix.calibDataFile;
|
calib-data-file = config.modules.fingerprint-fix.calibDataFile;
|
||||||
};
|
};
|
||||||
|
|
||||||
security.pam.services.su.fprintAuth = true;
|
security.pam.services.su.fprintAuth = true;
|
||||||
security.pam.services.sudo.fprintAuth = true;
|
security.pam.services.sudo.fprintAuth = true;
|
||||||
security.pam.services.login.fprintAuth = true;
|
security.pam.services.login.fprintAuth = true;
|
||||||
security.pam.services.greetd.fprintAuth = true;
|
security.pam.services.greetd.fprintAuth = true;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -1,20 +1,25 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
{
|
{
|
||||||
options.modules.greetd = {
|
options.modules.greetd = {
|
||||||
enable = lib.mkEnableOption "Enable GreetD with TUI-based login.";
|
enable = lib.mkEnableOption "Enable GreetD with TUI-based login.";
|
||||||
command = lib.mkOption {
|
command = lib.mkOption {
|
||||||
type = lib.types.str;
|
type = lib.types.str;
|
||||||
description = "Command to run after successful login";
|
description = "Command to run after successful login";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = lib.mkIf config.modules.greetd.enable {
|
config = lib.mkIf config.modules.greetd.enable {
|
||||||
services.greetd = {
|
services.greetd = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
default_session.command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time --cmd ${config.modules.greetd.Command}";
|
default_session.command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time --cmd ${config.modules.greetd.Command}";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -1,40 +1,48 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
{
|
{
|
||||||
options.modules.nordvpn.enable = lib.mkEnableOption "Whether to enable the NordVPN daemon";
|
options.modules.nordvpn.enable = lib.mkEnableOption "Whether to enable the NordVPN daemon";
|
||||||
|
|
||||||
config = lib.mkIf config.modules.nordvpn.enable (let
|
config = lib.mkIf config.modules.nordvpn.enable (
|
||||||
nordVPN = pkgs.callPackage ../derivations/nordvpn.nix { inherit pkgs lib; };
|
let
|
||||||
preScript = pkgs.writeShellScript "nordvpn-start" ''
|
nordVPN = pkgs.callPackage ../derivations/nordvpn.nix { inherit pkgs lib; };
|
||||||
mkdir -m 700 -p /var/lib/nordvpn;
|
preScript = pkgs.writeShellScript "nordvpn-start" ''
|
||||||
if [ -z "$(ls -A /var/lib/nordvpn)" ]; then
|
mkdir -m 700 -p /var/lib/nordvpn;
|
||||||
cp -r ${nordVPN}/var/lib/nordvpn/* /var/lib/nordvpn;
|
if [ -z "$(ls -A /var/lib/nordvpn)" ]; then
|
||||||
fi
|
cp -r ${nordVPN}/var/lib/nordvpn/* /var/lib/nordvpn;
|
||||||
'';
|
fi
|
||||||
in {
|
'';
|
||||||
networking.firewall.checkReversePath = false;
|
in
|
||||||
networking.firewall.allowedUDPPorts = [ 1194 ];
|
{
|
||||||
networking.firewall.allowedTCPPorts = [ 443 ];
|
networking.firewall.checkReversePath = false;
|
||||||
|
networking.firewall.allowedUDPPorts = [ 1194 ];
|
||||||
|
networking.firewall.allowedTCPPorts = [ 443 ];
|
||||||
|
|
||||||
environment.systemPackages = [ nordVPN ];
|
environment.systemPackages = [ nordVPN ];
|
||||||
users.groups.nordvpn = {};
|
users.groups.nordvpn = { };
|
||||||
|
|
||||||
systemd.services.nordvpn = {
|
systemd.services.nordvpn = {
|
||||||
description = "NordVPN daemon.";
|
description = "NordVPN daemon.";
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
ExecStart = "${nordVPN}/bin/nordvpnd";
|
ExecStart = "${nordVPN}/bin/nordvpnd";
|
||||||
ExecStartPre = preScript;
|
ExecStartPre = preScript;
|
||||||
NonBlocking = true;
|
NonBlocking = true;
|
||||||
KillMode = "process";
|
KillMode = "process";
|
||||||
Restart = "on-failure";
|
Restart = "on-failure";
|
||||||
RestartSec = 5;
|
RestartSec = 5;
|
||||||
RuntimeDirectory = "nordvpn";
|
RuntimeDirectory = "nordvpn";
|
||||||
RuntimeDirectoryMode = "0750";
|
RuntimeDirectoryMode = "0750";
|
||||||
Group = "nordvpn";
|
Group = "nordvpn";
|
||||||
};
|
};
|
||||||
wantedBy = ["multi-user.target"];
|
wantedBy = [ "multi-user.target" ];
|
||||||
after = ["network-online.target"];
|
after = [ "network-online.target" ];
|
||||||
wants = ["network-online.target"];
|
wants = [ "network-online.target" ];
|
||||||
};
|
};
|
||||||
});
|
}
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
@ -1,13 +1,17 @@
|
|||||||
{ config, lib, ... }:
|
{ config, lib, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
options.modules.nvidia.enable = lib.mkEnableOption "Enable NVIDIA kernel and modprobe configurations.";
|
options.modules.nvidia.enable = lib.mkEnableOption "Enable NVIDIA kernel and modprobe configurations.";
|
||||||
|
|
||||||
config = lib.mkIf config.modules.nvidia.enable {
|
config = lib.mkIf config.modules.nvidia.enable {
|
||||||
boot.kernelModules = [ "nvidia" "nvidia_modeset" "nvidia_uvm" "nvidia_drm" ];
|
boot.kernelModules = [
|
||||||
boot.extraModprobeConfig = ''
|
"nvidia"
|
||||||
options nvidia NVreg_OpenRmEnableUnsupportedGpus=1
|
"nvidia_modeset"
|
||||||
'';
|
"nvidia_uvm"
|
||||||
};
|
"nvidia_drm"
|
||||||
|
];
|
||||||
|
boot.extraModprobeConfig = ''
|
||||||
|
options nvidia NVreg_OpenRmEnableUnsupportedGpus=1
|
||||||
|
'';
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,14 +1,20 @@
|
|||||||
{ self, impurity, inputs, ... }: {
|
{
|
||||||
home-manager = {
|
self,
|
||||||
useGlobalPkgs = true;
|
impurity,
|
||||||
useUserPackages = true;
|
inputs,
|
||||||
backupFileExtension = "bak";
|
...
|
||||||
extraSpecialArgs = {
|
}:
|
||||||
inherit inputs self impurity;
|
{
|
||||||
};
|
home-manager = {
|
||||||
|
useGlobalPkgs = true;
|
||||||
|
useUserPackages = true;
|
||||||
|
backupFileExtension = "bak";
|
||||||
|
extraSpecialArgs = {
|
||||||
|
inherit inputs self impurity;
|
||||||
|
};
|
||||||
|
|
||||||
users = {
|
users = {
|
||||||
sadorowo = ./hulk;
|
sadorowo = ./hulk;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -1,24 +1,24 @@
|
|||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
username = "sadorowo";
|
username = "sadorowo";
|
||||||
homeDirectory = "/home/${username}";
|
homeDirectory = "/home/${username}";
|
||||||
in {
|
in
|
||||||
imports = [
|
{
|
||||||
./packages.nix
|
imports = [
|
||||||
./programs.nix
|
./packages.nix
|
||||||
./theme.nix
|
./programs.nix
|
||||||
];
|
./theme.nix
|
||||||
|
];
|
||||||
|
|
||||||
home = {
|
home = {
|
||||||
inherit username homeDirectory;
|
inherit username homeDirectory;
|
||||||
sessionVariables = {
|
sessionVariables = {
|
||||||
NIXOS_OZONE_WL = "1";
|
NIXOS_OZONE_WL = "1";
|
||||||
TZ = "Europe/Warsaw";
|
TZ = "Europe/Warsaw";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.home-manager.enable = true;
|
programs.home-manager.enable = true;
|
||||||
home.stateVersion = "24.11";
|
home.stateVersion = "24.11";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,32 +1,32 @@
|
|||||||
{
|
{
|
||||||
webcopy = ''
|
webcopy = ''
|
||||||
set -l domain (string trim $argv)
|
set -l domain (string trim $argv)
|
||||||
get --recursive \
|
get --recursive \
|
||||||
--level 5 \
|
--level 5 \
|
||||||
--no-clobber \
|
--no-clobber \
|
||||||
--page-requisites \
|
--page-requisites \
|
||||||
--adjust-extension \
|
--adjust-extension \
|
||||||
--span-hosts \
|
--span-hosts \
|
||||||
--convert-links \
|
--convert-links \
|
||||||
--domains $domain \
|
--domains $domain \
|
||||||
--no-parent \
|
--no-parent \
|
||||||
$domain
|
$domain
|
||||||
'';
|
'';
|
||||||
|
|
||||||
venv = ''
|
venv = ''
|
||||||
if [ -d .venv ]; then
|
if [ -d .venv ]; then
|
||||||
source .venv/bin/activate.fish
|
source .venv/bin/activate.fish
|
||||||
else
|
else
|
||||||
python -m venv .venv
|
python -m venv .venv
|
||||||
source .venv/bin/activate.fish
|
source .venv/bin/activate.fish
|
||||||
fi
|
fi
|
||||||
'';
|
'';
|
||||||
|
|
||||||
thunderbird = ''
|
thunderbird = ''
|
||||||
if pgrep -x birdtray > /dev/null
|
if pgrep -x birdtray > /dev/null
|
||||||
birdtray -s
|
birdtray -s
|
||||||
else
|
else
|
||||||
birdtray &
|
birdtray &
|
||||||
end
|
end
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
@ -1,40 +1,45 @@
|
|||||||
{ pkgs, inputs, ... }:
|
{ pkgs, inputs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
pywal pywalfox-native
|
pywal
|
||||||
|
pywalfox-native
|
||||||
|
|
||||||
(python3.withPackages (py: with py; [
|
(python3.withPackages (
|
||||||
pywayland
|
py: with py; [
|
||||||
]))
|
pywayland
|
||||||
|
]
|
||||||
|
))
|
||||||
|
|
||||||
(birdtray.overrideAttrs (_: {
|
(birdtray.overrideAttrs (_: {
|
||||||
cmakeFlags = [ "-DOPT_THUNDERBIRD_CMDLINE=${thunderbird}/bin/thunderbird" ];
|
cmakeFlags = [ "-DOPT_THUNDERBIRD_CMDLINE=${thunderbird}/bin/thunderbird" ];
|
||||||
}))
|
}))
|
||||||
|
|
||||||
jq
|
jq
|
||||||
starship
|
starship
|
||||||
element-desktop
|
element-desktop
|
||||||
firefox-beta-bin
|
firefox-beta-bin
|
||||||
thunderbird-bin
|
thunderbird-bin
|
||||||
youtube-music
|
youtube-music
|
||||||
libreoffice-qt6-fresh
|
libreoffice-qt6-fresh
|
||||||
gimp
|
gimp
|
||||||
vscodium git nodejs postgresql
|
vscodium
|
||||||
fprintd
|
git
|
||||||
cups
|
nodejs
|
||||||
fish
|
postgresql
|
||||||
anydesk
|
fprintd
|
||||||
fastfetch
|
cups
|
||||||
playerctl
|
fish
|
||||||
adwaita-icon-theme
|
anydesk
|
||||||
android-tools
|
fastfetch
|
||||||
filezilla
|
playerctl
|
||||||
bitwarden-desktop
|
adwaita-icon-theme
|
||||||
davinci-resolve
|
android-tools
|
||||||
mpv
|
filezilla
|
||||||
wget
|
bitwarden-desktop
|
||||||
sshfs
|
davinci-resolve
|
||||||
];
|
mpv
|
||||||
|
wget
|
||||||
|
sshfs
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,75 +1,90 @@
|
|||||||
{ inputs, pkgs, ... }:
|
{ inputs, pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
# DEs
|
# DEs
|
||||||
../../modules/desktop-environments/hyprland.nix
|
../../modules/desktop-environments/hyprland.nix
|
||||||
|
|
||||||
# Utilities + apps
|
# Utilities + apps
|
||||||
../../modules/home-manager/darkman.nix
|
../../modules/home-manager/darkman.nix
|
||||||
../../modules/home-manager/fish.nix
|
../../modules/home-manager/fish.nix
|
||||||
|
|
||||||
# Home Manager modules
|
# Home Manager modules
|
||||||
inputs.ags.homeManagerModules.default
|
inputs.ags.homeManagerModules.default
|
||||||
];
|
];
|
||||||
|
|
||||||
modules.hyprland = {
|
modules.hyprland = {
|
||||||
enable = true;
|
enable = true;
|
||||||
additionalPackages = with pkgs; [ hyprshot ];
|
additionalPackages = with pkgs; [ hyprshot ];
|
||||||
plugins = with pkgs.hyprlandPlugins; [ hyprspace ];
|
plugins = with pkgs.hyprlandPlugins; [ hyprspace ];
|
||||||
sourceFiles = [
|
sourceFiles = [
|
||||||
"~/.config/hypr/config/animations.conf"
|
"~/.config/hypr/config/animations.conf"
|
||||||
"~/.config/hypr/config/autostart.conf"
|
"~/.config/hypr/config/autostart.conf"
|
||||||
"~/.config/hypr/config/binds.conf"
|
"~/.config/hypr/config/binds.conf"
|
||||||
"~/.config/hypr/config/io.conf"
|
"~/.config/hypr/config/io.conf"
|
||||||
"~/.config/hypr/config/misc.conf"
|
"~/.config/hypr/config/misc.conf"
|
||||||
"~/.config/hypr/config/rules.conf"
|
"~/.config/hypr/config/rules.conf"
|
||||||
"~/.config/hypr/config/workspaces.conf"
|
"~/.config/hypr/config/workspaces.conf"
|
||||||
];
|
];
|
||||||
|
|
||||||
additionalConfig = {
|
additionalConfig = {
|
||||||
"$terminal" = "alacritty";
|
"$terminal" = "alacritty";
|
||||||
"$fileManager" = "thunar";
|
"$fileManager" = "thunar";
|
||||||
"$browser" = "firefox-beta";
|
"$browser" = "firefox-beta";
|
||||||
"$email" = "thunderbird";
|
"$email" = "thunderbird";
|
||||||
"$shell" = "fish";
|
"$shell" = "fish";
|
||||||
|
|
||||||
"$screenshot_dir" = "$HOME/images/screenshots";
|
"$screenshot_dir" = "$HOME/images/screenshots";
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
modules.darkman = {
|
|
||||||
enable = true;
|
|
||||||
customLightModeScript = "$HOME/.config/hypr/scripts/random-wallpaper.sh";
|
|
||||||
customDarkModeScript = "$HOME/.config/hypr/scripts/random-wallpaper.sh";
|
|
||||||
};
|
};
|
||||||
|
};
|
||||||
modules.fish = {
|
|
||||||
enable = true;
|
|
||||||
enableStarship = true;
|
|
||||||
functions = import ./fish-functions.nix;
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.pywal.enable = true;
|
modules.darkman = {
|
||||||
programs.ags = {
|
enable = true;
|
||||||
enable = true;
|
customLightModeScript = "$HOME/.config/hypr/scripts/random-wallpaper.sh";
|
||||||
extraPackages = with inputs.ags.packages.${pkgs.system}; [
|
customDarkModeScript = "$HOME/.config/hypr/scripts/random-wallpaper.sh";
|
||||||
apps battery bluetooth greet hyprland mpris network notifd powerprofiles tray wireplumber
|
};
|
||||||
] ++ [
|
|
||||||
pkgs.dart-sass pkgs.fzf pkgs.icon-library
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.obs-studio = {
|
modules.fish = {
|
||||||
enable = true;
|
enable = true;
|
||||||
plugins = with pkgs.obs-studio-plugins; [
|
enableStarship = true;
|
||||||
obs-source-clone
|
functions = import ./fish-functions.nix;
|
||||||
obs-pipewire-audio-capture
|
};
|
||||||
#advanced-scene-switcher
|
|
||||||
obs-tuna
|
programs.pywal.enable = true;
|
||||||
obs-move-transition
|
programs.ags = {
|
||||||
waveform
|
enable = true;
|
||||||
wlrobs
|
extraPackages =
|
||||||
];
|
with inputs.ags.packages.${pkgs.system};
|
||||||
};
|
[
|
||||||
|
apps
|
||||||
|
battery
|
||||||
|
bluetooth
|
||||||
|
greet
|
||||||
|
hyprland
|
||||||
|
mpris
|
||||||
|
network
|
||||||
|
notifd
|
||||||
|
powerprofiles
|
||||||
|
tray
|
||||||
|
wireplumber
|
||||||
|
]
|
||||||
|
++ [
|
||||||
|
pkgs.dart-sass
|
||||||
|
pkgs.fzf
|
||||||
|
pkgs.icon-library
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.obs-studio = {
|
||||||
|
enable = true;
|
||||||
|
plugins = with pkgs.obs-studio-plugins; [
|
||||||
|
obs-source-clone
|
||||||
|
obs-pipewire-audio-capture
|
||||||
|
#advanced-scene-switcher
|
||||||
|
obs-tuna
|
||||||
|
obs-move-transition
|
||||||
|
waveform
|
||||||
|
wlrobs
|
||||||
|
];
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
@ -1,37 +1,39 @@
|
|||||||
{ pkgs, inputs, ... }:
|
{ pkgs, inputs, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
nerdfonts = (pkgs.nerdfonts.override {
|
nerdfonts = (
|
||||||
fonts = [
|
pkgs.nerdfonts.override {
|
||||||
"CascadiaCode"
|
fonts = [
|
||||||
"JetBrainsMono"
|
"CascadiaCode"
|
||||||
"FiraCode"
|
"JetBrainsMono"
|
||||||
"SpaceMono"
|
"FiraCode"
|
||||||
];
|
"SpaceMono"
|
||||||
});
|
];
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
cursor-theme = "Bibata-Modern-Classic";
|
cursor-theme = "Bibata-Modern-Classic";
|
||||||
cursor-pkg = pkgs.bibata-cursors;
|
cursor-pkg = pkgs.bibata-cursors;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
home = {
|
home = {
|
||||||
packages = with pkgs; [
|
packages = with pkgs; [
|
||||||
material-symbols
|
material-symbols
|
||||||
noto-fonts
|
noto-fonts
|
||||||
noto-fonts-cjk-sans
|
noto-fonts-cjk-sans
|
||||||
bibata-cursors
|
bibata-cursors
|
||||||
];
|
];
|
||||||
|
|
||||||
sessionVariables = {
|
sessionVariables = {
|
||||||
XCURSOR_THEME = cursor-theme;
|
XCURSOR_THEME = cursor-theme;
|
||||||
XCURSOR_SIZE = "24";
|
XCURSOR_SIZE = "24";
|
||||||
};
|
};
|
||||||
|
|
||||||
pointerCursor = {
|
pointerCursor = {
|
||||||
package = cursor-pkg;
|
package = cursor-pkg;
|
||||||
name = cursor-theme;
|
name = cursor-theme;
|
||||||
size = 24;
|
size = 24;
|
||||||
gtk.enable = true;
|
gtk.enable = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -1,54 +1,57 @@
|
|||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
pythonWithPkgs = pkgs.python3.withPackages (ps: with ps; [
|
pythonWithPkgs = pkgs.python3.withPackages (
|
||||||
ps.pyqt5
|
ps: with ps; [
|
||||||
ps.pyqtwebengine
|
ps.pyqt5
|
||||||
ps.pyusb
|
ps.pyqtwebengine
|
||||||
ps.crcmod
|
ps.pyusb
|
||||||
ps.pyserial
|
ps.crcmod
|
||||||
]);
|
ps.pyserial
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
src = pkgs.fetchFromGitHub {
|
src = pkgs.fetchFromGitHub {
|
||||||
owner = "cedricp";
|
owner = "cedricp";
|
||||||
repo = "ddt4all";
|
repo = "ddt4all";
|
||||||
rev = "v3.0.4";
|
rev = "v3.0.4";
|
||||||
sha256 = "sha256-SswaqV2UabVjuNeMTd7K3Vxa77LZKCb/qkgidkaE0R8=";
|
sha256 = "sha256-SswaqV2UabVjuNeMTd7K3Vxa77LZKCb/qkgidkaE0R8=";
|
||||||
};
|
};
|
||||||
in pkgs.mkShell {
|
in
|
||||||
name = "ddt4all-env";
|
pkgs.mkShell {
|
||||||
|
name = "ddt4all-env";
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
pythonWithPkgs
|
pythonWithPkgs
|
||||||
src
|
src
|
||||||
pkgs.qt5.qtbase
|
pkgs.qt5.qtbase
|
||||||
pkgs.qt5.qttools
|
pkgs.qt5.qttools
|
||||||
pkgs.git
|
pkgs.git
|
||||||
pkgs.freetype
|
pkgs.freetype
|
||||||
pkgs.libGL
|
pkgs.libGL
|
||||||
pkgs.dbus
|
pkgs.dbus
|
||||||
pkgs.xorg.libX11
|
pkgs.xorg.libX11
|
||||||
pkgs.xorg.libXcomposite
|
pkgs.xorg.libXcomposite
|
||||||
pkgs.xorg.libXdamage
|
pkgs.xorg.libXdamage
|
||||||
pkgs.xorg.libXfixes
|
pkgs.xorg.libXfixes
|
||||||
pkgs.xorg.libXrender
|
pkgs.xorg.libXrender
|
||||||
pkgs.xorg.libXrandr
|
pkgs.xorg.libXrandr
|
||||||
pkgs.xorg.libXtst
|
pkgs.xorg.libXtst
|
||||||
pkgs.glib
|
pkgs.glib
|
||||||
pkgs.expat
|
pkgs.expat
|
||||||
pkgs.fontconfig
|
pkgs.fontconfig
|
||||||
];
|
];
|
||||||
|
|
||||||
nativeBuildInputs = [ pkgs.libsForQt5.qt5.wrapQtAppsHook ];
|
nativeBuildInputs = [ pkgs.libsForQt5.qt5.wrapQtAppsHook ];
|
||||||
|
|
||||||
shellHook = ''
|
shellHook = ''
|
||||||
mkdir -p $HOME/DDT4ALL
|
mkdir -p $HOME/DDT4ALL
|
||||||
cp -r $src/bin/* $HOME/DDT4ALL
|
cp -r $src/bin/* $HOME/DDT4ALL
|
||||||
|
|
||||||
cd $HOME/DDT4ALL
|
cd $HOME/DDT4ALL
|
||||||
wrapQtAppsHook
|
wrapQtAppsHook
|
||||||
|
|
||||||
python main.py
|
python main.py
|
||||||
#exit
|
#exit
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user