Containers and Refinements Oh my

This commit is contained in:
wayne 2024-11-01 09:04:24 -07:00
parent a3d810723c
commit b7006e904d
45 changed files with 1454 additions and 407 deletions

View File

@ -1,4 +1,5 @@
{ lib, config, pkgs, zen-browser, hyprland, inputs, ... }: # NixOS's declarative configuration calculates which software packages need to be installed and then soft-links the storage paths of these packages in the Nix Store to /run/current-system, and by modifying environment variables like PATH
{ lib, config, pkgs, zen-browser, hyprland, inputs, agenix, ... }:
let let
unstable = import <nixpkgs> { unstable = import <nixpkgs> {
overlays = pkgs.overlays; overlays = pkgs.overlays;
@ -10,11 +11,13 @@ in
./environment.nix ./environment.nix
./hardware-configuration.nix ./hardware-configuration.nix
./modules/containers.nix
./modules/display.nix ./modules/display.nix
./modules/files.nix ./modules/files.nix
./modules/fonts.nix ./modules/fonts.nix
./modules/network.nix ./modules/network.nix
./modules/nix.nix ./modules/nix.nix
# ./modules/qt.nix
./modules/security.nix ./modules/security.nix
./modules/users.nix ./modules/users.nix
./modules/wm.nix ./modules/wm.nix
@ -42,33 +45,33 @@ in
# Enable touchpad support (enabled default in most desktopManager). # Enable touchpad support (enabled default in most desktopManager).
# services.xserver.libinput.enable = true; # services.xserver.libinput.enable = true;
systemd.services.StartInputRemapperDaemonAtLogin = { # systemd.services.StartInputRemapperDaemonAtLogin = {
enable = false; # enable = false;
description = "Start input-remapper daemon after login"; # description = "Start input-remapper daemon after login";
unitConfig = { # unitConfig = {
Type = "simple"; # Type = "simple";
}; # };
script = lib.getExe(pkgs.writeShellApplication { # script = lib.getExe(pkgs.writeShellApplication {
name = "start-input-mapper-daemon"; # name = "start-input-mapper-daemon";
runtimeInputs = with pkgs; [input-remapper procps su]; # runtimeInputs = with pkgs; [input-remapper procps su];
text = '' # text = ''
until pgrep -u wayne; do # until pgrep -u wayne; do
sleep 1 # sleep 1
done # done
sleep 2 # sleep 2
until [ $(pgrep -c -u root "input-remapper") -eq 4 ]; do # until [ $(pgrep -c -u root "input-remapper") -eq 4 ]; do
input-remapper-service& # input-remapper-service&
sleep 1 # sleep 1
input-remapper-helper& # input-remapper-helper&
sleep 1 # sleep 1
done # done
su wayne -c "input-remapper-control --command stop-all" # su wayne -c "input-remapper-control --command stop-all"
su wayne -c "input-remapper-control --command autoload" # su wayne -c "input-remapper-control --command autoload"
sleep infinity # sleep infinity
''; # '';
}); # });
wantedBy = [ "default.target" ]; # wantedBy = [ "default.target" ];
}; # };
# Possible weird bug # Possible weird bug
# systemd.services.ReloadInputRemapperAfterSleep = { # systemd.services.ReloadInputRemapperAfterSleep = {
@ -107,7 +110,8 @@ in
# ]; # ];
virtualisation.docker = { virtualisation.docker = {
enable = true; enable = false;
enableNvidia = true;
rootless = { rootless = {
enable = true; enable = true;
setSocketVariable = true; setSocketVariable = true;
@ -155,7 +159,7 @@ in
# }; # };
# }; # };
# }; # };
avahi = { avahi = { # Printing
enable = true; enable = true;
nssmdns4 = true; nssmdns4 = true;
openFirewall = true; openFirewall = true;
@ -172,33 +176,54 @@ in
# no need to redefine it in your config for now) # no need to redefine it in your config for now)
#media-session.enable = true; #media-session.enable = true;
}; };
hardware.openrgb = {
enable = true;
package = pkgs.openrgb-with-all-plugins;
motherboard = "intel";
server.port = 6742;
};
}; };
# List packages installed in system profile. To search, run: # List packages installed in system profile. To search, run:
# $ nix search wget # $ nix search wget
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
(pkgs.catppuccin-sddm.override {
flavor = "mocha";
font = "Noto Sans";
fontSize = "9";
background = "${/home/wayne/Pictures/marvin.png}";
loginBackground = true;
# clockEnabled = true;
})
vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default. vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
wget git sshfs wget git sshfs
pciutils pciutils
zsh zsh
cryptsetup cryptsetup agenix.packages.x86_64-linux.default
home-manager home-manager
wpa_supplicant wpa_supplicant
lynx lynx
nix-index nix-prefetch-scripts nix-prefetch nix-index nix-prefetch-scripts nix-prefetch
docker_27 docker-compose docker_27 docker-compose
direnv nix-direnv # direnv nix-direnv
# xdg-desktop-portal-hyprland # xdg-desktop-portal-hyprland
clinfo glxinfo vulkan-tools wayland-utils wl-clipboard clinfo glxinfo vulkan-tools wayland-utils wl-clipboard
kdePackages.kdeplasma-addons kdePackages.qtstyleplugin-kvantum kdePackages.full kdePackages.qtwebengine kdePackages.qtpositioning kdePackages.qtlocation kdePackages.kdeplasma-addons kdePackages.qtstyleplugin-kvantum kdePackages.full kdePackages.qtwebengine kdePackages.qtpositioning kdePackages.qtlocation
kdePackages.ark plasma5Packages.kwallet-pam kdePackages.dolphin kdePackages.kwallet kdePackages.kwalletmanager kdePackages.konsole kdePackages.ark plasma5Packages.kwallet-pam kdePackages.dolphin kdePackages.kwallet kdePackages.kwalletmanager kdePackages.konsole
evtest input-remapper dbus uwsm # keyd evtest input-remapper dbus uwsm # keyd
egl-wayland
cudaPackages.cudatoolkit # cudaPackages.cuda-samples cudaPackages.cudatoolkit # cudaPackages.cuda-samples
cifs-utils mesa libGL udiskie cifs-utils mesa libGL udiskie
libsForQt5.qtstyleplugin-kvantum
catppuccin-sddm-corners
# steam-run # steam-run
lxqt.pavucontrol-qt
openrgb-with-all-plugins i2c-tools
android-udev-rules
]; ];
system.stateVersion = "24.05"; # Did you read the comment? system.stateVersion = "24.05"; # Did you read the comment?
} }

View File

@ -18,6 +18,37 @@
LC_TIME = "en_US.UTF-8"; LC_TIME = "en_US.UTF-8";
}; };
environment.sessionVariables.NIXOS_OZONE_WL = "1"; environment.pathsToLink = [ "/share/bash-completion" ];
environment.sessionVariables.SDDM_INITIAL_VT = "VT 7"; environment.sessionVariables = rec {
NIXOS_OZONE_WL = "1";
# SDDM_INITIAL_VT = "VT 7";
# https://discourse.nixos.org/t/guide-to-installing-qt-theme/35523/3
XDG_CURRENT_DESKTOP = "Hyprland";
XDG_SESSION_DESKTOP = "Hyprland";
XDG_SESSION_TYPE = "wayland";
XDG_DATA_HOME = "$HOME/.local/share";
GDK_BACKEND = "wayland";
GTK_USE_PORTAL = "1";
QT_QPA_PLATFORM = "wayland;xcb";
QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
QT_AUTO_SCREEN_SCALE_FACTOR = "1";
QT_SCALE_FACTOR_ROUNDING_POLICY = "RoundPreferFloor";
MOZ_ENABLE_WAYLAND = "1";
OZONE_PLATFORM = "wayland";
ELECTRON_OZONE_PLATFORM_HINT = "wayland";
APPIMAGELAUNCHER_DISABLE ="1";
CLUTTER_BACKEND = "wayland";
SDL_VIDEODRIVER = "wayland";
LIBVA_DRIVER_NAME = "nvidia";
# Replaces EGLStreams
GBM_BACKEND = "nvidia-drm";
__GLX_VENDOR_LIBRARY_NAME = "nvidia";
# QT_LOGGING_RULES="*.debug=true";
};
} }

132
flake.lock generated
View File

