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