diff --git a/.envrc b/.envrc
deleted file mode 100644
index cffc922..0000000
--- a/.envrc
+++ /dev/null
@@ -1 +0,0 @@
-use flake . --impure
diff --git a/README.md b/README.md
index 277fe4d..dabcff3 100644
--- a/README.md
+++ b/README.md
@@ -31,11 +31,16 @@ Before using this NixOS flake configuration, you should have the following prere
## Usage
-This section should provide guidance on using and managing your NixOS configuration.
+NixOS and home-manager are called seperately,
-To rebuild and switch to the new configuration:
+To rebuild and switch to the new NixOS configuration:
```bash
-nixos-rebuild switch --flake .#thinkpad
+nixos-rebuild switch --flake .#candlekeep
```
+To rebuild and switch to the new home-manager configuration:
+
+```bash
+home-manager switch --flake .#gwg313@candlekeep
+```
diff --git a/common/gui/common.nix b/common/gui/common.nix
new file mode 100644
index 0000000..d36f8d3
--- /dev/null
+++ b/common/gui/common.nix
@@ -0,0 +1,15 @@
+{pkgs, ...}: {
+ services.printing.enable = true;
+
+ environment.systemPackages = with pkgs; [
+ gnome.adwaita-icon-theme
+ gnome.gnome-themes-extra
+ firefox-wayland
+ discord
+ qt5.qtwayland
+ qt6.qmake
+ qt6.qtwayland
+ adwaita-qt
+ adwaita-qt6
+ ];
+}
diff --git a/common/gui/dbus.nix b/common/gui/dbus.nix
new file mode 100644
index 0000000..d433ad5
--- /dev/null
+++ b/common/gui/dbus.nix
@@ -0,0 +1,14 @@
+{
+ config,
+ pkgs,
+ ...
+}: {
+ services.dbus = {
+ enable = true;
+ packages = [pkgs.dconf];
+ };
+
+ programs.dconf = {
+ enable = true;
+ };
+}
diff --git a/common/gui/displayManager.nix b/common/gui/displayManager.nix
new file mode 100644
index 0000000..816340c
--- /dev/null
+++ b/common/gui/displayManager.nix
@@ -0,0 +1,16 @@
+{
+ config,
+ lib,
+ pkgs,
+ ...
+}: {
+ services.xserver = {
+ displayManager.gdm = {
+ enable = false;
+ wayland = true;
+ };
+ displayManager.lightdm.enable = false;
+ };
+ environment.systemPackages = with pkgs; [
+ ];
+}
diff --git a/common/gui/hyprland.nix b/common/gui/hyprland.nix
new file mode 100644
index 0000000..0ca4c0d
--- /dev/null
+++ b/common/gui/hyprland.nix
@@ -0,0 +1,80 @@
+{
+ pkgs,
+ inputs,
+ ...
+}: {
+ imports = [
+ ./common.nix
+ ./dbus.nix
+ ./pipewire.nix
+ ./wayland.nix
+ ./displayManager.nix
+ ./xdg.nix
+ ];
+
+ # Security
+ security = {
+ pam.services.swaylock = {
+ text = ''
+ auth include login
+ '';
+ };
+ };
+
+ # Services
+ services = {
+ xserver = {
+ enable = true;
+ layout = "us";
+ xkbVariant = "";
+ excludePackages = [pkgs.xterm];
+ # videoDrivers = ["amdgpu"];
+ libinput = {
+ enable = true;
+ touchpad.tapping = true;
+ touchpad.naturalScrolling = true;
+ touchpad.scrollMethod = "twofinger";
+ touchpad.disableWhileTyping = true;
+ touchpad.clickMethod = "clickfinger";
+ };
+ };
+ gvfs.enable = true;
+ tumbler.enable = true;
+ gnome = {
+ sushi.enable = true;
+ gnome-keyring.enable = true;
+ };
+ };
+
+ programs = {
+ hyprland = {
+ enable = true;
+ package = inputs.hyprland.packages.${pkgs.system}.hyprland;
+ xwayland = {
+ enable = true;
+ };
+ };
+ waybar = {
+ enable = true;
+ package = pkgs.waybar.overrideAttrs (oldAttrs: {
+ mesonFlags = oldAttrs.mesonFlags ++ ["-Dexperimental=true"];
+ });
+ };
+ thunar = {
+ enable = true;
+ plugins = with pkgs.xfce; [
+ thunar-archive-plugin
+ thunar-volman
+ ];
+ };
+ };
+
+ environment.systemPackages = with pkgs; [
+ libva-utils
+ gsettings-desktop-schemas
+ ];
+ environment.sessionVariables = {
+ XDG_CURRENT_DESKTOP = "Hyprland";
+ XDG_SESSION_DESKTOP = "Hyprland";
+ };
+}
diff --git a/common/gui/pipewire.nix b/common/gui/pipewire.nix
new file mode 100644
index 0000000..a482be6
--- /dev/null
+++ b/common/gui/pipewire.nix
@@ -0,0 +1,28 @@
+{
+ config,
+ lib,
+ pkgs,
+ ...
+}: {
+ # Enable sound with pipewire.
+ sound.enable = true;
+ hardware.pulseaudio.enable = false;
+ security.rtkit.enable = true;
+ services.pipewire = {
+ enable = true;
+ alsa.enable = true;
+ alsa.support32Bit = true;
+ pulse.enable = true;
+ # If you want to use JACK applications, uncomment this
+ #jack.enable = true;
+
+ # use the example session manager (no others are packaged yet so this is enabled by default,
+ # no need to redefine it in your config for now)
+ #media-session.enable = true;
+ };
+
+ environment.systemPackages = with pkgs; [
+ pipewire
+ wireplumber
+ ];
+}
diff --git a/modules/programs/thunar.nix b/common/gui/thunar.nix
similarity index 100%
rename from modules/programs/thunar.nix
rename to common/gui/thunar.nix
diff --git a/common/gui/wayland.nix b/common/gui/wayland.nix
new file mode 100644
index 0000000..45d6bb4
--- /dev/null
+++ b/common/gui/wayland.nix
@@ -0,0 +1,26 @@
+{pkgs, ...}: {
+ environment.systemPackages = with pkgs; [
+ wlr-randr
+ wl-clipboard
+ ];
+
+ environment.sessionVariables = {
+ POLKIT_AUTH_AGENT = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1";
+ GSETTINGS_SCHEMA_DIR = "${pkgs.gsettings-desktop-schemas}/share/gsettings-schemas/${pkgs.gsettings-desktop-schemas.name}/glib-2.0/schemas";
+ WLR_NO_HARDWARE_CURSORS = "1";
+ NIXOS_OZONE_WL = "1";
+ MOZ_ENABLE_WAYLAND = "1";
+ SDL_VIDEODRIVER = "wayland";
+ _JAVA_AWT_WM_NONREPARENTING = "1";
+ CLUTTER_BACKEND = "wayland";
+ WLR_RENDERER = "vulkan";
+ GTK_USE_PORTAL = "1";
+ #NIXOS_XDG_OPEN_USE_PORTAL = "1"; # Sets the desktop portal to use flatpak
+ WLR_NO_HARDWARE_CURSOR = "1";
+ GDK_BACKEND = "wayland";
+ QT_QPA_PLATFORM = "wayland;xcb";
+ QT_AUTO_SCREEN_SCALE_FACTOR = "1";
+ QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
+ QT_QPA_PLATFORMTHEME = "qt5ct";
+ };
+}
diff --git a/common/gui/xdg.nix b/common/gui/xdg.nix
new file mode 100644
index 0000000..394b78d
--- /dev/null
+++ b/common/gui/xdg.nix
@@ -0,0 +1,26 @@
+{
+ config,
+ lib,
+ pkgs,
+ ...
+}: {
+ # XDG Portals
+ xdg = {
+ autostart.enable = true;
+ portal = {
+ enable = true;
+ extraPortals = [
+ pkgs.xdg-desktop-portal-gtk
+ ];
+ };
+ };
+ environment.systemPackages = with pkgs; [
+ xdg-utils
+ xdg-desktop-portal
+ xdg-desktop-portal-gtk
+ ];
+
+ environment.sessionVariables = {
+ XDG_SESSION_TYPE = "wayland";
+ };
+}
diff --git a/common/networking/zerotier.nix b/common/networking/zerotier.nix
new file mode 100644
index 0000000..167b140
--- /dev/null
+++ b/common/networking/zerotier.nix
@@ -0,0 +1,19 @@
+{
+ config,
+ lib,
+ pkgs,
+ inputs,
+ outputs,
+ ...
+}: {
+ services.zerotierone = {
+ joinNetworks = [
+ "48d6023c46b60a94"
+ ];
+ enable = true;
+ };
+
+ networking.extraHosts = ''
+ 192.168.194.241 nothing.zt
+ '';
+}
diff --git a/common/nixos/bluetooth.nix b/common/nixos/bluetooth.nix
new file mode 100644
index 0000000..bcf60ba
--- /dev/null
+++ b/common/nixos/bluetooth.nix
@@ -0,0 +1,9 @@
+{...}: {
+ services.blueman.enable = true;
+ hardware.bluetooth = {
+ enable = true;
+ powerOnBoot = true;
+ };
+
+ services.upower = {enable = true;};
+}
diff --git a/common/nixos/common.nix b/common/nixos/common.nix
new file mode 100644
index 0000000..fb86d63
--- /dev/null
+++ b/common/nixos/common.nix
@@ -0,0 +1,42 @@
+{
+ config,
+ lib,
+ pkgs,
+ inputs,
+ outputs,
+ ...
+}: {
+ imports = [
+ ./packages.nix
+ ./users.nix
+ ./locale.nix
+ ../../common/style/stylix.nix
+ ];
+ #
+ nixpkgs.config.allowUnfree = true;
+
+ nix.settings.experimental-features = ["nix-command" "flakes"];
+
+ nix.settings.auto-optimise-store = true;
+ nix.optimise.automatic = true;
+
+ # Disable so comma can be installed
+ programs.command-not-found.enable = false;
+ programs.nix-index-database.comma.enable = true;
+
+ nix.gc = {
+ automatic = true;
+ dates = "daily";
+ options = "--delete-older-than 14d";
+ };
+
+ services.fstrim.enable = true;
+
+ # This value determines the NixOS release from which the default
+ # settings for stateful data, like file locations and database versions
+ # on your system we e ere taken. It's perfectly fine and recommended to leave
+ # this value at the release version of the first install of this system.
+ # Before changing this value read the documentation for this option
+ # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
+ system.stateVersion = "23.05"; # Did you read the comment?
+}
diff --git a/common/nixos/laptop.nix b/common/nixos/laptop.nix
new file mode 100644
index 0000000..8d37c61
--- /dev/null
+++ b/common/nixos/laptop.nix
@@ -0,0 +1,8 @@
+{...}: {
+ imports = [./bluetooth.nix];
+ # enable's backlight switching
+ programs.light.enable = true;
+
+ # use TLP for power management
+ services.tlp.enable = true;
+}
diff --git a/common/nixos/locale.nix b/common/nixos/locale.nix
new file mode 100644
index 0000000..5364945
--- /dev/null
+++ b/common/nixos/locale.nix
@@ -0,0 +1,26 @@
+{
+ config,
+ lib,
+ pkgs,
+ inputs,
+ outputs,
+ ...
+}: {
+ # Set your time zone.
+ time.timeZone = "America/Toronto";
+
+ # Select internationalisation properties.
+ i18n.defaultLocale = "en_US.UTF-8";
+
+ i18n.extraLocaleSettings = {
+ LC_ADDRESS = "en_US.UTF-8";
+ LC_IDENTIFICATION = "en_US.UTF-8";
+ LC_MEASUREMENT = "en_US.UTF-8";
+ LC_MONETARY = "en_US.UTF-8";
+ LC_NAME = "en_US.UTF-8";
+ LC_NUMERIC = "en_US.UTF-8";
+ LC_PAPER = "en_US.UTF-8";
+ LC_TELEPHONE = "en_US.UTF-8";
+ LC_TIME = "en_US.UTF-8";
+ };
+}
diff --git a/common/nixos/packages.nix b/common/nixos/packages.nix
new file mode 100644
index 0000000..a5d8593
--- /dev/null
+++ b/common/nixos/packages.nix
@@ -0,0 +1,26 @@
+{
+ config,
+ lib,
+ pkgs,
+ inputs,
+ outputs,
+ ...
+}: {
+ # Some programs need SUID wrappers, can be configured further or are
+ # started in user sessions.
+ programs.gnupg.agent = {
+ enable = true;
+ enableSSHSupport = true;
+ };
+
+ # List packages installed in system profile. To search, run:
+ # $ nix search wget
+ environment.systemPackages = with pkgs; [
+ alejandra
+ just
+ vim
+ wget
+ home-manager
+ git
+ ];
+}
diff --git a/common/nixos/users.nix b/common/nixos/users.nix
new file mode 100644
index 0000000..4a97a8c
--- /dev/null
+++ b/common/nixos/users.nix
@@ -0,0 +1,18 @@
+{
+ config,
+ lib,
+ pkgs,
+ inputs,
+ outputs,
+ ...
+}: {
+ # Define a user account. Don't forget to set a password with 'passwd'.
+ programs.zsh.enable = true;
+ users.users.gwg313 = {
+ isNormalUser = true;
+ description = "Glen Goodwin";
+ extraGroups = ["networkmanager" "wheel" "video" "docker" "audio" "wireshark"];
+ shell = pkgs.zsh;
+ uid = 1000;
+ };
+}
diff --git a/common/style/stylix.nix b/common/style/stylix.nix
new file mode 100644
index 0000000..f4ad548
--- /dev/null
+++ b/common/style/stylix.nix
@@ -0,0 +1,37 @@
+{pkgs, ...}: {
+ stylix = {
+ base16Scheme = "${pkgs.base16-schemes}/share/themes/tokyo-night-terminal-storm.yaml";
+ image = ./wallpaper.jpg;
+ autoEnable = true;
+
+ opacity.terminal = 1.0;
+ fonts.sizes.terminal = 15;
+
+ fonts = {
+ serif = {
+ package = pkgs.meslo-lgs-nf;
+ name = "MesloLGS NF";
+ };
+
+ sansSerif = {
+ package = pkgs.meslo-lgs-nf;
+ name = "MesloLGS NF";
+ };
+
+ monospace = {
+ package = pkgs.ibm-plex;
+ name = "IBM Plex Mono";
+ };
+
+ emoji = {
+ package = pkgs.noto-fonts-emoji;
+ name = "Noto Color Emoji";
+ };
+ };
+ cursor = {
+ package = pkgs.bibata-cursors;
+ name = "Bibata-Modern-Classic";
+ size = 20;
+ };
+ };
+}
diff --git a/common/style/wallpaper.jpg b/common/style/wallpaper.jpg
new file mode 100644
index 0000000..4d55dec
Binary files /dev/null and b/common/style/wallpaper.jpg differ
diff --git a/common/virtualization/kubernetes.nix b/common/virtualization/kubernetes.nix
new file mode 100644
index 0000000..f736142
--- /dev/null
+++ b/common/virtualization/kubernetes.nix
@@ -0,0 +1,18 @@
+{
+ config,
+ pkgs,
+ user,
+ ...
+}: {
+ environment.systemPackages = with pkgs; [
+ argocd # Declarative, GitOps continuous delivery tool for Kubernetes.
+ k3d # Lightweight utility to run Kubernetes clusters using Docker.
+ k9s # Kubernetes CLI to visually navigate and manage resources in clusters.
+ kind # Kubernetes IN Docker: Tool for running local Kubernetes clusters using Docker container nodes.
+ kubectl # Kubernetes command-line tool for interacting with clusters.
+ kubectx # Switch between Kubernetes contexts and namespaces with ease.
+ kubernetes-helm # Package manager for Kubernetes applications, simplifying deployment and management.
+ minikube # Local Kubernetes cluster for easy testing and development.
+ stern # Multi-container log tailing and streaming for Kubernetes.
+ ];
+}
diff --git a/modules/desktop/virtualisation/libvirt.nix b/common/virtualization/libvirt.nix
similarity index 100%
rename from modules/desktop/virtualisation/libvirt.nix
rename to common/virtualization/libvirt.nix
diff --git a/common/virtualization/podman.nix b/common/virtualization/podman.nix
new file mode 100644
index 0000000..204f6ad
--- /dev/null
+++ b/common/virtualization/podman.nix
@@ -0,0 +1,21 @@
+{pkgs, ...}: {
+ virtualisation = {
+ podman = {
+ enable = true;
+
+ # Create a `docker` alias for podman, to use it as a drop-in replacement
+ dockerCompat = true;
+
+ # Required for containers under podman-compose to be able to talk to each other.
+ defaultNetwork.settings.dns_enabled = true;
+ };
+ };
+
+ environment.systemPackages = with pkgs; [
+ buildah # Tool for building OCI (Open Container Initiative) and Docker container images.
+ distrobox # Lightweight utility for running Linux distributions in containers.
+ dive # A tool for exploring a Docker image, allowing inspection of layer contents.
+ grype # A vulnerability scanner for container images and filesystems.
+ podman-compose # Podman plugin for managing multi-container applications.
+ ];
+}
diff --git a/flake.lock b/flake.lock
index ccb0cac..eb79b41 100644
--- a/flake.lock
+++ b/flake.lock
@@ -1,59 +1,132 @@
{
"nodes": {
- "agenix": {
+ "base16": {
"inputs": {
- "darwin": "darwin",
- "home-manager": "home-manager",
- "nixpkgs": "nixpkgs"
+ "fromYaml": "fromYaml"
},
"locked": {
- "lastModified": 1696775529,
- "narHash": "sha256-TYlE4B0ktPtlJJF9IFxTWrEeq+XKG8Ny0gc2FGEAdj0=",
- "owner": "ryantm",
- "repo": "agenix",
- "rev": "daf42cb35b2dc614d1551e37f96406e4c4a2d3e4",
+ "lastModified": 1689633990,
+ "narHash": "sha256-iwvQg2Vx0IIDWZaKo8Xmzxlv1YPHg+Kp/QSv8dRv0RY=",
+ "owner": "SenchoPens",
+ "repo": "base16.nix",
+ "rev": "dddf2e1c04845d43c89a8e9e37d574519649a404",
"type": "github"
},
"original": {
- "owner": "ryantm",
- "repo": "agenix",
+ "owner": "SenchoPens",
+ "repo": "base16.nix",
"type": "github"
}
},
- "banner": {
- "inputs": {
- "nixpkgs": [
- "gtk-nix",
- "nixpkgs"
- ]
- },
- "locked": {
- "lastModified": 1669224926,
- "narHash": "sha256-UK19yx8jNqbPfBZNUeJr2Sms7BhbDAUyJBF5w2CT6Hc=",
- "owner": "the-argus",
- "repo": "banner.nix",
- "rev": "253556f4068f5cb9728e49ac42d630cdc0ccfd58",
- "type": "github"
- },
- "original": {
- "owner": "the-argus",
- "repo": "banner.nix",
- "type": "github"
- }
- },
- "base16-schemes": {
+ "base16-alacritty": {
"flake": false,
"locked": {
- "lastModified": 1689473676,
- "narHash": "sha256-L0RhUr9+W5EPWBpLcmkKpUeCEWRs/kLzVMF3Vao2ZU0=",
+ "lastModified": 1674275109,
+ "narHash": "sha256-Adwx9yP70I6mJrjjODOgZJjt4OPPe8gJu7UuBboXO4M=",
+ "owner": "aarowill",
+ "repo": "base16-alacritty",
+ "rev": "63d8ae5dfefe5db825dd4c699d0cdc2fc2c3eaf7",
+ "type": "github"
+ },
+ "original": {
+ "owner": "aarowill",
+ "repo": "base16-alacritty",
+ "type": "github"
+ }
+ },
+ "base16-fish": {
+ "flake": false,
+ "locked": {
+ "lastModified": 1622559957,
+ "narHash": "sha256-PebymhVYbL8trDVVXxCvZgc0S5VxI7I1Hv4RMSquTpA=",
+ "owner": "tomyun",
+ "repo": "base16-fish",
+ "rev": "2f6dd973a9075dabccd26f1cded09508180bf5fe",
+ "type": "github"
+ },
+ "original": {
+ "owner": "tomyun",
+ "repo": "base16-fish",
+ "type": "github"
+ }
+ },
+ "base16-foot": {
+ "flake": false,
+ "locked": {
+ "lastModified": 1696725948,
+ "narHash": "sha256-65bz2bUL/yzZ1c8/GQASnoiGwaF8DczlxJtzik1c0AU=",
"owner": "tinted-theming",
- "repo": "base16-schemes",
- "rev": "d95123ca6377cd849cfdce92c0a24406b0c6a789",
+ "repo": "base16-foot",
+ "rev": "eedbcfa30de0a4baa03e99f5e3ceb5535c2755ce",
"type": "github"
},
"original": {
"owner": "tinted-theming",
- "repo": "base16-schemes",
+ "repo": "base16-foot",
+ "type": "github"
+ }
+ },
+ "base16-helix": {
+ "flake": false,
+ "locked": {
+ "lastModified": 1696727917,
+ "narHash": "sha256-FVrbPk+NtMra0jtlC5oxyNchbm8FosmvXIatkRbYy1g=",
+ "owner": "tinted-theming",
+ "repo": "base16-helix",
+ "rev": "dbe1480d99fe80f08df7970e471fac24c05f2ddb",
+ "type": "github"
+ },
+ "original": {
+ "owner": "tinted-theming",
+ "repo": "base16-helix",
+ "type": "github"
+ }
+ },
+ "base16-kitty": {
+ "flake": false,
+ "locked": {
+ "lastModified": 1665001328,
+ "narHash": "sha256-aRaizTYPpuWEcvoYE9U+YRX+Wsc8+iG0guQJbvxEdJY=",
+ "owner": "kdrag0n",
+ "repo": "base16-kitty",
+ "rev": "06bb401fa9a0ffb84365905ffbb959ae5bf40805",
+ "type": "github"
+ },
+ "original": {
+ "owner": "kdrag0n",
+ "repo": "base16-kitty",
+ "type": "github"
+ }
+ },
+ "base16-tmux": {
+ "flake": false,
+ "locked": {
+ "lastModified": 1696725902,
+ "narHash": "sha256-wDPg5elZPcQpu7Df0lI5O8Jv4A3T6jUQIVg63KDU+3Q=",
+ "owner": "tinted-theming",
+ "repo": "base16-tmux",
+ "rev": "c02050bebb60dbb20cb433cd4d8ce668ecc11ba7",
+ "type": "github"
+ },
+ "original": {
+ "owner": "tinted-theming",
+ "repo": "base16-tmux",
+ "type": "github"
+ }
+ },
+ "base16-vim": {
+ "flake": false,
+ "locked": {
+ "lastModified": 1663659192,
+ "narHash": "sha256-uJvaYYDMXvoo0fhBZUhN8WBXeJ87SRgof6GEK2efFT0=",
+ "owner": "chriskempson",
+ "repo": "base16-vim",
+ "rev": "3be3cd82cd31acfcab9a41bad853d9c68d30478d",
+ "type": "github"
+ },
+ "original": {
+ "owner": "chriskempson",
+ "repo": "base16-vim",
"type": "github"
}
},
@@ -81,28 +154,6 @@
"type": "github"
}
},
- "darwin": {
- "inputs": {
- "nixpkgs": [
- "agenix",
- "nixpkgs"
- ]
- },
- "locked": {
- "lastModified": 1673295039,
- "narHash": "sha256-AsdYgE8/GPwcelGgrntlijMg4t3hLFJFCRF3tL5WVjA=",
- "owner": "lnl7",
- "repo": "nix-darwin",
- "rev": "87b9d090ad39b25b2400029c64825fc2a8868943",
- "type": "github"
- },
- "original": {
- "owner": "lnl7",
- "ref": "master",
- "repo": "nix-darwin",
- "type": "github"
- }
- },
"devenv": {
"inputs": {
"flake-compat": "flake-compat",
@@ -113,11 +164,11 @@
"pre-commit-hooks": "pre-commit-hooks"
},
"locked": {
- "lastModified": 1700140236,
- "narHash": "sha256-OpukFO0rRG2hJzD+pCQq+nSWuT9dBL6DSvADQaUlmFg=",
+ "lastModified": 1701187605,
+ "narHash": "sha256-NctguPdUeDVLXFsv6vI1RlEiHLsXkeW3pgZe/mwn1BU=",
"owner": "cachix",
"repo": "devenv",
- "rev": "525d60c44de848a6b2dd468f6efddff078eb2af2",
+ "rev": "a7c4dd8f4eb1f98a6b8f04bf08364954e1e73e4f",
"type": "github"
},
"original": {
@@ -211,14 +262,14 @@
},
"flake-utils_2": {
"inputs": {
- "systems": "systems_2"
+ "systems": "systems_3"
},
"locked": {
- "lastModified": 1689068808,
- "narHash": "sha256-6ixXo3wt24N/melDWjq70UuHQLxGV8jZvooRanIHXw0=",
+ "lastModified": 1694529238,
+ "narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=",
"owner": "numtide",
"repo": "flake-utils",
- "rev": "919d646de7be200f3bf08cb76ae1f09402b6f9b4",
+ "rev": "ff7b65b44d01cf9ba6a71320833626af21126384",
"type": "github"
},
"original": {
@@ -232,11 +283,11 @@
"systems": "systems_4"
},
"locked": {
- "lastModified": 1694529238,
- "narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=",
+ "lastModified": 1685518550,
+ "narHash": "sha256-o2d0KcvaXzTrPRIo0kOLV0/QXHhDQ5DTi+OxcjO8xqY=",
"owner": "numtide",
"repo": "flake-utils",
- "rev": "ff7b65b44d01cf9ba6a71320833626af21126384",
+ "rev": "a1720a10a6cfe8234c0e93907ffe81be440f4cef",
"type": "github"
},
"original": {
@@ -263,39 +314,19 @@
"type": "github"
}
},
- "flake-utils_5": {
- "inputs": {
- "systems": "systems_6"
- },
+ "fromYaml": {
+ "flake": false,
"locked": {
- "lastModified": 1685518550,
- "narHash": "sha256-o2d0KcvaXzTrPRIo0kOLV0/QXHhDQ5DTi+OxcjO8xqY=",
- "owner": "numtide",
- "repo": "flake-utils",
- "rev": "a1720a10a6cfe8234c0e93907ffe81be440f4cef",
+ "lastModified": 1689549921,
+ "narHash": "sha256-iX0pk/uB019TdBGlaJEWvBCfydT6sRq+eDcGPifVsCM=",
+ "owner": "SenchoPens",
+ "repo": "fromYaml",
+ "rev": "11fbbbfb32e3289d3c631e0134a23854e7865c84",
"type": "github"
},
"original": {
- "owner": "numtide",
- "repo": "flake-utils",
- "type": "github"
- }
- },
- "flake-utils_6": {
- "inputs": {
- "systems": "systems_7"
- },
- "locked": {
- "lastModified": 1685518550,
- "narHash": "sha256-o2d0KcvaXzTrPRIo0kOLV0/QXHhDQ5DTi+OxcjO8xqY=",
- "owner": "numtide",
- "repo": "flake-utils",
- "rev": "a1720a10a6cfe8234c0e93907ffe81be440f4cef",
- "type": "github"
- },
- "original": {
- "owner": "numtide",
- "repo": "flake-utils",
+ "owner": "SenchoPens",
+ "repo": "fromYaml",
"type": "github"
}
},
@@ -366,64 +397,23 @@
"type": "github"
}
},
- "gitignore_4": {
- "inputs": {
- "nixpkgs": [
- "pre-commit-hooks",
- "nixpkgs"
- ]
- },
- "locked": {
- "lastModified": 1660459072,
- "narHash": "sha256-8DFJjXG8zqoONA1vXtgeKXy68KdJL5UaXR8NtVMUbx8=",
- "owner": "hercules-ci",
- "repo": "gitignore.nix",
- "rev": "a20de23b925fd8264fd7fad6454652e142fd7f73",
- "type": "github"
- },
- "original": {
- "owner": "hercules-ci",
- "repo": "gitignore.nix",
- "type": "github"
- }
- },
- "gtk-nix": {
- "inputs": {
- "banner": "banner",
- "flake-utils": "flake-utils_2",
- "nixpkgs": "nixpkgs_2"
- },
- "locked": {
- "lastModified": 1692384535,
- "narHash": "sha256-lFOEsDLV7kuEAcHS7HfyGewTcdSkzTxM+l3XwGhzLgU=",
- "owner": "the-argus",
- "repo": "gtk-nix",
- "rev": "e77b9e68aa818b87389c682b4fd018ad451a85d3",
- "type": "github"
- },
- "original": {
- "owner": "the-argus",
- "repo": "gtk-nix",
- "type": "github"
- }
- },
"home-manager": {
"inputs": {
"nixpkgs": [
- "agenix",
"nixpkgs"
]
},
"locked": {
- "lastModified": 1682203081,
- "narHash": "sha256-kRL4ejWDhi0zph/FpebFYhzqlOBrk0Pl3dzGEKSAlEw=",
+ "lastModified": 1700553346,
+ "narHash": "sha256-kW7uWsCv/lxuA824Ng6EYD9hlVYRyjuFn0xBbYltAeQ=",
"owner": "nix-community",
"repo": "home-manager",
- "rev": "32d3e39c491e2f91152c84f8ad8b003420eab0a1",
+ "rev": "1aabb0a31b25ad83cfaa37c3fe29053417cd9a0f",
"type": "github"
},
"original": {
"owner": "nix-community",
+ "ref": "master",
"repo": "home-manager",
"type": "github"
}
@@ -431,15 +421,16 @@
"home-manager_2": {
"inputs": {
"nixpkgs": [
+ "stylix",
"nixpkgs"
]
},
"locked": {
- "lastModified": 1700118404,
- "narHash": "sha256-XkqpZpVoy1FV7UbiLkP+fQxxv/6KnwLYkFEHgE8z2IQ=",
+ "lastModified": 1691882297,
+ "narHash": "sha256-e1/LAQSGLnBywfA1TfMl0Vj3tvYka73XOZ/D2/CJowE=",
"owner": "nix-community",
"repo": "home-manager",
- "rev": "c1a033122df8a3c74fda3780c83a104a7d60873c",
+ "rev": "c3ab5ea047e6dc73df530948f7367455749d8906",
"type": "github"
},
"original": {
@@ -451,23 +442,21 @@
"hyprland": {
"inputs": {
"hyprland-protocols": "hyprland-protocols",
- "nixpkgs": [
- "nixpkgs"
- ],
- "systems": "systems_3",
+ "nixpkgs": "nixpkgs",
+ "systems": "systems_2",
"wlroots": "wlroots",
"xdph": "xdph"
},
"locked": {
- "lastModified": 1700168597,
- "narHash": "sha256-N+FsHxNTnSnqQW0e1SbMm3Vw59PZ7KTj+vR1hivSWCw=",
- "owner": "vaxerski",
+ "lastModified": 1700592218,
+ "narHash": "sha256-vHzDbBrZ5EsfVUMLgjuugf6OqB+iOLjKLO9O5n2occ4=",
+ "owner": "hyprwm",
"repo": "Hyprland",
- "rev": "1d9bfa60a19975274afb5fd9a3492f8cb6742c2e",
+ "rev": "472926528428cd714c90f157e639fc0466611c8b",
"type": "github"
},
"original": {
- "owner": "vaxerski",
+ "owner": "hyprwm",
"repo": "Hyprland",
"type": "github"
}
@@ -515,16 +504,16 @@
},
"neovim-config": {
"inputs": {
- "nixpkgs": "nixpkgs_3",
+ "nixpkgs": "nixpkgs_2",
"nixvim": "nixvim",
"pre-commit-hooks": "pre-commit-hooks_3"
},
"locked": {
- "lastModified": 1699682101,
- "narHash": "sha256-hl3MhlR2GZ4CIiiwkKhI75nN7edRYYQeo/XSyUjcyB8=",
+ "lastModified": 1700503498,
+ "narHash": "sha256-93Lw2/JJaDCfG2TscRd3qLNLI1QWpVk+nA2CVniwRlo=",
"owner": "gwg313",
"repo": "nvim-nix",
- "rev": "f5d17fcb2a367007e9e108a9dc8a5f393838ae33",
+ "rev": "157cf0b0150ea8095d559d9a6a6ca0e2962d476d",
"type": "github"
},
"original": {
@@ -557,25 +546,6 @@
"type": "github"
}
},
- "nix-colors": {
- "inputs": {
- "base16-schemes": "base16-schemes",
- "nixpkgs-lib": "nixpkgs-lib"
- },
- "locked": {
- "lastModified": 1695388192,
- "narHash": "sha256-2jelpE7xK+4M7jZNyWL7QYOYegQLYBDQS5bvdo8XRUQ=",
- "owner": "misterio77",
- "repo": "nix-colors",
- "rev": "37227f274b34a3b51649166deb94ce7fec2c6a4c",
- "type": "github"
- },
- "original": {
- "owner": "misterio77",
- "repo": "nix-colors",
- "type": "github"
- }
- },
"nix-index-database": {
"inputs": {
"nixpkgs": [
@@ -583,11 +553,11 @@
]
},
"locked": {
- "lastModified": 1699760693,
- "narHash": "sha256-u/gkNUHQR/q23voqE5J4xmEWQIAqR+g3lUnCtzn0k7Y=",
+ "lastModified": 1700363379,
+ "narHash": "sha256-fBEVPFwSZ6AmBE1s1oT7E9WVuqRghruxTnSQ8UUlMkw=",
"owner": "Mic92",
"repo": "nix-index-database",
- "rev": "8aff4ca3dee60d1422489fe8d52c2f837b3ad113",
+ "rev": "27920146e671a0d565aaa7452907383be14d8d82",
"type": "github"
},
"original": {
@@ -598,11 +568,11 @@
},
"nixpkgs": {
"locked": {
- "lastModified": 1677676435,
- "narHash": "sha256-6FxdcmQr5JeZqsQvfinIMr0XcTyTuR7EXX0H3ANShpQ=",
+ "lastModified": 1698134075,
+ "narHash": "sha256-foCD+nuKzfh49bIoiCBur4+Fx1nozo+4C/6k8BYk4sg=",
"owner": "NixOS",
"repo": "nixpkgs",
- "rev": "a08d6979dd7c82c4cef0dcc6ac45ab16051c1169",
+ "rev": "8efd5d1e283604f75a808a20e6cde0ef313d07d4",
"type": "github"
},
"original": {
@@ -612,21 +582,6 @@
"type": "github"
}
},
- "nixpkgs-lib": {
- "locked": {
- "lastModified": 1694911725,
- "narHash": "sha256-8YqI+YU1DGclEjHsnrrGfqsQg3Wyga1DfTbJrN3Ud0c=",
- "owner": "nix-community",
- "repo": "nixpkgs.lib",
- "rev": "819180647f428a3826bfc917a54449da1e532ce0",
- "type": "github"
- },
- "original": {
- "owner": "nix-community",
- "repo": "nixpkgs.lib",
- "type": "github"
- }
- },
"nixpkgs-regression": {
"locked": {
"lastModified": 1643052045,
@@ -691,54 +646,23 @@
"type": "github"
}
},
- "nixpkgs-stable_4": {
- "locked": {
- "lastModified": 1685801374,
- "narHash": "sha256-otaSUoFEMM+LjBI1XL/xGB5ao6IwnZOXc47qhIgJe8U=",
- "owner": "NixOS",
- "repo": "nixpkgs",
- "rev": "c37ca420157f4abc31e26f436c1145f8951ff373",
- "type": "github"
- },
- "original": {
- "owner": "NixOS",
- "ref": "nixos-23.05",
- "repo": "nixpkgs",
- "type": "github"
- }
- },
"nixpkgs-unstable": {
"locked": {
- "lastModified": 1700108881,
- "narHash": "sha256-+Lqybl8kj0+nD/IlAWPPG/RDTa47gff9nbei0u7BntE=",
+ "lastModified": 1700390070,
+ "narHash": "sha256-de9KYi8rSJpqvBfNwscWdalIJXPo8NjdIZcEJum1mH0=",
"owner": "nixos",
"repo": "nixpkgs",
- "rev": "7414e9ee0b3e9903c24d3379f577a417f0aae5f1",
+ "rev": "e4ad989506ec7d71f7302cc3067abd82730a4beb",
"type": "github"
},
"original": {
"owner": "nixos",
- "ref": "nixpkgs-unstable",
+ "ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
- "locked": {
- "lastModified": 1692264070,
- "narHash": "sha256-WepAkIL2UcHOj7JJiaFS/vxrA9lklQHv8p+xGL+7oQ0=",
- "owner": "NixOS",
- "repo": "nixpkgs",
- "rev": "42c25608aa2ad4e5d3716d8d63c606063513ba33",
- "type": "github"
- },
- "original": {
- "id": "nixpkgs",
- "ref": "nixos-unstable",
- "type": "indirect"
- }
- },
- "nixpkgs_3": {
"locked": {
"lastModified": 1699099776,
"narHash": "sha256-X09iKJ27mGsGambGfkKzqvw5esP1L/Rf8H3u3fCqIiU=",
@@ -754,7 +678,7 @@
"type": "github"
}
},
- "nixpkgs_4": {
+ "nixpkgs_3": {
"locked": {
"lastModified": 1698924604,
"narHash": "sha256-GCFbkl2tj8fEZBZCw3Tc0AkGo0v+YrQlohhEGJ/X4s0=",
@@ -770,13 +694,13 @@
"type": "github"
}
},
- "nixpkgs_5": {
+ "nixpkgs_4": {
"locked": {
- "lastModified": 1699963925,
- "narHash": "sha256-LE7OV/SwkIBsCpAlIPiFhch/J+jBDGEZjNfdnzCnCrY=",
+ "lastModified": 1700390070,
+ "narHash": "sha256-de9KYi8rSJpqvBfNwscWdalIJXPo8NjdIZcEJum1mH0=",
"owner": "nixos",
"repo": "nixpkgs",
- "rev": "bf744fe90419885eefced41b3e5ae442d732712d",
+ "rev": "e4ad989506ec7d71f7302cc3067abd82730a4beb",
"type": "github"
},
"original": {
@@ -789,8 +713,8 @@
"nixvim": {
"inputs": {
"beautysh": "beautysh",
- "flake-utils": "flake-utils_3",
- "nixpkgs": "nixpkgs_4",
+ "flake-utils": "flake-utils_2",
+ "nixpkgs": "nixpkgs_3",
"pre-commit-hooks": "pre-commit-hooks_2"
},
"locked": {
@@ -867,7 +791,7 @@
"pre-commit-hooks_2": {
"inputs": {
"flake-compat": "flake-compat_2",
- "flake-utils": "flake-utils_4",
+ "flake-utils": "flake-utils_3",
"gitignore": "gitignore_2",
"nixpkgs": [
"neovim-config",
@@ -893,7 +817,7 @@
"pre-commit-hooks_3": {
"inputs": {
"flake-compat": "flake-compat_3",
- "flake-utils": "flake-utils_5",
+ "flake-utils": "flake-utils_4",
"gitignore": "gitignore_3",
"nixpkgs": [
"neovim-config",
@@ -915,45 +839,48 @@
"type": "github"
}
},
- "pre-commit-hooks_4": {
+ "root": {
"inputs": {
+ "devenv": "devenv",
+ "home-manager": "home-manager",
+ "hyprland": "hyprland",
+ "neovim-config": "neovim-config",
+ "nix-index-database": "nix-index-database",
+ "nixpkgs": "nixpkgs_4",
+ "nixpkgs-unstable": "nixpkgs-unstable",
+ "stylix": "stylix"
+ }
+ },
+ "stylix": {
+ "inputs": {
+ "base16": "base16",
+ "base16-alacritty": "base16-alacritty",
+ "base16-fish": "base16-fish",
+ "base16-foot": "base16-foot",
+ "base16-helix": "base16-helix",
+ "base16-kitty": "base16-kitty",
+ "base16-tmux": "base16-tmux",
+ "base16-vim": "base16-vim",
"flake-compat": "flake-compat_4",
- "flake-utils": "flake-utils_6",
- "gitignore": "gitignore_4",
+ "home-manager": "home-manager_2",
"nixpkgs": [
"nixpkgs"
- ],
- "nixpkgs-stable": "nixpkgs-stable_4"
+ ]
},
"locked": {
- "lastModified": 1700064067,
- "narHash": "sha256-1ZWNDzhu8UlVCK7+DUN9dVQfiHX1bv6OQP9VxstY/gs=",
- "owner": "cachix",
- "repo": "pre-commit-hooks.nix",
- "rev": "e558068cba67b23b4fbc5537173dbb43748a17e8",
+ "lastModified": 1700302760,
+ "narHash": "sha256-JpOJf9Nj260rTrVuYonP9CiGzj+43AGPOfhF72XkQvU=",
+ "owner": "danth",
+ "repo": "stylix",
+ "rev": "a15c3196c1d620c18cbee8229092598384a89fef",
"type": "github"
},
"original": {
- "owner": "cachix",
- "repo": "pre-commit-hooks.nix",
+ "owner": "danth",
+ "repo": "stylix",
"type": "github"
}
},
- "root": {
- "inputs": {
- "agenix": "agenix",
- "devenv": "devenv",
- "gtk-nix": "gtk-nix",
- "home-manager": "home-manager_2",
- "hyprland": "hyprland",
- "neovim-config": "neovim-config",
- "nix-colors": "nix-colors",
- "nix-index-database": "nix-index-database",
- "nixpkgs": "nixpkgs_5",
- "nixpkgs-unstable": "nixpkgs-unstable",
- "pre-commit-hooks": "pre-commit-hooks_4"
- }
- },
"systems": {
"locked": {
"lastModified": 1681028828,
@@ -970,21 +897,6 @@
}
},
"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"
- }
- },
- "systems_3": {
"locked": {
"lastModified": 1689347949,
"narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=",
@@ -999,6 +911,21 @@
"type": "github"
}
},
+ "systems_3": {
+ "locked": {
+ "lastModified": 1681028828,
+ "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
+ "owner": "nix-systems",
+ "repo": "default",
+ "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
+ "type": "github"
+ },
+ "original": {
+ "owner": "nix-systems",
+ "repo": "default",
+ "type": "github"
+ }
+ },
"systems_4": {
"locked": {
"lastModified": 1681028828,
@@ -1029,36 +956,6 @@
"type": "github"
}
},
- "systems_6": {
- "locked": {
- "lastModified": 1681028828,
- "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
- "owner": "nix-systems",
- "repo": "default",
- "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
- "type": "github"
- },
- "original": {
- "owner": "nix-systems",
- "repo": "default",
- "type": "github"
- }
- },
- "systems_7": {
- "locked": {
- "lastModified": 1681028828,
- "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
- "owner": "nix-systems",
- "repo": "default",
- "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
- "type": "github"
- },
- "original": {
- "owner": "nix-systems",
- "repo": "default",
- "type": "github"
- }
- },
"utils": {
"locked": {
"lastModified": 1678901627,
diff --git a/flake.nix b/flake.nix
index 384f0fa..c00ef9f 100644
--- a/flake.nix
+++ b/flake.nix
@@ -1,79 +1,114 @@
{
- description = "My Nix Config";
+ description = "gwg313 Nix configs";
inputs = {
+ # Nixpkgs
+ #nixpkgs.url = "github:nixos/nixpkgs/nixos-23.05";
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
- nixpkgs-unstable.url = "github:nixos/nixpkgs/nixpkgs-unstable";
- home-manager = {
- url = "github:nix-community/home-manager";
+ # You can access packages and modules from different nixpkgs revs
+ # at the same time. Here's an working example:
+ nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
+ # Also see the 'unstable-packages' overlay at 'overlays/default.nix'.
+
+ # Home manager
+ home-manager.url = "github:nix-community/home-manager/master";
+ home-manager.inputs.nixpkgs.follows = "nixpkgs";
+
+ nix-index-database = {
+ url = "github:Mic92/nix-index-database";
inputs.nixpkgs.follows = "nixpkgs";
};
hyprland = {
- # Official Hyprland flake
- url = "github:vaxerski/Hyprland"; # Add "hyprland.nixosModules.default" to the host modules
- inputs.nixpkgs.follows = "nixpkgs";
+ url = "github:hyprwm/Hyprland";
+ # Don't follow nixpkgs or cache will miss
+ # inputs.nixpkgs.follows = "nixpkgs";
};
devenv = {
url = "github:cachix/devenv/main";
inputs.nixpkgs.follows = "nixpkgs";
};
- nix-colors.url = "github:misterio77/nix-colors";
- gtk-nix.url = "github:the-argus/gtk-nix";
- nix-index-database.url = "github:Mic92/nix-index-database";
- nix-index-database.inputs.nixpkgs.follows = "nixpkgs";
-
- agenix.url = "github:ryantm/agenix";
+ stylix = {
+ url = "github:danth/stylix";
+ inputs.nixpkgs.follows = "nixpkgs";
+ };
neovim-config.url = "github:gwg313/nvim-nix";
-
- pre-commit-hooks.url = "github:cachix/pre-commit-hooks.nix";
- pre-commit-hooks.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = {
self,
nixpkgs,
+ home-manager,
...
} @ inputs: let
- system = "x86_64-linux";
- user = "glen";
-
- pkgs = import nixpkgs {
- inherit system;
- config.allowUnfree = true;
- };
-
- lib = nixpkgs.lib;
+ inherit (self) outputs;
+ # Supported systems for your flake packages, shell, etc.
+ systems = [
+ "aarch64-linux"
+ "i686-linux"
+ "x86_64-linux"
+ "aarch64-darwin"
+ "x86_64-darwin"
+ ];
+ # This is a function that generates an attribute by calling a function you
+ # pass to it, with each system as an argument
+ forAllSystems = nixpkgs.lib.genAttrs systems;
+ user = "gwg313";
in {
+ # Your custom packages
+ # Accessible through 'nix build', 'nix shell', etc
+ packages = forAllSystems (system: import ./pkgs nixpkgs.legacyPackages.${system});
+ # Formatter for your nix files, available through 'nix fmt'
+ # Other options beside 'alejandra' include 'nixpkgs-fmt'
+ formatter = forAllSystems (system: nixpkgs.legacyPackages.${system}.alejandra);
+
# Your custom packages and modifications, exported as overlays
overlays = import ./overlays {inherit inputs;};
+ # Reusable nixos modules you might want to export
+ # These are usually stuff you would upstream into nixpkgs
+ nixosModules = import ./modules/nixos;
+ # Reusable home-manager modules you might want to export
+ # These are usually stuff you would upstream into home-manager
+ homeManagerModules = import ./modules/home-manager;
- nixosConfigurations = (
- import ./hosts {
- inherit (nixpkgs) lib;
- specialArgs = {inherit inputs;};
- inherit inputs user system;
- }
- );
-
- devShells.${system} = {
- default = pkgs.mkShell {
- inherit (self.checks.${system}.pre-commit-check) shellHook;
- buildInputs = with pkgs; [
- alejandra
+ # NixOS configuration entrypoint
+ # Available through 'nixos-rebuild --flake .#your-hostname'
+ nixosConfigurations = {
+ candlekeep = nixpkgs.lib.nixosSystem {
+ specialArgs = {inherit user inputs outputs;};
+ modules = [
+ # > Our main nixos configuration file <
+ ./hosts/candlekeep/configuration.nix
];
};
};
- checks.${system} = {
- pre-commit-check = inputs.pre-commit-hooks.lib.${system}.run {
- src = ./.;
- hooks = {
- alejandra.enable = true;
- };
+ # Standalone home-manager configuration entrypoint
+ # Available through 'home-manager --flake .#your-username@your-hostname'
+ homeConfigurations = {
+ "gwg313@candlekeep" = home-manager.lib.homeManagerConfiguration {
+ pkgs = nixpkgs.legacyPackages.x86_64-linux; # Home-manager requires 'pkgs' instance
+ extraSpecialArgs = {inherit inputs outputs;};
+ modules = [
+ # > Our main home-manager configuration file <
+ ./home-manager/machines/candlekeep.nix
+ inputs.stylix.homeManagerModules.stylix
+ ];
+ };
+ };
+
+ homeConfigurations = {
+ "gwg313@dorino" = home-manager.lib.homeManagerConfiguration {
+ pkgs = nixpkgs.legacyPackages.x86_64-linux; # Home-manager requires 'pkgs' instance
+ extraSpecialArgs = {inherit inputs outputs;};
+ modules = [
+ # > Our main home-manager configuration file <
+ ./home-manager/machines/dorino.nix
+ inputs.stylix.homeManagerModules.stylix
+ ];
};
};
};
diff --git a/home-manager/machines/candlekeep.nix b/home-manager/machines/candlekeep.nix
new file mode 100644
index 0000000..0637560
--- /dev/null
+++ b/home-manager/machines/candlekeep.nix
@@ -0,0 +1,111 @@
+# This is your home-manager configuration file
+# Use this to configure your home environment (it replaces ~/.config/nixpkgs/home.nix)
+{
+ inputs,
+ outputs,
+ lib,
+ config,
+ pkgs,
+ ...
+}: {
+ # You can import other home-manager modules here
+ imports = [
+ # If you want to use modules your own flake exports (from modules/home-manager):
+ # outputs.homeManagerModules.example
+
+ # Or modules exported from other flakes (such as nix-colors):
+ # inputs.nix-colors.homeManagerModules.default
+
+ # You can also split up your configuration and import pieces of it here:
+ # ./nvim.nix
+ ../modules/common.nix
+ ../modules/hyprland.nix
+ ../modules/common-gui.nix
+ ../modules/linux-gui.nix
+ ../modules/devenv.nix
+ ];
+
+ nixpkgs = {
+ # You can add overlays here
+ overlays = [
+ # Add overlays your own flake exports (from overlays and pkgs dir):
+ outputs.overlays.additions
+ outputs.overlays.modifications
+ outputs.overlays.unstable-packages
+
+ # You can also add overlays exported from other flakes:
+ # neovim-nightly-overlay.overlays.default
+ (final: prev: {
+ neovim = inputs.neovim-config.packages."x86_64-linux".default;
+ })
+ # Or define it inline, for example:
+ # (final: prev: {
+ # hi = final.hello.overrideAttrs (oldAttrs: {
+ # patches = [ ./change-hello-to-hi.patch ];
+ # });
+ # })
+ ];
+ # Configure your nixpkgs instance
+ config = {
+ # Disable if you don't want unfree packages
+ allowUnfree = true;
+ # Workaround for https://github.com/nix-community/home-manager/issues/2942
+ allowUnfreePredicate = _: true;
+ };
+ };
+
+ home = {
+ username = "gwg313";
+ homeDirectory = "/home/gwg313";
+ };
+
+ stylix = {
+ base16Scheme = "${pkgs.base16-schemes}/share/themes/tokyo-night-terminal-storm.yaml";
+ image = ./wallpaper.jpg;
+ autoEnable = true;
+
+ opacity.terminal = 1.0;
+ fonts.sizes.terminal = 15;
+
+ fonts = {
+ serif = {
+ package = pkgs.meslo-lgs-nf;
+ name = "MesloLGS NF";
+ };
+
+ sansSerif = {
+ package = pkgs.meslo-lgs-nf;
+ name = "MesloLGS NF";
+ };
+
+ monospace = {
+ package = pkgs.ibm-plex;
+ name = "IBM Plex Mono";
+ };
+
+ emoji = {
+ package = pkgs.noto-fonts-emoji;
+ name = "Noto Color Emoji";
+ };
+ };
+ cursor = {
+ package = pkgs.bibata-cursors;
+ name = "Bibata-Modern-Classic";
+ size = 20;
+ };
+ };
+
+ # Add stuff for your user as you see fit:
+ # programs.neovim.enable = true;
+ # home.packages = with pkgs; [ steam ];
+
+ # Enable home-manager and git
+ programs.home-manager.enable = true;
+ programs.git.enable = true;
+
+ # Nicely reload system units when changing configs
+ systemd.user.startServices = "sd-switch";
+
+ # https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
+ home.stateVersion = "23.05";
+}
diff --git a/home-manager/machines/dorino.nix b/home-manager/machines/dorino.nix
new file mode 100644
index 0000000..d8b2380
--- /dev/null
+++ b/home-manager/machines/dorino.nix
@@ -0,0 +1,107 @@
+# This is your home-manager configuration file
+# Use this to configure your home environment (it replaces ~/.config/nixpkgs/home.nix)
+{
+ inputs,
+ outputs,
+ lib,
+ config,
+ pkgs,
+ ...
+}: {
+ # You can import other home-manager modules here
+ imports = [
+ # If you want to use modules your own flake exports (from modules/home-manager):
+ # outputs.homeManagerModules.example
+
+ # Or modules exported from other flakes (such as nix-colors):
+ # inputs.nix-colors.homeManagerModules.default
+
+ # You can also split up your configuration and import pieces of it here:
+ # ./nvim.nix
+ ../modules/common.nix
+ ];
+
+ nixpkgs = {
+ # You can add overlays here
+ overlays = [
+ # Add overlays your own flake exports (from overlays and pkgs dir):
+ outputs.overlays.additions
+ outputs.overlays.modifications
+ outputs.overlays.unstable-packages
+
+ # You can also add overlays exported from other flakes:
+ # neovim-nightly-overlay.overlays.default
+ (final: prev: {
+ neovim = inputs.neovim-config.packages."x86_64-linux".default;
+ })
+ # Or define it inline, for example:
+ # (final: prev: {
+ # hi = final.hello.overrideAttrs (oldAttrs: {
+ # patches = [ ./change-hello-to-hi.patch ];
+ # });
+ # })
+ ];
+ # Configure your nixpkgs instance
+ config = {
+ # Disable if you don't want unfree packages
+ allowUnfree = true;
+ # Workaround for https://github.com/nix-community/home-manager/issues/2942
+ allowUnfreePredicate = _: true;
+ };
+ };
+
+ home = {
+ username = "gwg313";
+ homeDirectory = "/home/gwg313";
+ };
+
+ stylix = {
+ base16Scheme = "${pkgs.base16-schemes}/share/themes/tokyo-night-terminal-storm.yaml";
+ image = ./wallpaper.jpg;
+ autoEnable = true;
+
+ opacity.terminal = 1.0;
+ fonts.sizes.terminal = 15;
+
+ fonts = {
+ serif = {
+ package = pkgs.meslo-lgs-nf;
+ name = "MesloLGS NF";
+ };
+
+ sansSerif = {
+ package = pkgs.meslo-lgs-nf;
+ name = "MesloLGS NF";
+ };
+
+ monospace = {
+ package = pkgs.ibm-plex;
+ name = "IBM Plex Mono";
+ };
+
+ emoji = {
+ package = pkgs.noto-fonts-emoji;
+ name = "Noto Color Emoji";
+ };
+ };
+ cursor = {
+ package = pkgs.bibata-cursors;
+ name = "Bibata-Modern-Classic";
+ size = 20;
+ };
+ };
+
+ # Add stuff for your user as you see fit:
+ # programs.neovim.enable = true;
+ # home.packages = with pkgs; [ steam ];
+
+ # Enable home-manager and git
+ programs.home-manager.enable = true;
+ programs.git.enable = true;
+
+ # Nicely reload system units when changing configs
+ systemd.user.startServices = "sd-switch";
+
+ # https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
+ home.stateVersion = "23.05";
+}
diff --git a/home-manager/machines/wallpaper.jpg b/home-manager/machines/wallpaper.jpg
new file mode 100644
index 0000000..4d55dec
Binary files /dev/null and b/home-manager/machines/wallpaper.jpg differ
diff --git a/home-manager/modules/alacritty.nix b/home-manager/modules/alacritty.nix
new file mode 100644
index 0000000..1d25e41
--- /dev/null
+++ b/home-manager/modules/alacritty.nix
@@ -0,0 +1,9 @@
+# A fast, GPU-accelerated terminal emulator.
+{...}: {
+ programs.alacritty = {
+ enable = true;
+ settings = {
+ env = {TERM = "xterm-256color";};
+ };
+ };
+}
diff --git a/home-manager/modules/ansible.nix b/home-manager/modules/ansible.nix
new file mode 100644
index 0000000..8ca8ccc
--- /dev/null
+++ b/home-manager/modules/ansible.nix
@@ -0,0 +1,12 @@
+{
+ config,
+ lib,
+ pkgs,
+ ...
+}: {
+ home.packages = with pkgs; [
+ ansible
+ ansible-later
+ ansible-doctor
+ ];
+}
diff --git a/home-manager/modules/atuin.nix b/home-manager/modules/atuin.nix
new file mode 100644
index 0000000..0ade0ff
--- /dev/null
+++ b/home-manager/modules/atuin.nix
@@ -0,0 +1,9 @@
+# ✨ Magical shell history
+{...}: {
+ programs.atuin = {
+ enable = true;
+ flags = [
+ "--disable-up-arrow"
+ ];
+ };
+}
diff --git a/home-manager/modules/bat.nix b/home-manager/modules/bat.nix
new file mode 100644
index 0000000..f53b995
--- /dev/null
+++ b/home-manager/modules/bat.nix
@@ -0,0 +1,6 @@
+# A cat clone with syntax highlighting and Git integration.
+{...}: {
+ programs.bat = {
+ enable = true;
+ };
+}
diff --git a/home-manager/modules/broot.nix b/home-manager/modules/broot.nix
new file mode 100644
index 0000000..bc473a5
--- /dev/null
+++ b/home-manager/modules/broot.nix
@@ -0,0 +1,7 @@
+# An interactive treeview directory navigator
+{...}: {
+ programs.broot = {
+ enable = true;
+ enableZshIntegration = true;
+ };
+}
diff --git a/home-manager/modules/common-gui.nix b/home-manager/modules/common-gui.nix
new file mode 100644
index 0000000..1c41cc8
--- /dev/null
+++ b/home-manager/modules/common-gui.nix
@@ -0,0 +1,20 @@
+{pkgs, ...}: {
+ imports = [
+ ./alacritty.nix
+ ./fuzzel.nix
+ ];
+
+ fonts.fontconfig.enable = true;
+
+ # Bluetooth power alerts
+ services.poweralertd.enable = true;
+
+ home.packages = with pkgs; [
+ # fonts
+ rPackages.fontawesome
+ nerdfonts
+ ubuntu_font_family
+ noto-fonts-cjk-sans
+ yt-dlp
+ ];
+}
diff --git a/home-manager/modules/common.nix b/home-manager/modules/common.nix
new file mode 100644
index 0000000..c53ec7c
--- /dev/null
+++ b/home-manager/modules/common.nix
@@ -0,0 +1,93 @@
+{
+ config,
+ lib,
+ pkgs,
+ ...
+}: {
+ imports = [
+ ./git.nix
+ ./tmux/tmux.nix
+ ./zsh.nix
+ ./starship.nix
+ ./atuin.nix
+ ./bat.nix
+ ./broot.nix
+ ./eza.nix
+ ];
+ nixpkgs.config.allowUnfree = true;
+
+ home.packages = with pkgs;
+ [
+ # Editors
+ vim # Highly configurable text editor popular for efficiency and extensibility.
+ neovim # Improved version of vim, often used with overlays.
+
+ # Builtin Replacements
+ htop # Modern and interactive process viewer, an improved alternative to 'top.'
+ bottom # Similar to 'htop,' providing a top-like interface with additional features.
+ colordiff # Tool to colorize 'diff' output, making differences between files easier to spot.
+ du-dust # Modern replacement for 'du,' offering intuitive and visually appealing disk usage analysis.
+ eza # Modern replacement for 'ls' with additional features and a user-friendly interface.
+ fd # Faster and user-friendly alternative to 'find' for searching and locating files.
+ ripgrep # Faster alternative to 'grep,' recursively searching directories for a regex pattern.
+ thefuck # Handy tool that corrects mistyped console commands.
+ zoxide # Faster alternative to 'cd' for quick and efficient navigation.
+ fzf # Fuzzy finder for rapid file and directory searches.
+ tealdeer # Command-line utility providing simplified and community-driven man pages.
+ viddy # A modern watch command. Time machine and pager etc.
+ moar # A syntax highlighting pager
+
+ # Multiplexers
+ tmate # Terminal multiplexer allowing multiple users to access a single session.
+
+ # Misc Tools
+ tree # Displays directory structure in a tree-like format.
+ p7zip # Command-line tool for handling 7z compressed files.
+ yt-dlp # Fork of youtube-dl, facilitating video downloads from various sites.
+ mkvtoolnix # Set of tools to create, alter, and inspect Matroska files (MKV).
+ hyperfine # Command-line benchmarking tool.
+ unzip # Command-line tool for extracting files from ZIP archives.
+
+ # TUI Apps
+ #ncdu_2
+
+ # Networking
+ gping # Ping with TUI for a visual representation of network connectivity.
+ iperf # Tool for measuring maximum TCP and UDP bandwidth performance.
+ nmap # Network scanning tool for discovering hosts and services.
+ wget # Command-line utility for downloading files from the web.
+ speedtest-cli # Command-line interface for testing internet bandwidth.
+ rsync # Fast and versatile file copying and synchronization tool.
+ dig # A command-line tool for querying DNS name servers, providing detailed information about domain names, IP addresses, and DNS records.
+
+ picocom # Minimal terminal emulator for microcontrollers.
+
+ # Docs
+ pandoc # Document converter transforming files between markup formats.
+ gnumake # GNU make tool, a build automation tool for compiling projects.
+
+ # Useful Utils
+ grex # Tool generating regular expressions from user-provided test cases.
+ git-cliff # Tool for visualizing project commit history and generating release notes.
+
+ # Nix Tools
+ nix-prefetch-github # Tool for fetching the latest version and hash of a GitHub repository.
+ direnv # Environment switcher for the shell.
+ nix-direnv # Integration of direnv with the Nix package manager.
+ alejandra # Nix code formatter.
+ nix-init # Simplifies the process of creating Nix projects.
+ ]
+ ++ lib.optionals stdenv.isDarwin [
+ coreutils # Essential GNU core utilities, including `dd` with the `--status=progress` option for more informative progress reporting.
+ wifi-password # Command-line tool to quickly retrieve the current Wi-Fi password, simplifying access to network credentials.
+ time # GNU time command, providing more detailed and accurate information about the resource usage of a command or process.
+ ]
+ ++ lib.optionals stdenv.isLinux [
+ iputils # Package providing essential network utilities such as `ping` and `ifconfig` for network diagnostics and configuration.
+ libuuid # Library for generating universally unique identifiers (UUIDs), with the `uuidgen` utility included. (Note: Already pre-installed on macOS.)
+ iotop # Disk I/O monitoring tool that provides a top-like interface to showcase real-time disk activity and identify performance bottlenecks.
+ iftop # Network monitoring tool that displays a real-time, interactive view of network bandwidth usage by different connections.
+ bmon # Bandwidth monitoring tool that visually represents network usage with a simple and easy-to-read interface.
+ bandwhich # Network bandwidth monitor that identifies and displays bandwidth usage per process, helping to pinpoint data-hungry applications.
+ ];
+}
diff --git a/modules/programs/devenv/home.nix b/home-manager/modules/devenv.nix
similarity index 81%
rename from modules/programs/devenv/home.nix
rename to home-manager/modules/devenv.nix
index 958652b..d7a85f5 100644
--- a/modules/programs/devenv/home.nix
+++ b/home-manager/modules/devenv.nix
@@ -2,8 +2,6 @@
config,
lib,
pkgs,
- user,
- devenv,
inputs,
...
}: {
@@ -14,6 +12,4 @@
programs.direnv.enable = true;
programs.direnv.nix-direnv.enable = true;
-
- programs.zsh.enable = true;
}
diff --git a/home-manager/modules/discord/default.nix b/home-manager/modules/discord/default.nix
new file mode 100644
index 0000000..944e3ad
--- /dev/null
+++ b/home-manager/modules/discord/default.nix
@@ -0,0 +1,45 @@
+{
+ config,
+ pkgs,
+ lib,
+ ...
+}: let
+ cfg = config.programs.discord;
+
+ discordPatcherBin = pkgs.writers.writePython3Bin "discord-krisp-patcher" {
+ libraries = with pkgs.python3Packages; [pyelftools capstone];
+ flakeIgnore = [
+ "E265" # from nix-shell shebang
+ "E501" # line too long (82 > 79 characters)
+ "F403" # 'from module import *' used; unable to detect undefined names
+ "F405" # name may be undefined, or defined from star imports: module
+ ];
+ } (builtins.readFile ./krisp-patcher.py);
+
+ wrapDiscordBinary = pkgs.writeShellScriptBin "discord" ''
+ ${pkgs.findutils}/bin/find -L $HOME/.config/discord -name 'discord_krisp.node' -exec ${discordPatcherBin}/bin/discord-krisp-patcher {} +
+ ${pkgs.discord}/bin/discord "$@"
+ '';
+
+ discord = pkgs.discord.override {
+ # Performance mod
+ withOpenASAR = true;
+ # link fix
+ nss = pkgs.nss_latest;
+ };
+in {
+ options.programs.discord = {
+ enable = lib.mkEnableOption "Discord";
+ wrapDiscord = lib.mkEnableOption "wrap the Discord binary with a patching each time";
+ };
+
+ config = lib.mkIf cfg.enable {
+ home.packages =
+ [discordPatcherBin]
+ ++ (
+ if cfg.wrapDiscord
+ then [wrapDiscordBinary]
+ else [pkgs.discord]
+ );
+ };
+}
diff --git a/home-manager/modules/discord/krisp-patcher.py b/home-manager/modules/discord/krisp-patcher.py
new file mode 100644
index 0000000..8f06ed8
--- /dev/null
+++ b/home-manager/modules/discord/krisp-patcher.py
@@ -0,0 +1,83 @@
+import sys
+import shutil
+
+from elftools.elf.elffile import ELFFile
+from capstone import *
+from capstone.x86 import *
+
+if len(sys.argv) < 2:
+ print(f"Usage: {sys.argv[0]} [path to discord_krisp.node]")
+ # "Unix programs generally use 2 for command line syntax errors and 1 for all other kind of errors."
+ sys.exit(2)
+
+executable = sys.argv[1]
+
+elf = ELFFile(open(executable, "rb"))
+symtab = elf.get_section_by_name('.symtab')
+
+krisp_initialize_address = symtab.get_symbol_by_name("_ZN7discord15KrispInitializeEv")[0].entry.st_value
+isSignedByDiscord_address = symtab.get_symbol_by_name("_ZN7discord4util17IsSignedByDiscordERKNSt2Cr12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE")[0].entry.st_value
+
+text = elf.get_section_by_name('.text')
+text_start = text['sh_addr']
+text_start_file = text['sh_offset']
+# This seems to always be zero (.text starts at the right offset in the file). Do it just in case?
+address_to_file = text_start_file - text_start
+
+# Done with the ELF now.
+# elf.close()
+
+krisp_initialize_offset = krisp_initialize_address - address_to_file
+isSignedByDiscord_offset = krisp_initialize_address - address_to_file
+
+f = open(executable, "rb")
+f.seek(krisp_initialize_offset)
+krisp_initialize = f.read(64)
+f.close()
+
+# States
+found_issigned_by_discord_call = False
+found_issigned_by_discord_test = False
+found_issigned_by_discord_je = False
+found_already_patched = False
+je_location = None
+
+# We are looking for a call to IsSignedByDiscord, followed by a test, followed by a je.
+# Then we patch the je into a two byte nop.
+
+md = Cs(CS_ARCH_X86, CS_MODE_64)
+md.detail = True
+for i in md.disasm(krisp_initialize, krisp_initialize_address):
+ if i.id == X86_INS_CALL:
+ if i.operands[0].type == X86_OP_IMM:
+ if i.operands[0].imm == isSignedByDiscord_address:
+ found_issigned_by_discord_call = True
+
+ if i.id == X86_INS_TEST:
+ if found_issigned_by_discord_call:
+ found_issigned_by_discord_test = True
+
+ if i.id == X86_INS_JE:
+ if found_issigned_by_discord_test:
+ found_issigned_by_discord_je = True
+ je_location = i.address
+ break
+
+ if i.id == X86_INS_NOP:
+ if found_issigned_by_discord_test:
+ found_already_patched = True
+ break
+
+if je_location:
+ print(f"Found patch location: 0x{je_location:x}")
+
+ shutil.copyfile(executable, executable + ".orig")
+ f = open(executable, 'rb+')
+ f.seek(je_location - address_to_file)
+ f.write(b'\x66\x90') # Two byte NOP
+ f.close()
+else:
+ if found_already_patched:
+ print("Couldn't find patch location - already patched.")
+ else:
+ print("Couldn't find patch location - review manually. Sorry.")
diff --git a/home-manager/modules/eza.nix b/home-manager/modules/eza.nix
new file mode 100644
index 0000000..8518164
--- /dev/null
+++ b/home-manager/modules/eza.nix
@@ -0,0 +1,9 @@
+# A modern replacement for 'ls'.
+{...}: {
+ programs.eza = {
+ enable = true;
+ enableAliases = true;
+ git = true;
+ icons = true;
+ };
+}
diff --git a/home-manager/modules/fuzzel.nix b/home-manager/modules/fuzzel.nix
new file mode 100644
index 0000000..89e6f9e
--- /dev/null
+++ b/home-manager/modules/fuzzel.nix
@@ -0,0 +1,6 @@
+# Application launcher for wlroots based Wayland compositors, similar to rofi's `drun` mode.
+{...}: {
+ programs.fuzzel = {
+ enable = true;
+ };
+}
diff --git a/modules/shell/git/home.nix b/home-manager/modules/git.nix
similarity index 100%
rename from modules/shell/git/home.nix
rename to home-manager/modules/git.nix
diff --git a/home-manager/modules/hyprland.nix b/home-manager/modules/hyprland.nix
new file mode 100644
index 0000000..598c748
--- /dev/null
+++ b/home-manager/modules/hyprland.nix
@@ -0,0 +1,231 @@
+{
+ config,
+ pkgs,
+ ...
+}: {
+ imports = [
+ ./waybar.nix
+ ];
+
+ services.mako = {
+ enable = true;
+ defaultTimeout = 4000;
+ borderRadius = 5;
+ borderSize = 2;
+ layer = "overlay";
+ };
+
+ wayland.windowManager.hyprland.enable = true;
+
+ wayland.windowManager.hyprland.settings = {
+ xwayland.force_zero_scaling = true;
+
+ input = {
+ sensitivity = 0.4;
+ # todo custom
+ accel_profile = "adaptive";
+ # accel_profile = "custom 20000 0.755 0.05 0.855 0.06";
+ touchpad = {
+ natural_scroll = true;
+ scroll_factor = 0.38;
+ tap-and-drag = true;
+ middle_button_emulation = true;
+ tap-to-click = true;
+ };
+ };
+
+ device.at-translated-set-2-keyboard = {
+ kb_layout = "us";
+ kb_options = "caps:ctrl_modifier";
+ numlock_by_default = 1;
+ };
+
+ general = {
+ gaps_in = 5;
+ gaps_out = 16;
+ resize_on_border = true;
+ hover_icon_on_border = false;
+ layout = "dwindle";
+ };
+
+ master = {
+ new_is_master = false;
+ smart_resizing = false;
+ };
+
+ dwindle = {
+ force_split = 2;
+ preserve_split = true;
+ };
+
+ decoration = {
+ rounding = 5;
+ active_opacity = 0.93;
+ inactive_opacity = 0.93;
+ fullscreen_opacity = 1;
+ drop_shadow = false;
+ };
+ animations = {
+ enabled = true;
+ bezier = [
+ "myBezier, 0.22, 1, 0.36, 1"
+ "snap, 0, 1, 0, 1"
+ ];
+
+ animation = [
+ "windows, 1, 7, myBezier"
+ "windowsOut, 1, 3, default, popin 60%"
+ "border, 1, 0.5, snap"
+ "borderangle, 1, 0.5, snap"
+ "fade, 1, 0.001, myBezier"
+ "workspaces, 1, 0.8, myBezier, fade"
+ ];
+ };
+
+ # https://wiki.hyprland.org/Configuring/Variables/#gestures
+ gestures = {
+ workspace_swipe = true;
+ workspace_swipe_fingers = 3;
+ workspace_swipe_cancel_ratio = 0.6;
+ workspace_swipe_min_speed_to_force = 30;
+ workspace_swipe_distance = 2000;
+ workspace_swipe_invert = true;
+ };
+
+ misc = {
+ disable_hyprland_logo = true;
+ disable_splash_rendering = true;
+ force_default_wallpaper = 0;
+ mouse_move_enables_dpms = true;
+ key_press_enables_dpms = true;
+ };
+
+ "$mod" = "SUPER";
+
+ bind = [
+ # general binds
+ "$mod, RETURN, exec, ${pkgs.alacritty}/bin/alacritty"
+ "$mod, Q, killactive"
+ "SUPER_SHIFT, Q, exec, ${pkgs.wlogout}/bin/wlogout"
+ "$mod, SPACE, exec, pkill fuzzel || ${pkgs.fuzzel}/bin/fuzzel" # pkill or allows for toggle
+ "SUPER_SHIFT, SPACE, togglefloating"
+ "$mod, F, fullscreen"
+ "$mod, L, exec, ${pkgs.swaylock-effects}/bin/swaylock -f"
+ "$mod, B, exec, ${pkgs.grim}/bin/grim \"desktop-$(${pkgs.busybox}/bin/date +\"%Y%m%d%H%m\").png"
+ "SUPER_SHIFT, B, exec, ${pkgs.grim}/bin/grim -g \"$(${pkgs.slurp}/bin/slurp -d)\" - | ${pkgs.wl-clipboard}/bin/wl-copy" # Screenshot selection directly to clipboard
+
+ # Volume
+ ",XF86AudioRaiseVolume, exec, ${pkgs.ponymix}/bin/ponymix inc 2"
+ ",XF86AudioLowerVolume, exec, ${pkgs.ponymix}/bin/ponymix dec 2"
+ ",XF86AudioMute, exec, ${pkgs.ponymix}/bin/ponymix, toggle"
+
+ # Screen Brightness
+ ",XF86MonBrightnessUp, exec, ${pkgs.light}/bin/light -A 10"
+ ",XF86MonBrightnessDown, exec, ${pkgs.light}/bin/light -U 10"
+
+ # move focus
+ "$mod, left, movefocus, l"
+ "$mod, right, movefocus, r"
+ "$mod, up, movefocus, u"
+ "$mod, down, movefocus, d"
+ "$mod,right,workspace,+1"
+ "$mod,left,workspace,-1"
+
+ # workspace switching
+ "$mod, 1, workspace, 1"
+ "$mod, 2, workspace, 2"
+ "$mod, 3, workspace, 3"
+ "$mod, 4, workspace, 4"
+ "$mod, 5, workspace, 5"
+ "$mod, 6, workspace, 6"
+ "$mod, 7, workspace, 7"
+ "$mod, 8, workspace, 8"
+ "$mod, 9, workspace, 9"
+ "$mod, 0, workspace, 10"
+
+ # move window to workspace
+ "$mod SHIFT, 1, movetoworkspace, 1"
+ "$mod SHIFT, 2, movetoworkspace, 2"
+ "$mod SHIFT, 3, movetoworkspace, 3"
+ "$mod SHIFT, 4, movetoworkspace, 4"
+ "$mod SHIFT, 5, movetoworkspace, 5"
+ "$mod SHIFT, 6, movetoworkspace, 6"
+ "$mod SHIFT, 7, movetoworkspace, 7"
+ "$mod SHIFT, 8, movetoworkspace, 8"
+ "$mod SHIFT, 9, movetoworkspace, 9"
+ "$mod SHIFT, 0, movetoworkspace, 10"
+
+ # Scroll through workspaces
+ "$mod, mouse_down, workspace, e+1"
+ "$mod, mouse_up, workspace, e-1"
+ ];
+
+ bindm = [
+ # mouse movements
+ "$mod, mouse:272, movewindow"
+ "$mod_ALT, mouse:273, resizewindow"
+ "$mod_ALT, mouse:272, resizewindow"
+ ];
+
+ monitor = [",preferred,auto,1"];
+ exec = [
+ "${pkgs.swaybg}/bin/swaybg -i ${config.stylix.image} -m fill"
+ ];
+ exec-once = [
+ # Enables clipboard sync
+ "${pkgs.wl-clipboard}/bin/wl-paste -p | ${pkgs.wl-clipboard}/bin/wl-copy"
+ "${pkgs.wl-clipboard}/bin/wl-paste | ${pkgs.wl-clipboard}/bin/wl-copy -p"
+ ];
+ };
+
+ wayland.windowManager.hyprland.extraConfig = ''
+ # will switch to a submap called resize
+ bind=$mod,R,submap,resize
+
+ # will start a submap called "resize"
+ submap=resize
+
+ # sets repeatable binds for resizing the active window
+ binde=,right,resizeactive,10 0
+ binde=,left,resizeactive,-10 0
+ binde=,up,resizeactive,0 -10
+ binde=,down,resizeactive,0 10
+
+ # use reset to go back to the global submap
+ bind=,escape,submap,reset
+
+ # will reset the submap, meaning end the current one and return to the global one
+ submap=reset
+ '';
+ services.swayidle = {
+ enable = true;
+ events = [
+ {
+ event = "before-sleep";
+ command = "${pkgs.swaylock}/bin/swaylock -f";
+ }
+ {
+ event = "lock";
+ command = "lock";
+ }
+ ];
+ timeouts = [
+ {
+ timeout = 300;
+ command = "${pkgs.swaylock}/bin/swaylock -f";
+ }
+ ];
+ systemdTarget = "xdg-desktop-portal-hyprland.service";
+ };
+
+ programs.swaylock = {
+ enable = true;
+ settings = {
+ font-size = "24";
+ indicator-idle-visible = false;
+ indicator-radius = 100;
+ indicator-thickness = 20;
+ show-failed-attempts = true;
+ };
+ };
+}
diff --git a/home-manager/modules/k9s.nix b/home-manager/modules/k9s.nix
new file mode 100644
index 0000000..85427ac
--- /dev/null
+++ b/home-manager/modules/k9s.nix
@@ -0,0 +1,6 @@
+# A terminal-based Kubernetes CLI.
+{...}: {
+ programs.k9s = {
+ enable = true;
+ };
+}
diff --git a/home-manager/modules/lazygit.nix b/home-manager/modules/lazygit.nix
new file mode 100644
index 0000000..94d41d2
--- /dev/null
+++ b/home-manager/modules/lazygit.nix
@@ -0,0 +1,6 @@
+# A terminal-based Git interface.
+{...}: {
+ programs.lazygit = {
+ enable = true;
+ };
+}
diff --git a/home-manager/modules/linux-gui.nix b/home-manager/modules/linux-gui.nix
new file mode 100644
index 0000000..cdc957b
--- /dev/null
+++ b/home-manager/modules/linux-gui.nix
@@ -0,0 +1,24 @@
+{pkgs, ...}: {
+ imports = [
+ ./discord
+ ./zathura.nix
+ ];
+
+ programs.discord = {
+ enable = true;
+ wrapDiscord = true;
+ };
+
+ home.packages = with pkgs; [
+ betterdiscordctl # A utility for managing BetterDiscord, enhancing features and customization in the Discord desktop client.
+ gimp # GNU Image Manipulation Program, a powerful and open-source raster graphics editor for tasks like photo editing and graphic design.
+ gparted # Gnome Partition Editor, a graphical partition manager for creating, resizing, and managing disk partitions.
+ kodi # An open-source media center, providing a versatile platform for streaming and organizing media content.
+ pavucontrol # PulseAudio Volume Control, a feature-rich GUI for controlling and configuring the PulseAudio sound system.
+ schildichat-desktop-wayland # A desktop client for SchildiChat, designed to work with the Wayland display server.
+ sublime-music # A modern and feature-rich music player with a clean user interface and advanced playback options.
+ thunderbird # Mozilla Thunderbird, a powerful and customizable email client with integrated calendaring and chat features.
+ kicad # An open-source electronic design automation (EDA) suite for creating schematics, PCB layouts, and 3D models.
+ wireshark # Open-source network protocol analyzer for real-time packet inspection and analysis.
+ ];
+}
diff --git a/home-manager/modules/starship.nix b/home-manager/modules/starship.nix
new file mode 100644
index 0000000..9355c93
--- /dev/null
+++ b/home-manager/modules/starship.nix
@@ -0,0 +1,17 @@
+# A customizable prompt for shells.
+{...}: {
+ programs.starship = {
+ enable = true;
+ enableZshIntegration = true;
+ settings = {
+ add_newline = true;
+ character = {
+ success_symbol = "➜";
+ error_symbol = "➜";
+ };
+ aws = {
+ disabled = true;
+ };
+ };
+ };
+}
diff --git a/modules/shell/tmux/ta.sh b/home-manager/modules/tmux/ta.sh
similarity index 96%
rename from modules/shell/tmux/ta.sh
rename to home-manager/modules/tmux/ta.sh
index bfefb18..224af53 100644
--- a/modules/shell/tmux/ta.sh
+++ b/home-manager/modules/tmux/ta.sh
@@ -49,7 +49,7 @@ create_detached_session() {
else
(TMUX=''
tmux new-session -Ad -s "$session_name" -c "$path_name"
- tmux split-window -vb -t "$session_name" -c "$path_name" -p 70
+ # tmux split-window -vb -t "$session_name" -c "$path_name" -p 70
tmux send-keys -t "$session_name" "nvim '+Telescope find_files'" Enter
)
fi
diff --git a/home-manager/modules/tmux/tmux.nix b/home-manager/modules/tmux/tmux.nix
new file mode 100644
index 0000000..4e9ecfc
--- /dev/null
+++ b/home-manager/modules/tmux/tmux.nix
@@ -0,0 +1,166 @@
+{
+ pkgs,
+ config,
+ user,
+ ...
+}: {
+ stylix.targets.tmux.enable = false;
+ programs.tmux = {
+ enable = true;
+ clock24 = true;
+ plugins = with pkgs.tmuxPlugins; [
+ sensible
+ yank
+ resurrect
+ continuum
+ vim-tmux-navigator
+ tmux-thumbs
+ ];
+
+ extraConfig = ''
+ bind -n M-r source-file ~/.config/tmux/tmux.conf
+
+ set -ag terminal-overrides ",xterm-256color:RGB"
+
+
+
+ set -g detach-on-destroy off # don't exit from tmux when closing a session
+
+ # New Theme
+ set -g status-interval 3 # update the status bar every 3 seconds
+ set -g status-left "#[fg=blue,bold,bg=#${config.lib.stylix.colors.base00}]#S "
+ set -g status-right "#[fg=#${config.lib.stylix.colors.base07},bold,bg=#${config.lib.stylix.colors.base00}]%a %Y-%m-%d %l:%M %p"
+ set -ga status-right "#($HOME/.config/tmux/scripts/cal.sh)"
+ set -g status-justify left
+ set -g status-left-length 200 # increase length (from 10)
+ set -g status-right-length 200 # increase length (from 10)
+ set -g status-position top # macOS / darwin style
+ set -g status-style 'bg=#${config.lib.stylix.colors.base00}' # transparent
+ set -g window-status-current-format '#[fg=magenta,bg=#${config.lib.stylix.colors.base00}]#I #W#{?window_zoomed_flag,(),} '
+ set -g window-status-format '#[fg=gray,bg=#${config.lib.stylix.colors.base00}] #I #W'
+ set -g window-status-last-style 'fg=white,bg=black'
+ set -g message-command-style bg=default,fg=yellow
+ set -g message-style bg=default,fg=yellow
+ set -g mode-style bg=default,fg=yellow
+ set -g pane-active-border-style 'fg=magenta,bg=default'
+ set -g pane-border-style 'fg=brightblack,bg=default'
+ set -g @tmux-last-prompt-pattern ' '
+
+
+
+ set -g mouse on
+
+ set-option -g status-position top
+
+ bind-key g display-popup -h 95% -w 95% -E 'lazygit'
+ bind-key t display-popup -h 95% -w 95% -E "${pkgs.htop}/bin/htop"
+
+ bind C-g display-popup -E "tat ~/gallery"
+
+ bind -n M-g display-popup -E "tmux new-session -A -s scratch"
+
+ bind -n M-b switch-client -l
+ bind -n M-p previous-window # for ansi
+ bind -n M-n next-window # for ansi
+ bind -n M-P switch-client -p
+ bind -n M-N switch-client -n
+
+ unbind f
+ bind f resize-pane -Z
+
+ # create session
+ bind C-c new-session
+
+ # split current window horizontally
+ bind - split-window -v
+ # split current window vertically
+ bind _ split-window -h
+
+ # Select Layouts
+ #―――――――――――――――――
+ bind -n M-a select-layout main-vertical
+ bind -n M-A select-layout main-horizontal
+ bind -n M-E select-layout even-vertical
+ bind -n M-V select-layout even-horizontal
+
+ # pane navigation
+ bind -r h select-pane -L # move left
+ bind -r j select-pane -D # move down
+ bind -r k select-pane -U # move up
+ bind -r l select-pane -R # move right
+ bind > swap-pane -D # swap current pane with the next one
+ bind < swap-pane -U # swap current pane with the previous one
+
+ # pane resizing
+ bind -r H resize-pane -L 2
+ bind -r J resize-pane -D 2
+ bind -r K resize-pane -U 2
+ bind -r L resize-pane -R 2
+ bind -r c-f resize-pane -Z
+
+ # window navigation
+ # unbind n
+ # unbind p
+
+ setw -g mode-keys vi
+
+ bind Enter copy-mode # enter copy mode
+
+ bind -T copy-mode-vi v send -X begin-selection
+ bind -T copy-mode-vi C-v send -X rectangle-toggle
+ bind -T copy-mode-vi y send -X copy-selection-and-cancel
+ bind -T copy-mode-vi Escape send -X cancel
+ bind -T copy-mode-vi H send -X start-of-line
+ bind -T copy-mode-vi L send -X end-of-line
+
+ # -- buffers -------------------------------------------------------------------
+
+ bind b list-buffers # list paste buffers
+ #bind p paste-buffer -p # paste from the top paste buffer
+ bind P choose-buffer # choose which buffer to paste from
+
+ # -- display -------------------------------------------------------------------
+
+ set -g renumber-windows on # renumber windows when a window is closed
+
+ bind k display-popup -E "\
+ tmux list-sessions -F '#{?session_attached,,#{session_name}}' |\
+ fzf --reverse -m --header=kill-session |\
+ xargs -I {} tmux kill-session -t {}"
+
+ bind C-j display-popup -E "\
+ tmux list-sessions -F '#{?session_attached,,#{session_name}}' |\
+ sed '/^$/d' |\
+ fzf --reverse --header jump-to-session --preview 'tmux capture-pane -pt {}' |\
+ xargs tmux switch-client -t"
+
+
+ '';
+ };
+
+ programs.tmate = {
+ enable = true;
+ };
+
+ home.packages = [
+ # Open tmux for current project.
+ (pkgs.writeShellApplication {
+ name = "tat";
+ runtimeInputs = [pkgs.tmux pkgs.fzf];
+ text = builtins.readFile ./ta.sh;
+ })
+ pkgs.fzf
+ ];
+
+ programs.zsh = {
+ shellAliases = {
+ tx = "tmux new -s default";
+ ta = "tmux attach -t";
+ tad = "tmux attach -d -t";
+ ts = "tmux new-session -s";
+ tl = "tmux list-sessions";
+ tksv = "tmux kill-server";
+ tkss = "tmux kill-session -t";
+ };
+ };
+}
diff --git a/home-manager/modules/waybar.nix b/home-manager/modules/waybar.nix
new file mode 100644
index 0000000..9fad4ef
--- /dev/null
+++ b/home-manager/modules/waybar.nix
@@ -0,0 +1,107 @@
+# A highly customizable status bar for Sway and other Wayland-based compositors.
+{pkgs, ...}: let
+ networkInterface.eth = "wlp3s0";
+ hwmon = "/sys/class/hwmon/hwmon0/temp1_input";
+in {
+ programs.waybar.enable = true;
+
+ programs.waybar.settings = {
+ mainBar = {
+ layer = "bottom";
+ position = "top";
+ height = 24;
+ modules-left = ["hyprland/workspaces" "sway/mode" "wlr/taskbar"];
+ modules-center = ["hyprland/window" "gamemode"];
+ modules-right = ["network" "pulseaudio" "cpu" "custom/cpu_freq" "temperature" "memory" "battery" "tray" "clock"];
+
+ "hyprland/workspaces".sort-by-number = true;
+
+ "tray"."spacing" = 2;
+
+ "sway/mode" = {
+ format = "{}";
+ };
+
+ "clock" = {
+ format = " {:%a %b %d %R}";
+ };
+
+ "cpu" = {
+ "interval" = 2;
+ "format" = "{usage}% ";
+ };
+
+ "custom/cpu_freq" = {
+ format = "{}MHz ";
+ interval = 5;
+ exec =
+ pkgs.writeShellScript "cpuFreq"
+ ''
+ ${pkgs.busybox}/bin/cat /proc/cpuinfo | \
+ ${pkgs.busybox}/bin/grep MHz | \
+ ${pkgs.busybox}/bin/cut -c 12-15 | \
+ ${pkgs.busybox}/bin/tr '\n' ' ' | \
+ ${pkgs.busybox}/bin/awk '{s+=$1}END{print "",s/NR}' RS=" " | \
+ ${pkgs.busybox}/bin/cut -c 2-5
+ '';
+ };
+
+ "battery" = {
+ "bat" = "BAT0";
+ "states" = {
+ "good" = 95;
+ "warning" = 30;
+ "critical" = 15;
+ };
+ "format" = "{capacity}% {icon} ";
+ "format-full" = "";
+ "format-icons" = ["" "" "" "" ""];
+ };
+
+ "memory"."format" = "{used:0.1f}G/{total:0.1f}G ";
+
+ "network" = {
+ "interface" = "${networkInterface.eth}";
+ "interval" = 2;
+ "format-ethernet" = "Up: {bandwidthUpBits} Down: {bandwidthDownBits} ";
+ "tooltip-format-ethernet" = "{ifname} ";
+ "format-wifi" = "Up: {bandwidthUpBits} Down: {bandwidthDownBits} {essid} ({signalStrength}%) ";
+ "tooltip-format-wifi" = "{ifname} {essid} ({signalStrength}%) ";
+ "format-disconnected" = "Disconnected ⚠";
+ };
+
+ "pulseaudio" = {
+ "format" = "{volume}% {icon} ";
+ "format-bluetooth" = "{volume}% {icon} ";
+ "format-muted" = "";
+ "format-icons" = {
+ "headphones" = "";
+ "handsfree" = "";
+ "headset" = "";
+ "phone" = "";
+ "portable" = "";
+ "car" = "";
+ "default" = ["" ""];
+ };
+ "on-click" = "pavucontrol";
+ };
+ "temperature" = {
+ "hwmon-path" = "/sys/class/hwmon/hwmon2/temp1_input";
+ "format" = "{}°C";
+ "critical-threshold" = 80;
+ };
+ "gamemode" = {
+ "format" = "{glyph}";
+ "format-alt" = "{glyph} {count}";
+ "glyph" = "";
+ "hide-not-running" = true;
+ "use-icon" = true;
+ "icon-name" = "input-gaming-symbolic";
+ "icon-spacing" = 4;
+ "icon-size" = 20;
+ "tooltip" = true;
+ "tooltip-format" = "Games running: {count}";
+ };
+ };
+ };
+}
diff --git a/modules/programs/zathura.nix b/home-manager/modules/zathura.nix
similarity index 82%
rename from modules/programs/zathura.nix
rename to home-manager/modules/zathura.nix
index 30e9723..35f3842 100644
--- a/modules/programs/zathura.nix
+++ b/home-manager/modules/zathura.nix
@@ -1,3 +1,4 @@
+# A highly customizable document viewer.
{
pkgs,
config,
diff --git a/modules/shell/zsh/home.nix b/home-manager/modules/zsh.nix
similarity index 75%
rename from modules/shell/zsh/home.nix
rename to home-manager/modules/zsh.nix
index 8bc7e29..c33f275 100644
--- a/modules/shell/zsh/home.nix
+++ b/home-manager/modules/zsh.nix
@@ -8,7 +8,6 @@
programs.zsh = {
enable = true;
shellAliases = {
- vim = "nvim";
update = "sudo nixos-rebuild switch";
clean = "nix-collect-garbage -d";
reload = "source ~/.zshrc";
@@ -18,15 +17,10 @@
"..." = "cd ../../../";
"...." = "cd ../../../../";
- ls = "eza --icons=always";
- l = "eza -al --icons=always";
- la = "eza -a --color=always --group-directories-first --icons=always"; # all files and dirs
- ll = "eza -l --color=always --group-directories-first --icons=always"; # long format
- lt = "eza -aT --color=always --group-directories-first --icons=always"; # tree listing
-
- cat = "bat";
ps = "procs";
grep = "rg";
+ cat = "bat";
+ vim = "nvim";
# Default flags
rm = "rm -i";
@@ -51,8 +45,6 @@
benchmark = "hyperfine --warmup 3 ";
c = "clear";
listen = "lsof -P -i -n";
- nc = "nordvpn connect sweden";
- nd = "nordvpn disconnect";
tra = "transmission-remote -a";
clock = "sudo ntpd -gq";
octal = "stat -c '%a %n'";
@@ -68,15 +60,17 @@
];
};
+ oh-my-zsh = {
+ enable = true;
+ plugins = ["git"];
+ theme = "robbyrussell";
+ };
+
history = {
size = 10000;
path = "${config.xdg.dataHome}/zsh/history";
};
initExtra = ''
- #clear
- #neofetch
- eval "$(atuin init zsh)"
- eval $(thefuck --alias)
'';
};
}
diff --git a/hosts/thinkpad/auditd.nix b/hosts/candlekeep/auditd.nix
similarity index 100%
rename from hosts/thinkpad/auditd.nix
rename to hosts/candlekeep/auditd.nix
diff --git a/hosts/candlekeep/configuration.nix b/hosts/candlekeep/configuration.nix
new file mode 100644
index 0000000..9b94c2b
--- /dev/null
+++ b/hosts/candlekeep/configuration.nix
@@ -0,0 +1,125 @@
+# This is your system's configuration file.
+# Use this to configure your system environment (it replaces /etc/nixos/configuration.nix)
+{
+ inputs,
+ outputs,
+ lib,
+ config,
+ pkgs,
+ user,
+ ...
+}: {
+ # You can import other NixOS modules here
+ imports = [
+ # If you want to use modules your own flake exports (from modules/nixos):
+ # outputs.nixosModules.example
+ ../../common/nixos/common.nix
+ ../../common/networking/zerotier.nix
+ ../../common/nixos/bluetooth.nix
+ ../../common/gui/hyprland.nix
+ ../../common/gui/thunar.nix
+ ../../common/style/stylix.nix
+ ../../common/virtualization/podman.nix
+ ../../common/virtualization/kubernetes.nix
+ ../../common/virtualization/libvirt.nix
+
+ ./auditd.nix
+ ./kernel.nix
+ ./sysctl.nix
+
+ # Or modules from other flakes (such as nixos-hardware):
+ # inputs.hardware.nixosModules.common-cpu-amd
+ # inputs.hardware.nixosModules.common-ssd
+ inputs.nix-index-database.nixosModules.nix-index
+ inputs.stylix.nixosModules.stylix
+ # You can also split up your configuration and import pieces of it here:
+ # ./users.nix
+
+ # Import your generated (nixos-generate-config) hardware configuration
+ ./hardware-configuration.nix
+ ];
+
+ nixpkgs = {
+ # You can add overlays here
+ overlays = [
+ # Add overlays your own flake exports (from overlays and pkgs dir):
+ outputs.overlays.additions
+ outputs.overlays.modifications
+ outputs.overlays.unstable-packages
+
+ # You can also add overlays exported from other flakes:
+ # neovim-nightly-overlay.overlays.default
+
+ # Or define it inline, for example:
+ # (final: prev: {
+ # hi = final.hello.overrideAttrs (oldAttrs: {
+ # patches = [ ./change-hello-to-hi.patch ];
+ # });
+ # })
+ ];
+ # Configure your nixpkgs instance
+ config = {
+ # Disable if you don't want unfree packages
+ allowUnfree = true;
+ };
+ };
+
+ # This will add each flake input as a registry
+ # To make nix3 commands consistent with your flake
+ nix.registry = (lib.mapAttrs (_: flake: {inherit flake;})) ((lib.filterAttrs (_: lib.isType "flake")) inputs);
+
+ # This will additionally add your inputs to the system's legacy channels
+ # Making legacy nix commands consistent as well, awesome!
+ nix.nixPath = ["/etc/nix/path"];
+ environment.etc =
+ lib.mapAttrs'
+ (name: value: {
+ name = "nix/path/${name}";
+ value.source = value.flake;
+ })
+ config.nix.registry;
+
+ networking.hostName = "candlekeep";
+ networking.networkmanager.enable = true;
+
+ boot.loader.systemd-boot.enable = true;
+
+ users.users = {
+ gwg313 = {
+ initialPassword = "correcthorsebatterystaple";
+ isNormalUser = true;
+ openssh.authorizedKeys.keys = [
+ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJ/cWqqTUuLswymQVh9rKdUWgMNNtZE6PwXMNUgD8/Zx gwg313"
+ ];
+ extraGroups = ["wheel"];
+ };
+ };
+
+ # This setups a SSH server. Very important if you're setting up a headless system.
+ # Feel free to remove if you don't need it.
+ services.openssh = {
+ enable = true;
+ settings = {
+ # Forbid root login through SSH.
+ PermitRootLogin = "no";
+ # Use keys only. Remove if you want to SSH using password (not recommended)
+ PasswordAuthentication = false;
+ };
+ };
+
+ environment = {
+ loginShellInit = ''
+ if [ -z $DISPLAY ] && [ "$(tty)" = "/dev/tty1" ]; then
+ exec Hyprland
+ fi
+ ''; # Will automatically open Hyprland when logged into tty1
+ variables = {
+ TERMINAL = "alacritty";
+ EDITOR = "nvim";
+ VISUAL = "nvim";
+ PAGER = "moar";
+ };
+ };
+ # https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
+ system.stateVersion = "23.05";
+}
diff --git a/hosts/thinkpad/hardware-configuration.nix b/hosts/candlekeep/hardware-configuration.nix
similarity index 52%
rename from hosts/thinkpad/hardware-configuration.nix
rename to hosts/candlekeep/hardware-configuration.nix
index 2d29918..1bb5e31 100644
--- a/hosts/thinkpad/hardware-configuration.nix
+++ b/hosts/candlekeep/hardware-configuration.nix
@@ -18,42 +18,20 @@
boot.extraModulePackages = [];
fileSystems."/" = {
- device = "/dev/disk/by-uuid/88ae54e9-a47f-4ef0-acae-256803662304";
+ device = "/dev/disk/by-uuid/58fedfa4-d796-4e8f-a79d-2aa6b0f51909";
fsType = "ext4";
};
- fileSystems."/media" = {
- device = "192.168.10.2:/mnt/tank/media";
- fsType = "nfs";
- options = ["x-systemd.automount" "noauto" "x-systemd.after=network-online.target" "x-systemd.mount-timeout=90"];
- };
+ boot.initrd.luks.devices."luks-d24cbf42-c364-49e5-b569-34accd6e46cb".device = "/dev/disk/by-uuid/d24cbf42-c364-49e5-b569-34accd6e46cb";
- fileSystems."/books" = {
- device = "192.168.10.2:/mnt/tank/books";
- fsType = "nfs";
- options = ["x-systemd.automount" "noauto" "x-systemd.after=network-online.target" "x-systemd.mount-timeout=90"];
- };
-
- fileSystems."/music" = {
- device = "192.168.10.2:/mnt/tank/music";
- fsType = "nfs";
- options = ["x-systemd.automount" "noauto" "x-systemd.after=network-online.target" "x-systemd.mount-timeout=90"];
- };
-
- fileSystems."/projects" = {
- device = "192.168.10.2:/mnt/tank/projects";
- fsType = "nfs";
- options = ["x-systemd.automount" "noauto" "x-systemd.after=network-online.target" "x-systemd.mount-timeout=90"];
- };
-
- boot.initrd.luks.devices."luks-9d4b251f-b7d5-4a28-8e5d-6df09b434e47".device = "/dev/disk/by-uuid/9d4b251f-b7d5-4a28-8e5d-6df09b434e47";
-
- fileSystems."/boot/efi" = {
- device = "/dev/disk/by-uuid/C3A8-F13F";
+ fileSystems."/boot" = {
+ device = "/dev/disk/by-uuid/9D09-4864";
fsType = "vfat";
};
- swapDevices = [];
+ swapDevices = [
+ {device = "/dev/disk/by-uuid/0144132b-146b-4156-9518-67450854b736";}
+ ];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
@@ -62,6 +40,7 @@
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.enp2s0f0.useDHCP = lib.mkDefault true;
# networking.interfaces.enp5s0.useDHCP = lib.mkDefault true;
+ # networking.interfaces.wlp3s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
diff --git a/hosts/thinkpad/kernel.nix b/hosts/candlekeep/kernel.nix
similarity index 100%
rename from hosts/thinkpad/kernel.nix
rename to hosts/candlekeep/kernel.nix
diff --git a/hosts/thinkpad/sysctl.nix b/hosts/candlekeep/sysctl.nix
similarity index 100%
rename from hosts/thinkpad/sysctl.nix
rename to hosts/candlekeep/sysctl.nix
diff --git a/hosts/configuration.nix b/hosts/configuration.nix
deleted file mode 100644
index 65ad343..0000000
--- a/hosts/configuration.nix
+++ /dev/null
@@ -1,140 +0,0 @@
-# Edit this configuration file to define what should be installed on
-# your system. Help is available in the configuration.nix(5) man page
-# and in the NixOS manual (accessible by running ‘nixos-help’).
-{
- config,
- pkgs,
- inputs,
- ...
-}: {
- imports =
- (import ../modules/editors)
- ++ (import ../modules/shell);
-
- # Bootloader.
- boot.loader.systemd-boot.enable = true;
- boot.loader.efi.canTouchEfiVariables = true;
- boot.loader.efi.efiSysMountPoint = "/boot/efi";
-
- nix.daemonCPUSchedPolicy = "idle";
-
- networking.hostName = "nixos"; # Define your hostname.
- # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
-
- # Configure network proxy if necessary
- # networking.proxy.default = "http://user:password@proxy:port/";
- # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
-
- # Enable networking
- networking.networkmanager.enable = true;
-
- # Set your time zone.
- time.timeZone = "America/Toronto";
-
- # Select internationalisation properties.
- i18n.defaultLocale = "en_CA.UTF-8";
-
- # Configure keymap in X11
- services.xserver = {
- layout = "us";
- xkbVariant = "";
- };
-
- # Define a user account. Don't forget to set a password with ‘passwd’.
- users.users.glen = {
- isNormalUser = true;
- description = "Glen";
- extraGroups = ["networkmanager" "wheel" "video" "docker" "audio"];
- shell = pkgs.zsh; # Default shell
- packages = with pkgs; [];
- };
-
- # Allow unfree packages
- nixpkgs.config.allowUnfree = true;
-
- # List packages installed in system profile. To search, run:
- # $ nix search wget
- # environment.systemPackages = with pkgs; [
- # vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
- # wget
- # neovim
- # kitty
- # ];
-
- environment = {
- variables = {
- TERMINAL = "alacritty";
- EDITOR = "nvim";
- VISUAL = "nvim";
- };
- systemPackages = with pkgs; [
- # Default packages installed system-wide
- vim
- git
- killall
- nano
- pciutils
- usbutils
- wget
- lsof
- inputs.agenix.packages.${system}.agenix
- ];
- };
-
- # Some programs need SUID wrappers, can be configured further or are
- # started in user sessions.
- # programs.mtr.enable = true;
- # programs.gnupg.agent = {
- # enable = true;
- # enableSSHSupport = true;
- # };
- programs.hyprland.enable = true;
- # List services that you want to enable:
-
- services.pipewire = {
- # Sound
- enable = true;
- alsa = {
- enable = true;
- support32Bit = true;
- };
- pulse.enable = true;
- jack.enable = true;
- wireplumber.enable = true;
- };
-
- nix.gc = {
- automatic = true;
- dates = "weekly";
- options = "--delete-older-than 30d";
- };
-
- nix.settings.auto-optimise-store = true;
-
- # enable firewall and block all ports
- networking.firewall.enable = true;
- networking.firewall.allowedTCPPorts = [];
- networking.firewall.allowedUDPPorts = [];
-
- # only members of wheel can interact with the nix daemon
- nix.settings.allowed-users = ["@wheel"];
- security.sudo.execWheelOnly = true;
-
- # enable antivirus clamav and
- # keep the signatures' database updated
- services.clamav.daemon.enable = true;
- services.clamav.updater.enable = true;
-
- # This value determines the NixOS release from which the default
- # settings for stateful data, like file locations and database versions
- # on your system were taken. It‘s perfectly fine and recommended to leave
- # this value at the release version of the first install of this system.
- # Before changing this value read the documentation for this option
- # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
- system.stateVersion = "22.11"; # Did you read the comment?
-
- nix = {
- package = pkgs.nixFlakes;
- extraOptions = "experimental-features = nix-command flakes";
- };
-}
diff --git a/hosts/default.nix b/hosts/default.nix
deleted file mode 100644
index c3635ec..0000000
--- a/hosts/default.nix
+++ /dev/null
@@ -1,35 +0,0 @@
-{
- lib,
- inputs,
- system,
- user,
- ...
-}: {
- thinkpad = lib.nixosSystem {
- inherit system;
- specialArgs = {
- inherit user inputs system;
- host = {
- hostName = "thinkpad";
- mainMonitor = "eDP-1";
- # secondMonitor = "DP-1";
- };
- };
- modules = [
- ./thinkpad
- ./configuration.nix
- ../modules/themes/home.nix
- inputs.nix-index-database.nixosModules.nix-index
- inputs.agenix.nixosModules.default
- inputs.home-manager.nixosModules.home-manager
- {
- home-manager.useGlobalPkgs = true;
- home-manager.useUserPackages = true;
- home-manager.extraSpecialArgs = {inherit user inputs;};
- home-manager.users.${user} = {
- imports = [(import ./home.nix)] ++ [(import ./thinkpad/home.nix)];
- };
- }
- ];
- };
-}
diff --git a/hosts/home.nix b/hosts/home.nix
deleted file mode 100644
index 5ab862e..0000000
--- a/hosts/home.nix
+++ /dev/null
@@ -1,201 +0,0 @@
-{
- config,
- lib,
- pkgs,
- stable,
- user,
- devenv,
- inputs,
- ...
-}: {
- imports =
- # Home Manager Modules
- [(import ../modules/shell/git/home.nix)]
- ++ [(import ../modules/programs/wofi.nix)]
- ++ [(import ../modules/programs/devenv/home.nix)]
- ++ [(import ../modules/programs/kitty.nix)]
- ++ [(import ../modules/shell/tmux/home.nix)]
- ++ [(import ../modules/shell/ranger/home.nix)]
- ++ [(import ../modules/themes/home.nix)]
- ++ [(import ../modules/programs/mako.nix)]
- ++ [(import ../modules/programs/alacritty.nix)]
- ++ [(import ../modules/programs/zathura.nix)]
- ++ [(import ../modules/desktop/gtk.nix)]
- ++ [(import ../modules/shell/zsh/home.nix)];
-
- #Add support for ./local/bin
- #home.sessionPath = [
- #"$HOME/.local/bin"
- #];
-
- home = {
- username = "${user}";
- homeDirectory = "/home/${user}";
-
- packages = with pkgs; [
- inputs.neovim-config.packages.${system}.default
- starship
- pass
- kicad
- devbox
- nix-prefetch-git
- libnotify
- element-desktop
- nix-init
-
- tor-browser-bundle-bin
- nmap
- dig
- signal-desktop
- viddy
-
- # Terminal
- htop
- nitch # Minimal fetch
- tldr # Helper
- zellij # multiplexer
- dog # dns tool
- eza # better ls
- bat # better cap
- sd # simpler sed
- fd # simpler find
- xh
- ncdu
- duf
- atuin
- ranger
- thefuck
- hyperfine
- procs
- ripgrep
- nerdfonts
- pfetch
- dbeaver
- ansible
- nixpkgs-fmt
- zoxide
- webcord
- nfs-utils
- keychain
- slides
- glow
- entr
- just
- bandwhich
- navi
- git-crypt
-
- # Video/Audio
- feh # Image Viewer
- #mpv # Media Player
- pavucontrol # Audio Control
- #plex-media-player # Media Player
- vlc # Media Player
- stremio # Media Streamer
-
- # Apps
- appimage-run # Runs AppImages on NixOS
- firefox # Browser
- google-chrome # Browser
- remmina # XRDP & VNC Client
- anki
- obsidian
-
- # File Management
- gnome.file-roller # Archive Manager
- okular # PDF Viewer
- #pcmanfm # File Manager
- p7zip # Zip Encryption
- rsync # Syncer - $ rsync -r dir1/ dir2/
- unzip # Zip Files
- unrar # Rar Files
- zip # Zip
-
- # General configuration
- #git # Repositories
- #killall # Stop Applications
- #nano # Text Editor
- #pciutils # Computer Utility Info
- #pipewire # Sound
- #usbutils # USB Utility Info
- #wacomtablet # Wacom Tablet
- #wget # Downloader
- #zsh # Shell
- #
- # General home-manager
- #alacritty # Terminal Emulator
- #dunst # Notifications
- #doom emacs # Text Editor
- #libnotify # Dependency for Dunst
- #neovim # Text Editor
- #rofi # Menu
- #rofi-power-menu # Power Menu
- #udiskie # Auto Mounting
- #vim # Text Editor
- #
- # Xorg configuration
- #xclip # Console Clipboard
- #xorg.xev # Input Viewer
- #xorg.xkill # Kill Applications
- #xorg.xrandr # Screen Settings
- #xterm # Terminal
- #
- # Xorg home-manager
- #flameshot # Screenshot
- #picom # Compositer
- #sxhkd # Shortcuts
- #
- # Wayland configuration
- #autotiling # Tiling Script
- #grim # Image Grabber
- #slurp # Region Selector
- #swappy # Screenshot Editor
- #swayidle # Idle Management Daemon
- #wev # Input Viewer
- #wl-clipboard # Console Clipboard
- #wlr-randr # Screen Settings
- #xwayland # X for Wayland
- #
- # Wayland home-manager
- #mpvpaper # Video Wallpaper
- #pamixer # Pulse Audio Mixer
- swaybg # Background
- #swaylock-fancy # Screen Locker
- #waybar # Bar
- #
- # Desktop
- #ansible # Automation
- #blueman # Bluetooth
- #deluge # Torrents
- discord # Chat
- #ffmpeg # Video Support (dslr)
- #gmtp # Mount MTP (GoPro)
- #gphoto2 # Digital Photography
- #handbrake # Encoder
- #heroic # Game Launcher
- #hugo # Static Website Builder
- #lutris # Game Launcher
- #mkvtoolnix # Matroska Tool
- #plex-media-player# Media Player
- #prismlauncher # MC Launcher
- #steam # Games
- #simple-scan # Scanning
- #sshpass # Ansible dependency
- #
- # Laptop
- #cbatticon # Battery Notifications
- #blueman # Bluetooth
- #light # Display Brightness
- #libreoffice # Office Tools
- #simple-scan # Scanning
- #
- # Flatpak
- #obs-studio # Recording/Live Streaming
- ];
- stateVersion = "22.05";
- };
-
- programs = {
- home-manager.enable = true;
- };
-}
diff --git a/hosts/thinkpad/default.nix b/hosts/thinkpad/default.nix
deleted file mode 100644
index dc7fc66..0000000
--- a/hosts/thinkpad/default.nix
+++ /dev/null
@@ -1,57 +0,0 @@
-{
- config,
- pkgs,
- user,
- ...
-}: {
- imports =
- # For now, if applying to other system, swap files
- [(import ./hardware-configuration.nix)]
- ++ # Current system hardware config @ /etc/nixos/hardware-configuration.nix
- (import ../../modules/desktop/virtualisation/default.nix)
- ++ (import ../../modules/hardware/default.nix)
- ++
- # (import ./auditd.nix) ++
- [(import ./sysctl.nix)]
- ++ [(import ./kernel.nix)]
- ++ [(import ./auditd.nix)]
- ++ [(import ./openssh.nix)]
- ++ [(import ../../modules/programs/thunar.nix)]
- ++ [(import ../../modules/desktop/hyprland/default.nix)]; # Window Manager
-
- hardware.sane = {
- # Used for scanning with Xsane
- enable = true;
- extraBackends = [pkgs.sane-airscan];
- };
-
- environment = {
- systemPackages = with pkgs; [
- simple-scan
- ];
- };
-
- programs = {
- # No xbacklight, this is the alterantive
- dconf.enable = true;
- light.enable = true;
- command-not-found.enable = false;
- nix-index-database.comma.enable = true;
- };
-
- services = {
- tlp.enable = true; # TLP and auto-cpufreq for power management
- #logind.lidSwitch = "ignore"; # Laptop does not go to sleep when lid is closed
- auto-cpufreq.enable = true;
- blueman.enable = true;
- tailscale.enable = true;
- };
-
- networking.firewall.trustedInterfaces = ["tailscale0"];
-
- #temporary bluetooth fix
- systemd.tmpfiles.rules = [
- "d /var/lib/bluetooth 700 root root - -"
- ];
- systemd.targets."bluetooth".after = ["systemd-tmpfiles-setup.service"];
-}
diff --git a/hosts/thinkpad/home.nix b/hosts/thinkpad/home.nix
deleted file mode 100644
index d7f693f..0000000
--- a/hosts/thinkpad/home.nix
+++ /dev/null
@@ -1,37 +0,0 @@
-{pkgs, ...}: {
- imports = [
- ../../modules/shell/git/home.nix
- ../../modules/desktop/hyprland/home.nix
- ];
-
- home = {
- # Specific packages for laptop
- packages = with pkgs; [
- # Applications
- libreoffice # Office packages
-
- # Display
- #light # xorg.xbacklight not supported. Other option is just use xrandr.
-
- # Power Management
- #auto-cpufreq # Power management
- #tlp # Power management
- ];
- };
-
- # programs = {
- # alacritty.settings.font.size = 11;
- # };
-
- services = {
- # Applets
- blueman-applet.enable = true; # Bluetooth
- network-manager-applet.enable = true; # Network
- # cbatticon = {
- # enable = true;
- # criticalLevelPercent = 10;
- # lowLevelPercent = 20;
- # iconType = null;
- # };
- };
-}
diff --git a/hosts/thinkpad/openssh.nix b/hosts/thinkpad/openssh.nix
deleted file mode 100644
index 5536523..0000000
--- a/hosts/thinkpad/openssh.nix
+++ /dev/null
@@ -1,10 +0,0 @@
-{...}: {
- services.openssh = {
- enable = true;
- settings = {
- PasswordAuthentication = false;
- challengeResponseAuthentication = false;
- PermitRootLogin = "no";
- };
- };
-}
diff --git a/modules/desktop/gtk.nix b/modules/desktop/gtk.nix
deleted file mode 100644
index aa57c12..0000000
--- a/modules/desktop/gtk.nix
+++ /dev/null
@@ -1,35 +0,0 @@
-{
- inputs,
- pkgs,
- ...
-}: {
- gtk = {
- cursorTheme = {
- name = "Catppuccin-Mocha-Dark-Cursors";
-
- package = pkgs.catppuccin-cursors.mochaDark;
- };
-
- enable = true;
-
- iconTheme = {
- package = pkgs.catppuccin-papirus-folders.override {
- flavor = "mocha";
-
- accent = "blue";
- };
-
- name = "Papirus-Dark";
- };
-
- theme = {
- package = pkgs.catppuccin-gtk.override {
- size = "compact";
-
- variant = "mocha";
- };
-
- name = "Catppuccin-Mocha-Compact-Blue-Dark";
- };
- };
-}
diff --git a/modules/desktop/hyprland/default.nix b/modules/desktop/hyprland/default.nix
deleted file mode 100644
index e5d8771..0000000
--- a/modules/desktop/hyprland/default.nix
+++ /dev/null
@@ -1,65 +0,0 @@
-{
- config,
- lib,
- pkgs,
- system,
- inputs,
- ...
-}: let
- exec = "exec Hyprland";
-in {
- imports = [../../programs/waybar.nix];
-
- environment = {
- loginShellInit = ''
- if [ -z $DISPLAY ] && [ "$(tty)" = "/dev/tty1" ]; then
- ${exec}
- fi
- ''; # Will automatically open Hyprland when logged into tty1
-
- variables = {
- #WLR_NO_HARDWARE_CURSORS="1"; # Possible variables needed in vm
- #WLR_RENDERER_ALLOW_SOFTWARE="1";
- XDG_CURRENT_DESKTOP = "Hyprland";
- XDG_SESSION_TYPE = "wayland";
- XDG_SESSION_DESKTOP = "Hyprland";
- XCURSOR_SIZE = "108";
- };
- sessionVariables = {
- QT_QPA_PLATFORM = "wayland";
- QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
-
- GDK_BACKEND = "wayland";
- WLR_NO_HARDWARE_CURSORS = "1";
- MOZ_ENABLE_WAYLAND = "1";
- };
- systemPackages = with pkgs; [
- grim
- mpvpaper
- slurp
- swappy
- swaylock
- wl-clipboard
- wlr-randr
- ];
- };
-
- security.pam.services.swaylock = {
- text = ''
- auth include login
- '';
- };
-
- programs = {
- hyprland = {
- enable = true;
- package = inputs.hyprland.packages.${pkgs.system}.hyprland;
- };
- };
-
- xdg.portal = {
- # Required for flatpak with window managers and for file browsing
- enable = true;
- extraPortals = [pkgs.xdg-desktop-portal-gtk];
- };
-}
diff --git a/modules/desktop/hyprland/displayswitch.sh b/modules/desktop/hyprland/displayswitch.sh
deleted file mode 100644
index b588d2a..0000000
--- a/modules/desktop/hyprland/displayswitch.sh
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/usr/bin/env bash
-
-if grep open /proc/acpi/button/lid/LID/state; then
- hyprctl keyword monitor "eDP-1, 1920x1080, 0x0, 1"
-else
- if [[ $(hyprctl monitors | grep -c "Monitor") != 1 ]]; then
- hyprctl keyword monitor "eDP-1, disable"
- fi
-fi
diff --git a/modules/desktop/hyprland/home.nix b/modules/desktop/hyprland/home.nix
deleted file mode 100644
index 7da3f5a..0000000
--- a/modules/desktop/hyprland/home.nix
+++ /dev/null
@@ -1,215 +0,0 @@
-{
- pkgs,
- config,
- ...
-}: let
- hyprlandConf = ''
- monitor=,preferred,auto,1
- #monitor=,preferred,auto,auto
-
- # trigger when the switch is turning off
- # bindl = , switch:off:Lid Switch,exec,hyprctl keyword monitor "eDP-1, 1920x1080, 0x0, 1"
- # trigger when the switch is turning on
- # bindl = , switch:on:Lid Switch,exec,hyprctl keyword monitor "eDP-1, disable"
- bindl=,switch:Lid Switch, exec, displayswitch
-
- # use this instead of hidpi patches
- xwayland {
- force_zero_scaling = true
- }
-
- $mainMod=SUPER
-
- general {
- border_size=3
- gaps_in=5
- gaps_out=7
- col.active_border=rgba(${config.colorScheme.colors.base05}ee) rgba(${config.colorScheme.colors.base08}ee) 45deg
- col.inactive_border=0x66333333
- layout=dwindle
- }
-
- decoration {
- rounding=5
- active_opacity=0.93
- inactive_opacity=0.93
- fullscreen_opacity=1
- drop_shadow=false
- }
-
- animations {
- enabled=true
- bezier = myBezier,0.1,0.7,0.1,1.05
- animation=fade,1,7,default
- animation=windows,1,7,myBezier
- animation=windowsOut,1,3,default,popin 60%
- animation=windowsMove,1,7,myBezier
- }
-
- input {
- kb_layout=us
- kb_options=caps:ctrl_modifier
- follow_mouse=2
- repeat_delay=250
- numlock_by_default=1
- accel_profile=flat
- sensitivity=0.8
- touchpad {
- natural_scroll=true
- middle_button_emulation=true
- tap-to-click=true
- }
- }
- }
-
- gestures {
- workspace_swipe=true
- workspace_swipe_fingers=3
- workspace_swipe_distance=100
- }
-
- dwindle {
- pseudotile=false
- force_split=2
- }
-
- debug {
- damage_tracking=2
- }
-
- bindm=$mainMod,mouse:272,movewindow
- bindm=$mainMod,mouse:273,resizewindow
-
- bind=$mainMod,Return,exec,${pkgs.alacritty}/bin/alacritty
- bind=$mainMod,Q,killactive,
- bind=$mainMod,Escape,exit,
- bind=$mainMod,L,exec,${pkgs.swaylock}/bin/swaylock
- bind=$mainMod,E,exec,${pkgs.pcmanfm}/bin/pcmanfm
- bind=$mainMod,H,togglefloating,
- #bind=$mainMod,Space,exec,${pkgs.rofi}/bin/rofi -show drun
- bind=$mainMod,Space,exec,${pkgs.wofi}/bin/wofi --show drun
- bind=$mainMod,P,pseudo,
- bind=$mainMod,F,fullscreen,
- bind=$mainMod,R,forcerendererreload
- bind=$mainMod,R,exec,${pkgs.hyprland}/bin/hyprctl reload
-
- bind=$mainMod,left,movefocus,l
- bind=$mainMod,right,movefocus,r
- bind=$mainMod,up,movefocus,u
- bind=$mainMod,down,movefocus,d
-
- bind=$mainMod SHIFT,left,movewindow,l
- bind=$mainMod SHIFT,right,movewindow,r
- bind=$mainMod SHIFT,up,movewindow,u
- bind=$mainMod SHIFT,down,movewindow,d
-
- bind=$mainMod,1,workspace,1
- bind=$mainMod,2,workspace,2
- bind=$mainMod,3,workspace,3
- bind=$mainMod,4,workspace,4
- bind=$mainMod,5,workspace,5
- bind=$mainMod,6,workspace,6
- bind=$mainMod,7,workspace,7
- bind=$mainMod,8,workspace,8
- bind=$mainMod,9,workspace,9
- bind=$mainMod,0,workspace,10
- bind=$mainMod,right,workspace,+1
- bind=$mainMod,left,workspace,-1
-
- bind=$mainMod SHIFT,1,movetoworkspace,1
- bind=$mainMod SHIFT,2,movetoworkspace,2
- bind=$mainMod SHIFT,3,movetoworkspace,3
- bind=$mainMod SHIFT,4,movetoworkspace,4
- bind=$mainMod SHIFT,5,movetoworkspace,5
- bind=$mainMod SHIFT,6,movetoworkspace,6
- bind=$mainMod SHIFT,7,movetoworkspace,7
- bind=$mainMod SHIFT,8,movetoworkspace,8
- bind=$mainMod SHIFT,9,movetoworkspace,9
- bind=$mainMod SHIFT,0,movetoworkspace,10
- bind=$mainMod SHIFT,right,movetoworkspace,+1
- bind=$mainMod SHIFT,left,movetoworkspace,-1
-
- bind=CTRL,right,resizeactive,20 0
- bind=CTRL,left,resizeactive,-20 0
- bind=CTRL,up,resizeactive,0 -20
- bind=CTRL,down,resizeactive,0 20
-
- bind=,print,exec,${pkgs.grim}/bin/grim -g "$(${pkgs.slurp}/bin/slurp)" - | ${pkgs.swappy}/bin/swappy -f - -o ~/Pictures/$(date +%Hh_%Mm_%Ss_%d_%B_%Y).png && notify-send "Saved to ~/Pictures/$(date +%Hh_%Mm_%Ss_%d_%B_%Y).png"
-
- bind=,XF86AudioLowerVolume,exec,${pkgs.pamixer}/bin/pamixer -d 10
- bind=,XF86AudioRaiseVolume,exec,${pkgs.pamixer}/bin/pamixer -i 10
- bind=,XF86AudioMute,exec,${pkgs.pamixer}/bin/pamixer -t
- bind=,XF86AudioMicMute,exec,${pkgs.pamixer}/bin/pamixer --default-source -t
- bind=,XF86MonBrightnessDown,exec,${pkgs.light}/bin/light -U 10
- bind=,XF86MonBrightnessUP,exec,${pkgs.light}/bin/light -A 10
-
- #windowrule=float,^(Rofi)$
- windowrule=float,title:^(Volume Control)$
- windowrule=float,title:^(Picture-in-Picture)$
- windowrule=pin,title:^(Picture-in-Picture)$
- windowrule=move 75% 75% ,title:^(Picture-in-Picture)$
- windowrule=size 24% 24% ,title:^(Picture-in-Picture)$
-
- exec-once=dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
- exec-once=${pkgs.waybar}/bin/waybar
- exec-once=${pkgs.blueman}/bin/blueman-applet
- exec-once=${pkgs.swaybg}/bin/swaybg -m fill -i $HOME/.config/wall
- '';
-in {
- xdg.configFile."hypr/hyprland.conf".text = hyprlandConf;
-
- programs.swaylock.settings = {
- image = "$HOME/.config/lock";
- color = "000000f0";
- font-size = "24";
- indicator-idle-visible = false;
- indicator-radius = 100;
- indicator-thickness = 20;
- inside-color = "00000000";
- inside-clear-color = "00000000";
- inside-ver-color = "00000000";
- inside-wrong-color = "00000000";
- key-hl-color = "79b360";
- line-color = "000000f0";
- line-clear-color = "000000f0";
- line-ver-color = "000000f0";
- line-wrong-color = "000000f0";
- ring-color = "ffffff50";
- ring-clear-color = "bbbbbb50";
- ring-ver-color = "bbbbbb50";
- ring-wrong-color = "b3606050";
- text-color = "ffffff";
- text-ver-color = "ffffff";
- text-wrong-color = "ffffff";
- show-failed-attempts = true;
- };
-
- services.swayidle = {
- enable = true;
- events = [
- {
- event = "before-sleep";
- command = "${pkgs.swaylock}/bin/swaylock -f";
- }
- {
- event = "lock";
- command = "lock";
- }
- ];
- timeouts = [
- {
- timeout = 300;
- command = "${pkgs.swaylock}/bin/swaylock -f";
- }
- ];
- systemdTarget = "xdg-desktop-portal-hyprland.service";
- };
-
- home.packages = [
- (pkgs.writeShellApplication {
- name = "displayswitch";
- runtimeInputs = [];
- text = builtins.readFile ./displayswitch.sh;
- })
- ];
-}
diff --git a/modules/desktop/virtualisation/default.nix b/modules/desktop/virtualisation/default.nix
deleted file mode 100644
index 76abf8f..0000000
--- a/modules/desktop/virtualisation/default.nix
+++ /dev/null
@@ -1,5 +0,0 @@
-[
- ./docker.nix
- ./libvirt.nix
- ./kubernetes.nix
-]
diff --git a/modules/desktop/virtualisation/docker.nix b/modules/desktop/virtualisation/docker.nix
deleted file mode 100644
index 3ccb274..0000000
--- a/modules/desktop/virtualisation/docker.nix
+++ /dev/null
@@ -1,25 +0,0 @@
-{
- config,
- pkgs,
- user,
- ...
-}: {
- virtualisation = {
- docker.enable = true;
- };
-
- users.groups.docker.members = ["${user}"];
-
- #environment = {
- # interactiveShellInit = ''
- # alias rtmp='docker start nginx-rtmp'
- # ''; # Alias to easily start container
- #};
-
- environment.systemPackages = with pkgs; [
- docker-compose
- distrobox
- dive # A tool for exploring a docker image, layer contents.
- grype # A vulnerability scanner for container images and filesystems.
- ];
-}
diff --git a/modules/desktop/virtualisation/kubernetes.nix b/modules/desktop/virtualisation/kubernetes.nix
deleted file mode 100644
index c37b723..0000000
--- a/modules/desktop/virtualisation/kubernetes.nix
+++ /dev/null
@@ -1,30 +0,0 @@
-{
- config,
- pkgs,
- user,
- ...
-}: {
- virtualisation = {
- docker.enable = true;
- };
-
- users.groups.docker.members = ["${user}"];
-
- #environment = {
- # interactiveShellInit = ''
- # alias rtmp='docker start nginx-rtmp'
- # ''; # Alias to easily start container
- #};
-
- environment.systemPackages = with pkgs; [
- argocd
- k3d
- k9s
- kind
- kubectl
- kubectx
- kubernetes-helm
- minikube
- stern
- ];
-}
diff --git a/modules/editors/default.nix b/modules/editors/default.nix
deleted file mode 100644
index 85881a2..0000000
--- a/modules/editors/default.nix
+++ /dev/null
@@ -1,3 +0,0 @@
-[
- # ./nvim
-]
diff --git a/modules/hardware/bluetooth.nix b/modules/hardware/bluetooth.nix
deleted file mode 100644
index 46dbff7..0000000
--- a/modules/hardware/bluetooth.nix
+++ /dev/null
@@ -1,11 +0,0 @@
-{pkgs, ...}: {
- hardware.bluetooth = {
- enable = true;
- #hsphfpd.enable = true; # HSP & HFP daemon
- settings = {
- General = {
- Enable = "Source,Sink,Media,Socket";
- };
- };
- };
-}
diff --git a/modules/hardware/default.nix b/modules/hardware/default.nix
deleted file mode 100644
index 215aa8c..0000000
--- a/modules/hardware/default.nix
+++ /dev/null
@@ -1,3 +0,0 @@
-[
- ./bluetooth.nix
-]
diff --git a/modules/home-manager/default.nix b/modules/home-manager/default.nix
new file mode 100644
index 0000000..45aae31
--- /dev/null
+++ b/modules/home-manager/default.nix
@@ -0,0 +1,6 @@
+# Add your reusable home-manager modules to this directory, on their own file (https://nixos.wiki/wiki/Module).
+# These should be stuff you would like to share with others, not your personal configurations.
+{
+ # List your module files here
+ # my-module = import ./my-module.nix;
+}
diff --git a/modules/nixos/default.nix b/modules/nixos/default.nix
new file mode 100644
index 0000000..8605069
--- /dev/null
+++ b/modules/nixos/default.nix
@@ -0,0 +1,6 @@
+# Add your reusable NixOS modules to this directory, on their own file (https://nixos.wiki/wiki/Module).
+# These should be stuff you would like to share with others, not your personal configurations.
+{
+ # List your module files here
+ # my-module = import ./my-module.nix;
+}
diff --git a/modules/programs/alacritty.nix b/modules/programs/alacritty.nix
deleted file mode 100644
index 3785b7e..0000000
--- a/modules/programs/alacritty.nix
+++ /dev/null
@@ -1,60 +0,0 @@
-{
- pkgs,
- config,
- ...
-}: {
- programs.alacritty.enable = true;
- programs.alacritty.settings = {
- env = {TERM = "xterm-256color";};
- colors = with config.colorScheme.colors; {
- bright = {
- black = "0x${base03}";
- blue = "0x${base0D}";
- cyan = "0x${base0C}";
- green = "0x${base0B}";
- magenta = "0x${base0E}";
- red = "0x${base08}";
- white = "0x${base07}";
- yellow = "0x${base0A}";
- };
- cursor = {
- cursor = "0x${base06}";
- text = "0x${base05}";
- };
- normal = {
- black = "0x${base00}";
- blue = "0x${base0D}";
- cyan = "0x${base0C}";
- green = "0x${base0B}";
- magenta = "0x${base0E}";
- red = "0x${base08}";
- white = "0x${base05}";
- yellow = "0x${base0A}";
- };
- primary = {
- background = "0x${base00}";
- foreground = "0x${base05}";
- };
- };
- font = {
- normal = {
- family = "MonoLisa";
- style = "Regular";
- };
- bold = {
- family = "MonoLisa";
- style = "Bold";
- };
- italic = {
- family = "MonoLisa";
- style = "Italic";
- };
- bold_italic = {
- family = "MonoLisa";
- style = "Bold Italic";
- };
- size = 18;
- #bold_italic = {};
- };
- };
-}
diff --git a/modules/programs/kitty.nix b/modules/programs/kitty.nix
deleted file mode 100644
index c3cd536..0000000
--- a/modules/programs/kitty.nix
+++ /dev/null
@@ -1,79 +0,0 @@
-{
- config,
- lib,
- pkgs,
- ...
-}: {
- home = {
- packages = with pkgs; [
- kitty
- ];
- };
-
- home.file = {
- ".config/kitty/kitty.conf" = {
- text = ''
- include ./theme.conf
- font_family SauceCodePro Nerd Font
- font_size 14.0
-
- background_opacity 1.0
-
- show_hyperlink_targets yes
-
- allow_hyperlinks yes
-
- #term xterm-kitty
- term xterm-256color
-
- confirm_os_window_close 0
- '';
- };
- };
-
- home.file = {
- ".config/kitty/theme.conf" = {
- text = ''
-
- # Kitty window border colors
- active_border_color #${config.colorScheme.colors.base07}
- inactive_border_color #${config.colorScheme.colors.base02}
- bell_border_color #${config.colorScheme.colors.base0A}
-
- # URL underline color when hovering with mouse
- url_color #${config.colorScheme.colors.base06}
-
- # Colors for marks (marked text in the terminal)
- mark1_foreground #${config.colorScheme.colors.base00}
- mark1_background #${config.colorScheme.colors.base07}
- mark2_foreground #${config.colorScheme.colors.base00}
- mark2_background #${config.colorScheme.colors.base0E}
- mark3_foreground #${config.colorScheme.colors.base00}
- mark3_background #${config.colorScheme.colors.base0D}
-
- background #${config.colorScheme.colors.base00}
- foreground #${config.colorScheme.colors.base05}
- cursor #${config.colorScheme.colors.base06}
- cursor_text_color #${config.colorScheme.colors.base00}
- color0 #${config.colorScheme.colors.base03}
- color1 #${config.colorScheme.colors.base08}
- color2 #${config.colorScheme.colors.base0B}
- color3 #${config.colorScheme.colors.base0A}
- color4 #${config.colorScheme.colors.base0D}
- color5 #${config.colorScheme.colors.base0F}
- color6 #${config.colorScheme.colors.base0C}
- color7 #${config.colorScheme.colors.base03}
- color8 #${config.colorScheme.colors.base04}
- color9 #${config.colorScheme.colors.base08}
- color10 #${config.colorScheme.colors.base0B}
- color11 #${config.colorScheme.colors.base0A}
- color12 #${config.colorScheme.colors.base0D}
- color13 #${config.colorScheme.colors.base0F}
- color14 #${config.colorScheme.colors.base0C}
- color15 #${config.colorScheme.colors.base04}
- selection_foreground #${config.colorScheme.colors.base00}
- selection_background #${config.colorScheme.colors.base06}
- '';
- };
- };
-}
diff --git a/modules/programs/mako.nix b/modules/programs/mako.nix
deleted file mode 100644
index d4030e2..0000000
--- a/modules/programs/mako.nix
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- pkgs,
- config,
- ...
-}: {
- services.mako = with config.colorScheme.colors; {
- enable = true;
- backgroundColor = "#${base01}";
- borderColor = "#${base0E}";
- borderRadius = 5;
- borderSize = 2;
- textColor = "#${base04}";
- layer = "overlay";
- };
-}
diff --git a/modules/programs/waybar.nix b/modules/programs/waybar.nix
deleted file mode 100644
index ecde119..0000000
--- a/modules/programs/waybar.nix
+++ /dev/null
@@ -1,446 +0,0 @@
-{
- config,
- lib,
- pkgs,
- host,
- user,
- ...
-}: {
- environment.systemPackages = with pkgs; [
- waybar
- ];
-
- home-manager.users.${user} = {
- # Home-manager waybar config
- programs.waybar = {
- enable = true;
- systemd = {
- enable = true;
- target = "sway-session.target"; # Needed for waybar to start automatically
- };
-
- style = ''
- * {
- border: none;
- font-family: FiraCode Nerd Font Mono;
- /*font-weight: bold;*/
- font-size: 12px;
- text-shadow: 0px 0px 5px #${config.colorScheme.colors.base00};
- }
- button:hover {
- background-color: rgba(80,100,100,0.4);
- }
- window#waybar {
- background-color: #${config.colorScheme.colors.base00};
- transition-property: background-color;
- transition-duration: .5s;
- border-bottom: none;
- }
- window#waybar.hidden {
- opacity: 0.2;
- }
- #workspace,
- #mode,
- #clock,
- #pulseaudio,
- #custom-sink,
- #network,
- #mpd,
- #memory,
- #network,
- #window,
- #cpu,
- #disk,
- #backlight,
- #battery,
- #custom-ds4,
- #tray {
- color: #${config.colorScheme.colors.base09};
- background-clip: padding-box;
- }
- #custom-menu {
- color: #A7C7E7;
- padding: 0px 5px 0px 5px;
- }
- #workspaces button {
- padding: 0px 5px;
- min-width: 5px;
- color: #${config.colorScheme.colors.base09};
- }
- #workspaces button:hover {
- background-color: #${config.colorScheme.colors.base02};
- }
- /*#workspaces button.focused {*/
- #workspaces button.active {
- color: #${config.colorScheme.colors.base0C};
- background-color: #${config.colorScheme.colors.base02};
- }
- #workspaces button.visible {
- color: #${config.colorScheme.colors.base0E};
- }
- #workspaces button.hidden {
- color: #999999;
- }
- #battery.warning {
- color: #ff5d17;
- background-color: rgba(0,0,0,0);
- }
- #battery.critical {
- color: #ff200c;
- background-color: rgba(0,0,0,0);
- }
- #battery.charging {
- color: #9ece6a;
- background-color: rgba(0,0,0,0);
- }
- '';
- settings = with host; {
- Main = {
- layer = "top";
- position = "top";
- height = 16;
- # output = [
- # "${mainMonitor}"
- # ];
- tray = {spacing = 5;};
- #modules-center = [ "clock" ];
- modules-left = with config;
- if programs.hyprland.enable == true
- then ["custom/menu" "hyprland/workspaces"]
- else if programs.sway.enable == true
- then ["sway/workspaces" "sway/window" "sway/mode"]
- else [];
-
- modules-right =
- if hostName == "desktop"
- then ["custom/ds4" "custom/pad" "network" "cpu" "memory" "custom/pad" "pulseaudio" "custom/sink" "custom/pad" "clock" "tray"]
- else ["cpu" "memory" "custom/pad" "battery" "custom/pad" "backlight" "custom/pad" "pulseaudio" "custom/pad" "clock" "tray"];
-
- "custom/pad" = {
- format = " ";
- tooltip = false;
- };
- "custom/menu" = {
- format = "";
- #on-click = ''${pkgs.rofi}/bin/rofi -show power-menu -modi "power-menu:rofi-power-menu --choices=logout/suspend/reboot/shutdown"'';
- #on-click-right = "${pkgs.rofi}/bin/rofi -show drun";
- on-click = ''~/.config/wofi/power.sh'';
- on-click-right = "${pkgs.wofi}/bin/wofi --show drun";
- tooltip = false;
- };
- "sway/workspaces" = {
- format = "{icon}";
- format-icons = {
- "1" = "";
- "2" = "";
- "3" = "";
- "4" = "";
- "5" = "";
- };
- all-outputs = true;
- persistent_workspaces = {
- "1" = [];
- "2" = [];
- "3" = [];
- "4" = [];
- "5" = [];
- };
- };
- "wlr/workspaces" = {
- format = "{name}";
- #format = "{icon}";
- #format-icons = {
- # "1"="";
- # "2"="";
- # "3"="";
- # "4"="";
- # "5"="";
- # "6"="";
- # "7"="";
- # "8"="";
- # "9"="";
- # "10"="";
- #};
- #all-outputs = true;
- active-only = false;
- on-click = "activate";
- };
- "hyprland/workspaces" = {
- format = "{name}";
- };
- clock = {
- format = "{:%b %d %H:%M} ";
- tooltip-format = "{:%Y %B}\n{calendar}";
- #format-alt = "{:%A, %B %d, %Y} ";
- };
- cpu = {
- format = " {usage}% ";
- interval = 1;
- };
- disk = {
- format = "{percentage_used}% ";
- path = "/";
- interval = 30;
- };
- memory = {
- format = "{}% ";
- interval = 1;
- };
- backlight = {
- device = "intel_backlight";
- format = "{percent}% {icon}";
- format-icons = ["" ""];
- on-scroll-down = "${pkgs.light}/bin/light -U 5";
- on-scroll-up = "${pkgs.light}/bin/light -A 5";
- };
- battery = {
- interval = 60;
- states = {
- warning = 30;
- critical = 15;
- };
- format = "{capacity}% {icon}";
- format-charging = "{capacity}% ";
- format-icons = ["" "" "" "" ""];
- max-length = 25;
- };
- network = {
- format-wifi = "";
- format-ethernet = "";
- #format-ethernet = " {ifname}: {ipaddr}/{cidr}";
- format-linked = " {ifname} (No IP)";
- format-disconnected = " Not connected";
- #format-alt = "{ifname}: {ipaddr}/{cidr}";
- tooltip-format = "{essid} {ipaddr}/{cidr}";
- #on-click-right = "${pkgs.alacritty}/bin/alacritty -e nmtui";
- };
- pulseaudio = {
- format = "{icon} {volume}% {format_source} ";
- format-bluetooth = "{icon} {volume}% {format_source} ";
- format-bluetooth-muted = "x {volume}% {format_source} ";
- format-muted = "x {volume}% {format_source} ";
- #format-source = "{volume}% ";
- format-source = " ";
- format-source-muted = " ";
- format-icons = {
- default = ["" "" ""];
- headphone = "";
- #hands-free = "";
- #headset = "";
- #phone = "";
- #portable = "";
- #car = "";
- };
- tooltip-format = "{desc}, {volume}%";
- on-click = "${pkgs.pamixer}/bin/pamixer -t";
- on-click-right = "${pkgs.pamixer}/bin/pamixer --default-source -t";
- on-click-middle = "${pkgs.pavucontrol}/bin/pavucontrol";
- };
- "custom/sink" = {
- format = "{}";
- exec = "$HOME/.config/waybar/script/sink.sh";
- interval = 2;
- on-click = "$HOME/.config/waybar/script/switch.sh";
- tooltip = false;
- };
- "custom/ds4" = {
- format = "{}";
- exec = "$HOME/.config/waybar/script/ds4.sh";
- interval = 60;
- };
- tray = {
- icon-size = 13;
- };
- };
- Sec =
- if hostName == "desktop" || hostName == "work"
- then {
- layer = "top";
- position = "top";
- height = 16;
- output =
- if hostName == "desktop"
- then [
- "${secondMonitor}"
- ]
- else [
- "${secondMonitor}"
- "${thirdMonitor}"
- ];
- modules-left = ["custom/menu" "wlr/workspaces"];
-
- modules-right =
- if hostName == "desktop"
- then ["custom/ds4" "custom/pad" "pulseaudio" "custom/sink" "custom/pad" "clock"]
- else ["cpu" "memory" "custom/pad" "battery" "custom/pad" "backlight" "custom/pad" "pulseaudio" "custom/pad" "clock"];
-
- "custom/pad" = {
- format = " ";
- tooltip = false;
- };
- "custom/menu" = {
- format = "";
- #on-click = "${pkgs.rofi}/bin/rofi -show p -modi p:${pkgs.rofi-power-menu}/bin/rofi-power-menu -theme $HOME/.config/rofi/config.rasi";
- #on-click-right = "${pkgs.rofi}/bin/rofi -show drun";
- on-click = ''~/.config/wofi/power.sh'';
- on-click-right = "${pkgs.wofi}/bin/wofi --show drun";
- tooltip = false;
- };
- "wlr/workspaces" = {
- format = "{name}";
- #format = "{icon}";
- #format-icons = {
- # "1"="";
- # "2"="";
- # "3"="";
- # "4"="";
- # "5"="";
- # "6"="";
- # "7"="";
- # "8"="";
- # "9"="";
- # "10"="";
- #};
- active-only = false;
- on-click = "activate";
- #on-scroll-up = "hyprctl dispatch workspace e+1";
- #on-scroll-down = "hyprctl dispatch workspace e-1";
- };
- clock = {
- format = "{:%b %d %H:%M}";
- tooltip-format = "{:%Y %B}\n{calendar}";
- #format-alt = "{:%A, %B %d, %Y} ";
- };
- cpu = {
- format = " {usage}% ";
- interval = 1;
- };
- disk = {
- format = "{percentage_used}% ";
- path = "/";
- interval = 30;
- };
- memory = {
- format = "{}% ";
- interval = 1;
- };
- backlight = {
- device = "intel_backlight";
- format = "{percent}% {icon}";
- format-icons = ["" ""];
- on-scroll-down = "${pkgs.light}/bin/light -U 5";
- on-scroll-up = "${pkgs.light}/bin/light -A 5";
- };
- battery = {
- interval = 60;
- states = {
- warning = 30;
- critical = 15;
- };
- format = "{capacity}% {icon}";
- format-charging = "{capacity}% ";
- format-icons = ["" "" "" "" ""];
- max-length = 25;
- };
- pulseaudio = {
- format = "{icon} {volume}% {format_source} ";
- format-bluetooth = "{icon} {volume}% {format_source} ";
- format-bluetooth-muted = "x {volume}% {format_source} ";
- format-muted = "x {volume}% {format_source} ";
- #format-source = "{volume}% ";
- format-source = " ";
- format-source-muted = " ";
- format-icons = {
- default = ["" "" ""];
- headphone = "";
- #hands-free = "";
- #headset = "";
- #phone = "";
- #portable = "";
- #car = "";
- };
- tooltip-format = "{desc}, {volume}%";
- on-click = "${pkgs.pamixer}/bin/pamixer -t";
- on-click-right = "${pkgs.pamixer}/bin/pamixer --default-source -t";
- on-click-middle = "${pkgs.pavucontrol}/bin/pavucontrol";
- };
- "custom/sink" = {
- #format = "蓼";
- format = "{}";
- exec = "$HOME/.config/waybar/script/sink.sh";
- interval = 2;
- on-click = "$HOME/.config/waybar/script/switch.sh";
- tooltip = false;
- };
- "custom/ds4" = {
- format = "{}";
- exec = "$HOME/.config/waybar/script/ds4.sh";
- interval = 60;
- };
- }
- else {};
- };
- };
- home.file = {
- ".config/waybar/script/sink.sh" = {
- # Custom script: Toggle speaker/headset
- text = ''
- #!/bin/sh
-
- HEAD=$(awk '/ Built-in Audio Analog Stereo/ { print $2 }' <(${pkgs.wireplumber}/bin/wpctl status | grep "*") | sed -n 2p)
- SPEAK=$(awk '/ S10 Bluetooth Speaker/ { print $2 }' <(${pkgs.wireplumber}/bin/wpctl status | grep "*") | head -n 1)
-
- if [[ $HEAD = "*" ]]; then
- printf "\n"
- elif [[ $SPEAK = "*" ]]; then
- printf "\n"
- fi
- exit 0
- '';
- executable = true;
- };
- ".config/waybar/script/switch.sh" = {
- # Custom script: Toggle speaker/headset
- text = ''
- #!/bin/sh
-
- ID1=$(awk '/ Built-in Audio Analog Stereo/ {sub(/.$/,"",$2); print $2 }' <(${pkgs.wireplumber}/bin/wpctl status) | head -n 1)
- ID2=$(awk '/ S10 Bluetooth Speaker/ {sub(/.$/,"",$2); print $2 }' <(${pkgs.wireplumber}/bin/wpctl status) | sed -n 2p)
-
- HEAD=$(awk '/ Built-in Audio Analog Stereo/ { print $2 }' <(${pkgs.wireplumber}/bin/wpctl status | grep "*") | sed -n 2p)
- SPEAK=$(awk '/ S10 Bluetooth Speaker/ { print $2 }' <(${pkgs.wireplumber}/bin/wpctl status | grep "*") | head -n 1)
-
- if [[ $HEAD = "*" ]]; then
- ${pkgs.wireplumber}/bin/wpctl set-default $ID2
- elif [[ $SPEAK = "*" ]]; then
- ${pkgs.wireplumber}/bin/wpctl set-default $ID1
- fi
- exit 0
- '';
- executable = true;
- };
- ".config/waybar/script/ds4.sh" = {
- # Custom script: Dualshock battery indicator
- text = ''
- #!/bin/sh
-
- FILE=/sys/class/power_supply/sony_controller_battery_e8:47:3a:05:c0:2b/capacity
- FILE2=/sys/class/power_supply/ps-controller-battery-e8:47:3a:05:c0:2b/capacity
-
- if [[ -f $FILE ]] then
- DS4BATT=$(cat $FILE)
- printf " $DS4BATT%%\n"
- elif [[ -f $FILE2 ]] then
- DS4BATT=$(cat $FILE2)
- printf " $DS4BATT%%\n"
- else
- printf "\n"
- fi
-
- exit 0
- '';
- executable = true;
- };
- };
- };
-}
diff --git a/modules/programs/wofi.nix b/modules/programs/wofi.nix
deleted file mode 100644
index 7b4660e..0000000
--- a/modules/programs/wofi.nix
+++ /dev/null
@@ -1,103 +0,0 @@
-{
- config,
- lib,
- pkgs,
- ...
-}: let
- inherit (config.lib.formats.rasi) mkLiteral; # Theme.rasi alternative. Add Theme here
- colors = import ../themes/colors.nix;
-in {
- home = {
- packages = with pkgs; [
- wofi
- ];
- };
-
- home.file = {
- ".config/wofi/config" = {
- text = ''
- width=280
- lines=10
- xoffset=5
- yoffset=5
- location=1
- prompt=Search...
- filter_rate=100
- allow_markup=false
- no_actions=true
- halign=fill
- orientation=vertical
- content_halign=fill
- insensitive=true
- allow_images=true
- image_size=20
- hide_scroll=true
- '';
- };
- ".config/wofi/style.css" = {
- text = ''
- window {
- margin: 0px;
- background-color: #${config.colorScheme.colors.base00};
- }
-
- #input {
- all: unset;
- min-height: 20px;
- padding: 4px 10px;
- margin: 4px;
- border: none;
- color: #${config.colorScheme.colors.base08};
- font-weight: bold;
- background-color: #${config.colorScheme.colors.base00};
- outline: #fff;
- }
-
- #inner-box {
- font-weight: bold;
- border-radius: 0px;
- }
-
- #outer-box {
- margin: 0px;
- padding: 3px;
- border: none;
- border-radius: 10px;
- border: 3px solid #${config.colorScheme.colors.base05};
- }
-
- #text {
- color: #${config.colorScheme.colors.base09};
- }
-
- #text:selected {
- color: #${config.colorScheme.colors.base08};
- background-color: transparent;
- }
-
- #entry:selected {
- background-color: #${config.colorScheme.colors.base05};
- }
- '';
- };
- ".config/wofi/power.sh" = {
- executable = true;
- text = ''
- #!/bin/sh
-
- entries="⏾ Suspend\n⭮ Reboot\n⏻ Shutdown"
-
- selected=$(echo -e $entries|wofi --dmenu --cache-file /dev/null | awk '{print tolower($2)}')
-
- case $selected in
- suspend)
- exec systemctl suspend;;
- reboot)
- exec systemctl reboot;;
- shutdown)
- exec systemctl poweroff -i;;
- esac
- '';
- };
- };
-}
diff --git a/modules/shell/default.nix b/modules/shell/default.nix
deleted file mode 100644
index a89f5da..0000000
--- a/modules/shell/default.nix
+++ /dev/null
@@ -1,5 +0,0 @@
-[
- # ./git.nix
- ./zsh.nix
- # ./direnv.nix
-]
diff --git a/modules/shell/ranger/home.nix b/modules/shell/ranger/home.nix
deleted file mode 100644
index c70a8af..0000000
--- a/modules/shell/ranger/home.nix
+++ /dev/null
@@ -1,33 +0,0 @@
-{
- config,
- lib,
- pkgs,
- user,
- ...
-}: {
- home.file."ranger_devicons" = {
- source = pkgs.fetchgit {
- url = "https://github.com/alexanderjeurissen/ranger_devicons.git";
- rev = "main";
- sha256 = "1ra2afxm2167a6ashgbrlilsh5lx696jzdhmfl34jh1w9p4j34g8";
- };
-
- target = ".config/ranger/plugins/ranger_devicons";
- };
-
- home.file = {
- ".config/ranger/rc.conf" = {
- text = ''
- default_linemode devicons
- set vcs_backend_git enabled
- set preview_files true
- set preview_directories true
- set collapse_preview true
- '';
- };
- };
-
- home.packages = with pkgs; [
- ranger
- ];
-}
diff --git a/modules/shell/tmux/home.nix b/modules/shell/tmux/home.nix
deleted file mode 100644
index 0bfadf0..0000000
--- a/modules/shell/tmux/home.nix
+++ /dev/null
@@ -1,165 +0,0 @@
-{
- pkgs,
- config,
- user,
- ...
-}: {
- programs.tmux = {
- enable = true;
- clock24 = true;
- plugins = with pkgs.tmuxPlugins; [
- sensible
- yank
- resurrect
- continuum
- vim-tmux-navigator
- tmux-thumbs
- ];
-
- extraConfig = ''
- bind -n M-r source-file ~/.config/tmux/tmux.conf
-
- set -ag terminal-overrides ",xterm-256color:RGB"
-
-
-
- set -g detach-on-destroy off # don't exit from tmux when closing a session
-
- # New Theme
- set -g status-interval 3 # update the status bar every 3 seconds
- set -g status-left "#[fg=blue,bold,bg=#${config.colorScheme.colors.base00}] #S "
- set -g status-right "#[fg=#${config.colorScheme.colors.base07},bold,bg=#${config.colorScheme.colors.base00}]%a %Y-%m-%d %l:%M %p"
- set -ga status-right "#($HOME/.config/tmux/scripts/cal.sh)"
- set -g status-justify left
- set -g status-left-length 200 # increase length (from 10)
- set -g status-right-length 200 # increase length (from 10)
- set -g status-position top # macOS / darwin style
- set -g status-style 'bg=#${config.colorScheme.colors.base00}' # transparent
- set -g window-status-current-format '#[fg=magenta,bg=#${config.colorScheme.colors.base00}]*#I #W#{?window_zoomed_flag,(),} '
- set -g window-status-format '#[fg=gray,bg=#${config.colorScheme.colors.base00}] #I #W'
- set -g window-status-last-style 'fg=white,bg=black'
- set -g message-command-style bg=default,fg=yellow
- set -g message-style bg=default,fg=yellow
- set -g mode-style bg=default,fg=yellow
- set -g pane-active-border-style 'fg=magenta,bg=default'
- set -g pane-border-style 'fg=brightblack,bg=default'
- set -g @tmux-last-prompt-pattern ' '
-
-
-
- set -g mouse on
-
- set-option -g status-position top
-
- bind-key g display-popup -h 95% -w 95% -E 'lazygit'
- bind-key t display-popup -h 95% -w 95% -E "${pkgs.htop}/bin/htop"
-
- bind C-g display-popup -E "tat ~/gallery"
-
- bind -n M-g display-popup -E "tmux new-session -A -s scratch"
-
- bind -n M-b switch-client -l
- bind -n M-p previous-window
- bind -n M-n next-window
- bind -n M-P switch-client -p
- bind -n M-N switch-client -n
-
- unbind f
- bind f resize-pane -Z
-
- # create session
- bind C-c new-session
-
- # split current window horizontally
- bind - split-window -v
- # split current window vertically
- bind _ split-window -h
-
- # Select Layouts
- #―――――――――――――――――
- bind -n M-a select-layout main-vertical
- bind -n M-A select-layout main-horizontal
- bind -n M-E select-layout even-vertical
- bind -n M-V select-layout even-horizontal
-
- # pane navigation
- bind -r h select-pane -L # move left
- bind -r j select-pane -D # move down
- bind -r k select-pane -U # move up
- bind -r l select-pane -R # move right
- bind > swap-pane -D # swap current pane with the next one
- bind < swap-pane -U # swap current pane with the previous one
-
- # pane resizing
- bind -r H resize-pane -L 2
- bind -r J resize-pane -D 2
- bind -r K resize-pane -U 2
- bind -r L resize-pane -R 2
- bind -r c-f resize-pane -Z
-
- # window navigation
- unbind n
- unbind p
-
- setw -g mode-keys vi
-
- bind Enter copy-mode # enter copy mode
-
- bind -T copy-mode-vi v send -X begin-selection
- bind -T copy-mode-vi C-v send -X rectangle-toggle
- bind -T copy-mode-vi y send -X copy-selection-and-cancel
- bind -T copy-mode-vi Escape send -X cancel
- bind -T copy-mode-vi H send -X start-of-line
- bind -T copy-mode-vi L send -X end-of-line
-
- # -- buffers -------------------------------------------------------------------
-
- bind b list-buffers # list paste buffers
- bind p paste-buffer -p # paste from the top paste buffer
- bind P choose-buffer # choose which buffer to paste from
-
- # -- display -------------------------------------------------------------------
-
- set -g renumber-windows on # renumber windows when a window is closed
-
- bind k display-popup -E "\
- tmux list-sessions -F '#{?session_attached,,#{session_name}}' |\
- fzf --reverse -m --header=kill-session |\
- xargs -I {} tmux kill-session -t {}"
-
- bind C-j display-popup -E "\
- tmux list-sessions -F '#{?session_attached,,#{session_name}}' |\
- sed '/^$/d' |\
- fzf --reverse --header jump-to-session --preview 'tmux capture-pane -pt {}' |\
- xargs tmux switch-client -t"
-
-
- '';
- };
-
- programs.tmate = {
- enable = true;
- };
-
- home.packages = [
- # Open tmux for current project.
- (pkgs.writeShellApplication {
- name = "tat";
- runtimeInputs = [pkgs.tmux pkgs.fzf];
- text = builtins.readFile ./ta.sh;
- })
- pkgs.fzf
- ];
-
- programs.zsh = {
- shellAliases = {
- tx = "tmux new -s default";
- ta = "tmux attach -t";
- tad = "tmux attach -d -t";
- ts = "tmux new-session -s";
- tl = "tmux list-sessions";
- tksv = "tmux kill-server";
- tkss = "tmux kill-session -t";
- };
- };
-}
diff --git a/modules/shell/zsh.nix b/modules/shell/zsh.nix
deleted file mode 100644
index 720d75c..0000000
--- a/modules/shell/zsh.nix
+++ /dev/null
@@ -1,43 +0,0 @@
-{
- pkgs,
- config,
- ...
-}: {
- age.secrets.env = {
- file = ../../secrets/env.age;
- owner = "glen";
- };
-
- programs = {
- zsh = {
- enable = true;
- autosuggestions.enable = true; # Auto suggest options and highlights syntax, searches in history for options
- syntaxHighlighting.enable = true;
- enableCompletion = true;
- histSize = 100000;
-
- ohMyZsh = {
- # Extra plugins for zsh
- enable = true;
- plugins = ["git"];
- };
-
- shellInit = '' # Zsh theme
- eval "$(starship init zsh)"
- # Spaceship
- #source ${pkgs.spaceship-prompt}/share/zsh/site-functions/prompt_spaceship_setup
- #autoload -U promptinit; promptinit
- # Hook direnv
- #emulate zsh -c "$(direnv hook zsh)"
- # Swag
- #${pkgs.nitch}/bin/nitch
-
- #eval "$(direnv hook zsh)"
- eval "$(atuin init zsh)"
- clear
- pfetch
- source ${config.age.secrets.env.path}
- '';
- };
- };
-}
diff --git a/modules/themes/home.nix b/modules/themes/home.nix
deleted file mode 100644
index 6b531cd..0000000
--- a/modules/themes/home.nix
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- pkgs,
- inputs,
- ...
-}: {
- imports = [inputs.nix-colors.homeManagerModules.default];
- # choose a theme from here https://github.com/tinted-theming/base16-schemes/tree/main
- colorScheme = inputs.nix-colors.colorSchemes.tokyo-night-terminal-storm;
-}
diff --git a/overlays/defualt.nix b/overlays/default.nix
similarity index 100%
rename from overlays/defualt.nix
rename to overlays/default.nix
diff --git a/pkgs/default.nix b/pkgs/default.nix
new file mode 100644
index 0000000..3d9e23c
--- /dev/null
+++ b/pkgs/default.nix
@@ -0,0 +1,5 @@
+# Custom packages, that can be defined similarly to ones from nixpkgs
+# You can build them using 'nix build .#example'
+pkgs: {
+ # example = pkgs.callPackage ./example { };
+}
diff --git a/secrets/env.age b/secrets/env.age
deleted file mode 100644
index 2c86382..0000000
Binary files a/secrets/env.age and /dev/null differ
diff --git a/secrets/secrets.nix b/secrets/secrets.nix
deleted file mode 100644
index cd3488a..0000000
--- a/secrets/secrets.nix
+++ /dev/null
@@ -1,10 +0,0 @@
-let
- user1 = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAxZoOukLwiPP4tFZ2IzI61ZQccSwudPYYPJuU3COTAf";
- users = [user1];
-
- system1 = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIP9LR3o//JjFpnJ5+MSJVmTTC3x47Ca8ckL8tDRtHJZv";
- systems = [system1];
-in {
- #"secret1.age".publicKeys = [ user1 system1 ];
- "env.age".publicKeys = users ++ systems;
-}