@ -1,5 +1,26 @@
{ {
"nodes": { "nodes": {
"agenix": {
"inputs": {
"darwin": "darwin",
"home-manager": "home-manager",
"nixpkgs": "nixpkgs",
"systems": "systems"
},
"locked": {
"lastModified": 1723293904,
"narHash": "sha256-b+uqzj+Wa6xgMS9aNbX4I+sXeb5biPDi39VgvSFqFvU=",
"owner": "ryantm",
"repo": "agenix",
"rev": "f6291c5935fdc4e0bef208cfc0dcab7e3f7a1c41",
"type": "github"
},
"original": {
"owner": "ryantm",
"repo": "agenix",
"type": "github"
}
},
"base16": { "base16": {
"inputs": { "inputs": {
"fromYaml": "fromYaml" "fromYaml": "fromYaml"
@ -50,6 +71,28 @@
"type": "github" "type": "github"
} }
}, },
"darwin": {
"inputs": {
"nixpkgs": [
"agenix",
"nixpkgs"
]
},
"locked": {
"lastModified": 1700795494,
"narHash": "sha256-gzGLZSiOhf155FW7262kdHo2YDeugp3VuIFb4/GGng0=",
"owner": "lnl7",
"repo": "nix-darwin",
"rev": "4b9b83d5a92e8c1fbfd8eb27eda375908c11ec4d",
"type": "github"
},
"original": {
"owner": "lnl7",
"ref": "master",
"repo": "nix-darwin",
"type": "github"
}
},
"flake-compat": { "flake-compat": {
"flake": false, "flake": false,
"locked": { "locked": {
@ -68,7 +111,7 @@
}, },
"flake-utils": { "flake-utils": {
"inputs": { "inputs": {
"systems": "systems" "systems": "systems_2"
}, },
"locked": { "locked": {
"lastModified": 1726560853, "lastModified": 1726560853,
@ -101,6 +144,27 @@
} }
}, },
"home-manager": { "home-manager": {
"inputs": {
"nixpkgs": [
"agenix",
"nixpkgs"
]
},
"locked": {
"lastModified": 1703113217,
"narHash": "sha256-7ulcXOk63TIT2lVDSExj7XzFx09LpdSAPtvgtM7yQPE=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "3bfaacf46133c037bb356193bd2f1765d9dc82c1",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "home-manager",
"type": "github"
}
},
"home-manager_2": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"
@ -157,16 +221,16 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1728740863, "lastModified": 1703013332,
"narHash": "sha256-u+rxA79a0lyhG+u+oPBRtTDtzz8kvkc9a6SWSt9ekVc=", "narHash": "sha256-+tFNwMvlXLbJZXiMHqYq77z/RfmpfpiI3yjL6o/Zo9M=",
"owner": "nixos", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "a3f9ad65a0bf298ed5847629a57808b97e6e8077", "rev": "54aac082a4d9bb5bbc5c4e899603abfb76a3f6d6",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nixos", "owner": "NixOS",
"ref": "nixos-24.05", "ref": "nixos-unstable",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }
@ -204,11 +268,27 @@
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1727348695, "lastModified": 1728740863,
"narHash": "sha256-J+PeFKSDV+pHL7ukkfpVzCOO7mBSrrpJ3svwBFABbhI=", "narHash": "sha256-u+rxA79a0lyhG+u+oPBRtTDtzz8kvkc9a6SWSt9ekVc=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "1925c603f17fc89f4c8f6bf6f631a802ad85d784", "rev": "a3f9ad65a0bf298ed5847629a57808b97e6e8077",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-24.05",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_3": {
"locked": {
"lastModified": 1730200266,
"narHash": "sha256-l253w0XMT8nWHGXuXqyiIC/bMvh1VRszGXgdpQlfhvU=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "807e9154dcb16384b1b765ebe9cd2bba2ac287fd",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -220,14 +300,15 @@
}, },
"root": { "root": {
"inputs": { "inputs": {
"agenix": "agenix",
"base16": "base16", "base16": "base16",
"base16-vim": "base16-vim", "base16-vim": "base16-vim",
"flake-compat": "flake-compat", "flake-compat": "flake-compat",
"flake-utils": "flake-utils", "flake-utils": "flake-utils",
"home-manager": "home-manager", "home-manager": "home-manager_2",
"legacy": "legacy", "legacy": "legacy",
"nix-colors": "nix-colors", "nix-colors": "nix-colors",
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs_2",
"nixpkgs-unstable": "nixpkgs-unstable", "nixpkgs-unstable": "nixpkgs-unstable",
"tt-schemes": "tt-schemes", "tt-schemes": "tt-schemes",
"zen-browser": "zen-browser" "zen-browser": "zen-browser"
@ -248,6 +329,21 @@
"type": "github" "type": "github"
} }
}, },
"systems_2": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"tt-schemes": { "tt-schemes": {
"flake": false, "flake": false,
"locked": { "locked": {
@ -266,18 +362,18 @@
}, },
"zen-browser": { "zen-browser": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs_2" "nixpkgs": "nixpkgs_3"
}, },
"locked": { "locked": {
"lastModified": 1728598925, "lastModified": 1730444716,
"narHash": "sha256-WW8VBIsNd4ABwe0sOWAfEttFm9j4Bzq/Eu+CsYT5pKU=", "narHash": "sha256-WtqSpYQyG5ad+GK7B0ViDSl0NolHp7yM24TacUslBXE=",
"owner": "mastermines1", "owner": "ch4og",
"repo": "zen-browser-flake", "repo": "zen-browser-flake",
"rev": "b4290ee06022931de610817c13f324b82b9f2afc", "rev": "d3c639ee7bff20f799f443e18fffa6331a71cd3a",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "mastermines1", "owner": "ch4og",
"repo": "zen-browser-flake", "repo": "zen-browser-flake",
"type": "github" "type": "github"
} }

View File

@ -31,7 +31,8 @@
# Zen Browser # Zen Browser
# zen-browser.url = "github:MarceColl/zen-browser-flake"; # zen-browser.url = "github:MarceColl/zen-browser-flake";
zen-browser.url = "github:mastermines1/zen-browser-flake"; # zen-browser.url = "github:mastermines1/zen-browser-flake";
zen-browser.url = "github:ch4og/zen-browser-flake";
# hyprland.url = "git+https://github.com/hyprwm/Hyprland?submodules=1"; # hyprland.url = "git+https://github.com/hyprwm/Hyprland?submodules=1";
# hyprland.url = "github:hyprwm/Hyprland"; # hyprland.url = "github:hyprwm/Hyprland";
@ -42,9 +43,10 @@
# url = "git+https://github.com/kmonad/kmonad?submodules=1&dir=nix"; # url = "git+https://github.com/kmonad/kmonad?submodules=1&dir=nix";
# inputs.nixpkgs.follows = "nixpkgs"; # inputs.nixpkgs.follows = "nixpkgs";
# }; # };
agenix.url = "github:ryantm/agenix";
}; };
outputs = { self, nixpkgs, legacy, home-manager, flake-utils, flake-compat, zen-browser, nix-colors, base16, ... } @ inputs: outputs = { self, nixpkgs, legacy, home-manager, flake-utils, flake-compat, zen-browser, nix-colors, base16, agenix, ... } @ inputs:
let let
inherit (self) outputs; inherit (self) outputs;
lib = nixpkgs.lib; # Import lib here explicitly from nixpkgs lib = nixpkgs.lib; # Import lib here explicitly from nixpkgs
@ -79,10 +81,11 @@
nixosConfigurations = { nixosConfigurations = {
launchpad = nixpkgs.lib.nixosSystem { launchpad = nixpkgs.lib.nixosSystem {
specialArgs = {inherit inputs outputs systemSettings userSettings lib ;}; specialArgs = {inherit inputs outputs systemSettings userSettings lib agenix ;};
modules = [ modules = [
# kmonad.nixosModules.default # kmonad.nixosModules.default
./configuration.nix ./configuration.nix
agenix.nixosModules.default
]; ];
}; };
}; };
@ -99,6 +102,7 @@
# import `theming.nix`, we will write it in the next, final, step # import `theming.nix`, we will write it in the next, final, step
# ./theming.nix # ./theming.nix
./hm/home.nix ./hm/home.nix
]; ];
}; };
}; };

5
flakes/calxyos/shell.nix Normal file
View File

@ -0,0 +1,5 @@
{ pkgs ? import <nixpkgs> {} }:
(pkgs.buildFHSUserEnv {
name = "calyxos-device-flashing";
}).env

View File

@ -9,11 +9,23 @@
]; ];
# Bootloader. # Bootloader.
boot.loader.systemd-boot.enable = true; # boot.loader.systemd-boot.enable = true; Disabled for Grub
boot.loader.efi.canTouchEfiVariables = true; boot.loader = {
efi.canTouchEfiVariables = true;
grub = {
enable = true;
devices = [ "nodev" ];
efiSupport = true;
useOSProber = true;
# extraConfig = ''
# set gfxmode=3840x2160
# set gfxpayload=keep
# '';
};
};
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ]; boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ ]; boot.initrd.kernelModules = [ "i2c-dev" "i2c-piix4" ];
boot.kernelModules = [ "kvm-intel" ]; boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];

View File

@ -1,6 +1,9 @@
# Last stable generation 359 10/13/24 # Last stable generation 359 10/13/24
# home-manager works by soft-linking the software packages configured by the user to /etc/profiles/per-user/your-username and modifying environment variables like PATH to point to this path, thus installing user software packages.
{ inputs, outputs, lib, config, pkgs, systemSettings, userSettings, zen-browser, hyprland, nix-colors, ... }: { inputs, outputs, lib, config, pkgs, systemSettings, userSettings, zen-browser, hyprland, nix-colors, ... }:
let let
system = "x86_64-linux";
myAliases = { myAliases = {
# Sysadmin # Sysadmin
ll = "ls -alF"; ll = "ls -alF";
@ -12,6 +15,10 @@ let
update = "sudo apt update && sudo apt upgrade -y && sudo apt autoremove -y"; update = "sudo apt update && sudo apt upgrade -y && sudo apt autoremove -y";
listServices = "systemctl list-units --all --type=service --no-pager"; listServices = "systemctl list-units --all --type=service --no-pager";
listUserServices = "systemctl list-units --all --type=service --no-pager --user"; listUserServices = "systemctl list-units --all --type=service --no-pager --user";
listGenerations = "sudo nix-env -p /nix/var/nix/profiles/system --list-generations";
switchGenerations = "nix-env --switch-generation $1";
nixClean = "nix-env -e '*'";
takeOutTrash = "nix-collect-garbage --delete-older-than $1";
ls = "eza --icons -l -T -L=1"; ls = "eza --icons -l -T -L=1";
cat = "bat"; cat = "bat";
@ -27,7 +34,10 @@ let
updateChannel="nix-channel --update nixos"; updateChannel="nix-channel --update nixos";
nixOptimize="nix-store --optimise"; nixOptimize="nix-store --optimise";
mkhome="cd ~/system && home-manager switch --flake ."; mkhome="cd ~/system && home-manager switch --flake .";
buildsys="cd ~/system && sudo nixos-rebuild switch --flake '.#'"; buildsys="cd ~/system && sudo nixos-rebuild switch --flake \\'.#\\'";
get256="nix-prefetch-url --type sha256 $1";
remapKeys="input-remapper-control --command autoload";
# Zoxide # Zoxide
# cd="z"; # cd="z";
@ -74,31 +84,40 @@ let
# propogateBuildInputs = with pkgs.python311Packages; []; # propogateBuildInputs = with pkgs.python311Packages; [];
# }; # };
polycat = pkgs.callPackage ../pkgs/derivations/polycat {}; unstablePkgs = import (
fetchTarball {
url = "https://github.com/NixOS/nixpkgs/archive/nixos-unstable.tar.gz";
sha256 = "0p3ry8x72cl572fs1c47h9y3s045p4aq71wpblzdi4dfqx3z2i7m";
})
{
# config = config.nixpkgs.config;
inherit system;
};
in in
{ {
imports = [ imports = [
./hypr.nix (import ./modules/hypr.nix { inherit pkgs config lib; })
./xdg.nix (import ./modules/theme.nix { inherit pkgs unstablePkgs; })
./wayland.nix ./modules/wayland.nix
./modules/xdg.nix
(import ../pkgs/shell/stow.nix { pkgs = pkgs; lib = lib; config = config; }) (import ../pkgs/shell/stow.nix { inherit pkgs lib config; })
(import ../pkgs/shell/cli-collection.nix { pkgs = pkgs; }) (import ../pkgs/shell/cli-collection.nix { inherit pkgs; })
(import ../pkgs/shell/sh.nix { inherit myAliases; pkgs = pkgs;}) (import ../pkgs/shell/bash.nix { inherit pkgs config myAliases; })
(import ../pkgs/shell/zsh.nix { inherit myAliases; pkgs = pkgs;}) (import ../pkgs/shell/sh.nix { inherit myAliases pkgs;})
(import ../pkgs/git/git.nix { inherit userSettings; pkgs = pkgs; }) (import ../pkgs/shell/zsh.nix { inherit myAliases pkgs;})
(import ../pkgs/app/terminal/tmux.nix { pkgs = pkgs; lib = lib; config = config; }) (import ../pkgs/git/git.nix { inherit userSettings pkgs; })
(import ../pkgs/app/terminal/kitty.nix { pkgs = pkgs; lib = lib; nix-colors = nix-colors; config = config; }) (import ../pkgs/app/terminal/tmux.nix { inherit pkgs lib config; })
(import ../pkgs/app/terminal/kitty.nix { inherit pkgs lib nix-colors config; })
# (import ../pkgs/app/terminal/starship.nix { pkgs = pkgs; }) # (import ../pkgs/app/terminal/starship.nix { pkgs = pkgs; })
(import ../pkgs/app/terminal/parrot-starship.nix { pkgs = pkgs; }) (import ../pkgs/app/terminal/parrot-starship.nix { inherit pkgs; })
(import ../pkgs/app/terminal/yazi.nix { pkgs = pkgs; }) (import ../pkgs/app/terminal/yazi.nix { inherit pkgs; })
(import ../pkgs/lang/cc/cc.nix { pkgs = pkgs; }) (import ../pkgs/lang/cc/cc.nix { inherit pkgs; })
# (import ../pkgs/lang/python/python.nix { pkgs = pkgs; }) # (import ../pkgs/lang/python/python.nix { pkgs = pkgs; })
# (import ../pkgs/lang/python/python-packages.nix { pkgs = pkgs; }) # (import ../pkgs/lang/python/python-packages.nix { pkgs = pkgs; })
# (import ../pkgs/app/editor/nvim.nix { pkgs = pkgs; }) # (import ../pkgs/app/editor/nvim.nix { pkgs = pkgs; })
# (import ../pkgs/app/terminal/alacritty.nix { pkgs = pkgs; }) # (import ../pkgs/app/terminal/alacritty.nix { pkgs = pkgs; })
(import ../pkgs/app/audio/mopidy.nix { pkgs = pkgs; }) (import ../pkgs/app/audio/mopidy.nix { inherit pkgs; })
]; ];
nixpkgs = { nixpkgs = {
@ -113,6 +132,8 @@ in
username = "${userSettings.username}"; username = "${userSettings.username}";
homeDirectory = "/home/${userSettings.username}"; homeDirectory = "/home/${userSettings.username}";
sessionVariables = { sessionVariables = {
EDITOR = userSettings.editor;
TERM = userSettings.term;
PYTHONPATH = "${pkgs.mopidy}/lib/python3.11/site-packages:${pkgs.mopidy-tidal}/lib/python3.11/site-packages:${pkgs.mopidy-musicbox-webclient}/lib/python3.11/site-packages"; PYTHONPATH = "${pkgs.mopidy}/lib/python3.11/site-packages:${pkgs.mopidy-tidal}/lib/python3.11/site-packages:${pkgs.mopidy-musicbox-webclient}/lib/python3.11/site-packages";
}; };
}; };
@ -120,62 +141,21 @@ in
# colorScheme = nix-colors.colorSchemes.nord; # colorScheme = nix-colors.colorSchemes.nord;
home.packages = with pkgs; [ home.packages = with pkgs; [
(python3.withPackages (ps: with ps; [
pip pynvim # mopidy-tidal # Mopidy-WebSettings
]))
# mopidy mopidy-tidal mopidy-musicbox-webclient gst_all_1.gstreamer gst_all_1.gst-plugins-bad
# Core
zsh bash git stow tmux tmuxPlugins.tmux-fzf zsh bash git stow tmux tmuxPlugins.tmux-fzf
vim neovim lunarvim # vimPlugins.vim-kitty-navigator vim neovim lunarvim # vimPlugins.vim-kitty-navigator
zoxide # vimPlugins.telescope-zoxide vimPlugins.zoxide-vim zoxide # vimPlugins.telescope-zoxide vimPlugins.zoxide-vim
bottom htop jq bottom htop jq
# Lunarvim Dependencies
gnumake42 nodejs_22 cargo ripgrep cmake
starship starship
yazi mapscii tidal-dl yazi
# IDE's
sublime3 vscode # vscode.languages.web vscode.languages.python vscode.languages.nix vscode.languages.bash
typora obsidian obsidian-export # vimPlugins.obsidian-nvim
appimage-run appimage-run
# studio
krita inkscape blender gimp-with-plugins
reaper
# System/Rescue
ddrescue gparted
nerdfonts ubuntu_font_family nerdfonts ubuntu_font_family
# openrgb-with-all-plugins
# Cloud/Remote
restic
nextcloud-client
keepassxc git-credential-keepassxc keybase-gui keybase kbfs
remmina
# Browsers
firefox-devedition w3m ungoogled-chromium librewolf
# https://github.com/MarceColl/zen-browser-flake/tree/master
zen-browser.packages."${system}".default
mailspring betterbird doublecmd
doublecmd
# pentablet-flake # pentablet-flake
libreoffice libreoffice
bottles-unwrapped
] ++ (import ./pkgs { inherit unstablePkgs pkgs system zen-browser; });
wdisplays
waybar hyprpaper hyprlock hypridle wlogout rofi-wayland wev clipman cliphist wl-clip-persist wl-clipboard
polycat qt5.qtwayland qt6.qtwayland qt5ct qt6ct hyprshot hyprpicker dconf wayland-utils wayland-protocols qalculate-qt
blueman networkmanagerapplet swayosd wlr-randr
base16-schemes base16-shell-preview
# hyprcursor nordzy-icon-theme
# LLM's
# lmstudio
];
programs = { programs = {
home-manager.enable = true; home-manager.enable = true;
@ -210,11 +190,6 @@ in
}; };
}; };
home.sessionVariables = {
EDITOR = userSettings.editor;
TERM = userSettings.term;
};
news.display = "silent"; news.display = "silent";
systemd.user.startServices = "sd-switch"; systemd.user.startServices = "sd-switch";

View File

@ -1,92 +0,0 @@
{ pkgs, config, lib, ... }:
{
programs.hyprlock.enable = true;
services.hypridle = {
enable = true;
settings = {
# $lock_cmd = pidof hyprlock || hyprlock
# $suspend_cmd = pidof steam || systemctl suspend || loginctl suspend # fuck nvidia
general = {
lock_cmd = "pidof hyprlock || hyprlock";
before_sleep_cmd = "loginctl lock-session";
};
listener = [
{
timeout = 5400;
on-timeout = "loginctl lock-session";
}
{
timeout = 7200;
on-timeout = "hyprctl dispatch dpms off";
on-resume = "hyprctl dispatch dpms on";
}
{
timeout = 10800;
on-timeout = "pidof steam || systemctl suspend || loginctl suspend";
}
];
};
};
programs.wlogout = {
enable = true;
layout = [
{
label = "lock";
action = "loginctl lock-session";
text = "Lock";
keybind = "l";
circular = false;
}
{
label = "hibernate";
action = "systemctl hibernate";
text = "Hibernate";
keybind = "h";
circular = false;
}
{
label = "logout";
action = "hyprctl dispatch exit";
text = "Logout";
keybind = "e";
circular = false;
}
{
label = "shutdown";
action = "systemctl poweroff";
text = "Shutdown";
keybind = "s";
circular = false;
}
{
label = "suspend";
action = "systemctl suspend";
text = "Suspend";
keybind = "u";
circular = false;
}
{
label = "reboot";
action = "systemctl reboot";
text = "Reboot";
keybind = "r";
circular = false;
}
];
};
services.swayosd = {
enable = true;
display = "DP-4";
};
services.mako.enable = true;
imports = [
(import ../pkgs/wm/hyprland/hyprland.nix { pkgs = pkgs; })
(import ../pkgs/wm/waybar/waybar.nix { inherit config; pkgs = pkgs; })
(import ../pkgs/wm/mako/mako.nix { config = config; pkgs = pkgs; lib=lib; })
];
}

273
hm/modules/hypr.nix Normal file
View File

@ -0,0 +1,273 @@
{ pkgs, config, lib, ... }:
{
programs.hyprlock = {
enable = true;
# settings = {
# text_color = "rgba(FFFFFFFF)";
# entry_background_color = "rgba(33333311)";
# entry_border_color = "rgba(3B3B3B55)";
# entry_color = "rgba(FFFFFFFF)";
# font_family = "Rubik Light";
# font_family_clock = "Rubik Light";
# font_material_symbols = "Material Symbols Rounded";
# background = {
# # color = r"gba(0D0D17FF)";
# color = "rgba(000000FF)";
# # path = "{{ SWWW_WALL }}";
# path = "${config.home.homeDirectory}/.local/share/wallpapers/northern-lights-arctic-circle-norway-07.jpg";
# blur_size = 5;
# blur_passes = 4;
# };
# input-field = {
# monitor = "";
# size = "250, 50";
# outline_thickness = 2;
# dots_size = 0.1;
# dots_spacing = 0.3;
# outer_color = "${entry_border_color}";
# inner_color = "${entry_background_color}";
# font_color = "${entry_color}";
# # fade_on_empty = true,\;
# position = "0, 20";
# halign = "center";
# valign = "center";
# };
# label = { # Clock
# monitor = "";
# text = "${TIME12}";
# shadow_passes = 1;
# shadow_boost = 0.5;
# color = "${text_color}";
# font_size = 65;
# font_family = "${font_family_clock}";
# position = "0, 300";
# halign = "center";
# valign = "center";
# };
# label = { # Greeting
# monitor = "";
# text = "hi $USER !!!";
# shadow_passes = 1;
# shadow_boost = 0.5;
# color = "$[text_color]";
# font_size = 20;
# font_family = "${font_family}";
# position = "0, 240";
# halign = "center";
# valign = "center";
# };
# label = { # lock icon
# monitor = "";
# text = "lock";
# shadow_passes = 1;
# shadow_boost = 0.5;
# color = "${text_color}";
# font_size = 21;
# font_family = "${font_material_symbols}";
# position = "0, 65";
# halign = "center";
# valign = "bottom";
# };
# label = { # "locked" text
# monitor = "";
# text = "locked";
# shadow_passes = 1;
# shadow_boost = 0.5;
# color = "${text_color}";
# font_size = 14;
# font_family = "${font_family}";
# position = "0, 45";
# halign = "center";
# valign = "bottom";
# };
# label = { # Status
# monitor = "";
# text = "";
# shadow_passes = 1;
# shadow_boost = 0.5;
# color = "${text_color}";
# font_size = 14;
# font_family = "${font_family}";
# position = "30, -30";
# halign = "left";
# valign = "top";
# };
# };
};
services.hypridle = {
enable = true;
settings = {
# $lock_cmd = pidof hyprlock || hyprlock
# $suspend_cmd = pidof steam || systemctl suspend || loginctl suspend # fuck nvidia
general = {
lock_cmd = "pidof hyprlock || hyprlock";
before_sleep_cmd = "loginctl lock-session";
};
listener = [
{
timeout = 5400;
on-timeout = "loginctl lock-session";
}
{
timeout = 7200;
on-timeout = "hyprctl dispatch dpms off";
on-resume = "hyprctl dispatch dpms on";
}
{
timeout = 10800;
on-timeout = "pidof steam || systemctl suspend || loginctl suspend";
}
];
};
};
services.hyprpaper = {
enable = true;
settings = {
splash = true;
preload = [
"${config.home.homeDirectory}/Pictures/bg-left.png"
"${config.home.homeDirectory}/Pictures/bg-center.png"
"${config.home.homeDirectory}/Pictures/bg-right.png"
"${config.home.homeDirectory}/.local/share/wallpapers/Nordic-mountain-wallpaper.jpg"
"${config.home.homeDirectory}/.local/share/wallpapers/Nordic-mountain.jpg"
"${config.home.homeDirectory}/.local/share/wallpapers/northern-lights-arctic-circle-norway-07.jpg"
"${config.home.homeDirectory}/.local/share/wallpapers/canoe-3840x2160-scandinavia-europe-5k-18949.jpg"
];
wallpaper = [
"DP-3,~/.local/share/wallpapers/Nordic-mountain-wallpaper.jpg"
"DP-5,~/.local/share/wallpapers/northern-lights-arctic-circle-norway-07.jpg"
"DP-6,~/.local/share/wallpapers/canoe-3840x2160-scandinavia-europe-5k-18949.jpg"
];
};
};
programs.wlogout = {
enable = true;
layout = [
{
label = "lock";
action = "pkill hyprlock && loginctl lock-session";
text = "Lock";
keybind = "l";
circular = false;
}
{
label = "hibernate";
action = "systemctl hibernate";
text = "Hibernate";
keybind = "h";
circular = false;
}
{
label = "logout";
action = "loginctl terminate-user $USER";
text = "Logout";
keybind = "e";
circular = false;
}
{
label = "shutdown";
action = "systemctl poweroff";
text = "Shutdown";
keybind = "s";
circular = false;
}
{
label = "suspend";
action = "systemctl suspend";
text = "Suspend";
keybind = "u";
circular = false;
}
{
label = "reboot";
action = "systemctl reboot";
text = "Reboot";
keybind = "r";
circular = false;
}
];
style = ''
* {
background-image: none;
}
window {
background: #4C566A;
}
button {
color: #D8DEE9;
font-size: 16px;
background-color: #81A1C1;
border-style: none;
background-repeat: no-repeat;
background-position: center;
background-size: 35%;
border-radius:30px;
margin: 182px 5px;
text-shadow: 0px 0px;
box-shadow: 0px 0px;
}
button:focus, button:active, button:hover {
color: #ECEFF4;
background-color: #5E81AC;
outline-style: none;
}
#lock {
background-image: image(url("${config.home.homeDirectory}/.local/share/wlogout/lock.svg"));
}
#logout {
background-image: image(url("${config.home.homeDirectory}/.local/share/wlogout/logout.svg"));
}
#suspend {
background-image: image(url("${config.home.homeDirectory}/.local/share/wlogout/suspend.svg"));
}
#hibernate {
background-image: image(url("${config.home.homeDirectory}/.local/share/wlogout/hibernate.svg"));
}
#shutdown {
background-image: image(url("${config.home.homeDirectory}/.local/share/wlogout/shutdown.svg"));
}
#reboot {
background-image: image(url("${config.home.homeDirectory}/.local/share/wlogout/reboot.svg"));
}
'';
};
services.swayosd = {
enable = true;
display = "DP-4";
};
services.mako.enable = true;
imports = [
(import ../../pkgs/wm/hyprland/hyprland.nix { inherit pkgs config; })
(import ../../pkgs/wm/waybar/waybar.nix { inherit config; pkgs = pkgs; })
(import ../../pkgs/wm/mako/mako.nix { config = config; pkgs = pkgs; lib=lib; })
];
}

53
hm/modules/theme.nix Normal file
View File

@ -0,0 +1,53 @@
{ pkgs, unstablePkgs, ... }:
{
xdg.configFile = {
"Kvantum/Catppuccin-Macchiato-Blue/Catppuccin-Macchiato-Blue/Catppuccin-Macchiato-Blue.kvconfig".source = "${unstablePkgs.catppuccin-kvantum}/share/Kvantum/Catppuccin-Macchiato-Blue/Cattpuccin-Macchiato-Blue.kvconfig";
"Kvantum/Catppuccin-Macchiato-Blue/Catppuccin-Macchiato-Blue/Catppuccin-Macchiato-Blue.svg".source = "${unstablePkgs.catppuccin-kvantum}/share/Kvantum/Catppuccin-Macchiato-Blue/Cattpuccin-Macchiato-Blue.svg";
};
qt = {
enable = true;
platformTheme.name = "gtk";
style = {
name = "gtk2";
package = pkgs.libsForQt5.breeze-qt5;
};
};
gtk = {
enable = true;
theme = {
name = "Breeze-Dark";
package = pkgs.libsForQt5.breeze-gtk;
};
iconTheme = {
name = "nordzy-icon-theme";
package = pkgs.nordzy-icon-theme;
# package = pkgs.catppuccin-papirus-folders.override {
# flavor = "mocha";
# accent = "sky";
# };
};
cursorTheme = {
name = "Nordzy-cursors";
package = pkgs.nordzy-cursor-theme;
};
gtk3 = {
extraConfig.gtk-application-prefer-dark-theme = true;
};
};
home.pointerCursor = {
gtk.enable = true;
name = "Nordzy-cursors";
package = pkgs.nordzy-cursor-theme;
size = 24;
};
dconf.settings = {
"org/gnome/desktop/interface" = {
gtk-theme = "Breeze-Dark";
color-scheme = "prefer-dark";
};
};
}

View File

@ -4,14 +4,14 @@
wayland.windowManager = { wayland.windowManager = {
hyprland = { hyprland = {
enable = true;
systemd ={
enable = true; enable = true;
enableXdgAutostart = true; systemd ={
variables = [ "--all" ]; enable = true;
}; enableXdgAutostart = true;
package = pkgs.hyprland; variables = [ "--all" ];
xwayland.enable = true; };
package = pkgs.hyprland;
xwayland.enable = true;
}; };
}; };
# systemd.user.services.keybase-kwallet = { # systemd.user.services.keybase-kwallet = {

18
hm/modules/xdg.nix Normal file
View File

@ -0,0 +1,18 @@
{ config, pkgs, ... }:
{
xdg = {
enable = true;
userDirs = {
enable = true;
# createDirectories = false;
documents = "${config.home.homeDirectory}/Documents";
music = "${config.home.homeDirectory}/Music";
videos = "${config.home.homeDirectory}/Videos";
desktop = "${config.home.homeDirectory}/Desktop";
download = "${config.home.homeDirectory}/Downloads";
pictures = "${config.home.homeDirectory}/Pictures";
templates = "${config.home.homeDirectory}/Templates";
publicShare = "${config.home.homeDirectory}/Public";
};
};
}

View File

@ -0,0 +1,9 @@
{ pkgs, ... }:
with pkgs;
[
krita
inkscape
blender
gimp-with-plugins
reaper
]

11
hm/pkgs/default.nix Normal file
View File

@ -0,0 +1,11 @@
{ pkgs, unstablePkgs, system, zen-browser, ... }:
builtins.concatLists
[
(import ./creative-packages.nix { inherit pkgs; })
(import ./gramming-packages.nix { inherit pkgs; })
(import ./inet-packages.nix { inherit pkgs system zen-browser; })
(import ./llm-packages.nix { inherit pkgs; })
(import ./theme-packages.nix { inherit pkgs unstablePkgs; })
(import ./wm-packages.nix { inherit pkgs; })
(import ./rescue-packages.nix { inherit pkgs; })
]

View File

@ -0,0 +1,9 @@
{ pkgs, ... }:
with pkgs;
[
# IDE's
sublime3 vscode # vscode.languages.web vscode.languages.python vscode.languages.nix vscode.languages.bash
typora obsidian obsidian-export # vimPlugins.obsidian-nvim
# Lunarvim Dependencies
gnumake42 nodejs_22 cargo ripgrep cmake
]

30
hm/pkgs/inet-packages.nix Normal file
View File

@ -0,0 +1,30 @@
{ pkgs, system, zen-browser, ... }:
with pkgs;
[
(python3.withPackages (ps: with ps; [
pip pynvim # mopidy-tidal # Mopidy-WebSettings
]))
# mopidy mopidy-tidal mopidy-musicbox-webclient gst_all_1.gstreamer gst_all_1.gst-plugins-bad
# Browsers
firefox-devedition
w3m
ungoogled-chromium
librewolf
# https://github.com/MarceColl/zen-browser-flake/tree/master
zen-browser.packages."${system}".default
# Mail
mailspring
betterbird
# Cloud/Remote
restic
nextcloud-client
keepassxc git-credential-keepassxc keybase-gui keybase kbfs
remmina
mapscii
tidal-dl
]

6
hm/pkgs/llm-packages.nix Normal file
View File

@ -0,0 +1,6 @@
{ pkgs, ... }:
with pkgs;
[
# LLM's
# lmstudio
]

View File

@ -0,0 +1,5 @@
{ pkgs, ... }:
with pkgs;
[
ddrescue gparted
]

View File

@ -0,0 +1,21 @@
{ pkgs, unstablePkgs, ... }:
with pkgs;
[
(unstablePkgs.catppuccin-kvantum.override {
accent = "Blue";
variant = "Macchiato";
})
qt5.qtwayland qt6.qtwayland
qt6ct
libsForQt5.qtstyleplugin-kvantum
libsForQt5.qt5ct
base16-schemes base16-shell-preview
papirus-folders
themechanger
nordzy-icon-theme nordzy-cursor-theme
# hyprcursor nordzy-icon-theme
nordic
]

16
hm/pkgs/wm-packages.nix Normal file
View File

@ -0,0 +1,16 @@
{ pkgs, ... }:
let
polycat = pkgs.callPackage ../../pkgs/derivations/polycat {};
in
with pkgs;
[
wdisplays waybar wlogout wayland-utils wayland-protocols
hyprpaper hyprlock hypridle hyprshot hyprpicker hyprcursor
pyprland
rofi-wayland wev clipman cliphist wl-clip-persist wl-clipboard
blueman networkmanagerapplet swayosd
qalculate-qt
xorg.xrandr
dconf
polycat
]

39
hm/unused/catppuccin.nix Normal file
View File

@ -0,0 +1,39 @@
{ ... }:
{
catppuccin = {
enable = true;
accent = "blue"; # “blue”, “flamingo”, “green”, “lavender”, “maroon”, “mauve”, “peach”, “pink”, “red”, “rosewater”, “sapphire”, “sky”, “teal”, “yellow”
flavor = "mocha"; # “latte”, “frappe”, “macchiato”, “mocha”
pointerCursor = {
enable = true;
accent = "light";
flavor = "mocha";
};
};
gtk = {
catppuccin = {
enable = true;
accent = "blue";
flavor = "mocha";
icon = {
enable = true;
accent = "light";
flavor = "mocha";
};
size = "standard"; # “standard”, “compact”
tweaks = []; # one of “black”, “rimless”, “normal”, “float”
};
};
qt = {
style = {
catppuccin = {
enable = true;
accent = "blue";
apply = true;
flavor = "mocha";
};
};
};
}

View File

@ -0,0 +1,56 @@
# Add to flake.nix
# catppuccin.url = "github:catppuccin/nix";
# Define output
catppuccin,
# Add to Home Manager Modules
catppuccin.homeManagerModules.catppuccin
# Add to let in home.nix
# Define your list of programs to be themed
themedPrograms = [ "bat" "bottom" "btop" "cava" "fish" "fzf" "hyprlock" "kitty" "laztgit" "neovim" "rofi" "starship" "tmux" "waybar" "yazi" ];
# Define constants for `enable` and `flavor`
themeEnabled = true;
themeFlavor = "mocha"; # or any other Catppuccin flavor
# Recursive function to apply the theme settings
applyTheme = programs:
if programs == [] then {}
else let
program = builtins.head programs;
in
# Merge the settings for the current program with the results of the next
{
programs.${program} = lib.mkIf true {
catppuccin.enable = themeEnabled;
catppuccin.flavor = themeFlavor;
};
} // applyTheme (builtins.tail programs); # Recurse to the next item
themedServices = [ "mako" ];
themeService = services:
if services == [] then {}
else let
service = builtins.head services;
in
{
services.${service} = lib.mkIf true {
catppuccin.enable = themeEnabled;
catppuccin.flavor = themeFlavor;
};
} // themeService (builtins.tail services); # Recurse to the next item
# Add last home.nix
# Theme with a loop.
// applyTheme themedPrograms
// themeService themedServices
# add to hm/wayland.nix
wayland.windowManager = {
hyprland = {
catppuccin = {
enable = true;
accent = "blue";
};
};

View File

@ -1,18 +0,0 @@
{ config, pkgs, ... }:
{
xdg = {
enable = true;
# userDirs = {
# enable = true;
# createDirectories = false;
# documents = "${config.home.homeDirectory}/Documents";
# music = "${config.home.homeDirectory}/Music";
# videos = "${config.home.homeDirectory}/Videos";
# desktop = "${config.home.homeDirectory}/Desktop";
# download = "${config.home.homeDirectory}/Downloads";
# pictures = "${config.home.homeDirectory}/Pictures";
# templates = "${config.home.homeDirectory}/Templates";
# publicShare = "${config.home.homeDirectory}/Public";
# };
};
}

259
modules/containers.nix Normal file
View File

@ -0,0 +1,259 @@
# ssh-keygen -f /etc/ssh/ssh_host_ed25519_key
# ssh-keygen -f ~/.ssh/<name>.containers
# edit secrets file
# agenix -e secret.age
{ inputs, config, lib, pkgs, ... }:
{
containers = {
nextcloud = {
privateNetwork = true;
# hostAddress = "192.168.12.40";
localAddress = "192.168.12.71/24";
hostBridge = "br0";
autoStart = true;
bindMounts = {
"/etc/ssh/ssh_host_ed25519_key".isReadOnly = true;
};
config = { config, pkgs, ... }:
{
networking.firewall.allowedTCPPorts = [ 80 ];
imports = [ inputs.agenix.nixosModules.default ];
age = {
identityPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
secrets."nextcloud" = {
file = ../secrets/nextcloud.age;
mode = "770";
owner = "nextcloud";
group = "nextcloud";
};
};
services.openssh = {
enable = true;
ports = [ 22 ];
settings = {
PasswordAuthentication = true;
AllowUsers = [ "wayne" ]; # Allows all users by default. Can be [ "user1" "user2" ]
UseDns = true;
X11Forwarding = false;
PermitRootLogin = "no"; # "yes", "without-password", "prohibit-password", "forced-commands-only", "no"
};
};
services.nextcloud = {
enable = true;
package = pkgs.nextcloud30;
hostName = "nextcloud";
https = false;
database.createLocally = true;
configureRedis = true;
autoUpdateApps.enable = true;
maxUploadSize = "16G";
extraAppsEnable = true;
appstoreEnable = true;
extraApps = with config.services.nextcloud.package.packages.apps; {
# List of apps we want to install and are already packaged in
# https://github.com/NixOS/nixpkgs/blob/master/pkgs/servers/nextcloud/packages/nextcloud-apps.json
inherit calendar contacts mail notes onlyoffice tasks qownnotesapi;
# Custom app installation example.
# cookbook = pkgs.fetchNextcloudApp rec {
# url =
# "https://github.com/nextcloud/cookbook/releases/download/v0.10.2/Cookbook-0.10.2.tar.gz";
# sha256 = "sha256-XgBwUr26qW6wvqhrnhhhhcN4wkI+eXDHnNSm1HDbP6M=";
# };
};
enableImagemagick = true;
settings = {
default_phone_region = "US";
trusted_domains = [ "localhost" "launchpad" "192.168.12.40" "192.168.12.71" ];
};
config = {
dbtype = "pgsql";
adminuser = "nextcloud";
adminpassFile = config.age.secrets.nextcloud.path;
};
};
system.stateVersion = "24.05";
};
};
livebook = {
autoStart = true;
privateNetwork = true;
hostBridge = "br0";
localAddress = "192.168.12.72/24";
bindMounts = {
"/etc/ssh/ssh_host_ed25519_key".isReadOnly = true;
};
config = { config, pkgs, ... }:
{
networking.firewall.allowedTCPPorts = [ 80 ];
imports = [ inputs.agenix.nixosModules.default ];
age = {
identityPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
secrets."whayes" = {
file = ../secrets/whayes.age;
mode = "770";
owner = "wayne";
group = "wayne";
};
};
services.livebook = {
enableUserService = true;
environment = {
LIVEBOOK_PORT = 20123;
LIVEBOOK_PASSWORD = config.age.secrets.whayes.path;
};
# See note below about security
environmentFile = "/var/lib/livebook.env";
extraPackages = with pkgs; [ gcc gnumake ];
};
system.stateVersion = "24.05";
};
};
grocy = {
autoStart = true;
privateNetwork = true;
hostBridge = "br0";
localAddress = "192.168.12.73/24";
bindMounts = {
"/etc/ssh/ssh_host_ed25519_key".isReadOnly = true;
};
config = { config, pkgs, ... }:
{
networking.firewall.allowedTCPPorts = [ 80 ];
imports = [ inputs.agenix.nixosModules.default ];
age = {
identityPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
secrets."whayes" = {
file = ../secrets/whayes.age;
mode = "770";
owner = "wayne";
group = "wayne";
};
};
services.grocy = {
enable = true;
hostName = "grocy";
settings = {
currency = "USD";
culture = "en";
};
nginx = {
enableSSL = false;
};
phpfpm = {
settings = {
catch_workers_output = true;
"listen.owner" = "nginx";
"php_admin_flag[log_errors]" = true;
"php_admin_value[error_log]" = "stderr";
pm = "dynamic";
"pm.max_children" = "32";
"pm.max_requests" = "500";
"pm.max_spare_servers" = "4";
"pm.min_spare_servers" = "2";
"pm.start_servers" = "2";
};
};
};
system.stateVersion = "24.05";
};
};
onlyoffice = {
autoStart = true;
privateNetwork = true;
hostBridge = "br0";
localAddress = "192.168.12.74/24";
bindMounts = {
"/etc/ssh/ssh_host_ed25519_key".isReadOnly = true;
};
config = { config, lib, pkgs, ... }:
{
networking.firewall.allowedTCPPorts = [ 80 ];
nixpkgs.config.allowUnfree = true;
nixpkgs.config.allowUnfreePredicate = pkg:
builtins.elem (lib.getName pkg) [ "corefonts" ];
fonts.packages = with pkgs; [
corefonts
];
imports = [ inputs.agenix.nixosModules.default ];
age = {
identityPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
secrets."onlyoffice" = {
file = ../secrets/onlyoffice-jwt.age;
mode = "770";
owner = "onlyoffice";
group = "onlyoffice";
};
};
services.onlyoffice = {
enable = true;
port = 8000;
hostname = "onlyoffice";
package = pkgs.onlyoffice-documentserver;
jwtSecretFile = config.age.secrets.onlyoffice.path;
enableExampleServer = true;
examplePort = 8001;
};
system.stateVersion = "24.05";
};
};
# template = {
# autoStart = true;
# privateNetwork = true;
# hostBridge = "br0";
# localAddress = "192.168.12.73/24";
# bindMounts = {
# "/etc/ssh/ssh_host_ed25519_key".isReadOnly = true;
# };
# config = { config, pkgs, ... }:
# {
# networking.firewall.allowedTCPPorts = [ 80 ];
# imports = [ inputs.agenix.nixosModules.default ];
# age = {
# identityPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
# secrets."whayes" = {
# file = ../secrets/whayes.age;
# mode = "770";
# owner = "wayne";
# group = "wayne";
# };
# };
# services.name = { ... };
# system.stateVersion = "24.05";
# };
# };
};
}

View File

@ -1,11 +1,11 @@
{ pkgs, config, ... }: { pkgs, config, ... }:
{ {
hardware.opengl = { # Renamed hardware.graphics hardware.opengl = { # Renamed hardware.graphics
enable = true; # Renamed enable = true; # Renamed
package = pkgs.mesa.drivers; # Renamed package = pkgs.mesa.drivers; # Renamed
# 32bit Support # 32bit Support
driSupport32Bit = true; # Renamed driSupport32Bit = true; # Renamed
# package32 = pkgsi686Linux.mesa.drivers; # package32 = pkgsi686Linux.mesa.drivers;
}; };
# hardware.graphics = { # Only in unstable # hardware.graphics = { # Only in unstable
# enable = true; # enable = true;
@ -41,6 +41,6 @@
nvidiaSettings = true; nvidiaSettings = true;
# Optionally, you may need to select the appropriate driver version for your specific GPU. # Optionally, you may need to select the appropriate driver version for your specific GPU.
package = config.boot.kernelPackages.nvidiaPackages.stable; package = config.boot.kernelPackages.nvidiaPackages.stable; # 550.78
}; };
} }

View File

@ -1,4 +0,0 @@
{ pkgs, ... }
{
}

View File

@ -1,38 +1,88 @@
{ pkgs, ... }: { pkgs, ... }:
{ {
networking.hostName = "launchpad"; # Define your hostname. networking = {
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. hostName = "launchpad";
useDHCP = false;
enableIPv6 = false;
extraHosts = ''
192.168.12.20 router.local
192.168.12.21 switch.local
192.168.12.25 dhcpd.local
# Configure network proxy if necessary 192.168.12.30 canon.local
# networking.proxy.default = "http://user:password@proxy:port/";
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
networking.extraHosts = ''
192.168.12.20 router.local
192.168.12.21 switch.local
192.168.12.25 dhcpd.local
192.168.12.40 launchpad.local
192.168.12.41 xeon.local
192.168.12.80 robo.local
192.168.12.81 nas.local
192.168.12.83 homeassistant.local
192.168.12.60 toons.local
45.58.52.52 www 192.168.12.40 launchpad.local
172.245.111.249 est 192.168.12.41 xeon.local
216.189.156.74 mail
'';
networking.interfaces.enp4s0.ipv4.addresses = [ { 192.168.12.50 wayne-s-pixel-5
address = "192.168.12.40";
prefixLength = 24; 192.168.12.60 toons.local
} ]; 192.168.12.61 tv.local
networking.defaultGateway = "192.168.12.20";
networking.nameservers = [ "192.168.12.25" ]; 192.168.12.80 robo.local
networking.firewall = { 192.168.12.81 nas.local
allowedTCPPortRanges = [ { from = 35000; to = 36000; } { from = 5000; to = 6000; } { from = 8000; to = 9000; } ]; 192.168.12.83 homeassistant.local
extraCommands = ''iptables -t raw -A OUTPUT -p udp -m udp --dport 137 -j CT --helper netbios-ns'';
# containers
192.168.12.71 nextcloud
192.168.12.72 livebook
192.168.12.73 grocy
192.168.12.74 openoffice
45.58.52.52 www
172.245.111.249 est
216.189.156.74 mail
'';
interfaces = {
# enp4s0.ipv4.addresses = [ {
# address = "192.168.12.40";
# prefixLength = 24;
# } ];
br0 = {
useDHCP = false;
ipv4 = {
addresses = [
{
address = "192.168.12.40";
prefixLength = 24;
}
];
};
};
};
defaultGateway = "192.168.12.20";
nameservers = [ "192.168.12.25" ];
firewall = {
enable = true;
# { from = 5000; to = 6000; }
allowedTCPPorts = [ 80 443 ];
allowedTCPPortRanges = [ { from = 35000; to = 36000; } { from = 8000; to = 9000; } ];
extraCommands = ''
iptables -t raw -A OUTPUT -p udp -m udp --dport 137 -j CT --helper netbios-ns
'';
};
bridges = {
br0 = {
interfaces = [ "enp4s0" ];
};
};
# Required to access containers
nat = {
enable = true;
internalInterfaces = [ "eth0" "enp4s0" "ve-+" "vb-+" ];
externalInterface = "br0";
enableIPv6 = false;
};
# Dissable to prevent from managing containers
networkmanager = {
enable = true;
unmanaged = [ "eth0" "interface-name:ve-*" "interface-name:vb-*" ];
};
# wireless.enable = true; # Enables wireless support via wpa_supplicant.
# Configure network proxy if necessary
# proxy.default = "http://user:password@proxy:port/";
# proxy.noProxy = "127.0.0.1,localhost,internal.domain";
}; };
# Enable networking
networking.networkmanager.enable = true;
} }

8
modules/qt.nix Normal file
View File

@ -0,0 +1,8 @@
{ ... }:
{
qt = {
enable = true;
style = "kvantum";
# platformTheme = "qt5ct";
};
}

View File

@ -69,6 +69,8 @@
extraConfig = '' extraConfig = ''
%wheel ALL=(ALL) NOPASSWD: ${pkgs.input-remapper}/bin/input-remapper-service %wheel ALL=(ALL) NOPASSWD: ${pkgs.input-remapper}/bin/input-remapper-service
%wheel ALL=(ALL) NOPASSWD: ${pkgs.input-remapper}/bin/input-remapper-control %wheel ALL=(ALL) NOPASSWD: ${pkgs.input-remapper}/bin/input-remapper-control
%wheel ALL=(ALL) NOPASSWD: /run/wrappers/bin/systemctl restart display-manager
''; '';
}; };
@ -79,4 +81,18 @@
# enable = true; # enable = true;
# enableSSHSupport = true; # enableSSHSupport = true;
# }; # };
age = {
secrets = {
nextcloud = {
file = ../secrets/nextcloud.age;
};
wayne = {
file = ../secrets/whayes.age;
};
onlyoffice = {
file = ../secrets/onlyoffice-jwt.age;
};
};
};
} }

View File

@ -8,13 +8,14 @@
dialout = {}; dialout = {};
plugdev = {}; plugdev = {};
uinput = {}; uinput = {};
www-data = {};
}; };
users = { users = {
wayne = { wayne = {
isNormalUser = true; isNormalUser = true;
description = "Wayne Hayes"; description = "Wayne Hayes";
extraGroups = [ "networkmanager" "wheel" "docker" "wayne" "vmail" "uinput" "storage" ]; extraGroups = [ "networkmanager" "wheel" "docker" "wayne" "vmail" "uinput" "storage" "www-data" ];
openssh.authorizedKeys.keys = []; openssh.authorizedKeys.keys = [ "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQC6q75AXShVjzWerPFU3l0YXIKViNF4eyragL+RQIRwdNDMzW34GgxFhtyLsmRB2jsykf4gx76zSyJoii0K4uhS761w5oDXz9mqHnBzJutDTyltLyfgLsFKY8V2sOtSracWx4y6QrtmBR3MKV642kg5mufVEmCMVxBU9oVpIOJUSW+XNYBawaSkl5SjDMLI7flj0v9Hb2dZqjQigDM1+UHxTzcMoZnR6hAzoZpPNMGyZXtrgEotNywNdpxCqRV9T/KvKHSIVYc1umiDXc+5fyRo9v7CzvYY3MvRKWbgUfTVQRmR2kqwsGAsV5W+PEUb8qqmTjPVXusKxKlpGgYfsvIZOv0LgOvQMemga8psFIS9F4YQ1xuc092bKi1LteC+ZlabMLRMux6Wbhjci+v9wnLfTyBQc6wr3wDFJoELKyaLnI7Cn0KHn0k+BiYCCr2TjKrz9XztL490vprYtvVumNFZ3rxewGnZSn/2czaFfQgnXt+9xQGWWo9TJGE5jq1jThnsIbH3G9JIQ1WhomMq6DDRhGMX2ZKDk/M9/fk0XN5nvQyJNmbiHy5srW/VANx8R9jjsVkvX29MXeK6dzpR4ImywXggpYMeHB6moy06cJUu5WoR8aLS/rO5LbZM2j14AMQ2ZK79QfUJSdloA1/HHlmnx7YtzZOebD6BCR7xgasGRw== wayne"];
packages = with pkgs; [ packages = with pkgs; [
kdePackages.kate kdePackages.kate
]; ];

View File

@ -1,4 +1,4 @@
{ ... }: { pkgs, ... }:
{ {
services.desktopManager.plasma6.enable = false; services.desktopManager.plasma6.enable = false;
@ -9,26 +9,47 @@
variant = ""; variant = "";
}; };
videoDrivers = [ "nvidia" ]; videoDrivers = [ "nvidia" ];
# xrandrHeads = {
# DP-6= {
# monitorConfig = ''
# DisplaySize 1920x1080
# '';
# };
# DP-3 = {
# monitorConfig = ''
# DisplaySize 1920x1080
# '';
# };
# DP-5 = {
# primary = true;
# monitorConfig = ''
# DisplaySize 3840x216
# '';
# };
# };
}; };
services.xserver.displayManager.setupCommands = '' # services.xserver.displayManager.setupCommands = ''
wlr-randr --output DP-4 --auto --primary # xrandr --output DP-4 --auto --primary
wlr-randr --output DP-3 --left-of DP-4 # '';
wlr-randr --output DP-1 --right-of DP-4 --rotate left --noprimary
'';
services.displayManager.sddm = { services.displayManager = {
enable = true; defaultSession = "hyprland";
autoNumlock = true; sddm = {
enableHidpi = true;
settings = {
X11 = {
MinimumVT = 7;
DisplayCommand="/etc/sddm/Xsetup";
};
};
wayland = {
enable = true; enable = true;
autoNumlock = true;
enableHidpi = true;
settings = {
# X11 = {
# # MinimumVT = 7;
# DisplayCommand="/etc/sddm/Xsetup";
# };
};
wayland = {
enable = true;
};
theme = "catppuccin-mocha";
package = pkgs.kdePackages.sddm;
}; };
}; };
} }

View File

@ -5,7 +5,7 @@ access-tokens = nas.local/git=PAT:glpat-bfbAJxv_4tmgySBZcPSZ
allowed-users = * allowed-users = *
auto-optimise-store = true auto-optimise-store = true
builders = builders =
cores = 0 cores = 12
experimental-features = nix-command flakes experimental-features = nix-command flakes
max-jobs = 12 max-jobs = 12
require-sigs = true require-sigs = true
@ -15,6 +15,6 @@ substituters = https://cache.nixos.org/
system-features = nixos-test benchmark big-parallel kvm system-features = nixos-test benchmark big-parallel kvm
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
trusted-substituters = trusted-substituters =
trusted-users = root trusted-users = root wayne
extra-sandbox-paths = extra-sandbox-paths =

View File

@ -18,6 +18,7 @@ in
package = pkgs.nerdfonts; package = pkgs.nerdfonts;
}; };
settings = { settings = {
themeFile = "Nord";
enable_audio_bell = true; enable_audio_bell = true;
# foreground = "#${config.colorScheme.palette.base05}"; # foreground = "#${config.colorScheme.palette.base05}";
# background = "#${config.colorScheme.palette.base00}"; # background = "#${config.colorScheme.palette.base00}";
@ -26,7 +27,7 @@ in
background_image = "../../Pictures/marvin.png"; background_image = "../../Pictures/marvin.png";
background_image_layout = "cscaled"; background_image_layout = "cscaled";
background_tint = "0.95"; background_tint = "0.95";
dynamic_background_opacity = "yes"; dynamic_background_opacity = true;
modify_font = "cell_width 90%"; modify_font = "cell_width 90%";
scrollback_lines = 10000; scrollback_lines = 10000;
copy_on_select = "clipboard"; # Ensures text is copied when selected copy_on_select = "clipboard"; # Ensures text is copied when selected
@ -40,7 +41,9 @@ in
enableBashIntegration = true; enableBashIntegration = true;
enableZshIntegration = true; enableZshIntegration = true;
}; };
keybindings = {}; keybindings = {
"ctrl+c" = "copy_or_interrupt";
};
extraConfig = '' extraConfig = ''
wayland_titlebar_color ${base16-scheme.base13}; wayland_titlebar_color ${base16-scheme.base13};
background ${base16-scheme.base00} background ${base16-scheme.base00}

View File

@ -6,6 +6,7 @@
]; ];
programs.tmux = { programs.tmux = {
enable = true; enable = true;
prefix = "C-s";
shortcut = "a"; shortcut = "a";
# aggressiveResize = true; -- Disabled to be iTerm-friendly # aggressiveResize = true; -- Disabled to be iTerm-friendly
baseIndex = 1; baseIndex = 1;
@ -14,23 +15,27 @@
escapeTime = 0; escapeTime = 0;
# Force tmux to use /tmp for sockets (WSL2 compat) # Force tmux to use /tmp for sockets (WSL2 compat)
secureSocket = false; secureSocket = false;
mouse = true;
keyMode = "vi";
terminal = "xterm-256color";
plugins = with pkgs; [ plugins = with pkgs; [
tmuxPlugins.better-mouse-mode tmuxPlugins.better-mouse-mode
]; ];
extraConfig = '' # extraConfig = ''
set -g default-terminal "xterm-256color" # # # set -g default-terminal "xterm-256color"
set -ga terminal-overrides ",*256col*:Tc" # # # set -ga terminal-overrides ",*256col*:Tc"
set -ga terminal-overrides '*:Ss=\E[%p1%d q:Se=\E[ q' # # # set -ga terminal-overrides '*:Ss=\E[%p1%d q:Se=\E[ q'
set-environment -g COLORTERM "truecolor" # # # set-environment -g COLORTERM "truecolor"
# Mouse works as expected # # Mouse works as expected
set-option -g mouse on # set-option -g mouse on
# easy-to-remember split pane commands # # easy-to-remember split pane commands
bind | split-window -h -c "#{pane_current_path}" # bind | split-window -h -c "#{pane_current_path}"
bind - split-window -v -c "#{pane_current_path}" # bind - split-window -v -c "#{pane_current_path}"
bind c new-window -c "#{pane_current_path}" # bind c new-window -c "#{pane_current_path}"
''; # '';
}; };
} }

29
pkgs/shell/bash.nix Normal file
View File

@ -0,0 +1,29 @@
{ pkgs, myAliases, ...}:
{
# To copy the Oh My Zsh configuration file to your home directory, run the following command:
# $ cp -v $(nix-env -q out-path oh-my-zsh | cut -d -f3)/share/oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc
home.packages = with pkgs; [
bashInteractive
];
programs.bash = {
enable = true;
# package = pkgs.bashInteractive;
enableCompletion = true;
historySize = 10000;
shellOptions = [];
shellAliases = myAliases;
historyIgnore = [ "exit" "clear" "sl" "pwd" ];
historyControl = [ "ignoredups" ];
historyFileSize = 20000;
sessionVariables = {
EDITOR = "lvim";
PATH = "$HOME/bin:$HOME/.local/bin:$PATH";
};
initExtra = "
# make less more friendly for non-text input files, see lesspipe(1)
[ -x /usr/bin/lesspipe ] && eval $(SHELL=/bin/sh lesspipe)
";
};
}

View File

@ -37,7 +37,8 @@ in
echo "Running stow to manage dotfiles" echo "Running stow to manage dotfiles"
export PATH=${pkgs.stow}/bin:$PATH export PATH=${pkgs.stow}/bin:$PATH
cd ${dotfilesPath}/home cd ${dotfilesPath}/home
stow --adopt -t ${config.home.homeDirectory} bash bin config profile screen ssh tmux zsh # Specify the packages to stow # stow --adopt -t ${config.home.homeDirectory} bash bin config profile screen ssh tmux zsh # Specify the packages to stow
stow --adopt -t ${config.home.homeDirectory} bin config screen ssh tmux zsh # Specify the packages to stow
''; '';
# if [ ! -d "${dotfilesPath}" ]; then # if [ ! -d "${dotfilesPath}" ]; then
# git clone ${dotfilesRepo} ${dotfilesPath} # git clone ${dotfilesRepo} ${dotfilesPath}

View File

@ -1,12 +1,12 @@
{ pkgs, ... }: { pkgs, config, ... }:
{ {
wayland.windowManager.hyprland = { wayland.windowManager.hyprland = {
# enable = true; # enable = true;
# package = pkgs.hyprland; # package = pkgs.hyprland;
# package = hyprland.packages.${pkgs.stdenv.hostPlatform.system}.hyprland; # package = hyprland.packages.stdenv.hostPlatform.system}.hyprland;
# xwayland.enable = true; # xwayland.enable = true;
# systemd.enable = true; systemd.enable = true;
# systemd.variables = ["--all"]; systemd.variables = ["--all"];
# device { # device {
# name = "hanvon-ugee-shortcut-remote key bindings" # name = "hanvon-ugee-shortcut-remote key bindings"
@ -22,35 +22,34 @@
"MOZ_ENABLE_WAYLAND,1" "MOZ_ENABLE_WAYLAND,1"
# "ANKI_WAYLAND,1" # "ANKI_WAYLAND,1"
"QT_AUTO_SCREEN_SCALE_FACTOR,1" # "QT_AUTO_SCREEN_SCALE_FACTOR,1"
"QT_WAYLAND_DISABLE_WINDOWDECORATION,1" # "QT_WAYLAND_DISABLE_WINDOWDECORATION,1"
"QT_QPA_PLATFORM=wayland,xcb" # removed ,xcb CGPT # "QT_QPA_PLATFORM=wayland,xcb" # removed ,xcb CGPT
# "QT_QPA_PLATFORMTHEME,qt6ct" # "QT_QPA_PLATFORMTHEME,qt6ct"
"GDK_SCALE,1" # "GDK_SCALE,1"
"GDK_BACKEND,wayland,x11,*" # "GDK_BACKEND,wayland,x11,*"
"GTK_THEME,FlatColor:dark" # "GTK_THEME,FlatColor:dark"
"GTK2_RC_FILES,/home/hadi/.local/share/themes/FlatColor/gtk-2.0/gtkrc" # "GTK2_RC_FILES,/home/hadi/.local/share/themes/FlatColor/gtk-2.0/gtkrc"
"DISABLE_QT5_COMPAT,0" # "DISABLE_QT5_COMPAT,0"
# "XCURSOR_SIZE,24" # "NIXOS_OZONE_WL,1"
"NIXOS_OZONE_WL,1" # "ELECTRON_OZONE_PLATFORM_HINT,auto"
"ELECTRON_OZONE_PLATFORM_HINT,auto" # "__GL_GSYNC_ALLOWED,0"
"__GL_GSYNC_ALLOWED,0" # "__GL_VRR_ALLOWED,0"
"__GL_VRR_ALLOWED,0"
"__GLX_VENDOR_LIBRARY_NAME,nvidia" "__GLX_VENDOR_LIBRARY_NAME,nvidia"
"DIRENV_LOG_FORMAT," # "DIRENV_LOG_FORMAT,"
# "WLR_DRM_NO_ATOMIC,1" # "WLR_DRM_NO_ATOMIC,1"
# "WLR_BACKEND,vulkan" # "WLR_BACKEND,vulkan"
# "WLR_RENDERER,vulkan" # "WLR_RENDERER,vulkan"
# "WLR_NO_HARDWARE_CURSORS,1" # "WLR_NO_HARDWARE_CURSORS,1"
"APPIMAGELAUNCHER_DISABLE,1" # "APPIMAGELAUNCHER_DISABLE,1"
"OZONE_PLATFORM,wayland" # "OZONE_PLATFORM,wayland"
"SDL_VIDEODRIVER,wayland" # "SDL_VIDEODRIVER,wayland"
"CLUTTER_BACKEND,wayland" # "CLUTTER_BACKEND,wayland"
"GBM_BACKEND,nvidia-drm" "GBM_BACKEND,nvidia-drm"
"LIBVA_DRIVER_NAME,nvidia" "LIBVA_DRIVER_NAME,nvidia"
# "AQ_DRM_DEVICES,/dev/dri/card2/" # CHANGEME: Related to the GPU # "AQ_DRM_DEVICES,/dev/dri/card2/" # CHANGEME: Related to the GPU
@ -58,8 +57,16 @@
# THEMING # THEMING
# "HYPRCURSOR_THEME,~/.icons/Nordic-cursors" # "HYPRCURSOR_THEME,~/.icons/Nordic-cursors"
# "HYPRCURSOR_SIZE,24x" # "HYPRCURSOR_SIZE,24x"
"HYPRCURSOR_THEME,Nordzy-cursors"
"HYPRCURSOR_SIZE,24"
"XCURSOR_THEME,Nordzy-cursors"
"XCURSOR_SIZE,24"
"HYPRLAND_TRACE=1" "HYPRLAND_TRACE=1"
# "QT_STYLE_OVERRIDE=kvantum"
"QT_QPA_PLATFORMTHEME = qt6ct" # qt5ct no display
]; ];
input = { input = {
kb_layout = "us"; kb_layout = "us";
@ -125,6 +132,7 @@
"$mod, F, exec, firefox" "$mod, F, exec, firefox"
"$mod, Z, exec, zen" "$mod, Z, exec, zen"
"$mod, k, exec, kitty" "$mod, k, exec, kitty"
"$mod+SHIFT_R, k, exec, pypr toggle term"
"ALTSHIFT, K, exec, konsole" "ALTSHIFT, K, exec, konsole"
"$mod, S, exec, subl" "$mod, S, exec, subl"
# "CTRLSHIFT, K&B, exec, hyprctl dispatch exec keybase-gui %u" # "CTRLSHIFT, K&B, exec, hyprctl dispatch exec keybase-gui %u"
@ -190,32 +198,33 @@
cursor = { cursor = {
# no_hardware_cursors = true; # no_hardware_cursors = true;
default_monitor = "DP-4"; default_monitor = "DP-5";
}; };
dwindle = { dwindle = {
# See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more # See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more
pseudotile = true; # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below pseudotile = true; # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
preserve_split = true; # you probably want this preserve_split = true; # you probably want this
special_scale_factor = 0.60; # Fix for floaters
}; };
monitor = [ monitor = [
"DP-3, 1920x1080, 0x616, 1" "DP-3, 1920x1080, 0x616, 1"
"DP-4, 3840x2160, 1920x0, 1" "DP-5, 3840x2160, 1920x0, 1"
"DP-1, 1080x1920, 5760x266, 1, transform, 3" # or 3 "DP-6, 1920x1080, 5760x266, 1, transform, 3" # or 3
# "gravity,center"
]; ];
workspace = [ workspace = [
"1,monitor:DP-4,default:true,decorate:true"
"2,monitor:DP-4,persistent:true"
"3,monitor:DP-4,persistent:true"
"4,monitor:DP-3,default:true" "4,monitor:DP-3,default:true"
"5,monitor:DP-3,persistent:true" "5,monitor:DP-3,persistent:true"
"6,monitor:DP-3,persistent:true" "6,monitor:DP-3,persistent:true"
"7,monitor:DP-1,default:true,gapsin:2" "1,monitor:DP-5,default:true,decorate:true"
"8,monitor:DP-1,persistent:true" "2,monitor:DP-5,persistent:true"
"9,monitor:DP-1,persistent:true" "3,monitor:DP-5,persistent:true"
"10,monitor:DP-5,persistent:true"
"7,monitor:DP-6,default:true,gapsin:2"
"8,monitor:DP-6,persistent:true"
"9,monitor:DP-6,persistent:true"
]; ];
exec-once = [ exec-once = [
@ -223,25 +232,25 @@
"dbus-daemon --session --address=unix:path=$XDG_RUNTIME_DIR/bus" "dbus-daemon --session --address=unix:path=$XDG_RUNTIME_DIR/bus"
"dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP" "dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP"
"systemctl --user start plasma-polkit-agent" "systemctl --user start plasma-polkit-agent"
"/nix/store/fj1n850329w79nfvqz22cm36vk4x1ypc-kwallet-pam-6.0.5/libexec/pam_kwallet_init --no-startup-id" "/nix/store/fj1n850329w79nfvqz22cm36vk4x1ypc-kwallet-pam-6.0.5/libexec/pam_kwallet_init --no-startup-id"
""
"waybar &" "waybar &"
"hyprpaper &" # "hyprpaper &"
"hypridle &" "hypridle &"
"swayosd &" "swayosd &"
"udiskie &" "udiskie &"
"wl-paste --type text --watch cliphist store" "wl-paste --type text --watch cliphist store"
"wl-paste --type image --watch cliphist store" "wl-paste --type image --watch cliphist store"
"/home/wayne/.config/hypr/scripts/start-in-tray.sh" # "${config.home.homeDirectory}/.config/hypr/scripts/start-in-tray.sh"
"${config.home.homeDirectory}/.config/hypr/scripts/start-keybase-gui.sh"
"[workspace 4 silent] remmina -c rdp://wayne@xeon.local" # "[workspace 4 silent] remmina -c rdp://wayne@xeon.local"
"[workspace 5 silent] keepassxc" "[workspace 5 silentl] keepassxc"
"[workspace 5 silent] /home/wayne/.nix-profile/bin/nextcloud --background" "[workspace 5 silent] /home/wayne/.nix-profile/bin/nextcloud --background"
"[workspace 5 silent] /nix/store/104jb5a21d1d338zkl1f07si6brsmrk2-keybase-gui-6.2.4/bin/keybase-gui %u &" "[workspace 5 silent] /nix/store/104jb5a21d1d338zkl1f07si6brsmrk2-keybase-gui-6.2.4/bin/keybase-gui %u &"
"[workspace 7 silent] subl" "[workspace 7 silent] sublime3"
"/home/wayne/.config/hypr/scripts/start-keybase-gui.sh" # "/nix/store/r3fdp5rlxcihmqhpcgy91sj918wnrmrc-pyprland-2.3.4/bin/pypr --debug ~/tmp/pypr.log"
]; ];
general = { general = {
@ -280,26 +289,28 @@
# "unset, rofi" # "unset, rofi"
# "ignorezero, rofi" # "ignorezero, rofi"
"blurpopups, notifications" "blurpopups, notifications"
"blur, waybar"
]; ];
windowrule = [ windowrule = [
"opacity 0.9 override 0.5 override 0.8 override, ^(.*)$" # set opacity to 1.0 active, 0.5 inactive and 0.8 fullscreen for kitty "opacity 0.9 override 0.5 override 0.8 override, ^(.*)$" # set opacity to 1.0 active, 0.5 inactive and 0.8 fullscreen for kitty
"opacity 1 override 0.9 override 0.9 override, ^(zen-alpha)$" # set opacity to 1.0 active, 0.5 inactive and 0.8 fullscreen for kitty
# "opacity 1.0 override 0.5 override 0.8 override, ^(kitty)$" # set opacity to 1.0 active, 0.5 inactive and 0.8 fullscreen for kitty # "opacity 1.0 override 0.5 override 0.8 override, ^(kitty)$" # set opacity to 1.0 active, 0.5 inactive and 0.8 fullscreen for kitty
"move -50% -50%, float, ^(org.keepassxc.KeePassXC)$" "move -50% -50%, float, ^(org.keepassxc.KeePassXC)$"
"move -50% -50%, float, ^(Nextcloud)$" "move -50% -50%, float, ^(Nextcloud)$"
# common modals # common modals
"center,title:^(Open)$" "center,title:^(Open).*$"
"center,title:^(Choose Files)$" # "center,title:^(Choose Files)$"
"center,title:^(Save As)$" "center,title:^(Save).*$"
"center,title:^(Confirm to replace files)$" # "center,title:^(Confirm to replace files)$"
"center,title:^(File Operation Progress)$" # "center,title:^(File Operation Progress)$"
]; ];
windowrulev2 = [ windowrulev2 = [
"workspace 7,class:dropdown_menu_class" # "workspace 7,class:dropdown_menu_class"
"workspace 8,class:dropdown_menu_class" # "workspace 8,class:dropdown_menu_class"
"workspace 9,class:dropdown_menu_class" # "workspace 9,class:dropdown_menu_class"
# "move cursor 5px 15px, class:sublime_text" # "move cursor 5px 15px, class:sublime_text"
"minsize 1 1, class:sublime_text" "minsize 1 1, class:sublime_text"
@ -317,12 +328,14 @@
# "nofocus, class:REAPER" # "nofocus, class:REAPER"
# "fullscreen, title:^(File|Edit|View|Options|Help)$, class:REAPER" # "fullscreen, title:^(File|Edit|View|Options|Help)$, class:REAPER"
"float,class:^(google-chrome)$,title:^(Open Files)$" # "float,class:^(google-chrome)$,title:^(Open Files)$"
"float,class:^(google-chrome)$,title:^(Open File)$" # "float,class:^(google-chrome)$,title:^(Open File)$"
"float,class:^(Typora)$,title:^(Open File)$"
"float,class:com.nextcloud.desktopclient.nextcloud" "float,class:com.nextcloud.desktopclient.nextcloud"
"float,class:Keybase" "float,class:Keybase"
"float,class:org.kde.kwalletmanager5" "float,class:org.kde.kwalletmanager5"
"float,class:org.keepassxc.KeePassXC" "float,class:org.keepassxc.KeePassXC"
"float,class:Typora"
"workspace special:magic, class:^my-app-class$" "workspace special:magic, class:^my-app-class$"
]; ];

View File

@ -12,12 +12,12 @@
width = 350; width = 350;
height = 200; height = 200;
output = "DP-4"; output = "DP-4";
backgroundColor = "#00000080"; # backgroundColor = "#00000080";
margin = "20"; margin = "20";
# outerMargin = "10"; # outerMargin = "10";
markup = true; markup = true;
borderSize = 2; borderSize = 2;
borderColor = "#ffffff"; # borderColor = "#ffffff";
borderRadius = 15; borderRadius = 15;
icons = true; icons = true;
layer = "top"; layer = "top";

View File

@ -13,12 +13,6 @@
}, },
}, },
// "cpu": {
// "interval": 5,
// "format": " {usage}%",
// "max-length": 10,
// },
"cpu": { "cpu": {
"format": "{usage}% 󰍛", "format": "{usage}% 󰍛",
"interval": 1, "interval": 1,
@ -53,8 +47,10 @@
}, },
"network": { "network": {
"format": "{ifname}",
"interface": "Ethernet",
"format-wifi": " {icon}", "format-wifi": " {icon}",
"format-ethernet": "  ", "format-ethernet": "{ipaddr} up: {bandwidthUpBytyes} bps / down: {bandwidthDownByte} bps  ",
"format-disconnected": "󰌙", "format-disconnected": "󰌙",
"format-icons": [ "format-icons": [
"󰤯 ", "󰤯 ",
@ -83,12 +79,13 @@
}, },
"temperature": { "temperature": {
"hwmon-path-abs": "/sys/devices/platform/coretemp.0/hwmon", "hwmon-path": "/sys/devices/platform/coretemp.0/hwmon/hwmon3/temp2_input",
"input-filename": "temp2_input", // "input-filename": "temp2_input",
"critical-threshold": 75, "critical-threshold": 75,
"tooltip": false, "tooltip": true,
"format-critical": "({temperatureC}°C)", "format-critical": "{temperatureC}°C ",
"format": "({temperatureC}°C)", "format": "{temperatureC}°C ",
"interval": 10,
}, },
"hyprland/workspaces": { "hyprland/workspaces": {
@ -98,13 +95,6 @@
"on-scroll-up": "hyprctl dispatch workspace e+1", "on-scroll-up": "hyprctl dispatch workspace e+1",
"on-scroll-down": "hyprctl dispatch workspace e-1", "on-scroll-down": "hyprctl dispatch workspace e-1",
}, },
// "hyprland/workspaces": {
// "icon-size": 32,
// "spacing": 16,
// "on-scroll-up": "hyprctl dispatch workspace r+1",
// "on-scroll-down": "hyprctl dispatch workspace r-1",
// },
// ROMAN Numerals style // ROMAN Numerals style
"hyprland/workspaces#roman": { "hyprland/workspaces#roman": {
"active-only":false, "active-only":false,
@ -130,11 +120,16 @@
"8": "VIII", "8": "VIII",
"9": "IX", "9": "IX",
"10": "X", "10": "X",
"11": "XI",
"12": "XII",
}, },
}, },
"tray": {
"icon-size": 31,
"spacing": 10
},
"custom/polycat": { "custom/polycat": {
"execr": "/home/wayne/bin/polycat.sh", "exec": "/home/wayne/bin/polycat.sh",
"interval": 2, "interval": 2,
"return-type": "json", "return-type": "json",
"on-click": "polycat --config-path /home/wayne/.config/polycat-config.json", "on-click": "polycat --config-path /home/wayne/.config/polycat-config.json",

View File

@ -8,16 +8,17 @@
layer = "top"; layer = "top";
position = "top"; position = "top";
height = 58; height = 58;
spacing = 6; spacing = 0;
fixed-center = true; fixed-center = true;
margin-left = 8; margin-left = 8;
margin-right = 8; margin-right = 25;
padding-right = 25;
output = [ output = [
"DP-4" "DP-5"
]; ];
include = "~/Flakes/user/wm/waybar/default.json"; include = "~/system/pkgs/wm/waybar/default.json";
modules-left = [ "custom/os_button" "hyprland/workspaces#roman" ]; modules-left = [ "custom/os_button" "hyprland/workspaces#roman" ];
modules-center = [ "hyprland/window" "custom/polycat" "wlr/taskbar" ]; # replace wlr/taskbar modules-center = [ "hyprland/window" "wlr/taskbar" ]; # replace wlr/taskbar
modules-right = [ "cpu" "temperature" "disk" "tray" "clock" "custom/exit" ]; modules-right = [ "cpu" "temperature" "disk" "tray" "clock" "custom/exit" ];
"custom/os_button" = { "custom/os_button" = {
@ -32,11 +33,11 @@
position = "bottom"; position = "bottom";
height = 39; height = 39;
output = "DP-3"; output = "DP-3";
spacing = 6; spacing = 0;
fixed-center = true; fixed-center = true;
margin-left = 8; margin-left = 8;
margin-right = 8; margin-right = 8;
include = "~/Flakes/user/wm/waybar/default.json"; include = "~/system/pkgs/wm/waybar/default.json";
modules-left = [ "memory" "hyprland/workspaces#roman" ]; modules-left = [ "memory" "hyprland/workspaces#roman" ];
modules-center = [ "wlr/taskbar" ]; modules-center = [ "wlr/taskbar" ];
modules-right = [ ]; modules-right = [ ];
@ -45,8 +46,8 @@
layer = "top"; layer = "top";
position = "bottom"; position = "bottom";
height = 47; height = 47;
output = "DP-1"; output = "DP-6";
include = "~/Flakes/user/wm/waybar/default.json"; include = "~/system/pkgs/wm/waybar/default.json";
modules-left = [ ]; modules-left = [ ];
modules-center = [ "wlr/taskbar" ]; modules-center = [ "wlr/taskbar" ];
modules-right = [ "hyprland/workspaces#roman" "network" ]; modules-right = [ "hyprland/workspaces#roman" "network" ];

20
secrets/nextcloud.age Normal file
View File

@ -0,0 +1,20 @@
age-encryption.org/v1
-> ssh-ed25519 ecR1kg EMgSo+Sesqv1kBeF3zBU7weq3nhj9rCp3rvLUxBG8l4
bNTssiqcfr04W7+INqxNPI+k9EfFe1SdjXGtxbZWYvw
-> ssh-rsa 28puQg
nAZoX9Ttjs+dZSS851YzldbsAk/tFp70dd1ABorwgNudwsp2QfnX7lTmNYHroNVB
bStN8yGm4YA1SZmz7f67maT9OpDQRYSN8SlpRrhd7zF9FjF14p9uhgvRVOFtJO+5
342ytJG3FVrysUObKj5Cjly2i/sRUGerAz/MYIr+wBnXJy0yHwf4lnJXBnuxNNcq
cqFvrP5qw00/64VnjrXLQvj/TyXnb7ztDAIESu8gRB1rC+cMFbEot7dsUQ5m7H4D
4RJ4AnX9ZaAa8DJDhj5j6Xy90/QjHShFM8A3ZjZ6nWT1gyvvkFwlvn0Xe/655AsK
AyebAFvyEf2JO/u8R18HYDIyGuVECsDZQOHv5NlmPxYbXVnry3e7gafZU5HScZ3H
fnUrBkkFmRr+aYrxkaiIkmT8wpTtcLk9qdyb0Ndd7ND7k76v/yNOc1TPaoj7Jfvf
qrt0UDZzapmUDTdVixJxPZGYqo8dC4X720Z2OqxiYaMNH7pbwKtY9b3VpkDyZ189
Yr2yS53gOOqO8aHQbTmE31GiHeZFHtStfOQhoCWwj6WNO5nkWaiAPyip612//mf3
yXjUMynqFa9Ks5fgdZRXJ/H02rtxorluqZ0LiCxV6KdlTW//OFnGDrhIxGCryp2u
G9+P9cDcOi8kMq7dmj5NtqQL4520aMXowO6SGlvLEmk
-> ssh-ed25519 rxYdLA ElMhyghLYbn7DIUzoYlIfjjFtQ+pzYityCirej0/tFA
96DSltOuKXJo1qDSHTIeKwqCPUga4oooHIdaVfB8Pdk
--- NW2k58ys9cYMl9m25jnNs8879hl2N6mx2ism/yxHd8w
og~sÝ»ªcAgÙ
P"{P¹ÑøÒ×Ãćڞ<C39A>hwe<«JGL*€g¡è#ǽG

BIN
secrets/onlyoffice-jwt.age Normal file

Binary file not shown.

14
secrets/secrets.nix Normal file
View File

@ -0,0 +1,14 @@
let
nextcloud = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAnqBhNzgNUg+SA9Z5qj1oPAt5O8/HaA3NxCJVA3CzBD";
onlyoffice = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKYS0ZqeMbnwGpy84g+MRsBMUbyMjbezvZ7RDR+jzvEF";
wayne = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQC6q75AXShVjzWerPFU3l0YXIKViNF4eyragL+RQIRwdNDMzW34GgxFhtyLsmRB2jsykf4gx76zSyJoii0K4uhS761w5oDXz9mqHnBzJutDTyltLyfgLsFKY8V2sOtSracWx4y6QrtmBR3MKV642kg5mufVEmCMVxBU9oVpIOJUSW+XNYBawaSkl5SjDMLI7flj0v9Hb2dZqjQigDM1+UHxTzcMoZnR6hAzoZpPNMGyZXtrgEotNywNdpxCqRV9T/KvKHSIVYc1umiDXc+5fyRo9v7CzvYY3MvRKWbgUfTVQRmR2kqwsGAsV5W+PEUb8qqmTjPVXusKxKlpGgYfsvIZOv0LgOvQMemga8psFIS9F4YQ1xuc092bKi1LteC+ZlabMLRMux6Wbhjci+v9wnLfTyBQc6wr3wDFJoELKyaLnI7Cn0KHn0k+BiYCCr2TjKrz9XztL490vprYtvVumNFZ3rxewGnZSn/2czaFfQgnXt+9xQGWWo9TJGE5jq1jThnsIbH3G9JIQ1WhomMq6DDRhGMX2ZKDk/M9/fk0XN5nvQyJNmbiHy5srW/VANx8R9jjsVkvX29MXeK6dzpR4ImywXggpYMeHB6moy06cJUu5WoR8aLS/rO5LbZM2j14AMQ2ZK79QfUJSdloA1/HHlmnx7YtzZOebD6BCR7xgasGRw== wayne";
users = [ nextcloud onlyoffice wayne ];
launchpad = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFLf5umUfcKD+lZflpHJKLa4XMAE7aSM9pusq/TpHqQ8";
systems = [ launchpad ];
in
{
"nextcloud.age".publicKeys = [ nextcloud wayne launchpad ];
"onlyoffice-jwt.age".publicKeys = [ onlyoffice wayne launchpad ];
"whayes.age".publicKeys = [ wayne launchpad ];
}

17
secrets/whayes.age Normal file
View File

@ -0,0 +1,17 @@
age-encryption.org/v1
-> ssh-rsa 28puQg
nUKwWoxRO6V/OU2iyN6L1y4jKh/5cWfqvbQrCsHzsoYwTvxdZNPx/TfPyW8m4Ozy
e7WN6zhlqt6VQ8QSneqCS9NkQShvDKlPaReXBatmpULRy65oJMl3g3ADS+u27d1Y
qTWzyUKSMWhMUYcjnJklRMtmhEmQ07B6pB9KCe5uQ1Td5zjCzDbqZUA4zxKBb8DR
TIFiIw/fGp6riFepaoX9zSyM02qPg+t3JAqJ8+IvxJK9z6dnCHuCqNsIatnG7HaZ
WOIyRquSQeVsBrtcCwCjC/yW8fr7+gz1naBuTVmS/zffkCRXufjhA4Z+FhKxXTQc
lYg6r0Ej6UjyXhv8GUwfI4dHdrSqE2cJWv/LjT3ulGBs7kSV6udJSHMZQ/EJC/XX
P4NDbw7SA87rdnYzMTShzIvfR5zcJjKT0P9b123ORLB5fswT0Sl3HtaUHYEv3Qsy
5jQY8h2MZwv5lqGjlbdGwMCWUjNdQXgRzHqycu6EOI2Y/wDeubu+nMV8qXIvTvgm
qZB6HfCLMai9JGYxbHpW4ue8EzneRXsDSJ14sE7aiLcI3ErRnMT9J1tMctOW9MyW
sLE/CzsBaGvf4Vd2yvCyApYz3e7fUNKYBuVQSWgkegOXJfk7UW+MEGL6GVBr/MiJ
cC89vHy4Ns+Rkdxyzi9Jj+0/LbOnD2kF93DgOsv5PiY
-> ssh-ed25519 rxYdLA T1XsWxbEWodhpA8Bfq4/GPT/KyMOmzjIEcahKnw0qR4
NJrSZOxMbY4cbp/oO63+ly9rwabTlnwMs7wqucu/lDc
--- eGMQEqys85GcJRgD+SacKpG4bDdTII8yO2Ycdav7f/Y
"åøvp ÜÖ3Ø{ä‡d]'W…<57>Qf­³®‡—É}KÝô2Pf‰…

14
testBuild.sh Executable file
View File

@ -0,0 +1,14 @@
#!/usr/bin/env bash
# Script to test config files before compile
cd ~/system
echo "Testing ~/system ..."
echo "running nixos-rebuild dry-build switch --flake '.#'"
if nixos-rebuild dry-build --flake '.#'; then
echo "running home-manager -n switch --flake"
home-manager -n switch --flake .
echo "If all went well proceede with buildsys and mkhome"
else
echo "nixos-rebuild --dry-run failed, exiting script."
exit 1
fi