From 62e462a0df50e2c84e3158084287f7a946ed3484 Mon Sep 17 00:00:00 2001 From: DashieTM Date: Fri, 28 Feb 2025 18:30:31 +0100 Subject: [PATCH 001/118] disko test --- flake.nix | 6 +- lib/default.nix | 1 + modules/conf.nix | 8 ++ modules/programs/drives.nix | 157 ++++++++++++++++++------------------ 4 files changed, 92 insertions(+), 80 deletions(-) diff --git a/flake.nix b/flake.nix index 15d1e5e..4ae8f79 100644 --- a/flake.nix +++ b/flake.nix @@ -33,6 +33,7 @@ stylix.url = "github:danth/stylix"; base16.url = "github:SenchoPens/base16.nix"; + disko.url = "github:nix-community/disko/latest"; anyrun.url = "github:Kirottu/anyrun"; oxicalc.url = "github:DashieTM/OxiCalc"; @@ -80,7 +81,8 @@ }; overlays = [ inputs.nur.overlays.default - inputs.chaoticNyx.overlays.default]; + inputs.chaoticNyx.overlays.default + ]; }; pkgs = import inputs.nixpkgs { system = currentSystem; @@ -94,7 +96,7 @@ overlays = [ inputs.nur.overlays.default inputs.chaoticNyx.overlays.default - ]; + ]; }; in rec { dashNixLib = import ./lib { diff --git a/lib/default.nix b/lib/default.nix index 757fdf4..93408b3 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -44,6 +44,7 @@ nixos = [ inputs.home-manager.nixosModules.home-manager inputs.stylix.nixosModules.stylix + inputs.disko.nixosModules.disko ../base ../home ../modules diff --git a/modules/conf.nix b/modules/conf.nix index a9e9734..ed36389 100644 --- a/modules/conf.nix +++ b/modules/conf.nix @@ -28,6 +28,14 @@ ''; }; + defualtDiskId = lib.mkOption { + default = "TODO"; + example = "/dev/disk/by-id/nvme-Force_MP510_19498249000129196385"; + description = '' + The id of the disk to format + ''; + }; + cpu = lib.mkOption { # TODO: how to enable arm? default = "amd"; diff --git a/modules/programs/drives.nix b/modules/programs/drives.nix index 35bf396..8e463d2 100644 --- a/modules/programs/drives.nix +++ b/modules/programs/drives.nix @@ -3,35 +3,7 @@ config, options, ... -}: let - driveModule = lib.types.submodule { - options = { - name = lib.mkOption { - type = lib.types.str; - description = '' - The path of the drive. - Note that a / is already added at the beginning. - ''; - default = ""; - example = "drive2"; - }; - drive = lib.mkOption { - type = lib.types.attrsOf lib.types.anything; - description = "The attrs of the drive"; - default = {}; - example = { - device = "/dev/disk/by-label/DRIVE2"; - fsType = "ext4"; - options = [ - "noatime" - "nodiratime" - "discard" - ]; - }; - }; - }; - }; -in { +}: { options.mods = { drives = { useSwap = { @@ -83,55 +55,84 @@ in { config = ( lib.optionalAttrs (options ? fileSystems) { - fileSystems = - builtins.listToAttrs ( - map ( - { - name, - drive, - }: { - name = "/" + name; - value = drive; - } - ) - config.mods.drives.extraDrives - ) - // (lib.optionalAttrs config.mods.drives.defaultDrives.enable) { - "/" = { - device = "/dev/disk/by-label/ROOT"; - fsType = "btrfs"; - options = [ - "noatime" - "nodiratime" - "discard" - ]; - }; - - "/boot" = { - device = "/dev/disk/by-label/BOOT"; - fsType = "vfat"; - options = [ - "rw" - "fmask=0022" - "dmask=0022" - "noatime" - ]; - }; - - "/home" = { - device = "/dev/disk/by-label/HOME"; - fsType = "btrfs"; - options = [ - "noatime" - "nodiratime" - "discard" - ]; - }; - }; - # TODO make this convert to choice of drives -> thanks to funny types this doesn't work... - swapDevices = lib.mkIf config.mods.drives.useSwap.enable [ - {device = "/dev/disk/by-label/SWAP";} - ]; + disko.devices = { + disk = + { + main = (lib.optionalAttrs config.mods.drives.defaultDrives.enable) { + device = "${config.conf.defaultDiskId}"; + type = "disk"; + content = { + type = "gpt"; + partitions = { + root = { + start = "33G"; + end = "30%"; + content = { + type = "filesystem"; + format = "btrfs"; + mountpoint = "/"; + mountOptions = [ + "noatime" + "nodiratime" + "discard" + ]; + }; + }; + plainSwap = { + start = "1G"; + end = "33G"; + content = { + type = "swap"; + discardPolicy = "both"; + resumeDevice = true; + }; + }; + boot = { + start = "0G"; + end = "1G"; + content = { + type = "filesystem"; + format = "vfat"; + mountpoint = "/boot"; + mountOptions = [ + "rw" + "fmask=0022" + "dmask=0022" + "noatime" + ]; + }; + }; + home = { + start = "30%"; + end = "100%"; + content = { + type = "filesystem"; + format = "btrfs"; + mountpoint = "/home"; + mountOptions = [ + "noatime" + "nodiratime" + "discard" + ]; + }; + }; + }; + }; + }; + } + // builtins.listToAttrs ( + map ( + { + name, + drive, + }: { + name = "/" + name; + value = drive; + } + ) + config.mods.drives.extraDrives + ); + }; } ); } From ae8fb251024f6f0f256ad91af88924b0a2bdda0f Mon Sep 17 00:00:00 2001 From: DashieTM Date: Sun, 2 Mar 2025 15:29:47 +0100 Subject: [PATCH 002/118] Add disko variant for drive configuration --- flake.nix | 6 +- lib/default.nix | 1 + modules/programs/drives.nix | 298 +++++++++++++++++++++++++++--------- 3 files changed, 228 insertions(+), 77 deletions(-) diff --git a/flake.nix b/flake.nix index 15d1e5e..4ae8f79 100644 --- a/flake.nix +++ b/flake.nix @@ -33,6 +33,7 @@ stylix.url = "github:danth/stylix"; base16.url = "github:SenchoPens/base16.nix"; + disko.url = "github:nix-community/disko/latest"; anyrun.url = "github:Kirottu/anyrun"; oxicalc.url = "github:DashieTM/OxiCalc"; @@ -80,7 +81,8 @@ }; overlays = [ inputs.nur.overlays.default - inputs.chaoticNyx.overlays.default]; + inputs.chaoticNyx.overlays.default + ]; }; pkgs = import inputs.nixpkgs { system = currentSystem; @@ -94,7 +96,7 @@ overlays = [ inputs.nur.overlays.default inputs.chaoticNyx.overlays.default - ]; + ]; }; in rec { dashNixLib = import ./lib { diff --git a/lib/default.nix b/lib/default.nix index 757fdf4..93408b3 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -44,6 +44,7 @@ nixos = [ inputs.home-manager.nixosModules.home-manager inputs.stylix.nixosModules.stylix + inputs.disko.nixosModules.disko ../base ../home ../modules diff --git a/modules/programs/drives.nix b/modules/programs/drives.nix index 35bf396..8331464 100644 --- a/modules/programs/drives.nix +++ b/modules/programs/drives.nix @@ -3,87 +3,151 @@ config, options, ... -}: let - driveModule = lib.types.submodule { - options = { - name = lib.mkOption { - type = lib.types.str; +}: { + options.mods.drives = { + variant = lib.mkOption { + default = "manual"; + example = "disko"; + type = with lib.types; (enum [ + "manual" + "disko" + ]); + description = '' + Disk configuration type, either "manual" for regular NixOS disk configuration, + or "disko" for using disko to automatically format your drives. + ''; + }; + useSwap = lib.mkOption { + default = true; + example = false; + type = lib.types.bool; + description = '' + Use swap in drive. + ''; + }; + homeAndRootFsTypes = lib.mkOption { + default = "ext4"; + example = "btrfs"; + type = with lib.types; (enum [ + "btrfs" + "ext2" + "ext3" + "ext4" + "exfat" + "f2fs" + "fat8" + "fat16" + "fat32" + "ntfs" + "xfs" + "zfs" + ]); + description = '' + Filesystem for the home and root partitions. + ''; + }; + defaultDrives = { + enable = lib.mkOption { + default = true; + example = false; + type = lib.types.bool; description = '' - The path of the drive. - Note that a / is already added at the beginning. + Use default drive config. + + ## Manual variant + This config expects 4 different partitions on a single drive: + - boot partition with "BOOT" label and vfat format (filesystem configurable) + - swap partition with "SWAP" label + - root partition with "ROOT" label and ext4 format (filesystem configurable) + - home partition with "HOME" label and ext4 format (filesystem configurable) + - gpt disk format + NOTE: Any different configuration must be done manually with this turned off. + + ## Disko variant + This config creates 4 different partitions on a single drive: + - boot partition with 1GB size and vfat format + - swap partition with 32GB (size configurable) + - root partition with 30% size and ext4 format (size and filesystem configurable) + - home partition with 70%~ size and ext4 format (size and filesystem configurable) + - gpt disk format + NOTE: Any different configuration must be done manually with this turned off. ''; - default = ""; - example = "drive2"; - }; - drive = lib.mkOption { - type = lib.types.attrsOf lib.types.anything; - description = "The attrs of the drive"; - default = {}; - example = { - device = "/dev/disk/by-label/DRIVE2"; - fsType = "ext4"; - options = [ - "noatime" - "nodiratime" - "discard" - ]; - }; }; }; - }; -in { - options.mods = { - drives = { - useSwap = { - enable = lib.mkOption { - default = true; - example = false; - type = lib.types.bool; - description = '' - Use default drive config - ''; - }; - }; - defaultDrives = { - enable = lib.mkOption { - default = true; - example = false; - type = lib.types.bool; - description = '' - Use default drive config - ''; - }; - }; - extraDrives = lib.mkOption { - default = [ - ]; - example = [ - { - name = "drive2"; - drive = { - device = "/dev/disk/by-label/DRIVE2"; - fsType = "ext4"; - options = [ - "noatime" - "nodiratime" - "discard" - ]; + extraDrives = lib.mkOption { + default = [ + ]; + example = [ + { + name = "drive2"; + drive = { + device = "/dev/disk/by-label/DRIVE2"; + fsType = "ext4"; + options = [ + "noatime" + "nodiratime" + "discard" + ]; + }; + } + ]; + type = with lib.types; listOf (attrsOf anything); + description = '' + Extra drives to add. + Please ensure to add variant compliant attrsets (manual/disko). + (The example is for manual variant, here an example for disko): + ```nix + drive2 = (lib.optionalAttrs config.mods.drives.defaultDrives.enable) { + device = "/dev/nvme1n1" + type = "disk"; + content = { + type = "gpt"; + partitions = { + drive2 = { + start = "0%"; + end = "100%"; + content = { + type = "filesystem"; + format = "ext4"; + mountpoint = "/drive2"; + mountOptions = [ + "noatime" + "nodiratime" + "discard" + ]; + }; + }; + }; }; - } - ]; - # TODO: how to make this work - # type = with lib.types; listOf (attrsOf driveModule); - type = with lib.types; listOf (attrsOf anything); - description = '' - Extra drives to add. - ''; + }; + ``` + ''; + }; + disko = { + defaultDiskId = lib.mkOption { + default = "TODO"; + example = "/dev/nvme0n1"; + type = lib.types.string; + description = "The name, ID, UUID or similar for the default drive."; + }; + rootAmount = lib.mkOption { + default = 70; + example = 60; + type = lib.types.number; + description = "The percentage of the disk for root. (Home will take up the rest) (Only for disko)"; + }; + swapAmount = lib.mkOption { + default = 32; + example = 64; + type = lib.types.number; + description = "The amount of swap to use. (Only for disko)"; }; }; }; config = ( lib.optionalAttrs (options ? fileSystems) { - fileSystems = + fileSystems = lib.mkIf (config.mods.drives.variant == "manual") ( builtins.listToAttrs ( map ( { @@ -99,7 +163,7 @@ in { // (lib.optionalAttrs config.mods.drives.defaultDrives.enable) { "/" = { device = "/dev/disk/by-label/ROOT"; - fsType = "btrfs"; + fsType = config.mods.drives.homeAndRootFsTypes; options = [ "noatime" "nodiratime" @@ -120,18 +184,102 @@ in { "/home" = { device = "/dev/disk/by-label/HOME"; - fsType = "btrfs"; + fsType = config.mods.drives.homeAndRootFsTypes; options = [ "noatime" "nodiratime" "discard" ]; }; - }; - # TODO make this convert to choice of drives -> thanks to funny types this doesn't work... - swapDevices = lib.mkIf config.mods.drives.useSwap.enable [ + } + ); + + swapDevices = lib.mkIf (config.mods.drives.useSwap && config.mods.drives.variant == "manual") [ {device = "/dev/disk/by-label/SWAP";} ]; + + disko.devices = lib.mkIf (config.mods.drives.variant == "disko") { + disk = + { + main = (lib.optionalAttrs config.mods.drives.defaultDrives.enable) { + device = "${config.mods.drives.disko.defaultDiskId}"; + type = "disk"; + content = { + type = "gpt"; + partitions = { + root = { + start = "${ + if config.mods.drives.useSwap + then builtins.toString config.mods.drives.disko.swapAmount + else builtins.toString 1 + }G"; + end = "${builtins.toString config.mods.drives.disko.rootAmount}%"; + content = { + type = "filesystem"; + format = config.mods.drives.homeAndRootFsTypes; + mountpoint = "/"; + mountOptions = [ + "noatime" + "nodiratime" + "discard" + ]; + }; + }; + plainSwap = { + start = "1G"; + end = "33G"; + content = { + type = "swap"; + discardPolicy = "both"; + resumeDevice = true; + }; + }; + boot = { + start = "0G"; + end = "1G"; + content = { + type = "filesystem"; + format = "vfat"; + mountpoint = "/boot"; + mountOptions = [ + "rw" + "fmask=0022" + "dmask=0022" + "noatime" + ]; + }; + }; + home = { + start = "${builtins.toString config.mods.drives.disko.rootAmount}%"; + end = "100%"; + content = { + type = "filesystem"; + format = config.mods.drives.homeAndRootFsTypes; + mountpoint = "/home"; + mountOptions = [ + "noatime" + "nodiratime" + "discard" + ]; + }; + }; + }; + }; + }; + } + // builtins.listToAttrs ( + map ( + { + name, + drive, + }: { + name = "/" + name; + value = drive; + } + ) + config.mods.drives.extraDrives + ); + }; } ); } From 54174d9a95782976dc06e5105d694471f5a5106f Mon Sep 17 00:00:00 2001 From: DashieTM Date: Sun, 2 Mar 2025 16:10:52 +0100 Subject: [PATCH 003/118] Disable ANR for Hyprland (broken) --- modules/programs/hyprland/hyprland.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/programs/hyprland/hyprland.nix b/modules/programs/hyprland/hyprland.nix index 503c992..5b16349 100644 --- a/modules/programs/hyprland/hyprland.nix +++ b/modules/programs/hyprland/hyprland.nix @@ -291,6 +291,8 @@ in { disable_hyprland_logo = true; swallow_regex = "^(.*)(kitty)(.*)$"; initial_workspace_tracking = 1; + # just doesn't work + enable_anr_dialog = false; }; cursor = { From bf3230ad43ce114d7121ac402a0b213c143af36b Mon Sep 17 00:00:00 2001 From: DashieTM Date: Sun, 2 Mar 2025 16:20:43 +0100 Subject: [PATCH 004/118] Fix documentation generation --- docs/src/README.md | 2 ++ modules/programs/drives.nix | 38 +++++++++++++++++++------------------ 2 files changed, 22 insertions(+), 18 deletions(-) diff --git a/docs/src/README.md b/docs/src/README.md index 2fc1e31..2da86c4 100644 --- a/docs/src/README.md +++ b/docs/src/README.md @@ -99,6 +99,8 @@ Here is a minimal required configuration.nix (the TODOs mention a required chang # }; # } # ]; + # You can also use disko to format your disks on installation. + # Please refer to the Documentation about the drives module for an example. }; sops.enable = false; nextcloud.enable = false; diff --git a/modules/programs/drives.nix b/modules/programs/drives.nix index 8331464..2df11b5 100644 --- a/modules/programs/drives.nix +++ b/modules/programs/drives.nix @@ -54,23 +54,25 @@ description = '' Use default drive config. - ## Manual variant - This config expects 4 different partitions on a single drive: - - boot partition with "BOOT" label and vfat format (filesystem configurable) - - swap partition with "SWAP" label - - root partition with "ROOT" label and ext4 format (filesystem configurable) - - home partition with "HOME" label and ext4 format (filesystem configurable) - - gpt disk format - NOTE: Any different configuration must be done manually with this turned off. + - Manual variant + This config expects 4 different partitions on a single drive: + - boot partition with BOOT label and vfat format (filesystem configurable) + - swap partition with SWAP label + - root partition with ROOT label and ext4 format (filesystem configurable) + - home partition with HOME label and ext4 format (filesystem configurable) + - gpt disk format - ## Disko variant - This config creates 4 different partitions on a single drive: - - boot partition with 1GB size and vfat format - - swap partition with 32GB (size configurable) - - root partition with 30% size and ext4 format (size and filesystem configurable) - - home partition with 70%~ size and ext4 format (size and filesystem configurable) - - gpt disk format - NOTE: Any different configuration must be done manually with this turned off. + NOTE: Any different configuration must be done manually with this turned off. + + - Disko variant + This config creates 4 different partitions on a single drive: + - boot partition with 1GB size and vfat format + - swap partition with 32GB (size configurable) + - root partition with 30% size and ext4 format (size and filesystem configurable) + - home partition with 70%~ size and ext4 format (size and filesystem configurable) + - gpt disk format + + NOTE: Any different configuration must be done manually with this turned off. ''; }; }; @@ -131,8 +133,8 @@ description = "The name, ID, UUID or similar for the default drive."; }; rootAmount = lib.mkOption { - default = 70; - example = 60; + default = 30; + example = 40; type = lib.types.number; description = "The percentage of the disk for root. (Home will take up the rest) (Only for disko)"; }; From 4c5ebe96910782dde3a39dafaad3ddafbffd92d3 Mon Sep 17 00:00:00 2001 From: DashieTM Date: Sun, 2 Mar 2025 17:10:13 +0100 Subject: [PATCH 005/118] Update iso and installation instructions --- docs/src/README.md | 26 ++ example/flake.nix | 24 +- example/hosts/example/configuration.nix | 2 + flake.lock | 335 ++++++++++++++++-------- iso/configuration.nix | 8 +- 5 files changed, 275 insertions(+), 120 deletions(-) diff --git a/docs/src/README.md b/docs/src/README.md index 2da86c4..a667e34 100644 --- a/docs/src/README.md +++ b/docs/src/README.md @@ -197,6 +197,32 @@ as well as a few tools like gnome-disks, neovim, vscodium, a browser etc. Alternatively, you can use whatever NixOS installer and just install your config from there, just make sure to set the drive configuration before. +## Commands + +First, copy the readonly config from /iso/example-config to a location of your choice. + +```sh +cp /iso/example-config ~/config -r +``` + +Then configure as you please and choose a command below depending on your disk installation variant. + +Installation via manual configuration: + +```sh +sudo nixos-install --flake # --root +#example +#nixos-install --flake ~/config#globi --root /mnt +``` + +Installation via disko: + +```sh +sudo disko-install --flake # --disk +#example +#disko-install -- --flake ~/config#globi --disk main /dev/nvme0n1 +``` + # Modules This configuration features several modules that can be used as preconfigured "recipies". diff --git a/example/flake.nix b/example/flake.nix index 0ad08bc..c621766 100644 --- a/example/flake.nix +++ b/example/flake.nix @@ -2,10 +2,6 @@ description = "some dots"; inputs = { - dashvim.url = "github:DashieTM/DashVim"; - hyprland.url = "git+https://github.com/hyprwm/Hyprland?submodules=1"; - ironbar.url = "github:JakeStanger/ironbar?ref=3a1c60442382f970cdb7669814b6ef3594d9f048"; - anyrun.url = "github:Kirottu/anyrun"; nixpkgs.url = "github:NixOs/nixpkgs/nixos-unstable"; stable.url = "github:NixOs/nixpkgs/nixos-24.05"; dashNix = { @@ -13,10 +9,6 @@ inputs = { nixpkgs.follows = "nixpkgs"; stable.follows = "stable"; - dashvim.follows = "dashvim"; - hyprland.follows = "hyprland"; - ironbar.follows = "ironbar"; - anyrun.follows = "anyrun"; }; }; }; @@ -32,12 +24,28 @@ "https://hyprland.cachix.org" "https://anyrun.cachix.org" "https://cache.garnix.io" + "https://oxipaste.cachix.org" + "https://oxinoti.cachix.org" + "https://oxishut.cachix.org" + "https://oxidash.cachix.org" + "https://oxicalc.cachix.org" + "https://hyprdock.cachix.org" + "https://reset.cachix.org" + "https://chaotic-nyx.cachix.org/" ]; extra-trusted-public-keys = [ "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=" "anyrun.cachix.org-1:pqBobmOjI7nKlsUMV25u9QHa9btJK65/C8vnO3p346s=" "cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g=" + "oxipaste.cachix.org-1:n/oA3N3Z+LJP7eIWOwuoLd9QnPyZXqFjLgkahjsdDGc=" + "oxinoti.cachix.org-1:dvSoJl2Pjo5HMaNngdBbSaixK9BSf2N8gzjP2MdGvfc=" + "oxishut.cachix.org-1:axyAGF3XMh1IyMAW4UMbQCdMNovDH0KH6hqLLRJH8jU=" + "oxidash.cachix.org-1:5K2FNHp7AS8VF7LmQkJAUG/dm6UHCz4ngshBVbjFX30=" + "oxicalc.cachix.org-1:qF3krFc20tgSmtR/kt6Ku/T5QiG824z79qU5eRCSBTQ=" + "hyprdock.cachix.org-1:HaROK3fBvFWIMHZau3Vq1TLwUoJE8yRbGLk0lEGzv3Y=" + "reset.cachix.org-1:LfpnUUdG7QM/eOkN7NtA+3+4Ar/UBeYB+3WH+GjP9Xo=" + "chaotic-nyx.cachix.org-1:HfnXSw4pj95iI/n17rIDy40agHj12WfF+Gqk6SonIT8=" ]; }; } diff --git a/example/hosts/example/configuration.nix b/example/hosts/example/configuration.nix index c39c104..b08e1c0 100644 --- a/example/hosts/example/configuration.nix +++ b/example/hosts/example/configuration.nix @@ -20,6 +20,8 @@ mods = { # default disk config has root home boot and swap partition, overwrite if you want something different drives = { + # WARNING: Only do this when installing for the first time, as I am not sure if disko would format your disk + variant = "disko"; # default assumes ROOT, BOOT, HOME and SWAP labaled drives exist # for an example without HOME see below #defaultDrives.enable = false; diff --git a/flake.lock b/flake.lock index 98a66e3..e49b268 100644 --- a/flake.lock +++ b/flake.lock @@ -258,6 +258,25 @@ "type": "github" } }, + "disko": { + "inputs": { + "nixpkgs": "nixpkgs_5" + }, + "locked": { + "lastModified": 1736864502, + "narHash": "sha256-ItkIZyebGvNH2dK9jVGzJHGPtb6BSWLN8Gmef16NeY0=", + "owner": "nix-community", + "repo": "disko", + "rev": "0141aabed359f063de7413f80d906e1d98c0c123", + "type": "github" + }, + "original": { + "owner": "nix-community", + "ref": "latest", + "repo": "disko", + "type": "github" + } + }, "fenix": { "inputs": { "nixpkgs": [ @@ -363,6 +382,27 @@ } }, "flake-parts_10": { + "inputs": { + "nixpkgs-lib": [ + "oxishut", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1715865404, + "narHash": "sha256-/GJvTdTpuDjNn84j82cU6bXztE0MSkdnTWClUCRub78=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "8dc45382d5206bd292f9c2768b8058a8fd8311d9", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "flake-parts_11": { "inputs": { "nixpkgs-lib": [ "reset", @@ -383,7 +423,7 @@ "type": "github" } }, - "flake-parts_11": { + "flake-parts_12": { "inputs": { "nixpkgs-lib": [ "reset-plugins", @@ -404,7 +444,7 @@ "type": "github" } }, - "flake-parts_12": { + "flake-parts_13": { "inputs": { "nixpkgs-lib": [ "stylix", @@ -490,16 +530,16 @@ "flake-parts_5": { "inputs": { "nixpkgs-lib": [ - "oxicalc", + "nur", "nixpkgs" ] }, "locked": { - "lastModified": 1715865404, - "narHash": "sha256-/GJvTdTpuDjNn84j82cU6bXztE0MSkdnTWClUCRub78=", + "lastModified": 1733312601, + "narHash": "sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "8dc45382d5206bd292f9c2768b8058a8fd8311d9", + "rev": "205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9", "type": "github" }, "original": { @@ -511,7 +551,7 @@ "flake-parts_6": { "inputs": { "nixpkgs-lib": [ - "oxidash", + "oxicalc", "nixpkgs" ] }, @@ -532,7 +572,7 @@ "flake-parts_7": { "inputs": { "nixpkgs-lib": [ - "oxinoti", + "oxidash", "nixpkgs" ] }, @@ -553,16 +593,16 @@ "flake-parts_8": { "inputs": { "nixpkgs-lib": [ - "oxipaste", + "oxinoti", "nixpkgs" ] }, "locked": { - "lastModified": 1722555600, - "narHash": "sha256-XOQkdLafnb/p9ij77byFQjDf5m5QYl9b2REiVClC+x4=", + "lastModified": 1715865404, + "narHash": "sha256-/GJvTdTpuDjNn84j82cU6bXztE0MSkdnTWClUCRub78=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "8471fe90ad337a8074e957b69ca4d0089218391d", + "rev": "8dc45382d5206bd292f9c2768b8058a8fd8311d9", "type": "github" }, "original": { @@ -574,16 +614,16 @@ "flake-parts_9": { "inputs": { "nixpkgs-lib": [ - "oxishut", + "oxipaste", "nixpkgs" ] }, "locked": { - "lastModified": 1715865404, - "narHash": "sha256-/GJvTdTpuDjNn84j82cU6bXztE0MSkdnTWClUCRub78=", + "lastModified": 1722555600, + "narHash": "sha256-XOQkdLafnb/p9ij77byFQjDf5m5QYl9b2REiVClC+x4=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "8dc45382d5206bd292f9c2768b8058a8fd8311d9", + "rev": "8471fe90ad337a8074e957b69ca4d0089218391d", "type": "github" }, "original": { @@ -1019,7 +1059,7 @@ "hyprdock": { "inputs": { "flake-parts": "flake-parts_4", - "nixpkgs": "nixpkgs_5" + "nixpkgs": "nixpkgs_6" }, "locked": { "lastModified": 1733264848, @@ -1074,7 +1114,7 @@ "hyprlang": "hyprlang", "hyprutils": "hyprutils", "hyprwayland-scanner": "hyprwayland-scanner", - "nixpkgs": "nixpkgs_6", + "nixpkgs": "nixpkgs_7", "pre-commit-hooks": "pre-commit-hooks", "systems": "systems_4", "xdph": "xdph" @@ -1344,7 +1384,7 @@ }, "naersk": { "inputs": { - "nixpkgs": "nixpkgs_7" + "nixpkgs": "nixpkgs_8" }, "locked": { "lastModified": 1736429655, @@ -1449,6 +1489,22 @@ } }, "nixpkgs_10": { + "locked": { + "lastModified": 1740828860, + "narHash": "sha256-cjbHI+zUzK5CPsQZqMhE3npTyYFt9tJ3+ohcfaOF/WM=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "303bd8071377433a2d8f76e684ec773d70c5b642", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_11": { "locked": { "lastModified": 1716137900, "narHash": "sha256-sowPU+tLQv8GlqtVtsXioTKeaQvlMz/pefcdwg8MvfM=", @@ -1464,22 +1520,6 @@ "type": "github" } }, - "nixpkgs_11": { - "locked": { - "lastModified": 1706487304, - "narHash": "sha256-LE8lVX28MV2jWJsidW13D2qrHU/RUUONendL2Q/WlJg=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "90f456026d284c22b3e3497be980b2e47d0b28ac", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, "nixpkgs_12": { "locked": { "lastModified": 1716137900, @@ -1513,22 +1553,6 @@ } }, "nixpkgs_14": { - "locked": { - "lastModified": 1723637854, - "narHash": "sha256-med8+5DSWa2UnOqtdICndjDAEjxr5D7zaIiK4pn0Q7c=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "c3aa7b8938b17aebd2deecf7be0636000d62a2b9", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_15": { "locked": { "lastModified": 1716137900, "narHash": "sha256-sowPU+tLQv8GlqtVtsXioTKeaQvlMz/pefcdwg8MvfM=", @@ -1544,7 +1568,7 @@ "type": "github" } }, - "nixpkgs_16": { + "nixpkgs_15": { "locked": { "lastModified": 1706487304, "narHash": "sha256-LE8lVX28MV2jWJsidW13D2qrHU/RUUONendL2Q/WlJg=", @@ -1560,13 +1584,29 @@ "type": "github" } }, - "nixpkgs_17": { + "nixpkgs_16": { "locked": { - "lastModified": 1739446958, - "narHash": "sha256-+/bYK3DbPxMIvSL4zArkMX0LQvS7rzBKXnDXLfKyRVc=", + "lastModified": 1723637854, + "narHash": "sha256-med8+5DSWa2UnOqtdICndjDAEjxr5D7zaIiK4pn0Q7c=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "2ff53fe64443980e139eaa286017f53f88336dd0", + "rev": "c3aa7b8938b17aebd2deecf7be0636000d62a2b9", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_17": { + "locked": { + "lastModified": 1716137900, + "narHash": "sha256-sowPU+tLQv8GlqtVtsXioTKeaQvlMz/pefcdwg8MvfM=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "6c0b7a92c30122196a761b440ac0d46d3d9954f1", "type": "github" }, "original": { @@ -1578,11 +1618,11 @@ }, "nixpkgs_18": { "locked": { - "lastModified": 1736320768, - "narHash": "sha256-nIYdTAiKIGnFNugbomgBJR+Xv5F1ZQU+HfaBqJKroC0=", + "lastModified": 1706487304, + "narHash": "sha256-LE8lVX28MV2jWJsidW13D2qrHU/RUUONendL2Q/WlJg=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "4bc9c909d9ac828a039f288cf872d16d38185db8", + "rev": "90f456026d284c22b3e3497be980b2e47d0b28ac", "type": "github" }, "original": { @@ -1594,11 +1634,11 @@ }, "nixpkgs_19": { "locked": { - "lastModified": 1716948383, - "narHash": "sha256-SzDKxseEcHR5KzPXLwsemyTR/kaM9whxeiJohbL04rs=", + "lastModified": 1739446958, + "narHash": "sha256-+/bYK3DbPxMIvSL4zArkMX0LQvS7rzBKXnDXLfKyRVc=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "ad57eef4ef0659193044870c731987a6df5cf56b", + "rev": "2ff53fe64443980e139eaa286017f53f88336dd0", "type": "github" }, "original": { @@ -1625,6 +1665,38 @@ } }, "nixpkgs_20": { + "locked": { + "lastModified": 1736320768, + "narHash": "sha256-nIYdTAiKIGnFNugbomgBJR+Xv5F1ZQU+HfaBqJKroC0=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "4bc9c909d9ac828a039f288cf872d16d38185db8", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_21": { + "locked": { + "lastModified": 1716948383, + "narHash": "sha256-SzDKxseEcHR5KzPXLwsemyTR/kaM9whxeiJohbL04rs=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "ad57eef4ef0659193044870c731987a6df5cf56b", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_22": { "locked": { "lastModified": 1706487304, "narHash": "sha256-LE8lVX28MV2jWJsidW13D2qrHU/RUUONendL2Q/WlJg=", @@ -1640,7 +1712,7 @@ "type": "github" } }, - "nixpkgs_21": { + "nixpkgs_23": { "locked": { "lastModified": 1731763621, "narHash": "sha256-ddcX4lQL0X05AYkrkV2LMFgGdRvgap7Ho8kgon3iWZk=", @@ -1656,7 +1728,7 @@ "type": "github" } }, - "nixpkgs_22": { + "nixpkgs_24": { "locked": { "lastModified": 1740367490, "narHash": "sha256-WGaHVAjcrv+Cun7zPlI41SerRtfknGQap281+AakSAw=", @@ -1672,7 +1744,7 @@ "type": "github" } }, - "nixpkgs_23": { + "nixpkgs_25": { "locked": { "lastModified": 1740367490, "narHash": "sha256-WGaHVAjcrv+Cun7zPlI41SerRtfknGQap281+AakSAw=", @@ -1721,6 +1793,22 @@ } }, "nixpkgs_5": { + "locked": { + "lastModified": 1736241350, + "narHash": "sha256-CHd7yhaDigUuJyDeX0SADbTM9FXfiWaeNyY34FL1wQU=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "8c9fd3e564728e90829ee7dbac6edc972971cd0f", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_6": { "locked": { "lastModified": 1716330097, "narHash": "sha256-8BO3B7e3BiyIDsaKA0tY8O88rClYRTjvAp66y+VBUeU=", @@ -1736,7 +1824,7 @@ "type": "github" } }, - "nixpkgs_6": { + "nixpkgs_7": { "locked": { "lastModified": 1739020877, "narHash": "sha256-mIvECo/NNdJJ/bXjNqIh8yeoSjVLAuDuTUzAo7dzs8Y=", @@ -1752,7 +1840,7 @@ "type": "github" } }, - "nixpkgs_7": { + "nixpkgs_8": { "locked": { "lastModified": 1738297584, "narHash": "sha256-AYvaFBzt8dU0fcSK2jKD0Vg23K2eIRxfsVXIPCW9a0E=", @@ -1766,7 +1854,7 @@ "type": "indirect" } }, - "nixpkgs_8": { + "nixpkgs_9": { "locked": { "lastModified": 1740367490, "narHash": "sha256-WGaHVAjcrv+Cun7zPlI41SerRtfknGQap281+AakSAw=", @@ -1782,22 +1870,6 @@ "type": "github" } }, - "nixpkgs_9": { - "locked": { - "lastModified": 1716137900, - "narHash": "sha256-sowPU+tLQv8GlqtVtsXioTKeaQvlMz/pefcdwg8MvfM=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "6c0b7a92c30122196a761b440ac0d46d3d9954f1", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, "nixvim": { "inputs": { "devshell": "devshell", @@ -1826,12 +1898,32 @@ }, "nur": { "inputs": { - "flake-parts": "flake-parts_12", + "flake-parts": "flake-parts_5", + "nixpkgs": "nixpkgs_10", + "treefmt-nix": "treefmt-nix_2" + }, + "locked": { + "lastModified": 1740926717, + "narHash": "sha256-KBCQdP1rSQAXjy1ZNf68foSsqnT3LXJliMBGLW+SNsU=", + "owner": "nix-community", + "repo": "NUR", + "rev": "1788063f2dfe4bc8ed0d643abb1df2771446b7af", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "NUR", + "type": "github" + } + }, + "nur_2": { + "inputs": { + "flake-parts": "flake-parts_13", "nixpkgs": [ "stylix", "nixpkgs" ], - "treefmt-nix": "treefmt-nix_2" + "treefmt-nix": "treefmt-nix_3" }, "locked": { "lastModified": 1740408283, @@ -1873,8 +1965,8 @@ }, "oxicalc": { "inputs": { - "flake-parts": "flake-parts_5", - "nixpkgs": "nixpkgs_9" + "flake-parts": "flake-parts_6", + "nixpkgs": "nixpkgs_11" }, "locked": { "lastModified": 1733264508, @@ -1892,8 +1984,8 @@ }, "oxidash": { "inputs": { - "flake-parts": "flake-parts_6", - "nixpkgs": "nixpkgs_10", + "flake-parts": "flake-parts_7", + "nixpkgs": "nixpkgs_12", "rust-overlay": "rust-overlay_2" }, "locked": { @@ -1912,8 +2004,8 @@ }, "oxinoti": { "inputs": { - "flake-parts": "flake-parts_7", - "nixpkgs": "nixpkgs_12", + "flake-parts": "flake-parts_8", + "nixpkgs": "nixpkgs_14", "rust-overlay": "rust-overlay_3" }, "locked": { @@ -1932,8 +2024,8 @@ }, "oxipaste": { "inputs": { - "flake-parts": "flake-parts_8", - "nixpkgs": "nixpkgs_14" + "flake-parts": "flake-parts_9", + "nixpkgs": "nixpkgs_16" }, "locked": { "lastModified": 1737624143, @@ -1951,8 +2043,8 @@ }, "oxishut": { "inputs": { - "flake-parts": "flake-parts_9", - "nixpkgs": "nixpkgs_15", + "flake-parts": "flake-parts_10", + "nixpkgs": "nixpkgs_17", "rust-overlay": "rust-overlay_4" }, "locked": { @@ -1994,8 +2086,8 @@ }, "reset": { "inputs": { - "flake-parts": "flake-parts_10", - "nixpkgs": "nixpkgs_17", + "flake-parts": "flake-parts_11", + "nixpkgs": "nixpkgs_19", "rust-overlay": "rust-overlay_5" }, "locked": { @@ -2014,8 +2106,8 @@ }, "reset-plugins": { "inputs": { - "flake-parts": "flake-parts_11", - "nixpkgs": "nixpkgs_19", + "flake-parts": "flake-parts_12", + "nixpkgs": "nixpkgs_21", "rust-overlay": "rust-overlay_6" }, "locked": { @@ -2039,12 +2131,14 @@ "base16": "base16", "chaoticNyx": "chaoticNyx", "dashvim": "dashvim", + "disko": "disko", "home-manager": "home-manager_3", "hyprdock": "hyprdock", "hyprland": "hyprland", "ironbar": "ironbar", "nix-flatpak": "nix-flatpak", - "nixpkgs": "nixpkgs_8", + "nixpkgs": "nixpkgs_9", + "nur": "nur", "oxicalc": "oxicalc", "oxidash": "oxidash", "oxinoti": "oxinoti", @@ -2099,7 +2193,7 @@ "rust-overlay_2": { "inputs": { "flake-utils": "flake-utils_2", - "nixpkgs": "nixpkgs_11" + "nixpkgs": "nixpkgs_13" }, "locked": { "lastModified": 1716171463, @@ -2118,7 +2212,7 @@ "rust-overlay_3": { "inputs": { "flake-utils": "flake-utils_3", - "nixpkgs": "nixpkgs_13" + "nixpkgs": "nixpkgs_15" }, "locked": { "lastModified": 1716171463, @@ -2137,7 +2231,7 @@ "rust-overlay_4": { "inputs": { "flake-utils": "flake-utils_4", - "nixpkgs": "nixpkgs_16" + "nixpkgs": "nixpkgs_18" }, "locked": { "lastModified": 1716171463, @@ -2155,7 +2249,7 @@ }, "rust-overlay_5": { "inputs": { - "nixpkgs": "nixpkgs_18" + "nixpkgs": "nixpkgs_20" }, "locked": { "lastModified": 1739586408, @@ -2174,7 +2268,7 @@ "rust-overlay_6": { "inputs": { "flake-utils": "flake-utils_5", - "nixpkgs": "nixpkgs_20" + "nixpkgs": "nixpkgs_22" }, "locked": { "lastModified": 1717035469, @@ -2192,7 +2286,7 @@ }, "sops-nix": { "inputs": { - "nixpkgs": "nixpkgs_21" + "nixpkgs": "nixpkgs_23" }, "locked": { "lastModified": 1739262228, @@ -2236,8 +2330,8 @@ "git-hooks": "git-hooks_2", "gnome-shell": "gnome-shell", "home-manager": "home-manager_4", - "nixpkgs": "nixpkgs_22", - "nur": "nur", + "nixpkgs": "nixpkgs_24", + "nur": "nur_2", "systems": "systems_9", "tinted-foot": "tinted-foot", "tinted-kitty": "tinted-kitty", @@ -2499,6 +2593,27 @@ } }, "treefmt-nix_2": { + "inputs": { + "nixpkgs": [ + "nur", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1733222881, + "narHash": "sha256-JIPcz1PrpXUCbaccEnrcUS8jjEb/1vJbZz5KkobyFdM=", + "owner": "numtide", + "repo": "treefmt-nix", + "rev": "49717b5af6f80172275d47a418c9719a31a78b53", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "treefmt-nix", + "type": "github" + } + }, + "treefmt-nix_3": { "inputs": { "nixpkgs": [ "stylix", @@ -2563,7 +2678,7 @@ }, "zen-browser": { "inputs": { - "nixpkgs": "nixpkgs_23" + "nixpkgs": "nixpkgs_25" }, "locked": { "lastModified": 1740442108, diff --git a/iso/configuration.nix b/iso/configuration.nix index a17ba81..0f6247d 100644 --- a/iso/configuration.nix +++ b/iso/configuration.nix @@ -3,11 +3,14 @@ lib, modulesPath, self, + inputs, ... -}: { +}: let + system = "x86_64-linux"; +in { imports = ["${modulesPath}/installer/cd-dvd/installation-cd-minimal.nix"]; nixpkgs.hostPlatform = { - system = "x86_64-linux"; + system = system; }; environment.systemPackages = with pkgs; [ @@ -19,6 +22,7 @@ firefox kitty gnome-disk-utility + inputs.disko.packages.${system}.disko-install ]; networking = { wireless.enable = false; From 24acd1b1a3ae491f9e4e394e96332073cfb3adcc Mon Sep 17 00:00:00 2001 From: DashieTM Date: Mon, 3 Mar 2025 08:01:08 +0100 Subject: [PATCH 006/118] Include fsautocomplete again --- modules/programs/coding.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/programs/coding.nix b/modules/programs/coding.nix index c26d365..f69835d 100644 --- a/modules/programs/coding.nix +++ b/modules/programs/coding.nix @@ -229,7 +229,7 @@ netcoredbg #fsharp fsharp - #fsautocomplete + fsautocomplete ]; example = []; type = with lib.types; listOf package; From dc83628ac968e8da08718ef15148c441a5f72380 Mon Sep 17 00:00:00 2001 From: DashieTM Date: Mon, 10 Mar 2025 09:18:02 +0100 Subject: [PATCH 007/118] Update deps --- flake.lock | 722 +++++++++++++++++++++++++---------------------------- 1 file changed, 335 insertions(+), 387 deletions(-) diff --git a/flake.lock b/flake.lock index e49b268..8f2283a 100644 --- a/flake.lock +++ b/flake.lock @@ -8,11 +8,11 @@ "systems": "systems" }, "locked": { - "lastModified": 1739004667, - "narHash": "sha256-t/KaeHEgzh225HUdAiHXRsgDeyDrBCMTg0LjR73v3Nw=", + "lastModified": 1740777046, + "narHash": "sha256-hPp+DnTYjE6M9Mdau7inbqMeLR1SpSPVyuxd+nabwaA=", "owner": "KZDKM", "repo": "Hyprspace", - "rev": "ac55bbdb6cee760af9315899b5b187a40ce43e46", + "rev": "b5c8adb16f4729572c67883da1bcb46e11f195d6", "type": "github" }, "original": { @@ -61,11 +61,11 @@ ] }, "locked": { - "lastModified": 1739298463, - "narHash": "sha256-oAFv9jKwwA7d7384d2LeywDSgwhvb3ZnrwbfoWPhXsI=", + "lastModified": 1741282631, + "narHash": "sha256-jZE1CmQ53uN1Gq4FjaLFzSSjDqzL0pG4mdRbjBqSmho=", "owner": "hyprwm", "repo": "aquamarine", - "rev": "f239e5aadd6d23c48e085c2de3397e2058e54d16", + "rev": "81498562d0f53e613d30368bb5b076784fa86f80", "type": "github" }, "original": { @@ -177,6 +177,26 @@ "type": "github" } }, + "blink": { + "inputs": { + "fenix": "fenix_2", + "flake-parts": "flake-parts_2", + "nixpkgs": "nixpkgs_3" + }, + "locked": { + "lastModified": 1741016004, + "narHash": "sha256-2iNZP6Znrk6/orVEKR8VCYWIr71L0cwaRMWjRNbvAjA=", + "owner": "Saghen", + "repo": "blink.cmp", + "rev": "273bb364d8601dd72ca0b657079f4624bc76c3af", + "type": "github" + }, + "original": { + "owner": "Saghen", + "repo": "blink.cmp", + "type": "github" + } + }, "chaoticNyx": { "inputs": { "fenix": "fenix", @@ -186,11 +206,11 @@ "nixpkgs": "nixpkgs_2" }, "locked": { - "lastModified": 1740408177, - "narHash": "sha256-baFhGvCncDj3zJlDODJESVE83lV5+tGOrvgwQczzp84=", + "lastModified": 1741572691, + "narHash": "sha256-CsX+uf0w7FGx/bMraCBzU9BQu9A3iaWnY7nV/Sbq6Js=", "owner": "chaotic-cx", "repo": "nyx", - "rev": "62e2d6c89e4310c7cb56ee5f6bbdc280072dd082", + "rev": "ebc0b86d16f902b79d6345a4ec365716b4495f3f", "type": "github" }, "original": { @@ -202,11 +222,11 @@ }, "crane": { "locked": { - "lastModified": 1737689766, - "narHash": "sha256-ivVXYaYlShxYoKfSo5+y5930qMKKJ8CLcAoIBPQfJ6s=", + "lastModified": 1739936662, + "narHash": "sha256-x4syUjNUuRblR07nDPeLDP7DpphaBVbUaSoeZkFbGSk=", "owner": "ipetkov", "repo": "crane", - "rev": "6fe74265bbb6d016d663b1091f015e2976c4a527", + "rev": "19de14aaeb869287647d9461cbd389187d8ecdb7", "type": "github" }, "original": { @@ -218,16 +238,17 @@ "dashvim": { "inputs": { "base16": "base16_2", - "flake-parts": "flake-parts_2", - "nixpkgs": "nixpkgs_3", + "blink": "blink", + "flake-parts": "flake-parts_3", + "nixpkgs": "nixpkgs_4", "nixvim": "nixvim" }, "locked": { - "lastModified": 1740315793, - "narHash": "sha256-GXmi3T2Lj9a2LwfADZ82WiZTgPTH+vbUwj4647Bjeqc=", + "lastModified": 1741038146, + "narHash": "sha256-j+GXUXWx88sAdRSRAXdvixnJxfDH8rWcQ473MuhklJ0=", "owner": "DashieTM", "repo": "DashVim", - "rev": "752206afc9a03954b221d0a8880151636d8dbf53", + "rev": "cd82156b3b32a6bbb06bc4a4c16e0303d523e655", "type": "github" }, "original": { @@ -236,31 +257,9 @@ "type": "github" } }, - "devshell": { - "inputs": { - "nixpkgs": [ - "dashvim", - "nixvim", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1735644329, - "narHash": "sha256-tO3HrHriyLvipc4xr+Ewtdlo7wM1OjXNjlWRgmM7peY=", - "owner": "numtide", - "repo": "devshell", - "rev": "f7795ede5b02664b57035b3b757876703e2c3eac", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "devshell", - "type": "github" - } - }, "disko": { "inputs": { - "nixpkgs": "nixpkgs_5" + "nixpkgs": "nixpkgs_6" }, "locked": { "lastModified": 1736864502, @@ -286,11 +285,34 @@ "rust-analyzer-src": "rust-analyzer-src" }, "locked": { - "lastModified": 1740292204, - "narHash": "sha256-ZbptkmqaenRhUKsodSEcVzBw+kXZ8DcZpTGutU1HEiI=", + "lastModified": 1741329193, + "narHash": "sha256-niB60+AZBnp535cwvu5jU+K/cKfJeaWqt3GtrDMlLU0=", "owner": "nix-community", "repo": "fenix", - "rev": "93d59130e3fc121f927c03e406142df8d544b901", + "rev": "232581de4261157f316848773574d1f5895805f3", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "fenix", + "type": "github" + } + }, + "fenix_2": { + "inputs": { + "nixpkgs": [ + "dashvim", + "blink", + "nixpkgs" + ], + "rust-analyzer-src": "rust-analyzer-src_2" + }, + "locked": { + "lastModified": 1734676450, + "narHash": "sha256-iwcxhTVe4h5TqW0HsNiOQP27eMBmbBshF+q2UjEy5aU=", + "owner": "nix-community", + "repo": "fenix", + "rev": "46e19fa0eb3260b2c3ee5b2cf89e73343c1296ab", "type": "github" }, "original": { @@ -316,20 +338,6 @@ } }, "flake-compat": { - "locked": { - "lastModified": 1733328505, - "narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=", - "rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec", - "revCount": 69, - "type": "tarball", - "url": "https://api.flakehub.com/f/pinned/edolstra/flake-compat/1.1.0/01948eb7-9cba-704f-bbf3-3fa956735b52/source.tar.gz" - }, - "original": { - "type": "tarball", - "url": "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz" - } - }, - "flake-compat_2": { "flake": false, "locked": { "lastModified": 1696426674, @@ -345,7 +353,7 @@ "type": "github" } }, - "flake-compat_3": { + "flake-compat_2": { "locked": { "lastModified": 1733328505, "narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=", @@ -382,6 +390,27 @@ } }, "flake-parts_10": { + "inputs": { + "nixpkgs-lib": [ + "oxipaste", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1722555600, + "narHash": "sha256-XOQkdLafnb/p9ij77byFQjDf5m5QYl9b2REiVClC+x4=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "8471fe90ad337a8074e957b69ca4d0089218391d", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "flake-parts_11": { "inputs": { "nixpkgs-lib": [ "oxishut", @@ -402,7 +431,7 @@ "type": "github" } }, - "flake-parts_11": { + "flake-parts_12": { "inputs": { "nixpkgs-lib": [ "reset", @@ -423,7 +452,7 @@ "type": "github" } }, - "flake-parts_12": { + "flake-parts_13": { "inputs": { "nixpkgs-lib": [ "reset-plugins", @@ -444,7 +473,7 @@ "type": "github" } }, - "flake-parts_13": { + "flake-parts_14": { "inputs": { "nixpkgs-lib": [ "stylix", @@ -471,11 +500,11 @@ "nixpkgs-lib": "nixpkgs-lib" }, "locked": { - "lastModified": 1738453229, - "narHash": "sha256-7H9XgNiGLKN1G1CgRh0vUL4AheZSYzPm+zmZ7vxbJdo=", + "lastModified": 1733312601, + "narHash": "sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "32ea77a06711b758da0ad9bd6a844c5740a87abd", + "rev": "205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9", "type": "github" }, "original": { @@ -485,6 +514,24 @@ } }, "flake-parts_3": { + "inputs": { + "nixpkgs-lib": "nixpkgs-lib_2" + }, + "locked": { + "lastModified": 1740872218, + "narHash": "sha256-ZaMw0pdoUKigLpv9HiNDH2Pjnosg7NBYMJlHTIsHEUo=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "3876f6b87db82f33775b1ef5ea343986105db764", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "flake-parts_4": { "inputs": { "nixpkgs-lib": [ "dashvim", @@ -506,7 +553,7 @@ "type": "github" } }, - "flake-parts_4": { + "flake-parts_5": { "inputs": { "nixpkgs-lib": [ "hyprdock", @@ -527,7 +574,7 @@ "type": "github" } }, - "flake-parts_5": { + "flake-parts_6": { "inputs": { "nixpkgs-lib": [ "nur", @@ -548,7 +595,7 @@ "type": "github" } }, - "flake-parts_6": { + "flake-parts_7": { "inputs": { "nixpkgs-lib": [ "oxicalc", @@ -569,7 +616,7 @@ "type": "github" } }, - "flake-parts_7": { + "flake-parts_8": { "inputs": { "nixpkgs-lib": [ "oxidash", @@ -590,7 +637,7 @@ "type": "github" } }, - "flake-parts_8": { + "flake-parts_9": { "inputs": { "nixpkgs-lib": [ "oxinoti", @@ -611,27 +658,6 @@ "type": "github" } }, - "flake-parts_9": { - "inputs": { - "nixpkgs-lib": [ - "oxipaste", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1722555600, - "narHash": "sha256-XOQkdLafnb/p9ij77byFQjDf5m5QYl9b2REiVClC+x4=", - "owner": "hercules-ci", - "repo": "flake-parts", - "rev": "8471fe90ad337a8074e957b69ca4d0089218391d", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "flake-parts", - "type": "github" - } - }, "flake-schemas": { "locked": { "lastModified": 1721999734, @@ -806,40 +832,12 @@ } }, "git-hooks": { - "inputs": { - "flake-compat": [ - "dashvim", - "nixvim", - "flake-compat" - ], - "gitignore": "gitignore", - "nixpkgs": [ - "dashvim", - "nixvim", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1737465171, - "narHash": "sha256-R10v2hoJRLq8jcL4syVFag7nIGE7m13qO48wRIukWNg=", - "owner": "cachix", - "repo": "git-hooks.nix", - "rev": "9364dc02281ce2d37a1f55b6e51f7c0f65a75f17", - "type": "github" - }, - "original": { - "owner": "cachix", - "repo": "git-hooks.nix", - "type": "github" - } - }, - "git-hooks_2": { "inputs": { "flake-compat": [ "stylix", "flake-compat" ], - "gitignore": "gitignore_3", + "gitignore": "gitignore_2", "nixpkgs": [ "stylix", "nixpkgs" @@ -860,29 +858,6 @@ } }, "gitignore": { - "inputs": { - "nixpkgs": [ - "dashvim", - "nixvim", - "git-hooks", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1709087332, - "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=", - "owner": "hercules-ci", - "repo": "gitignore.nix", - "rev": "637db329424fd7e46cf4185293b9cc8c88c95394", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "gitignore.nix", - "type": "github" - } - }, - "gitignore_2": { "inputs": { "nixpkgs": [ "hyprland", @@ -904,7 +879,7 @@ "type": "github" } }, - "gitignore_3": { + "gitignore_2": { "inputs": { "nixpkgs": [ "stylix", @@ -951,11 +926,11 @@ ] }, "locked": { - "lastModified": 1740318342, - "narHash": "sha256-fjr9+3Iru6O5qE+2oERQkabqAUXx4awm0+i2MBcta1U=", + "lastModified": 1741393072, + "narHash": "sha256-+Su28oU1FBvptj1AO0geJP+BcIJghSVxaNFagvW5K2M=", "owner": "nix-community", "repo": "home-manager", - "rev": "b5ab2c7fdaa807cf425066ab7cd34b073946b1ca", + "rev": "d2c014e1c73195d1958abec0c5ca6112b07b79da", "type": "github" }, "original": { @@ -967,17 +942,15 @@ "home-manager_2": { "inputs": { "nixpkgs": [ - "dashvim", - "nixvim", "nixpkgs" ] }, "locked": { - "lastModified": 1738878603, - "narHash": "sha256-fmhq8B3MvQLawLbMO+LWLcdC2ftLMmwSk+P29icJ3tE=", + "lastModified": 1741579508, + "narHash": "sha256-skRbH+UF2ES+msEa+KWi7AQFX73S+QsGlPsyCU6XyE0=", "owner": "nix-community", "repo": "home-manager", - "rev": "433799271274c9f2ab520a49527ebfe2992dcfbd", + "rev": "744f749dd6fbc1489591ea370b95156858629cb9", "type": "github" }, "original": { @@ -987,26 +960,6 @@ } }, "home-manager_3": { - "inputs": { - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1740494361, - "narHash": "sha256-Dd/GhJ9qKmUwuhgt/PAROG8J6YdU2ZjtJI9SQX5sVQI=", - "owner": "nix-community", - "repo": "home-manager", - "rev": "74f0a8546e3f2458c870cf90fc4b38ac1f498b17", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "home-manager", - "type": "github" - } - }, - "home-manager_4": { "inputs": { "nixpkgs": [ "stylix", @@ -1058,8 +1011,8 @@ }, "hyprdock": { "inputs": { - "flake-parts": "flake-parts_4", - "nixpkgs": "nixpkgs_6" + "flake-parts": "flake-parts_5", + "nixpkgs": "nixpkgs_7" }, "locked": { "lastModified": 1733264848, @@ -1114,17 +1067,17 @@ "hyprlang": "hyprlang", "hyprutils": "hyprutils", "hyprwayland-scanner": "hyprwayland-scanner", - "nixpkgs": "nixpkgs_7", + "nixpkgs": "nixpkgs_8", "pre-commit-hooks": "pre-commit-hooks", "systems": "systems_4", "xdph": "xdph" }, "locked": { - "lastModified": 1740492189, - "narHash": "sha256-ulVWP6hjMT+aByXlqjaLSEywkfw8lbTwVg4K9J/j5f0=", + "lastModified": 1741461862, + "narHash": "sha256-oq8drhL7ejjGjcv2Hg5gdESbnCMgv+vVsxiKHNnHmBQ=", "ref": "refs/heads/main", - "rev": "f0850905f0275922340035f62b6d808c2980ceda", - "revCount": 5843, + "rev": "d30cc19d253a3db784ad10c3084f58cbb52d325a", + "revCount": 5874, "submodules": true, "type": "git", "url": "https://github.com/hyprwm/Hyprland" @@ -1244,11 +1197,11 @@ ] }, "locked": { - "lastModified": 1739048914, - "narHash": "sha256-vd5rJBTmp2w7SDgfv23Zcd84ktI5eDA7e5UBzx+pKrU=", + "lastModified": 1741191527, + "narHash": "sha256-kM+11Nch47Xwfgtw2EpRitJuORy4miwoMuRi5tyMBDY=", "owner": "hyprwm", "repo": "hyprlang", - "rev": "a7334904d591f38757c46fbe2ab68651877d9099", + "rev": "72df3861f1197e41b078faa3e38eedd60e00018d", "type": "github" }, "original": { @@ -1269,11 +1222,11 @@ ] }, "locked": { - "lastModified": 1739891528, - "narHash": "sha256-h8HOCZ/rw2Buzku+GKF77VXxrGjCSOQkLhptiEKMYg0=", + "lastModified": 1741123584, + "narHash": "sha256-mprerMlucqtirmbx6L3VoFnF2bGYc2WSUCj7tuc6xTQ=", "owner": "hyprwm", "repo": "hyprutils", - "rev": "61a5382f4b1ab578064d470b1b3d3f0df396b8ba", + "rev": "6b0154b183f9539097f13af9b5da78ca24da6df2", "type": "github" }, "original": { @@ -1294,11 +1247,11 @@ ] }, "locked": { - "lastModified": 1739049028, - "narHash": "sha256-RleJp7LYbr6s+M1xgbmhtBs+fYa3ZdIiF7+QalJ4D1g=", + "lastModified": 1739870480, + "narHash": "sha256-SiDN5BGxa/1hAsqhgJsS03C3t2QrLgBT8u+ENJ0Qzwc=", "owner": "hyprwm", "repo": "hyprwayland-scanner", - "rev": "04146df74a8d5ec0b579657307be01f1e241125f", + "rev": "206367a08dc5ac4ba7ad31bdca391d098082e64b", "type": "github" }, "original": { @@ -1317,11 +1270,11 @@ "rust-overlay": "rust-overlay" }, "locked": { - "lastModified": 1740229415, - "narHash": "sha256-9x2r4mCmyZelgdlcd3Zla0bQp/dQhTvjMyb6OO1CMWY=", + "lastModified": 1741037542, + "narHash": "sha256-ZyodYB5R2KJzTZjIHZMA8AwDfaZIuOD/5vDP2VvrE1Q=", "owner": "JakeStanger", "repo": "ironbar", - "rev": "9b67719cac7b66727b16fe7a490039510fcc1965", + "rev": "00e5ac8191edd5e039c4ea1b96845b14047298b2", "type": "github" }, "original": { @@ -1369,11 +1322,11 @@ ] }, "locked": { - "lastModified": 1740269380, - "narHash": "sha256-l+zB5a39MJp4Olc4YxP7GChFXmNZIhoXaiSS6QRXa9o=", + "lastModified": 1741338475, + "narHash": "sha256-+vAXiFRQ6ykBX7iFI20rV+xMyOVNtULbFWy6BHKPP+0=", "owner": "Jovian-Experiments", "repo": "Jovian-NixOS", - "rev": "11ba89d13831cb399194310304fffb025081c674", + "rev": "1821e6ae980ff6175d28065ad6d0c87560d2b8ea", "type": "github" }, "original": { @@ -1384,14 +1337,14 @@ }, "naersk": { "inputs": { - "nixpkgs": "nixpkgs_8" + "nixpkgs": "nixpkgs_9" }, "locked": { - "lastModified": 1736429655, - "narHash": "sha256-BwMekRuVlSB9C0QgwKMICiJ5EVbLGjfe4qyueyNQyGI=", + "lastModified": 1739824009, + "narHash": "sha256-fcNrCMUWVLMG3gKC5M9CBqVOAnJtyRvGPxptQFl5mVg=", "owner": "nix-community", "repo": "naersk", - "rev": "0621e47bd95542b8e1ce2ee2d65d6a1f887a13ce", + "rev": "e5130d37369bfa600144c2424270c96f0ef0e11d", "type": "github" }, "original": { @@ -1400,28 +1353,6 @@ "type": "github" } }, - "nix-darwin": { - "inputs": { - "nixpkgs": [ - "dashvim", - "nixvim", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1738743987, - "narHash": "sha256-O3bnAfsObto6l2tQOmQlrO6Z2kD6yKwOWfs7pA0CpOc=", - "owner": "lnl7", - "repo": "nix-darwin", - "rev": "ae406c04577ff9a64087018c79b4fdc02468c87c", - "type": "github" - }, - "original": { - "owner": "lnl7", - "repo": "nix-darwin", - "type": "github" - } - }, "nix-flatpak": { "locked": { "lastModified": 1739444422, @@ -1478,27 +1409,39 @@ }, "nixpkgs-lib": { "locked": { - "lastModified": 1738452942, - "narHash": "sha256-vJzFZGaCpnmo7I6i416HaBLpC+hvcURh/BQwROcGIp8=", + "lastModified": 1733096140, + "narHash": "sha256-1qRH7uAUsyQI7R1Uwl4T+XvdNv778H0Nb5njNrqvylY=", "type": "tarball", - "url": "https://github.com/NixOS/nixpkgs/archive/072a6db25e947df2f31aab9eccd0ab75d5b2da11.tar.gz" + "url": "https://github.com/NixOS/nixpkgs/archive/5487e69da40cbd611ab2cadee0b4637225f7cfae.tar.gz" }, "original": { "type": "tarball", - "url": "https://github.com/NixOS/nixpkgs/archive/072a6db25e947df2f31aab9eccd0ab75d5b2da11.tar.gz" + "url": "https://github.com/NixOS/nixpkgs/archive/5487e69da40cbd611ab2cadee0b4637225f7cfae.tar.gz" + } + }, + "nixpkgs-lib_2": { + "locked": { + "lastModified": 1740872140, + "narHash": "sha256-3wHafybyRfpUCLoE8M+uPVZinImg3xX+Nm6gEfN3G8I=", + "type": "tarball", + "url": "https://github.com/NixOS/nixpkgs/archive/6d3702243441165a03f699f64416f635220f4f15.tar.gz" + }, + "original": { + "type": "tarball", + "url": "https://github.com/NixOS/nixpkgs/archive/6d3702243441165a03f699f64416f635220f4f15.tar.gz" } }, "nixpkgs_10": { "locked": { - "lastModified": 1740828860, - "narHash": "sha256-cjbHI+zUzK5CPsQZqMhE3npTyYFt9tJ3+ohcfaOF/WM=", - "owner": "nixos", + "lastModified": 1741379970, + "narHash": "sha256-Wh7esNh7G24qYleLvgOSY/7HlDUzWaL/n4qzlBePpiw=", + "owner": "NixOs", "repo": "nixpkgs", - "rev": "303bd8071377433a2d8f76e684ec773d70c5b642", + "rev": "36fd87baa9083f34f7f5027900b62ee6d09b1f2f", "type": "github" }, "original": { - "owner": "nixos", + "owner": "NixOs", "ref": "nixos-unstable", "repo": "nixpkgs", "type": "github" @@ -1506,15 +1449,15 @@ }, "nixpkgs_11": { "locked": { - "lastModified": 1716137900, - "narHash": "sha256-sowPU+tLQv8GlqtVtsXioTKeaQvlMz/pefcdwg8MvfM=", - "owner": "NixOS", + "lastModified": 1741379970, + "narHash": "sha256-Wh7esNh7G24qYleLvgOSY/7HlDUzWaL/n4qzlBePpiw=", + "owner": "nixos", "repo": "nixpkgs", - "rev": "6c0b7a92c30122196a761b440ac0d46d3d9954f1", + "rev": "36fd87baa9083f34f7f5027900b62ee6d09b1f2f", "type": "github" }, "original": { - "owner": "NixOS", + "owner": "nixos", "ref": "nixos-unstable", "repo": "nixpkgs", "type": "github" @@ -1537,6 +1480,22 @@ } }, "nixpkgs_13": { + "locked": { + "lastModified": 1716137900, + "narHash": "sha256-sowPU+tLQv8GlqtVtsXioTKeaQvlMz/pefcdwg8MvfM=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "6c0b7a92c30122196a761b440ac0d46d3d9954f1", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_14": { "locked": { "lastModified": 1706487304, "narHash": "sha256-LE8lVX28MV2jWJsidW13D2qrHU/RUUONendL2Q/WlJg=", @@ -1552,7 +1511,7 @@ "type": "github" } }, - "nixpkgs_14": { + "nixpkgs_15": { "locked": { "lastModified": 1716137900, "narHash": "sha256-sowPU+tLQv8GlqtVtsXioTKeaQvlMz/pefcdwg8MvfM=", @@ -1568,7 +1527,7 @@ "type": "github" } }, - "nixpkgs_15": { + "nixpkgs_16": { "locked": { "lastModified": 1706487304, "narHash": "sha256-LE8lVX28MV2jWJsidW13D2qrHU/RUUONendL2Q/WlJg=", @@ -1584,7 +1543,7 @@ "type": "github" } }, - "nixpkgs_16": { + "nixpkgs_17": { "locked": { "lastModified": 1723637854, "narHash": "sha256-med8+5DSWa2UnOqtdICndjDAEjxr5D7zaIiK4pn0Q7c=", @@ -1600,7 +1559,7 @@ "type": "github" } }, - "nixpkgs_17": { + "nixpkgs_18": { "locked": { "lastModified": 1716137900, "narHash": "sha256-sowPU+tLQv8GlqtVtsXioTKeaQvlMz/pefcdwg8MvfM=", @@ -1616,7 +1575,7 @@ "type": "github" } }, - "nixpkgs_18": { + "nixpkgs_19": { "locked": { "lastModified": 1706487304, "narHash": "sha256-LE8lVX28MV2jWJsidW13D2qrHU/RUUONendL2Q/WlJg=", @@ -1632,7 +1591,23 @@ "type": "github" } }, - "nixpkgs_19": { + "nixpkgs_2": { + "locked": { + "lastModified": 1741379970, + "narHash": "sha256-Wh7esNh7G24qYleLvgOSY/7HlDUzWaL/n4qzlBePpiw=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "36fd87baa9083f34f7f5027900b62ee6d09b1f2f", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_20": { "locked": { "lastModified": 1739446958, "narHash": "sha256-+/bYK3DbPxMIvSL4zArkMX0LQvS7rzBKXnDXLfKyRVc=", @@ -1648,23 +1623,7 @@ "type": "github" } }, - "nixpkgs_2": { - "locked": { - "lastModified": 1740367490, - "narHash": "sha256-WGaHVAjcrv+Cun7zPlI41SerRtfknGQap281+AakSAw=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "0196c0175e9191c474c26ab5548db27ef5d34b05", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_20": { + "nixpkgs_21": { "locked": { "lastModified": 1736320768, "narHash": "sha256-nIYdTAiKIGnFNugbomgBJR+Xv5F1ZQU+HfaBqJKroC0=", @@ -1680,7 +1639,7 @@ "type": "github" } }, - "nixpkgs_21": { + "nixpkgs_22": { "locked": { "lastModified": 1716948383, "narHash": "sha256-SzDKxseEcHR5KzPXLwsemyTR/kaM9whxeiJohbL04rs=", @@ -1696,7 +1655,7 @@ "type": "github" } }, - "nixpkgs_22": { + "nixpkgs_23": { "locked": { "lastModified": 1706487304, "narHash": "sha256-LE8lVX28MV2jWJsidW13D2qrHU/RUUONendL2Q/WlJg=", @@ -1712,7 +1671,7 @@ "type": "github" } }, - "nixpkgs_23": { + "nixpkgs_24": { "locked": { "lastModified": 1731763621, "narHash": "sha256-ddcX4lQL0X05AYkrkV2LMFgGdRvgap7Ho8kgon3iWZk=", @@ -1728,7 +1687,7 @@ "type": "github" } }, - "nixpkgs_24": { + "nixpkgs_25": { "locked": { "lastModified": 1740367490, "narHash": "sha256-WGaHVAjcrv+Cun7zPlI41SerRtfknGQap281+AakSAw=", @@ -1744,13 +1703,13 @@ "type": "github" } }, - "nixpkgs_25": { + "nixpkgs_26": { "locked": { - "lastModified": 1740367490, - "narHash": "sha256-WGaHVAjcrv+Cun7zPlI41SerRtfknGQap281+AakSAw=", + "lastModified": 1741379970, + "narHash": "sha256-Wh7esNh7G24qYleLvgOSY/7HlDUzWaL/n4qzlBePpiw=", "owner": "nixos", "repo": "nixpkgs", - "rev": "0196c0175e9191c474c26ab5548db27ef5d34b05", + "rev": "36fd87baa9083f34f7f5027900b62ee6d09b1f2f", "type": "github" }, "original": { @@ -1762,11 +1721,27 @@ }, "nixpkgs_3": { "locked": { - "lastModified": 1739866667, - "narHash": "sha256-EO1ygNKZlsAC9avfcwHkKGMsmipUk1Uc0TbrEZpkn64=", + "lastModified": 1736166416, + "narHash": "sha256-U47xeACNBpkSO6IcCm0XvahsVXpJXzjPIQG7TZlOToU=", "owner": "nixos", "repo": "nixpkgs", - "rev": "73cf49b8ad837ade2de76f87eb53fc85ed5d4680", + "rev": "b30f97d8c32d804d2d832ee837d0f1ca0695faa5", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_4": { + "locked": { + "lastModified": 1740828860, + "narHash": "sha256-cjbHI+zUzK5CPsQZqMhE3npTyYFt9tJ3+ohcfaOF/WM=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "303bd8071377433a2d8f76e684ec773d70c5b642", "type": "github" }, "original": { @@ -1776,7 +1751,7 @@ "type": "github" } }, - "nixpkgs_4": { + "nixpkgs_5": { "locked": { "lastModified": 1738797219, "narHash": "sha256-KRwX9Z1XavpgeSDVM/THdFd6uH8rNm/6R+7kIbGa+2s=", @@ -1792,7 +1767,7 @@ "type": "github" } }, - "nixpkgs_5": { + "nixpkgs_6": { "locked": { "lastModified": 1736241350, "narHash": "sha256-CHd7yhaDigUuJyDeX0SADbTM9FXfiWaeNyY34FL1wQU=", @@ -1808,7 +1783,7 @@ "type": "github" } }, - "nixpkgs_6": { + "nixpkgs_7": { "locked": { "lastModified": 1716330097, "narHash": "sha256-8BO3B7e3BiyIDsaKA0tY8O88rClYRTjvAp66y+VBUeU=", @@ -1824,13 +1799,13 @@ "type": "github" } }, - "nixpkgs_7": { + "nixpkgs_8": { "locked": { - "lastModified": 1739020877, - "narHash": "sha256-mIvECo/NNdJJ/bXjNqIh8yeoSjVLAuDuTUzAo7dzs8Y=", + "lastModified": 1741246872, + "narHash": "sha256-Q6pMP4a9ed636qilcYX8XUguvKl/0/LGXhHcRI91p0U=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "a79cfe0ebd24952b580b1cf08cd906354996d547", + "rev": "10069ef4cf863633f57238f179a0297de84bd8d3", "type": "github" }, "original": { @@ -1840,13 +1815,13 @@ "type": "github" } }, - "nixpkgs_8": { + "nixpkgs_9": { "locked": { - "lastModified": 1738297584, - "narHash": "sha256-AYvaFBzt8dU0fcSK2jKD0Vg23K2eIRxfsVXIPCW9a0E=", + "lastModified": 1740547748, + "narHash": "sha256-Ly2fBL1LscV+KyCqPRufUBuiw+zmWrlJzpWOWbahplg=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "9189ac18287c599860e878e905da550aa6dec1cd", + "rev": "3a05eebede89661660945da1f151959900903b6a", "type": "github" }, "original": { @@ -1854,40 +1829,18 @@ "type": "indirect" } }, - "nixpkgs_9": { - "locked": { - "lastModified": 1740367490, - "narHash": "sha256-WGaHVAjcrv+Cun7zPlI41SerRtfknGQap281+AakSAw=", - "owner": "NixOs", - "repo": "nixpkgs", - "rev": "0196c0175e9191c474c26ab5548db27ef5d34b05", - "type": "github" - }, - "original": { - "owner": "NixOs", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, "nixvim": { "inputs": { - "devshell": "devshell", - "flake-compat": "flake-compat", - "flake-parts": "flake-parts_3", - "git-hooks": "git-hooks", - "home-manager": "home-manager_2", - "nix-darwin": "nix-darwin", - "nixpkgs": "nixpkgs_4", - "nuschtosSearch": "nuschtosSearch", - "treefmt-nix": "treefmt-nix" + "flake-parts": "flake-parts_4", + "nixpkgs": "nixpkgs_5", + "nuschtosSearch": "nuschtosSearch" }, "locked": { - "lastModified": 1739902813, - "narHash": "sha256-BgOQcKKz7VNvSHIbBllHisv32HvF3W3ALF9sdnC++V8=", + "lastModified": 1740520037, + "narHash": "sha256-TpZMYjOre+6GhKDVHFwoW2iBWqpNQppQTuqIAo+OBV8=", "owner": "nix-community", "repo": "nixvim", - "rev": "0ab9947137cd034ec64eb5cd9ede94e53af21f50", + "rev": "6f8d8f7aee84f377f52c8bb58385015f9168a666", "type": "github" }, "original": { @@ -1898,16 +1851,16 @@ }, "nur": { "inputs": { - "flake-parts": "flake-parts_5", - "nixpkgs": "nixpkgs_10", - "treefmt-nix": "treefmt-nix_2" + "flake-parts": "flake-parts_6", + "nixpkgs": "nixpkgs_11", + "treefmt-nix": "treefmt-nix" }, "locked": { - "lastModified": 1740926717, - "narHash": "sha256-KBCQdP1rSQAXjy1ZNf68foSsqnT3LXJliMBGLW+SNsU=", + "lastModified": 1741581473, + "narHash": "sha256-GN1Jkhs5jBJnMzbY5ok8fK07Vr/RSOxOL+QMSx5mAHA=", "owner": "nix-community", "repo": "NUR", - "rev": "1788063f2dfe4bc8ed0d643abb1df2771446b7af", + "rev": "05607425540ace50b41392637ea33b23bff0d2c7", "type": "github" }, "original": { @@ -1918,12 +1871,12 @@ }, "nur_2": { "inputs": { - "flake-parts": "flake-parts_13", + "flake-parts": "flake-parts_14", "nixpkgs": [ "stylix", "nixpkgs" ], - "treefmt-nix": "treefmt-nix_3" + "treefmt-nix": "treefmt-nix_2" }, "locked": { "lastModified": 1740408283, @@ -1965,8 +1918,8 @@ }, "oxicalc": { "inputs": { - "flake-parts": "flake-parts_6", - "nixpkgs": "nixpkgs_11" + "flake-parts": "flake-parts_7", + "nixpkgs": "nixpkgs_12" }, "locked": { "lastModified": 1733264508, @@ -1984,8 +1937,8 @@ }, "oxidash": { "inputs": { - "flake-parts": "flake-parts_7", - "nixpkgs": "nixpkgs_12", + "flake-parts": "flake-parts_8", + "nixpkgs": "nixpkgs_13", "rust-overlay": "rust-overlay_2" }, "locked": { @@ -2004,8 +1957,8 @@ }, "oxinoti": { "inputs": { - "flake-parts": "flake-parts_8", - "nixpkgs": "nixpkgs_14", + "flake-parts": "flake-parts_9", + "nixpkgs": "nixpkgs_15", "rust-overlay": "rust-overlay_3" }, "locked": { @@ -2024,8 +1977,8 @@ }, "oxipaste": { "inputs": { - "flake-parts": "flake-parts_9", - "nixpkgs": "nixpkgs_16" + "flake-parts": "flake-parts_10", + "nixpkgs": "nixpkgs_17" }, "locked": { "lastModified": 1737624143, @@ -2043,8 +1996,8 @@ }, "oxishut": { "inputs": { - "flake-parts": "flake-parts_10", - "nixpkgs": "nixpkgs_17", + "flake-parts": "flake-parts_11", + "nixpkgs": "nixpkgs_18", "rust-overlay": "rust-overlay_4" }, "locked": { @@ -2063,19 +2016,19 @@ }, "pre-commit-hooks": { "inputs": { - "flake-compat": "flake-compat_2", - "gitignore": "gitignore_2", + "flake-compat": "flake-compat", + "gitignore": "gitignore", "nixpkgs": [ "hyprland", "nixpkgs" ] }, "locked": { - "lastModified": 1737465171, - "narHash": "sha256-R10v2hoJRLq8jcL4syVFag7nIGE7m13qO48wRIukWNg=", + "lastModified": 1741379162, + "narHash": "sha256-srpAbmJapkaqGRE3ytf3bj4XshspVR5964OX5LfjDWc=", "owner": "cachix", "repo": "git-hooks.nix", - "rev": "9364dc02281ce2d37a1f55b6e51f7c0f65a75f17", + "rev": "b5a62751225b2f62ff3147d0a334055ebadcd5cc", "type": "github" }, "original": { @@ -2086,8 +2039,8 @@ }, "reset": { "inputs": { - "flake-parts": "flake-parts_11", - "nixpkgs": "nixpkgs_19", + "flake-parts": "flake-parts_12", + "nixpkgs": "nixpkgs_20", "rust-overlay": "rust-overlay_5" }, "locked": { @@ -2106,8 +2059,8 @@ }, "reset-plugins": { "inputs": { - "flake-parts": "flake-parts_12", - "nixpkgs": "nixpkgs_21", + "flake-parts": "flake-parts_13", + "nixpkgs": "nixpkgs_22", "rust-overlay": "rust-overlay_6" }, "locked": { @@ -2132,12 +2085,12 @@ "chaoticNyx": "chaoticNyx", "dashvim": "dashvim", "disko": "disko", - "home-manager": "home-manager_3", + "home-manager": "home-manager_2", "hyprdock": "hyprdock", "hyprland": "hyprland", "ironbar": "ironbar", "nix-flatpak": "nix-flatpak", - "nixpkgs": "nixpkgs_9", + "nixpkgs": "nixpkgs_10", "nur": "nur", "oxicalc": "oxicalc", "oxidash": "oxidash", @@ -2155,11 +2108,28 @@ "rust-analyzer-src": { "flake": false, "locked": { - "lastModified": 1740259966, - "narHash": "sha256-FJU9qiELvmJzNRr7wLFtJUy4bSk1PNqsRB7wOQz6zUE=", + "lastModified": 1741300343, + "narHash": "sha256-Engmn908XKEy/hmriudPQbX1QWr7ySpmQg9HbTigiME=", "owner": "rust-lang", "repo": "rust-analyzer", - "rev": "9df88ff0f65f8de9f73684d2bb96e1b62669d083", + "rev": "21a88a3767c4a6b3f211ed12174b923be851e1c6", + "type": "github" + }, + "original": { + "owner": "rust-lang", + "ref": "nightly", + "repo": "rust-analyzer", + "type": "github" + } + }, + "rust-analyzer-src_2": { + "flake": false, + "locked": { + "lastModified": 1734622712, + "narHash": "sha256-2Oc2LbFypF1EG3zTVIVcuT5XFJ7R3oAwu2tS8B0qQ0I=", + "owner": "rust-lang", + "repo": "rust-analyzer", + "rev": "fe027d79d22f2a7645da4143f5cc0f5f56239b97", "type": "github" }, "original": { @@ -2177,11 +2147,11 @@ ] }, "locked": { - "lastModified": 1738290352, - "narHash": "sha256-YKOHUmc0Clm4tMV8grnxYL4IIwtjTayoq/3nqk0QM7k=", + "lastModified": 1740709839, + "narHash": "sha256-4dF++MXIXna/AwlZWDKr7bgUmY4xoEwvkF1GewjNrt0=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "b031b584125d33d23a0182f91ddbaf3ab4880236", + "rev": "b4270835bf43c6f80285adac6f66a26d83f0f277", "type": "github" }, "original": { @@ -2193,7 +2163,7 @@ "rust-overlay_2": { "inputs": { "flake-utils": "flake-utils_2", - "nixpkgs": "nixpkgs_13" + "nixpkgs": "nixpkgs_14" }, "locked": { "lastModified": 1716171463, @@ -2212,7 +2182,7 @@ "rust-overlay_3": { "inputs": { "flake-utils": "flake-utils_3", - "nixpkgs": "nixpkgs_15" + "nixpkgs": "nixpkgs_16" }, "locked": { "lastModified": 1716171463, @@ -2231,7 +2201,7 @@ "rust-overlay_4": { "inputs": { "flake-utils": "flake-utils_4", - "nixpkgs": "nixpkgs_18" + "nixpkgs": "nixpkgs_19" }, "locked": { "lastModified": 1716171463, @@ -2249,7 +2219,7 @@ }, "rust-overlay_5": { "inputs": { - "nixpkgs": "nixpkgs_20" + "nixpkgs": "nixpkgs_21" }, "locked": { "lastModified": 1739586408, @@ -2268,7 +2238,7 @@ "rust-overlay_6": { "inputs": { "flake-utils": "flake-utils_5", - "nixpkgs": "nixpkgs_22" + "nixpkgs": "nixpkgs_23" }, "locked": { "lastModified": 1717035469, @@ -2286,14 +2256,14 @@ }, "sops-nix": { "inputs": { - "nixpkgs": "nixpkgs_23" + "nixpkgs": "nixpkgs_24" }, "locked": { - "lastModified": 1739262228, - "narHash": "sha256-7JAGezJ0Dn5qIyA2+T4Dt/xQgAbhCglh6lzCekTVMeU=", + "lastModified": 1741043164, + "narHash": "sha256-9lfmSZLz6eq9Ygr6cCmvQiiBEaPb54pUBcjvbEMPORc=", "owner": "Mic92", "repo": "sops-nix", - "rev": "07af005bb7d60c7f118d9d9f5530485da5d1e975", + "rev": "3f2412536eeece783f0d0ad3861417f347219f4d", "type": "github" }, "original": { @@ -2304,11 +2274,11 @@ }, "stable": { "locked": { - "lastModified": 1740339700, - "narHash": "sha256-cbrw7EgQhcdFnu6iS3vane53bEagZQy/xyIkDWpCgVE=", + "lastModified": 1741445498, + "narHash": "sha256-F5Em0iv/CxkN5mZ9hRn3vPknpoWdcdCyR0e4WklHwiE=", "owner": "NixOs", "repo": "nixpkgs", - "rev": "04ef94c4c1582fd485bbfdb8c4a8ba250e359195", + "rev": "52e3095f6d812b91b22fb7ad0bfc1ab416453634", "type": "github" }, "original": { @@ -2325,12 +2295,12 @@ "base16-helix": "base16-helix", "base16-vim": "base16-vim", "firefox-gnome-theme": "firefox-gnome-theme", - "flake-compat": "flake-compat_3", + "flake-compat": "flake-compat_2", "flake-utils": "flake-utils_6", - "git-hooks": "git-hooks_2", + "git-hooks": "git-hooks", "gnome-shell": "gnome-shell", - "home-manager": "home-manager_4", - "nixpkgs": "nixpkgs_24", + "home-manager": "home-manager_3", + "nixpkgs": "nixpkgs_25", "nur": "nur_2", "systems": "systems_9", "tinted-foot": "tinted-foot", @@ -2340,11 +2310,11 @@ "tinted-zed": "tinted-zed" }, "locked": { - "lastModified": 1740484771, - "narHash": "sha256-vVuuizPabugzTQtOKHB8NV/RC1PQWH6KxQtRW8Jqkyg=", + "lastModified": 1741533345, + "narHash": "sha256-wStpjHkVAuwYvs3oNSLWz8A2QkicfrGlP4rw2+OiyAU=", "owner": "danth", "repo": "stylix", - "rev": "c9195530b40e2589a70d3bf4154d2f92de1fafca", + "rev": "a76068262cfc16c04f9c07a6458715548b067450", "type": "github" }, "original": { @@ -2571,28 +2541,6 @@ } }, "treefmt-nix": { - "inputs": { - "nixpkgs": [ - "dashvim", - "nixvim", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1738680491, - "narHash": "sha256-8X7tR3kFGkE7WEF5EXVkt4apgaN85oHZdoTGutCFs6I=", - "owner": "numtide", - "repo": "treefmt-nix", - "rev": "64dbb922d51a42c0ced6a7668ca008dded61c483", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "treefmt-nix", - "type": "github" - } - }, - "treefmt-nix_2": { "inputs": { "nixpkgs": [ "nur", @@ -2613,7 +2561,7 @@ "type": "github" } }, - "treefmt-nix_3": { + "treefmt-nix_2": { "inputs": { "nixpkgs": [ "stylix", @@ -2678,14 +2626,14 @@ }, "zen-browser": { "inputs": { - "nixpkgs": "nixpkgs_25" + "nixpkgs": "nixpkgs_26" }, "locked": { - "lastModified": 1740442108, - "narHash": "sha256-TfLmlndhcaGBzYMkv3QFrcwXJwony5apCBOWErKQov8=", + "lastModified": 1741493092, + "narHash": "sha256-jShBVqU8K5rN8xtsq2JDgq+KInRw3pDbp8SViMIz5pE=", "owner": "youwen5", "repo": "zen-browser-flake", - "rev": "4d82cf9b46b099c81758bd3fa2b5ce617db05532", + "rev": "117945c4162d78f2cc7ad578cf44edbbf1ee33fb", "type": "github" }, "original": { From 18867008575b1bbd5946d2ead1590d07da6ee064 Mon Sep 17 00:00:00 2001 From: DashieTM Date: Wed, 12 Mar 2025 11:11:10 +0100 Subject: [PATCH 008/118] Add zen and librewolf configuration --- flake.nix | 2 + home/default.nix | 4 +- lib/default.nix | 2 + modules/programs/browser/default.nix | 7 +- modules/programs/browser/firefox.nix | 2 +- modules/programs/browser/foxwrappers.nix | 25 +++++++ modules/programs/browser/librewolf.nix | 29 ++++++++ modules/programs/browser/zen.nix | 94 +++++++++++++++++++++++- modules/programs/homePackages.nix | 25 +++++-- modules/programs/media.nix | 91 +++++++++++------------ 10 files changed, 219 insertions(+), 62 deletions(-) create mode 100644 modules/programs/browser/foxwrappers.nix create mode 100644 modules/programs/browser/librewolf.nix diff --git a/flake.nix b/flake.nix index 4ae8f79..5eeb4a4 100644 --- a/flake.nix +++ b/flake.nix @@ -106,10 +106,12 @@ pkgs stable ; + system = currentSystem; lib = inputs.nixpkgs.lib; }; docs = import ./docs { inherit inputs pkgs stable; + system = currentSystem; lib = inputs.nixpkgs.lib; build_systems = dashNixLib.build_systems; }; diff --git a/home/default.nix b/home/default.nix index f4fb47b..50f1c66 100644 --- a/home/default.nix +++ b/home/default.nix @@ -10,6 +10,7 @@ pkgs, root, alternativePkgs, + system, ... }: { xdg = { @@ -23,7 +24,7 @@ useGlobalPkgs = true; useUserPackages = true; extraSpecialArgs = { - inherit inputs root additionalInputs alternativePkgs; + inherit inputs root additionalInputs alternativePkgs system; }; users.${config.conf.username} = { @@ -32,6 +33,7 @@ ./common.nix ./themes ./sync.nix + ../modules/programs/browser/foxwrappers.nix ] ++ homeMods ++ additionalHomeMods diff --git a/lib/default.nix b/lib/default.nix index 93408b3..5bd2ce3 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -4,6 +4,7 @@ pkgs, self, stable, + system, ... }: { /* @@ -84,6 +85,7 @@ inputs mod additionalHomeConfig + system root ; pkgs = lib.mkForce ( diff --git a/modules/programs/browser/default.nix b/modules/programs/browser/default.nix index a7436d9..ade4ecf 100644 --- a/modules/programs/browser/default.nix +++ b/modules/programs/browser/default.nix @@ -1,8 +1,9 @@ { imports = [ - ./firefox.nix - ./zen.nix - ./chromium.nix ./brave.nix + ./chromium.nix + ./firefox.nix + ./librewolf.nix + ./zen.nix ]; } diff --git a/modules/programs/browser/firefox.nix b/modules/programs/browser/firefox.nix index 048263d..1bb07d7 100644 --- a/modules/programs/browser/firefox.nix +++ b/modules/programs/browser/firefox.nix @@ -70,7 +70,7 @@ value = { isDefault = true; id = 0; - extensions.packages = [ pkgs.nur.repos.rycee.firefox-addons.darkreader ]; + extensions.packages = [pkgs.nur.repos.rycee.firefox-addons.darkreader]; }; } ]; diff --git a/modules/programs/browser/foxwrappers.nix b/modules/programs/browser/foxwrappers.nix new file mode 100644 index 0000000..a6a5c21 --- /dev/null +++ b/modules/programs/browser/foxwrappers.nix @@ -0,0 +1,25 @@ +{inputs, ...}: let + mkFirefoxModule = import "${inputs.home-manager.outPath}/modules/programs/firefox/mkFirefoxModule.nix"; +in { + imports = [ + (mkFirefoxModule { + modulePath = [ + "programs" + "zen-browser" + ]; + name = "Zen Browser"; + wrappedPackageName = "zen-browser-unwrapped"; + unwrappedPackageName = "zen-browser"; + visible = true; + platforms = { + linux = { + vendorPath = ".zen"; + configPath = ".zen"; + }; + darwin = { + configPath = "Library/Application Support/Zen"; + }; + }; + }) + ]; +} diff --git a/modules/programs/browser/librewolf.nix b/modules/programs/browser/librewolf.nix new file mode 100644 index 0000000..9a17bda --- /dev/null +++ b/modules/programs/browser/librewolf.nix @@ -0,0 +1,29 @@ +{ + lib, + config, + options, + ... +}: { + options.mods.browser.librewolf = { + enable = lib.mkOption { + default = false; + example = true; + type = lib.types.bool; + description = "Enables the librwolf browser"; + }; + settings = lib.mkOption { + default = {}; + example = {}; + type = with lib.types; attrsOf anything; + description = "librewolf settings"; + }; + }; + config = lib.mkIf config.mods.browser.librewolf.enable ( + lib.optionalAttrs (options ? home.packages) { + programs.librewolf = { + enable = true; + settings = config.mods.browser.librewolf.settings; + }; + } + ); +} diff --git a/modules/programs/browser/zen.nix b/modules/programs/browser/zen.nix index 96ef32c..ced52ea 100644 --- a/modules/programs/browser/zen.nix +++ b/modules/programs/browser/zen.nix @@ -2,8 +2,8 @@ lib, config, options, - system, inputs, + pkgs, ... }: { options.mods.browser.zen = { @@ -13,11 +13,99 @@ type = lib.types.bool; description = "Enables the zen browser"; }; - # TODO configure zen + configuration = lib.mkOption { + default = { + EnableTrackingProtection = { + Value = true; + Locked = true; + Cryptomining = true; + Fingerprinting = true; + }; + DisablePocket = true; + DisplayBookmarksToolbar = "never"; + DisplayMenuBar = "default-off"; + CaptivePortal = false; + DisableFirefoxStudies = true; + DisableTelemetry = true; + DisableFirefoxAccounts = false; + NoDefaultBookmarks = true; + OfferToSaveLogins = false; + OfferToSaveLoginsDefault = false; + PasswordManagerEnabled = false; + FirefoxHome = { + Search = true; + Pocket = false; + Snippets = false; + TopSites = true; + Highlights = false; + }; + UserMessaging = { + ExtensionRecommendations = false; + SkipOnboarding = true; + }; + }; + example = {}; + type = with lib.types; attrsOf anything; + description = "Zen policy configuration. See https://mozilla.github.io/policy-templates/ for more information."; + }; + profiles = lib.mkOption { + default = [ + { + name = "${config.conf.username}"; + value = { + isDefault = true; + id = 0; + }; + } + { + name = "special"; + value = { + isDefault = false; + id = 1; + }; + } + ]; + example = [ + { + name = "custom"; + value = { + isDefault = true; + id = 0; + extensions.packages = [pkgs.nur.repos.rycee.firefox-addons.darkreader]; + }; + } + ]; + type = with lib.types; listOf (attrsOf anything); + description = "Zen profiles"; + }; }; config = lib.mkIf config.mods.browser.zen.enable ( lib.optionalAttrs (options ? home.packages) { - home.packages = [inputs.zen-browser.packages."${system}".default]; + programs.zen-browser = { + enable = true; + package = + pkgs.wrapFirefox + (inputs.zen-browser.packages.${pkgs.system}.default.overrideAttrs (prevAttrs: { + passthru = + prevAttrs.passthru + or {} + // { + applicationName = "Zen Browser"; + binaryName = "zen"; + + ffmpegSupport = true; + gssSupport = true; + gtk3 = pkgs.gtk3; + }; + })) + { + icon = "zen-beta"; + wmClass = "zen"; + hasMozSystemDirPatch = false; + }; + policies = config.mods.browser.zen.configuration; + profiles = builtins.listToAttrs config.mods.browser.zen.profiles; + }; } ); } diff --git a/modules/programs/homePackages.nix b/modules/programs/homePackages.nix index 223283d..4ca908b 100644 --- a/modules/programs/homePackages.nix +++ b/modules/programs/homePackages.nix @@ -3,7 +3,6 @@ options, config, pkgs, - inputs, ... }: let # TODO remove when chromium works again @@ -72,12 +71,14 @@ in { description = "The email client"; }; browser = lib.mkOption { - default = inputs.zen-browser.packages.${pkgs.system}.default; + default = "zen"; example = "firefox"; type = with lib.types; nullOr ( either (enum [ "firefox" + "zen" + "librewolf" ]) package ); @@ -150,11 +151,23 @@ in { profiles = builtins.listToAttrs config.mods.browser.firefox.profiles; }; } + else if config.mods.homePackages.browser == "zen" + then { + zen-browser = { + enable = true; + policies = config.mods.browser.zen.configuration; + profiles = builtins.listToAttrs config.mods.browser.zen.profiles; + }; + } + else if config.mods.homePackages.browser == "librewolf" + then { + librewolf = { + enable = true; + settings = config.mods.browser.librewolf.settings; + }; + } else {} ); - services = - if config.mods.homePackages.useDefaultPackages - then config.mods.homePackages.specialServices - else config.mods.homePackages.specialServices; + services = config.mods.homePackages.specialServices; }; } diff --git a/modules/programs/media.nix b/modules/programs/media.nix index 62080f3..207fa9c 100644 --- a/modules/programs/media.nix +++ b/modules/programs/media.nix @@ -4,8 +4,7 @@ config, pkgs, ... -}: -{ +}: { options.mods.media = { useBasePackages = lib.mkOption { default = true; @@ -14,24 +13,24 @@ description = "Default media packages (If disabled, only the additional packages will be installed)"; }; additionalPackages = lib.mkOption { - default = [ ]; - example = [ pkgs.flatpak ]; + default = []; + example = [pkgs.flatpak]; type = with lib.types; listOf package; description = '' Additional media packages. ''; }; specialPrograms = lib.mkOption { - default = { }; - example = { }; + default = {}; + example = {}; type = with lib.types; attrsOf anything; description = '' special program configuration to be added which require programs.something notation. ''; }; specialServices = lib.mkOption { - default = { }; - example = { }; + default = {}; + example = {}; type = with lib.types; attrsOf anything; description = '' special services configuration to be added which require an services.something notation. @@ -40,51 +39,47 @@ }; config = lib.optionalAttrs (options ? home.packages) { home.packages = - if config.mods.media.useBasePackages then + if config.mods.media.useBasePackages + then with pkgs; - [ - # base audio - pipewire - wireplumber - # audio control - playerctl - # images - imv - # videos - mpv - # pdf - zathura - evince - libreoffice-fresh - onlyoffice-bin - pdftk - pdfpc - polylux2pdfpc - # spotify - # video editing - kdePackages.kdenlive - # image creation - inkscape - gimp - krita - yt-dlp - ] - ++ config.mods.media.additionalPackages - else - config.mods.media.additionalPackages; + [ + # base audio + pipewire + wireplumber + # audio control + playerctl + # images + imv + # videos + mpv + # pdf + zathura + evince + libreoffice-fresh + onlyoffice-bin + pdftk + pdfpc + polylux2pdfpc + # spotify + # video editing + kdePackages.kdenlive + # image creation + inkscape + gimp + krita + yt-dlp + ] + ++ config.mods.media.additionalPackages + else config.mods.media.additionalPackages; programs = - if config.mods.media.useBasePackages then + if config.mods.media.useBasePackages + then { obs-studio.enable = true; - obs-studio.plugins = with pkgs; [ obs-studio-plugins.obs-vaapi ]; + obs-studio.plugins = with pkgs; [obs-studio-plugins.obs-vaapi]; } // config.mods.media.specialPrograms - else - config.mods.media.specialPrograms; - services = - if config.mods.media.useBasePackages then - config.mods.media.specialServices - else - config.mods.media.specialServices; + else config.mods.media.specialPrograms; + services = config.mods.media.specialServices; }; } From 4ca16884348a642661d8c7620d36715f82a96e6d Mon Sep 17 00:00:00 2001 From: DashieTM Date: Wed, 12 Mar 2025 22:05:56 +0100 Subject: [PATCH 009/118] Add userContent and userChrome to firefox/zen/librewolf --- base/common_hardware.nix | 3 +- docs/src/README.md | 3 +- home/themes/default.nix | 1 + home/themes/firefoxTheme.nix | 325 +++++++++++++++++++++++ iso/configuration.nix | 1 + modules/programs/browser/foxwrappers.nix | 1 + 6 files changed, 332 insertions(+), 2 deletions(-) create mode 100644 home/themes/firefoxTheme.nix diff --git a/base/common_hardware.nix b/base/common_hardware.nix index 7e6239a..988e2ba 100644 --- a/base/common_hardware.nix +++ b/base/common_hardware.nix @@ -87,7 +87,8 @@ in { trusted-users = [username]; auto-optimise-store = true; - experimental-features = "nix-command flakes"; + experimental-features = "nix-command flakes pipe-operators"; + }; }; diff --git a/docs/src/README.md b/docs/src/README.md index a667e34..7141724 100644 --- a/docs/src/README.md +++ b/docs/src/README.md @@ -268,6 +268,7 @@ For package lists, please check the individual modules, as the lists can be long # Credits - [Fufexan](https://github.com/fufexan) for the xdg-mime config: -- [Catppuccin](https://github.com/catppuccin) for base16 colors +- [Catppuccin](https://github.com/catppuccin) for base16 colors and zen-browser css - [Danth](https://github.com/danth) for providing a base for the nix docs +- [chermnyx](https://github.com/chermnyx) for providing a base for zen configuration - [Nix-Artwork](https://github.com/NixOS/nixos-artwork/tree/master/logo) for the Nix/NixOS logo (Tim Cuthbertson (@timbertson)) diff --git a/home/themes/default.nix b/home/themes/default.nix index 1e091a9..9976455 100644 --- a/home/themes/default.nix +++ b/home/themes/default.nix @@ -3,5 +3,6 @@ ./qt.nix ./kdeglobals.nix ./oxiced.nix + ./firefoxTheme.nix ]; } diff --git a/home/themes/firefoxTheme.nix b/home/themes/firefoxTheme.nix new file mode 100644 index 0000000..91c5804 --- /dev/null +++ b/home/themes/firefoxTheme.nix @@ -0,0 +1,325 @@ +# css from https://github.com/catppuccin/zen-browser/tree/main/themes +{ + config, + inputs, + pkgs, + lib, + ... +}: let + # at time of using this here, stylix might not be evaluated yet + # hence ensure it is by using base16 mkSchemeAttrs + base16 = pkgs.callPackage inputs.base16.lib {}; + scheme = base16.mkSchemeAttrs config.stylix.base16Scheme; + userChrome = + /* + css + */ + '' + /* Catppuccin Mocha Blue userContent.css*/ + + @media (prefers-color-scheme: dark) { + + /* Common variables affecting all pages */ + @-moz-document url-prefix("about:") { + :root { + --in-content-page-color: #${scheme.base05} !important; + --color-accent-primary: #${scheme.base0D} !important; + --color-accent-primary-hover: rgb(163, 197, 251) !important; // TODO + --color-accent-primary-active: rgb(138, 153, 250) !important; // TODO + background-color: #${scheme.base00} !important; + --in-content-page-background: #${scheme.base00} !important; + } + + } + + /* Variables and styles specific to about:newtab and about:home */ + @-moz-document url("about:newtab"), url("about:home") { + + :root { + --newtab-background-color: #${scheme.base00} !important; + --newtab-background-color-secondary: #${scheme.base02} !important; + --newtab-element-hover-color: #${scheme.base02} !important; + --newtab-text-primary-color: #${scheme.base05} !important; + --newtab-wordmark-color: #${scheme.base05} !important; + --newtab-primary-action-background: #${scheme.base0D} !important; + } + + .icon { + color: #${scheme.base0D} !important; + } + + .search-wrapper .logo-and-wordmark .logo { + //background: url("zen-logo-mocha.svg"), url("https://raw.githubusercontent.com/IAmJafeth/zen-browser/main/themes/Mocha/Blue/zen-logo-mocha.svg") no-repeat center !important; // TODO + display: inline-block !important; + height: 82px !important; + width: 82px !important; + background-size: 82px !important; + } + + @media (max-width: 609px) { + .search-wrapper .logo-and-wordmark .logo { + background-size: 64px !important; + height: 64px !important; + width: 64px !important; + } + } + + .card-outer:is(:hover, :focus, .active):not(.placeholder) .card-title { + color: #${scheme.base0D} !important; + } + + .top-site-outer .search-topsite { + background-color: #${scheme.base0D} !important; + } + + .compact-cards .card-outer .card-context .card-context-icon.icon-download { + fill: #${scheme.base0B} !important; + } + } + + /* Variables and styles specific to about:preferences */ + @-moz-document url-prefix("about:preferences") { + :root { + --zen-colors-tertiary: #${scheme.base01} !important; + --in-content-text-color: #${scheme.base05} !important; + --link-color: #${scheme.base0D} !important; + --link-color-hover: rgb(163, 197, 251) !important; // TODO + --zen-colors-primary: #${scheme.base02} !important; + --in-content-box-background: #${scheme.base02} !important; + --zen-primary-color: #${scheme.base0D} !important; + } + + groupbox , moz-card{ + background: #${scheme.base00} !important; + } + + button, + groupbox menulist { + background: #${scheme.base02} !important; + color: #${scheme.base05} !important; + } + + .main-content { + background-color: #${scheme.base01} !important; + } + + .identity-color-blue { + --identity-tab-color: #8aadf4 !important; // TODO + --identity-icon-color: #8aadf4 !important; // TODO + } + + .identity-color-turquoise { + --identity-tab-color: #8bd5ca !important; // TODO + --identity-icon-color: #8bd5ca !important; // TODO + } + + .identity-color-green { + --identity-tab-color: #${scheme.base0B} !important; + --identity-icon-color: #${scheme.base0B} !important; + } + + .identity-color-yellow { + --identity-tab-color: #eed49f !important; // TODO + --identity-icon-color: #eed49f !important; // TODO + } + + .identity-color-orange { + --identity-tab-color: #f5a97f !important; // TODO + --identity-icon-color: #f5a97f !important; // TODO + } + + .identity-color-red { + --identity-tab-color: #ed8796 !important; // TODO + --identity-icon-color: #ed8796 !important; // TODO + } + + .identity-color-pink { + --identity-tab-color: #f5bde6 !important; // TODO + --identity-icon-color: #f5bde6 !important; // TODO + } + + .identity-color-purple { + --identity-tab-color: #c6a0f6 !important; // TODO + --identity-icon-color: #c6a0f6 !important; // TODO + } + } + + /* Variables and styles specific to about:addons */ + @-moz-document url-prefix("about:addons") { + :root { + --zen-dark-color-mix-base: #${scheme.base01} !important; + --background-color-box: #${scheme.base00} !important; + } + } + + /* Variables and styles specific to about:protections */ + @-moz-document url-prefix("about:protections") { + :root { + --zen-primary-color: #${scheme.base00} !important; + --social-color: #${scheme.base0E} !important; + --coockie-color: #${scheme.base08} !important; + --fingerprinter-color: #${scheme.base0A} !important; + --cryptominer-color: #${scheme.base07} !important; + --tracker-color: #${scheme.base0B} !important; + --in-content-primary-button-background-hover: rgb(81, 83, 05) !important; + --in-content-primary-button-text-color-hover: #${scheme.base05} !important; + --in-content-primary-button-background: #${scheme.base03} !important; + --in-content-primary-button-text-color: #${scheme.base05} !important; + } + + + .card { + background-color: #${scheme.base02} !important; + } + } + } + ''; + userContent = + /* + css + */ + '' + /* Catppuccin Mocha Blue userChrome.css*/ + @media (prefers-color-scheme: dark) { + + :root { + --zen-colors-primary: #${scheme.base02} !important; + --zen-primary-color: #${scheme.base0D} !important; + --zen-colors-secondary: #${scheme.base02} !important; + --zen-colors-tertiary: #${scheme.base01} !important; + --zen-colors-border: #${scheme.base0D} !important; + --toolbarbutton-icon-fill: #${scheme.base0D} !important; + --lwt-text-color: #${scheme.base05} !important; + --toolbar-field-color: #${scheme.base05} !important; + --tab-selected-textcolor: rgb(171, 197, 247) !important; // TODO + --toolbar-field-focus-color: #${scheme.base05} !important; + --toolbar-color: #${scheme.base05} !important; + --newtab-text-primary-color: #${scheme.base05} !important; + --arrowpanel-color: #${scheme.base05} !important; + --arrowpanel-background: #${scheme.base00} !important; + --sidebar-text-color: #${scheme.base05} !important; + --lwt-sidebar-text-color: #${scheme.base05} !important; + --lwt-sidebar-background-color: #${scheme.base01} !important; //TODO 11111b !important; + --toolbar-bgcolor: #${scheme.base02} !important; + --newtab-background-color: #${scheme.base00} !important; + --zen-themed-toolbar-bg: #${scheme.base01} !important; + --zen-main-browser-background: #${scheme.base01} !important; + } + + #permissions-granted-icon{ + color: #${scheme.base01} !important; + } + + .sidebar-placesTree { + background-color: #${scheme.base00} !important; + } + + #zen-workspaces-button { + background-color: #${scheme.base00} !important; + } + + #TabsToolbar { + background-color: #${scheme.base01} !important; + } + + #urlbar-background { + background-color: #${scheme.base00} !important; + } + + .content-shortcuts { + background-color: #${scheme.base00} !important; + border-color: #${scheme.base0D} !important; + } + + .urlbarView-url { + color: #${scheme.base0D} !important; + } + + #zenEditBookmarkPanelFaviconContainer { + background: #${scheme.base01} !important; + } + + toolbar .toolbarbutton-1 { + &:not([disabled]) { + &:is([open], [checked]) > :is(.toolbarbutton-icon, .toolbarbutton-text, .toolbarbutton-badge-stack){ + fill: #${scheme.base01}; + } + } + } + + .identity-color-blue { + --identity-tab-color: #${scheme.base0D} !important; + --identity-icon-color: #${scheme.base0D} !important; + } + + .identity-color-turquoise { + --identity-tab-color: #${scheme.base0C} !important; + --identity-icon-color: #${scheme.base0C} !important; + } + + .identity-color-green { + --identity-tab-color: #${scheme.base0B} !important; + --identity-icon-color: #${scheme.base0B} !important; + } + + .identity-color-yellow { + --identity-tab-color: #${scheme.base0A} !important; + --identity-icon-color: #${scheme.base0A} !important; + } + + .identity-color-orange { + --identity-tab-color: #${scheme.base09} !important; + --identity-icon-color: #${scheme.base09} !important; + } + + .identity-color-red { + --identity-tab-color: #${scheme.base08} !important; + --identity-icon-color: #${scheme.base08} !important; + } + + .identity-color-pink { + --identity-tab-color: #${scheme.base0F} !important; + --identity-icon-color: #${scheme.base0F} !important; // TODO f5c2e7 + } + + .identity-color-purple { + --identity-tab-color: #${scheme.base0E} !important; + --identity-icon-color: #${scheme.base0E} !important; + } + } + ''; + browsername = config.mods.homePackages.browser; + profiles = + if config.mods.homePackages.browser == "firefox" then + config.mods.browser.firefox.profiles + else if config.mods.homePackages.browser == "zen" then + config.mods.browser.zen.profiles + else if config.mods.homePackages.browser == "librewolf" then + [{name = "default"; value = {};}] + else + []; + profileNamesFn = + builtins.catAttrs "name"; + chromesFn = builtins.map ( + name: + if (builtins.isString browsername) + then { + ".${browsername}/${name}/chrome/userContent.css" = { + text = userChrome; + }; + + ".${browsername}/${name}/chrome/userChrome.css" = { + text = userContent; + }; + } + else {} + ); + moduleFn = lib.lists.foldr (attr1: attr2: attr1 // attr2) {}; + mkFirefoxTheme = (profiles: + profiles + |> profileNamesFn + |> chromesFn + |> moduleFn + ); +in + {home.file = mkFirefoxTheme profiles;} diff --git a/iso/configuration.nix b/iso/configuration.nix index 0f6247d..5745fe7 100644 --- a/iso/configuration.nix +++ b/iso/configuration.nix @@ -31,6 +31,7 @@ in { nix.settings.experimental-features = [ "nix-command" "flakes" + "pipe-operators" ]; # gnome is a good default that works with every gpu and doesn't require knowledge about custom keybinds. diff --git a/modules/programs/browser/foxwrappers.nix b/modules/programs/browser/foxwrappers.nix index a6a5c21..45fcd13 100644 --- a/modules/programs/browser/foxwrappers.nix +++ b/modules/programs/browser/foxwrappers.nix @@ -1,3 +1,4 @@ +# https://github.com/0xc000022070/zen-browser-flake/issues/9#issuecomment-2711057434 {inputs, ...}: let mkFirefoxModule = import "${inputs.home-manager.outPath}/modules/programs/firefox/mkFirefoxModule.nix"; in { From 58c42ed7d80c00a157dd251dca59b1e365e665fe Mon Sep 17 00:00:00 2001 From: DashieTM Date: Thu, 13 Mar 2025 12:29:44 +0100 Subject: [PATCH 010/118] Add librewolf module configuration --- modules/programs/browser/foxwrappers.nix | 17 ++++++ modules/programs/browser/librewolf.nix | 72 ++++++++++++++++++++++-- modules/programs/browser/zen.nix | 43 +++++++++++++- modules/programs/homePackages.nix | 5 +- 4 files changed, 127 insertions(+), 10 deletions(-) diff --git a/modules/programs/browser/foxwrappers.nix b/modules/programs/browser/foxwrappers.nix index 45fcd13..fc166cb 100644 --- a/modules/programs/browser/foxwrappers.nix +++ b/modules/programs/browser/foxwrappers.nix @@ -22,5 +22,22 @@ in { }; }; }) + (mkFirefoxModule { + modulePath = [ + "programs" + "librewolf-dashnix" + ]; + name = "LibreWolf"; + description = "LibreWolf is a privacy enhanced Firefox fork."; + wrappedPackageName = "librewolf"; + unwrappedPackageName = "librewolf-unwrapped"; + + platforms.linux = {configPath = ".librewolf";}; + platforms.darwin = { + configPath = "Library/Application Support/LibreWolf"; + }; + + enableBookmarks = false; + }) ]; } diff --git a/modules/programs/browser/librewolf.nix b/modules/programs/browser/librewolf.nix index 9a17bda..8bbbfd5 100644 --- a/modules/programs/browser/librewolf.nix +++ b/modules/programs/browser/librewolf.nix @@ -2,6 +2,7 @@ lib, config, options, + pkgs, ... }: { options.mods.browser.librewolf = { @@ -11,18 +12,79 @@ type = lib.types.bool; description = "Enables the librwolf browser"; }; - settings = lib.mkOption { - default = {}; + configuration = lib.mkOption { + default = { + EnableTrackingProtection = { + Value = true; + Locked = true; + Cryptomining = true; + Fingerprinting = true; + }; + DisablePocket = true; + DisplayBookmarksToolbar = "never"; + DisplayMenuBar = "default-off"; + CaptivePortal = false; + DisableFirefoxStudies = true; + DisableTelemetry = true; + DisableFirefoxAccounts = false; + NoDefaultBookmarks = true; + OfferToSaveLogins = false; + OfferToSaveLoginsDefault = false; + PasswordManagerEnabled = false; + FirefoxHome = { + Search = true; + Pocket = false; + Snippets = false; + TopSites = true; + Highlights = false; + }; + UserMessaging = { + ExtensionRecommendations = false; + SkipOnboarding = true; + }; + }; example = {}; type = with lib.types; attrsOf anything; - description = "librewolf settings"; + description = "Librewolf policy configuration. See https://mozilla.github.io/policy-templates/ for more information."; + }; + profiles = lib.mkOption { + default = [ + { + name = "${config.conf.username}"; + value = { + isDefault = true; + id = 0; + }; + } + { + name = "special"; + value = { + isDefault = false; + id = 1; + }; + } + ]; + example = [ + { + name = "custom"; + value = { + isDefault = true; + id = 0; + extensions.packages = [pkgs.nur.repos.rycee.firefox-addons.darkreader]; + }; + } + ]; + type = with lib.types; listOf (attrsOf anything); + description = "Librewolf profiles"; }; }; config = lib.mkIf config.mods.browser.librewolf.enable ( lib.optionalAttrs (options ? home.packages) { - programs.librewolf = { + programs.librewolf-dashnix = { enable = true; - settings = config.mods.browser.librewolf.settings; + package = pkgs.librewolf; + policies = config.mods.browser.librewolf.configuration; + profiles = builtins.listToAttrs config.mods.browser.librewolf.profiles; }; } ); diff --git a/modules/programs/browser/zen.nix b/modules/programs/browser/zen.nix index ced52ea..33f2da8 100644 --- a/modules/programs/browser/zen.nix +++ b/modules/programs/browser/zen.nix @@ -46,13 +46,37 @@ }; example = {}; type = with lib.types; attrsOf anything; - description = "Zen policy configuration. See https://mozilla.github.io/policy-templates/ for more information."; + description = "Zen policy configuration. See https://mozilla.github.io/policy-templates for more information."; }; profiles = lib.mkOption { - default = [ + default = let + extensions = [ + pkgs.nur.repos.rycee.firefox-addons.darkreader + pkgs.nur.repos.rycee.firefox-addons.ublock-origin + pkgs.nur.repos.rycee.firefox-addons.ghostery + pkgs.nur.repos.rycee.firefox-addons.canvasblocker + pkgs.nur.repos.rycee.firefox-addons.i-dont-care-about-cookies + pkgs.nur.repos.rycee.firefox-addons.keepassxc-browser + pkgs.nur.repos.rycee.firefox-addons.vimium + pkgs.nur.repos.rycee.firefox-addons.react-devtools + pkgs.nur.repos.rycee.firefox-addons.reduxdevtools + pkgs.nur.repos.rycee.firefox-addons.user-agent-string-switcher + pkgs.nur.repos.rycee.firefox-addons.private-relay + ]; + in [ { name = "${config.conf.username}"; value = { + settings = { + zen.view.compact.hide-tabbar = false; + zen.view.compact.hide-toolbar = true; + zen.view.sidebar-expanded = false; + zen.view.use-single-toolbar = false; + zen.view.welcome-screen.seen = true; + zen.theme.accent-color = "#b4bbff"; + extensions.autoDisableScopes = 0; + }; + extensions.packages = extensions; isDefault = true; id = 0; }; @@ -60,6 +84,16 @@ { name = "special"; value = { + settings = { + zen.view.compact.hide-tabbar = false; + zen.view.compact.hide-toolbar = true; + zen.view.sidebar-expanded = false; + zen.view.use-single-toolbar = false; + zen.view.welcome-screen.seen = true; + zen.theme.accent-color = "#b4bbff"; + extensions.autoDisableScopes = 0; + }; + extensions.packages = extensions; isDefault = false; id = 1; }; @@ -69,9 +103,12 @@ { name = "custom"; value = { + settings = { + extensions.autoDisableScopes = 0; + }; + extensions.packages = [pkgs.nur.repos.rycee.firefox-addons.darkreader]; isDefault = true; id = 0; - extensions.packages = [pkgs.nur.repos.rycee.firefox-addons.darkreader]; }; } ]; diff --git a/modules/programs/homePackages.nix b/modules/programs/homePackages.nix index 4ca908b..8df753f 100644 --- a/modules/programs/homePackages.nix +++ b/modules/programs/homePackages.nix @@ -161,9 +161,10 @@ in { } else if config.mods.homePackages.browser == "librewolf" then { - librewolf = { + librewolf-dashnix = { enable = true; - settings = config.mods.browser.librewolf.settings; + policies = config.mods.browser.librewolf.configuration; + profiles = builtins.listToAttrs config.mods.browser.librewolf.profiles; }; } else {} From 4f04b5d683792185b7708781a8762f88858b5c54 Mon Sep 17 00:00:00 2001 From: DashieTM Date: Fri, 14 Mar 2025 23:10:08 +0100 Subject: [PATCH 011/118] Add zen extension config and fix zen policy config --- docs/src/README.md | 1 + flake.lock | 154 ++++---- flake.nix | 19 +- home/default.nix | 4 +- lib/default.nix | 18 +- modules/programs/browser/darkeader.patch | 456 +++++++++++++++++++++++ modules/programs/browser/darkreader.nix | 23 ++ modules/programs/browser/foxwrappers.nix | 4 +- modules/programs/browser/zen.nix | 103 +++-- modules/programs/drives.nix | 2 +- modules/programs/homePackages.nix | 7 +- 11 files changed, 647 insertions(+), 144 deletions(-) create mode 100644 modules/programs/browser/darkeader.patch create mode 100644 modules/programs/browser/darkreader.nix diff --git a/docs/src/README.md b/docs/src/README.md index 7141724..fa1d1e3 100644 --- a/docs/src/README.md +++ b/docs/src/README.md @@ -271,4 +271,5 @@ For package lists, please check the individual modules, as the lists can be long - [Catppuccin](https://github.com/catppuccin) for base16 colors and zen-browser css - [Danth](https://github.com/danth) for providing a base for the nix docs - [chermnyx](https://github.com/chermnyx) for providing a base for zen configuration +- [voronind-com](https://github.com/voronind-com) for providing the darkreader configuration - [Nix-Artwork](https://github.com/NixOS/nixos-artwork/tree/master/logo) for the Nix/NixOS logo (Tim Cuthbertson (@timbertson)) diff --git a/flake.lock b/flake.lock index 8f2283a..46c9e0f 100644 --- a/flake.lock +++ b/flake.lock @@ -942,7 +942,7 @@ "home-manager_2": { "inputs": { "nixpkgs": [ - "nixpkgs" + "unstable" ] }, "locked": { @@ -1265,7 +1265,7 @@ "crane": "crane", "naersk": "naersk", "nixpkgs": [ - "nixpkgs" + "unstable" ], "rust-overlay": "rust-overlay" }, @@ -1435,13 +1435,13 @@ "locked": { "lastModified": 1741379970, "narHash": "sha256-Wh7esNh7G24qYleLvgOSY/7HlDUzWaL/n4qzlBePpiw=", - "owner": "NixOs", + "owner": "nixos", "repo": "nixpkgs", "rev": "36fd87baa9083f34f7f5027900b62ee6d09b1f2f", "type": "github" }, "original": { - "owner": "NixOs", + "owner": "nixos", "ref": "nixos-unstable", "repo": "nixpkgs", "type": "github" @@ -1449,15 +1449,15 @@ }, "nixpkgs_11": { "locked": { - "lastModified": 1741379970, - "narHash": "sha256-Wh7esNh7G24qYleLvgOSY/7HlDUzWaL/n4qzlBePpiw=", - "owner": "nixos", + "lastModified": 1716137900, + "narHash": "sha256-sowPU+tLQv8GlqtVtsXioTKeaQvlMz/pefcdwg8MvfM=", + "owner": "NixOS", "repo": "nixpkgs", - "rev": "36fd87baa9083f34f7f5027900b62ee6d09b1f2f", + "rev": "6c0b7a92c30122196a761b440ac0d46d3d9954f1", "type": "github" }, "original": { - "owner": "nixos", + "owner": "NixOS", "ref": "nixos-unstable", "repo": "nixpkgs", "type": "github" @@ -1481,37 +1481,21 @@ }, "nixpkgs_13": { "locked": { - "lastModified": 1716137900, - "narHash": "sha256-sowPU+tLQv8GlqtVtsXioTKeaQvlMz/pefcdwg8MvfM=", + "lastModified": 1706487304, + "narHash": "sha256-LE8lVX28MV2jWJsidW13D2qrHU/RUUONendL2Q/WlJg=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "6c0b7a92c30122196a761b440ac0d46d3d9954f1", + "rev": "90f456026d284c22b3e3497be980b2e47d0b28ac", "type": "github" }, "original": { "owner": "NixOS", - "ref": "nixos-unstable", + "ref": "nixpkgs-unstable", "repo": "nixpkgs", "type": "github" } }, "nixpkgs_14": { - "locked": { - "lastModified": 1706487304, - "narHash": "sha256-LE8lVX28MV2jWJsidW13D2qrHU/RUUONendL2Q/WlJg=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "90f456026d284c22b3e3497be980b2e47d0b28ac", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_15": { "locked": { "lastModified": 1716137900, "narHash": "sha256-sowPU+tLQv8GlqtVtsXioTKeaQvlMz/pefcdwg8MvfM=", @@ -1527,7 +1511,7 @@ "type": "github" } }, - "nixpkgs_16": { + "nixpkgs_15": { "locked": { "lastModified": 1706487304, "narHash": "sha256-LE8lVX28MV2jWJsidW13D2qrHU/RUUONendL2Q/WlJg=", @@ -1543,7 +1527,7 @@ "type": "github" } }, - "nixpkgs_17": { + "nixpkgs_16": { "locked": { "lastModified": 1723637854, "narHash": "sha256-med8+5DSWa2UnOqtdICndjDAEjxr5D7zaIiK4pn0Q7c=", @@ -1559,7 +1543,7 @@ "type": "github" } }, - "nixpkgs_18": { + "nixpkgs_17": { "locked": { "lastModified": 1716137900, "narHash": "sha256-sowPU+tLQv8GlqtVtsXioTKeaQvlMz/pefcdwg8MvfM=", @@ -1575,7 +1559,7 @@ "type": "github" } }, - "nixpkgs_19": { + "nixpkgs_18": { "locked": { "lastModified": 1706487304, "narHash": "sha256-LE8lVX28MV2jWJsidW13D2qrHU/RUUONendL2Q/WlJg=", @@ -1591,6 +1575,22 @@ "type": "github" } }, + "nixpkgs_19": { + "locked": { + "lastModified": 1739446958, + "narHash": "sha256-+/bYK3DbPxMIvSL4zArkMX0LQvS7rzBKXnDXLfKyRVc=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "2ff53fe64443980e139eaa286017f53f88336dd0", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, "nixpkgs_2": { "locked": { "lastModified": 1741379970, @@ -1608,22 +1608,6 @@ } }, "nixpkgs_20": { - "locked": { - "lastModified": 1739446958, - "narHash": "sha256-+/bYK3DbPxMIvSL4zArkMX0LQvS7rzBKXnDXLfKyRVc=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "2ff53fe64443980e139eaa286017f53f88336dd0", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_21": { "locked": { "lastModified": 1736320768, "narHash": "sha256-nIYdTAiKIGnFNugbomgBJR+Xv5F1ZQU+HfaBqJKroC0=", @@ -1639,7 +1623,7 @@ "type": "github" } }, - "nixpkgs_22": { + "nixpkgs_21": { "locked": { "lastModified": 1716948383, "narHash": "sha256-SzDKxseEcHR5KzPXLwsemyTR/kaM9whxeiJohbL04rs=", @@ -1655,7 +1639,7 @@ "type": "github" } }, - "nixpkgs_23": { + "nixpkgs_22": { "locked": { "lastModified": 1706487304, "narHash": "sha256-LE8lVX28MV2jWJsidW13D2qrHU/RUUONendL2Q/WlJg=", @@ -1671,7 +1655,7 @@ "type": "github" } }, - "nixpkgs_24": { + "nixpkgs_23": { "locked": { "lastModified": 1731763621, "narHash": "sha256-ddcX4lQL0X05AYkrkV2LMFgGdRvgap7Ho8kgon3iWZk=", @@ -1687,7 +1671,7 @@ "type": "github" } }, - "nixpkgs_25": { + "nixpkgs_24": { "locked": { "lastModified": 1740367490, "narHash": "sha256-WGaHVAjcrv+Cun7zPlI41SerRtfknGQap281+AakSAw=", @@ -1703,13 +1687,13 @@ "type": "github" } }, - "nixpkgs_26": { + "nixpkgs_25": { "locked": { - "lastModified": 1741379970, - "narHash": "sha256-Wh7esNh7G24qYleLvgOSY/7HlDUzWaL/n4qzlBePpiw=", + "lastModified": 1741513245, + "narHash": "sha256-7rTAMNTY1xoBwz0h7ZMtEcd8LELk9R5TzBPoHuhNSCk=", "owner": "nixos", "repo": "nixpkgs", - "rev": "36fd87baa9083f34f7f5027900b62ee6d09b1f2f", + "rev": "e3e32b642a31e6714ec1b712de8c91a3352ce7e1", "type": "github" }, "original": { @@ -1852,7 +1836,7 @@ "nur": { "inputs": { "flake-parts": "flake-parts_6", - "nixpkgs": "nixpkgs_11", + "nixpkgs": "nixpkgs_10", "treefmt-nix": "treefmt-nix" }, "locked": { @@ -1919,7 +1903,7 @@ "oxicalc": { "inputs": { "flake-parts": "flake-parts_7", - "nixpkgs": "nixpkgs_12" + "nixpkgs": "nixpkgs_11" }, "locked": { "lastModified": 1733264508, @@ -1938,7 +1922,7 @@ "oxidash": { "inputs": { "flake-parts": "flake-parts_8", - "nixpkgs": "nixpkgs_13", + "nixpkgs": "nixpkgs_12", "rust-overlay": "rust-overlay_2" }, "locked": { @@ -1958,7 +1942,7 @@ "oxinoti": { "inputs": { "flake-parts": "flake-parts_9", - "nixpkgs": "nixpkgs_15", + "nixpkgs": "nixpkgs_14", "rust-overlay": "rust-overlay_3" }, "locked": { @@ -1978,7 +1962,7 @@ "oxipaste": { "inputs": { "flake-parts": "flake-parts_10", - "nixpkgs": "nixpkgs_17" + "nixpkgs": "nixpkgs_16" }, "locked": { "lastModified": 1737624143, @@ -1997,7 +1981,7 @@ "oxishut": { "inputs": { "flake-parts": "flake-parts_11", - "nixpkgs": "nixpkgs_18", + "nixpkgs": "nixpkgs_17", "rust-overlay": "rust-overlay_4" }, "locked": { @@ -2040,7 +2024,7 @@ "reset": { "inputs": { "flake-parts": "flake-parts_12", - "nixpkgs": "nixpkgs_20", + "nixpkgs": "nixpkgs_19", "rust-overlay": "rust-overlay_5" }, "locked": { @@ -2060,7 +2044,7 @@ "reset-plugins": { "inputs": { "flake-parts": "flake-parts_13", - "nixpkgs": "nixpkgs_22", + "nixpkgs": "nixpkgs_21", "rust-overlay": "rust-overlay_6" }, "locked": { @@ -2090,7 +2074,6 @@ "hyprland": "hyprland", "ironbar": "ironbar", "nix-flatpak": "nix-flatpak", - "nixpkgs": "nixpkgs_10", "nur": "nur", "oxicalc": "oxicalc", "oxidash": "oxidash", @@ -2102,6 +2085,7 @@ "sops-nix": "sops-nix", "stable": "stable", "stylix": "stylix", + "unstable": "unstable", "zen-browser": "zen-browser" } }, @@ -2163,7 +2147,7 @@ "rust-overlay_2": { "inputs": { "flake-utils": "flake-utils_2", - "nixpkgs": "nixpkgs_14" + "nixpkgs": "nixpkgs_13" }, "locked": { "lastModified": 1716171463, @@ -2182,7 +2166,7 @@ "rust-overlay_3": { "inputs": { "flake-utils": "flake-utils_3", - "nixpkgs": "nixpkgs_16" + "nixpkgs": "nixpkgs_15" }, "locked": { "lastModified": 1716171463, @@ -2201,7 +2185,7 @@ "rust-overlay_4": { "inputs": { "flake-utils": "flake-utils_4", - "nixpkgs": "nixpkgs_19" + "nixpkgs": "nixpkgs_18" }, "locked": { "lastModified": 1716171463, @@ -2219,7 +2203,7 @@ }, "rust-overlay_5": { "inputs": { - "nixpkgs": "nixpkgs_21" + "nixpkgs": "nixpkgs_20" }, "locked": { "lastModified": 1739586408, @@ -2238,7 +2222,7 @@ "rust-overlay_6": { "inputs": { "flake-utils": "flake-utils_5", - "nixpkgs": "nixpkgs_23" + "nixpkgs": "nixpkgs_22" }, "locked": { "lastModified": 1717035469, @@ -2256,7 +2240,7 @@ }, "sops-nix": { "inputs": { - "nixpkgs": "nixpkgs_24" + "nixpkgs": "nixpkgs_23" }, "locked": { "lastModified": 1741043164, @@ -2300,7 +2284,7 @@ "git-hooks": "git-hooks", "gnome-shell": "gnome-shell", "home-manager": "home-manager_3", - "nixpkgs": "nixpkgs_25", + "nixpkgs": "nixpkgs_24", "nur": "nur_2", "systems": "systems_9", "tinted-foot": "tinted-foot", @@ -2583,6 +2567,22 @@ "type": "github" } }, + "unstable": { + "locked": { + "lastModified": 1741851582, + "narHash": "sha256-cPfs8qMccim2RBgtKGF+x9IBCduRvd/N5F4nYpU0TVE=", + "owner": "NixOs", + "repo": "nixpkgs", + "rev": "6607cf789e541e7873d40d3a8f7815ea92204f32", + "type": "github" + }, + "original": { + "owner": "NixOs", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, "xdph": { "inputs": { "hyprland-protocols": [ @@ -2626,14 +2626,14 @@ }, "zen-browser": { "inputs": { - "nixpkgs": "nixpkgs_26" + "nixpkgs": "nixpkgs_25" }, "locked": { - "lastModified": 1741493092, - "narHash": "sha256-jShBVqU8K5rN8xtsq2JDgq+KInRw3pDbp8SViMIz5pE=", + "lastModified": 1741838758, + "narHash": "sha256-nGTC/y9e+1+QIVCzIbiSpPiXM2HfS8YwIDCp52CcOQ4=", "owner": "youwen5", "repo": "zen-browser-flake", - "rev": "117945c4162d78f2cc7ad578cf44edbbf1ee33fb", + "rev": "03a7fc89bc48344aed00e01b409c1d6ffc4c52ce", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 5eeb4a4..a418e8b 100644 --- a/flake.nix +++ b/flake.nix @@ -2,7 +2,7 @@ description = "DashNix"; inputs = { - nixpkgs.url = "github:NixOs/nixpkgs/nixos-unstable"; + unstable.url = "github:NixOs/nixpkgs/nixos-unstable"; stable.url = "github:NixOs/nixpkgs/nixos-24.11"; nur.url = "github:nix-community/NUR"; @@ -12,7 +12,7 @@ home-manager = { url = "github:nix-community/home-manager"; - inputs.nixpkgs.follows = "nixpkgs"; + inputs.nixpkgs.follows = "unstable"; }; sops-nix.url = "github:Mic92/sops-nix"; @@ -26,7 +26,7 @@ ironbar = { url = "github:JakeStanger/ironbar"; - inputs.nixpkgs.follows = "nixpkgs"; + inputs.nixpkgs.follows = "unstable"; }; zen-browser.url = "github:youwen5/zen-browser-flake"; @@ -84,7 +84,7 @@ inputs.chaoticNyx.overlays.default ]; }; - pkgs = import inputs.nixpkgs { + unstable = import inputs.unstable { system = currentSystem; config = { allowUnsupportedSystem = true; @@ -103,21 +103,22 @@ inherit self inputs - pkgs + unstable stable ; system = currentSystem; - lib = inputs.nixpkgs.lib; + lib = inputs.unstable.lib; }; docs = import ./docs { - inherit inputs pkgs stable; + inherit inputs; + pkgs = unstable; system = currentSystem; - lib = inputs.nixpkgs.lib; + lib = inputs.unstable.lib; build_systems = dashNixLib.build_systems; }; dashNixInputs = inputs; stablePkgs = stable; - unstablePkgs = pkgs; + unstablePkgs = unstable; modules = ./modules; iso = dashNixLib.buildIso.config.system.build.isoImage; }; diff --git a/home/default.nix b/home/default.nix index 50f1c66..5cd013a 100644 --- a/home/default.nix +++ b/home/default.nix @@ -11,6 +11,8 @@ root, alternativePkgs, system, + stable, + unstable, ... }: { xdg = { @@ -24,7 +26,7 @@ useGlobalPkgs = true; useUserPackages = true; extraSpecialArgs = { - inherit inputs root additionalInputs alternativePkgs system; + inherit inputs root additionalInputs alternativePkgs system stable unstable; }; users.${config.conf.username} = { diff --git a/lib/default.nix b/lib/default.nix index 5bd2ce3..3b01e7e 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -1,7 +1,7 @@ { inputs, lib, - pkgs, + unstable, self, stable, system, @@ -87,15 +87,17 @@ additionalHomeConfig system root + stable + unstable ; pkgs = lib.mkForce ( if overridePkgs then stable - else pkgs + else unstable ); alternativePkgs = if overridePkgs - then pkgs + then unstable else stable; hostName = name; homeMods = mods.home; @@ -103,7 +105,7 @@ additionalInputs = additionalInputs; }; in - inputs.nixpkgs.lib.nixosSystem { + inputs.unstable.lib.nixosSystem { modules = [ {_module.args = args;} @@ -111,8 +113,8 @@ ] ++ mods.nixos ++ additionalMods.nixos - ++ inputs.nixpkgs.lib.optional (builtins.pathExists additionalNixosConfig) additionalNixosConfig - ++ inputs.nixpkgs.lib.optional (builtins.pathExists mod) mod; + ++ inputs.unstable.lib.optional (builtins.pathExists additionalNixosConfig) additionalNixosConfig + ++ inputs.unstable.lib.optional (builtins.pathExists mod) mod; }; }) ( @@ -127,9 +129,9 @@ ) ); - buildIso = inputs.nixpkgs.lib.nixosSystem { + buildIso = inputs.unstable.lib.nixosSystem { specialArgs = { - inherit self inputs pkgs; + inherit self inputs unstable; }; modules = [ ../iso/configuration.nix diff --git a/modules/programs/browser/darkeader.patch b/modules/programs/browser/darkeader.patch new file mode 100644 index 0000000..f1663df --- /dev/null +++ b/modules/programs/browser/darkeader.patch @@ -0,0 +1,456 @@ +diff --git a/src/background/user-storage.ts b/src/background/user-storage.ts +index 54612fb3b1f6..298e5032fc94 100644 +--- a/src/background/user-storage.ts ++++ b/src/background/user-storage.ts +@@ -5,7 +5,7 @@ import {PromiseBarrier} from '../utils/promise-barrier'; + import {isURLMatched} from '../utils/url'; + import {validateSettings} from '../utils/validation'; + +-import {readSyncStorage, readLocalStorage, writeSyncStorage, writeLocalStorage, removeSyncStorage, removeLocalStorage} from './utils/extension-api'; ++import {readManagedStorage, readSyncStorage, readLocalStorage, writeSyncStorage, writeLocalStorage, removeSyncStorage, removeLocalStorage} from './utils/extension-api'; + import {logWarn} from './utils/log'; + + +@@ -78,12 +78,7 @@ export default class UserStorage { + return settings; + } + +- private static async loadSettingsFromStorage(): Promise { +- if (UserStorage.loadBarrier) { +- return await UserStorage.loadBarrier.entry(); +- } +- UserStorage.loadBarrier = new PromiseBarrier(); +- ++ private static async loadSettingsFromStorageWithoutManaged(): Promise { + let local = await readLocalStorage(DEFAULT_SETTINGS); + + if (local.schemeVersion < 2) { +@@ -113,10 +108,8 @@ export default class UserStorage { + if (local.syncSettings == null) { + local.syncSettings = DEFAULT_SETTINGS.syncSettings; + } ++ + if (!local.syncSettings) { +- UserStorage.migrateAutomationSettings(local); +- UserStorage.fillDefaults(local); +- UserStorage.loadBarrier.resolve(local); + return local; + } + +@@ -126,18 +119,34 @@ export default class UserStorage { + local.syncSettings = false; + UserStorage.set({syncSettings: false}); + UserStorage.saveSyncSetting(false); +- UserStorage.loadBarrier.resolve(local); + return local; + } + + const {errors: syncCfgErrors} = validateSettings($sync); + syncCfgErrors.forEach((err) => logWarn(err)); ++ return $sync; ++ } ++ ++ private static async loadSettingsFromStorage(): Promise { ++ if (UserStorage.loadBarrier) { ++ return await UserStorage.loadBarrier.entry(); ++ } ++ UserStorage.loadBarrier = new PromiseBarrier(); + +- UserStorage.migrateAutomationSettings($sync); +- UserStorage.fillDefaults($sync); ++ let settings = await UserStorage.loadSettingsFromStorageWithoutManaged(); + +- UserStorage.loadBarrier.resolve($sync); +- return $sync; ++ const managed = await readManagedStorage(settings); ++ const {errors: managedCfgErrors} = validateSettings(managed); ++ if (managedCfgErrors.length === 0) { ++ settings = managed; ++ } else { ++ managedCfgErrors.forEach((err) => logWarn(err)); ++ } ++ ++ UserStorage.migrateAutomationSettings(settings); ++ UserStorage.fillDefaults(settings); ++ UserStorage.loadBarrier.resolve(settings); ++ return settings; + } + + static async saveSettings(): Promise { +diff --git a/src/background/utils/extension-api.ts b/src/background/utils/extension-api.ts +index 6d18fc0919df..6812ac2e4224 100644 +--- a/src/background/utils/extension-api.ts ++++ b/src/background/utils/extension-api.ts +@@ -97,6 +97,19 @@ export async function readLocalStorage(defaults: + }); + } + ++export async function readManagedStorage(defaults: T): Promise { ++ return new Promise((resolve) => { ++ chrome.storage.managed.get(defaults, (managed: T) => { ++ if (chrome.runtime.lastError) { ++ console.error(chrome.runtime.lastError.message); ++ resolve(defaults); ++ return; ++ } ++ resolve(managed); ++ }); ++ }); ++} ++ + function prepareSyncStorage(values: T): {[key: string]: any} { + for (const key in values) { + const value = values[key]; +diff --git a/src/managed-storage.json b/src/managed-storage.json +new file mode 100644 +index 000000000000..e394d0f1ff60 +--- /dev/null ++++ b/src/managed-storage.json +@@ -0,0 +1,304 @@ ++{ ++ ++ "$schema": "http://json-schema.org/draft-07/schema#", ++ "type": "object", ++ "properties": { ++ "schemeVersion": { ++ "type": "integer" ++ }, ++ "enabled": { ++ "type": "boolean" ++ }, ++ "fetchNews": { ++ "type": "boolean" ++ }, ++ "theme": { ++ "$ref": "Theme" ++ }, ++ "presets": { ++ "type": "array", ++ "items": { ++ "$ref": "ThemePreset" ++ } ++ }, ++ "customThemes": { ++ "type": "array", ++ "items": { ++ "$ref": "CustomSiteConfig" ++ } ++ }, ++ "enabledByDefault": { ++ "type": "boolean" ++ }, ++ "enabledFor": { ++ "type": "array", ++ "items": { ++ "type": "string", ++ "minLength": 1 ++ } ++ }, ++ "disabledFor": { ++ "type": "array", ++ "items": { ++ "type": "string", ++ "minLength": 1 ++ } ++ }, ++ "changeBrowserTheme": { ++ "type": "boolean" ++ }, ++ "syncSettings": { ++ "type": "boolean" ++ }, ++ "syncSitesFixes": { ++ "type": "boolean" ++ }, ++ "automation": { ++ "$ref": "Automation" ++ }, ++ "time": { ++ "$ref": "TimeSettings" ++ }, ++ "location": { ++ "$ref": "LocationSettings" ++ }, ++ "previewNewDesign": { ++ "type": "boolean" ++ }, ++ "previewNewestDesign": { ++ "type": "boolean" ++ }, ++ "enableForPDF": { ++ "type": "boolean" ++ }, ++ "enableForProtectedPages": { ++ "type": "boolean" ++ }, ++ "enableContextMenus": { ++ "type": "boolean" ++ }, ++ "detectDarkTheme": { ++ "type": "boolean" ++ }, ++ // Chrome's JSON schema format is weird and doesn't support `definitions` property and thus `#/definitions` references ++ // https://datatracker.ietf.org/doc/html/draft-zyp-json-schema-03 ++ // This "property" mimics it ++ "definitions": { ++ "type": "object", ++ "properties": { ++ "Theme": { ++ "id": "Theme", ++ "type": "object", ++ "properties": { ++ "mode": { ++ "$ref": "FilterMode" ++ }, ++ "brightness": { ++ "type": "integer", ++ "minimum": 0, ++ "maximum": 200 ++ }, ++ "contrast": { ++ "type": "integer", ++ "minimum": 0, ++ "maximum": 200 ++ }, ++ "grayscale": { ++ "type": "integer", ++ "minimum": 0, ++ "maximum": 100 ++ }, ++ "sepia": { ++ "type": "integer", ++ "minimum": 0, ++ "maximum": 100 ++ }, ++ "useFont": { ++ "type": "boolean" ++ }, ++ "fontFamily": { ++ "type": "string", ++ "minLength": 1 ++ }, ++ "textStroke": { ++ "type": "number" ++ }, ++ "engine": { ++ "type": "string", ++ "enum": [ ++ "cssFilter", ++ "svgFilter", ++ "staticTheme", ++ "dynamicTheme" ++ ] ++ }, ++ "stylesheet": { ++ "type": "string" ++ }, ++ "darkSchemeBackgroundColor": { ++ "$ref": "HexColor" ++ }, ++ "darkSchemeTextColor": { ++ "$ref": "HexColor" ++ }, ++ "lightSchemeBackgroundColor": { ++ "$ref": "HexColor" ++ }, ++ "lightSchemeTextColor": { ++ "$ref": "HexColor" ++ }, ++ "scrollbarColor": { ++ "$ref": "HexColorOrAuto" ++ }, ++ "selectionColor": { ++ "$ref": "HexColorOrAuto" ++ }, ++ "styleSystemControls": { ++ "type": "boolean" ++ }, ++ "lightColorScheme": { ++ "type": "string", ++ "minLength": 1 ++ }, ++ "darkColorScheme": { ++ "type": "string", ++ "minLength": 1 ++ }, ++ "immediateModify": { ++ "type": "boolean" ++ } ++ } ++ }, ++ "HexColor": { ++ "id": "HexColor", ++ "type": "string", ++ "pattern": "^[0-9a-f]{6}$" ++ }, ++ "HexColorOrAuto": { ++ "id": "HexColorOrAuto", ++ "type": "string", ++ "pattern": "^([0-9a-f]{6}|auto)$" ++ }, ++ "FilterMode": { ++ "id": "FilterMode", ++ "type": "integer", ++ "enum": [ ++ 0, ++ 1 ++ ] ++ }, ++ "ThemePreset": { ++ "id": "ThemePreset", ++ "type": "object", ++ "properties": { ++ "id": { ++ "type": "string", ++ "minLength": 1 ++ }, ++ "name": { ++ "type": "string", ++ "minLength": 1 ++ }, ++ "urls": { ++ "type": "array", ++ "items": { ++ "type": "string", ++ "minLength": 1 ++ } ++ }, ++ "theme": { ++ "$ref": "Theme" ++ } ++ }, ++ "required": [ ++ "id", ++ "name", ++ "urls", ++ "theme" ++ ] ++ }, ++ "CustomSiteConfig": { ++ "id": "CustomSiteConfig", ++ "type": "object", ++ "properties": { ++ "url": { ++ "type": "array", ++ "items": { ++ "type": "string", ++ "minLength": 1 ++ } ++ }, ++ "theme": { ++ "$ref": "Theme" ++ }, ++ "builtin": { ++ "type": "boolean" ++ } ++ }, ++ "required": [ ++ "url", ++ "theme" ++ ] ++ }, ++ "Automation": { ++ "id": "Automation", ++ "type": "object", ++ "properties": { ++ "enabled": { ++ "type": "boolean" ++ }, ++ "mode": { ++ "$ref": "AutomationMode" ++ }, ++ "behavior": { ++ "type": "string", ++ "enum": [ ++ "OnOff", ++ "Scheme" ++ ] ++ } ++ } ++ }, ++ "AutomationMode": { ++ "id": "AutomationMode", ++ "type": "string", ++ "enum": [ ++ "", ++ "time", ++ "system", ++ "location" ++ ] ++ }, ++ "TimeSettings": { ++ "id": "TimeSettings", ++ "type": "object", ++ "properties": { ++ "activation": { ++ "$ref": "Time" ++ }, ++ "deactivation": { ++ "$ref": "Time" ++ } ++ } ++ }, ++ "Time": { ++ "id": "Time", ++ "type": "string", ++ "pattern": "^((0?[0-9])|(1[0-9])|(2[0-3])):([0-5][0-9])$" ++ }, ++ "LocationSettings": { ++ "id": "LocationSettings", ++ "type": "object", ++ "properties": { ++ "latitude": { ++ "type": "number" ++ }, ++ "longitude": { ++ "type": "number" ++ } ++ } ++ } ++ } ++ } ++ } ++} +diff --git a/tasks/bundle-manifest.js b/tasks/bundle-manifest.js +index ae29531e67b7..f4058a129f52 100644 +--- a/tasks/bundle-manifest.js ++++ b/tasks/bundle-manifest.js +@@ -4,6 +4,7 @@ import {PLATFORM} from './platform.js'; + import * as reload from './reload.js'; + import {createTask} from './task.js'; + import {readJSON, writeJSON} from './utils.js'; ++import {copyFile} from 'node:fs/promises'; + + async function patchManifest(platform, debug, watch, test) { + const manifest = await readJSON(absolutePath('src/manifest.json')); +@@ -16,6 +17,11 @@ async function patchManifest(platform, debug, watch, test) { + if (platform === PLATFORM.CHROMIUM_MV3) { + patched.browser_action = undefined; + } ++ if (platform === PLATFORM.CHROMIUM_MV2 || platform === PLATFORM.CHROMIUM_MV3) { ++ patched.storage = { ++ managed_schema: 'managed-storage.json', ++ }; ++ } + if (debug) { + patched.version = '1'; + patched.description = `Debug build, platform: ${platform}, watch: ${watch ? 'yes' : 'no'}.`; +@@ -42,6 +48,9 @@ async function manifests({platforms, debug, watch, test}) { + const manifest = await patchManifest(platform, debug, watch, test); + const destDir = getDestDir({debug, platform}); + await writeJSON(`${destDir}/manifest.json`, manifest); ++ if (platform === PLATFORM.CHROMIUM_MV2 || platform === PLATFORM.CHROMIUM_MV3) { ++ await copyFile(absolutePath('src/managed-storage.json'), `${destDir}/managed-storage.json`); ++ } + } + } + +@@ -49,7 +58,7 @@ const bundleManifestTask = createTask( + 'bundle-manifest', + manifests, + ).addWatcher( +- ['src/manifest*.json'], ++ ['src/manifest*.json', 'src/managed-storage.json'], + async (changedFiles, _, buildPlatforms) => { + const chrome = changedFiles.some((file) => file.endsWith('manifest.json')); + const platforms = {}; diff --git a/modules/programs/browser/darkreader.nix b/modules/programs/browser/darkreader.nix new file mode 100644 index 0000000..a1c462a --- /dev/null +++ b/modules/programs/browser/darkreader.nix @@ -0,0 +1,23 @@ +# credits to Voronind for darkreader config https://github.com/voronind-com/nix/blob/main/home/program/firefox/default.nix +{ + lib, + stable, + ... +}: +stable.buildNpmPackage rec { + version = "4.9.99"; + pname = "dark-reader"; + npmDepsHash = "sha256-m41HkwgbeRRmxJALQFJl/grYjjIqFOc47ltaesob1FA="; + env.ESBUILD_BINARY_PATH = lib.getExe stable.esbuild; + patches = [./darkeader.patch]; + src = stable.fetchFromGitHub { + hash = "sha256-K375/4qOyE1Tp/T5V5uCGcNd1IVVbT1Pjdnq/8oRHj0="; + owner = "darkreader"; + repo = "darkreader"; + rev = "v${version}"; + }; + installPhase = '' + mkdir -p $out + cp build/release/darkreader-firefox.xpi $out/latest.xpi + ''; +} diff --git a/modules/programs/browser/foxwrappers.nix b/modules/programs/browser/foxwrappers.nix index fc166cb..e5c39a7 100644 --- a/modules/programs/browser/foxwrappers.nix +++ b/modules/programs/browser/foxwrappers.nix @@ -9,8 +9,8 @@ in { "zen-browser" ]; name = "Zen Browser"; - wrappedPackageName = "zen-browser-unwrapped"; - unwrappedPackageName = "zen-browser"; + wrappedPackageName = "zen"; + unwrappedPackageName = "zen-unwrapped"; visible = true; platforms = { linux = { diff --git a/modules/programs/browser/zen.nix b/modules/programs/browser/zen.nix index 33f2da8..375756c 100644 --- a/modules/programs/browser/zen.nix +++ b/modules/programs/browser/zen.nix @@ -1,11 +1,25 @@ +# credits to Voronind for darkreader config https://github.com/voronind-com/nix/blob/main/home/program/firefox/default.nix { lib, config, options, inputs, + stable, + system, pkgs, ... -}: { +}: let + # at time of using this here, stylix might not be evaluated yet + # hence ensure it is by using base16 mkSchemeAttrs + base16 = pkgs.callPackage inputs.base16.lib {}; + scheme = base16.mkSchemeAttrs config.stylix.base16Scheme; + mkExtension = id: install_url: { + ${id} = { + inherit install_url; + installation_mode = "normal_installed"; + }; + }; +in { options.mods.browser.zen = { enable = lib.mkOption { default = false; @@ -13,6 +27,37 @@ type = lib.types.bool; description = "Enables the zen browser"; }; + extensions = lib.mkOption { + default = [ + (mkExtension "uBlock0@raymondhill.net" "https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi") + (mkExtension "{a6c4a591-f1b2-4f03-b3ff-767e5bedf4e7}" "https://addons.mozilla.org/firefox/downloads/latest/user-agent-string-switcher/latest.xpi") + (mkExtension "{d7742d87-e61d-4b78-b8a1-b469842139fa}" "https://addons.mozilla.org/firefox/downloads/latest/vimium-ff/latest.xpi") + (mkExtension "firefox@ghostery.com" "https://addons.mozilla.org/firefox/downloads/latest/ghostery/latest.xpi") + (mkExtension "CanvasBlocker@kkapsner.de" "https://addons.mozilla.org/firefox/downloads/latest/canvasblocker/latest.xpi") + (mkExtension "jid1-KKzOGWgsW3Ao4Q@jetpack" "https://addons.mozilla.org/firefox/downloads/latest/i-dont-care-about-cookies/latest.xpi") + (mkExtension "keepassxc-browser@keepassxc.org" "https://addons.mozilla.org/firefox/downloads/latest/keepassxc-browser/latest.xpi") + (mkExtension "@react-devtools" "https://addons.mozilla.org/firefox/downloads/latest/react-devtools/latest.xpi") + (mkExtension "extension@redux.devtools" "https://addons.mozilla.org/firefox/downloads/latest/reduxdevtools/latest.xpi") + (mkExtension "private-relay@firefox.com" "https://addons.mozilla.org/firefox/downloads/latest/private-relay/latest.xpi") + (mkExtension "addon@darkreader.org" "file://${pkgs.callPackage ./darkreader.nix {inherit lib stable;}}/latest.xpi") + ]; + example = []; + type = with lib.types; listOf anything; + description = '' + List of extensions via attrsets: + ```nix + # id + # figure out the id via: + # nix run github:tupakkatapa/mozid -- 'https://addons.mozilla.org/en/firefox/addon/ublock-origin' + "uBlock0@raymondhill.net" = { + # install url + install_url = "https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi"; + # method https://mozilla.github.io/policy-templates/#extensionsettings + installation_mode = "force_installed"; + }; + ``` + ''; + }; configuration = lib.mkOption { default = { EnableTrackingProtection = { @@ -22,15 +67,10 @@ Fingerprinting = true; }; DisablePocket = true; - DisplayBookmarksToolbar = "never"; - DisplayMenuBar = "default-off"; CaptivePortal = false; DisableFirefoxStudies = true; DisableTelemetry = true; - DisableFirefoxAccounts = false; NoDefaultBookmarks = true; - OfferToSaveLogins = false; - OfferToSaveLoginsDefault = false; PasswordManagerEnabled = false; FirefoxHome = { Search = true; @@ -43,27 +83,22 @@ ExtensionRecommendations = false; SkipOnboarding = true; }; + "3rdparty".Extensions = { + "addon@darkreader.org" = { + theme = { + darkSchemeBackgroundColor = "#${scheme.base00}"; + darkSchemeTextColor = "#${scheme.base05}"; + }; + previewNewDesign = true; + }; + }; }; example = {}; type = with lib.types; attrsOf anything; description = "Zen policy configuration. See https://mozilla.github.io/policy-templates for more information."; }; profiles = lib.mkOption { - default = let - extensions = [ - pkgs.nur.repos.rycee.firefox-addons.darkreader - pkgs.nur.repos.rycee.firefox-addons.ublock-origin - pkgs.nur.repos.rycee.firefox-addons.ghostery - pkgs.nur.repos.rycee.firefox-addons.canvasblocker - pkgs.nur.repos.rycee.firefox-addons.i-dont-care-about-cookies - pkgs.nur.repos.rycee.firefox-addons.keepassxc-browser - pkgs.nur.repos.rycee.firefox-addons.vimium - pkgs.nur.repos.rycee.firefox-addons.react-devtools - pkgs.nur.repos.rycee.firefox-addons.reduxdevtools - pkgs.nur.repos.rycee.firefox-addons.user-agent-string-switcher - pkgs.nur.repos.rycee.firefox-addons.private-relay - ]; - in [ + default = [ { name = "${config.conf.username}"; value = { @@ -76,7 +111,6 @@ zen.theme.accent-color = "#b4bbff"; extensions.autoDisableScopes = 0; }; - extensions.packages = extensions; isDefault = true; id = 0; }; @@ -93,7 +127,6 @@ zen.theme.accent-color = "#b4bbff"; extensions.autoDisableScopes = 0; }; - extensions.packages = extensions; isDefault = false; id = 1; }; @@ -122,25 +155,15 @@ enable = true; package = pkgs.wrapFirefox - (inputs.zen-browser.packages.${pkgs.system}.default.overrideAttrs (prevAttrs: { - passthru = - prevAttrs.passthru - or {} - // { - applicationName = "Zen Browser"; - binaryName = "zen"; - - ffmpegSupport = true; - gssSupport = true; - gtk3 = pkgs.gtk3; - }; - })) + inputs.zen-browser.packages.${system}.zen-browser-unwrapped { - icon = "zen-beta"; - wmClass = "zen"; - hasMozSystemDirPatch = false; + pname = "zen-browser"; + extraPolicies = + config.mods.browser.zen.configuration + // { + ExtensionSettings = builtins.foldl' (acc: ext: acc // ext) {} config.mods.browser.zen.extensions; + }; }; - policies = config.mods.browser.zen.configuration; profiles = builtins.listToAttrs config.mods.browser.zen.profiles; }; } diff --git a/modules/programs/drives.nix b/modules/programs/drives.nix index 2df11b5..0f67be2 100644 --- a/modules/programs/drives.nix +++ b/modules/programs/drives.nix @@ -129,7 +129,7 @@ defaultDiskId = lib.mkOption { default = "TODO"; example = "/dev/nvme0n1"; - type = lib.types.string; + type = lib.types.str; description = "The name, ID, UUID or similar for the default drive."; }; rootAmount = lib.mkOption { diff --git a/modules/programs/homePackages.nix b/modules/programs/homePackages.nix index 8df753f..d96036b 100644 --- a/modules/programs/homePackages.nix +++ b/modules/programs/homePackages.nix @@ -3,6 +3,7 @@ options, config, pkgs, + inputs, ... }: let # TODO remove when chromium works again @@ -147,24 +148,18 @@ in { then { firefox = { enable = true; - policies = config.mods.browser.firefox.configuration; - profiles = builtins.listToAttrs config.mods.browser.firefox.profiles; }; } else if config.mods.homePackages.browser == "zen" then { zen-browser = { enable = true; - policies = config.mods.browser.zen.configuration; - profiles = builtins.listToAttrs config.mods.browser.zen.profiles; }; } else if config.mods.homePackages.browser == "librewolf" then { librewolf-dashnix = { enable = true; - policies = config.mods.browser.librewolf.configuration; - profiles = builtins.listToAttrs config.mods.browser.librewolf.profiles; }; } else {} From 5443370f169cef4ef05d0f90e10edfbdd8b93d43 Mon Sep 17 00:00:00 2001 From: DashieTM Date: Sat, 15 Mar 2025 15:45:11 +0100 Subject: [PATCH 012/118] Fix brightness script --- modules/programs/hyprland/hyprland.nix | 4 ++-- modules/programs/scripts.nix | 8 +------- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/modules/programs/hyprland/hyprland.nix b/modules/programs/hyprland/hyprland.nix index 5b16349..fe25f14 100644 --- a/modules/programs/hyprland/hyprland.nix +++ b/modules/programs/hyprland/hyprland.nix @@ -164,8 +164,8 @@ in { ",XF86AudioPlay,exec, playerctl play-pause" ",XF86AudioNext,exec, playerctl next" ",XF86AudioPrev,exec, playerctl previous" - (lib.mkIf config.mods.scripts.changeBrightness ",XF86MonBrightnessDown,exec, change-brightness brightness 10%-") - (lib.mkIf config.mods.scripts.changeBrightness ",XF86MonBrightnessUp,exec, change-brightness brightness +10%") + (lib.mkIf config.mods.scripts.changeBrightness ",XF86MonBrightnessDown,exec, changeBrightness brightness 10%-") + (lib.mkIf config.mods.scripts.changeBrightness ",XF86MonBrightnessUp,exec, changeBrightness brightness +10%") # hyprland keybinds # misc diff --git a/modules/programs/scripts.nix b/modules/programs/scripts.nix index e17a96b..ce0f4f0 100644 --- a/modules/programs/scripts.nix +++ b/modules/programs/scripts.nix @@ -30,15 +30,9 @@ [ (lib.mkIf config.mods.scripts.changeBrightness ( pkgs.writeShellScriptBin "changeBrightness" '' - set_brightness() { brightnessctl set "$1" CURRENT=$(brightnessctl -m -d intel_backlight | awk -F, '{print substr($4, 0, length($4)-1)}') - dunstify -a "changeBrightness" -r 3 -u low -i brightness-high -h int:value:"$CURRENT" "Brightness: ''${CURRENT}%" - } - - if [ "$1" == "brightness" ]; then - set_brightness "$2" - fi + notify-send -a "changeBrightness" -r 3 -u low -i brightness-high -h int:value:"$CURRENT" "Brightness: ''${CURRENT}%" '' )) (lib.mkIf config.mods.scripts.audioControl ( From 7c70384da2c8b53ba837a216da5b3922259c5c44 Mon Sep 17 00:00:00 2001 From: DashieTM Date: Sat, 15 Mar 2025 17:37:06 +0100 Subject: [PATCH 013/118] Rework docs and add streamcontroller --- .github/workflows/docs.yaml | 2 +- .github/workflows/release.yaml | 3 +- docs/default.nix | 34 +++- home/default.nix | 2 +- .../programs/browser => lib}/foxwrappers.nix | 0 modules/conf.nix | 11 -- modules/programs/browser/zen.nix | 2 +- modules/programs/default.nix | 1 + modules/programs/hyprland/hyprland.nix | 176 +++++++++--------- modules/programs/streamcontroller.nix | 37 ++++ .../browser => patches}/darkeader.patch | 0 .../browser => patches}/darkreader.nix | 0 12 files changed, 156 insertions(+), 112 deletions(-) rename {modules/programs/browser => lib}/foxwrappers.nix (100%) create mode 100644 modules/programs/streamcontroller.nix rename {modules/programs/browser => patches}/darkeader.patch (100%) rename {modules/programs/browser => patches}/darkreader.nix (100%) diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index 015dc25..62524cb 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -21,7 +21,7 @@ jobs: with: github-token: ${{ secrets.GITHUB_TOKEN }} extra-conf: | - extra-experimental-features = nix-command flakes + extra-experimental-features = nix-command flakes pipe-operators - name: Set up cache uses: DeterminateSystems/magic-nix-cache-action@main diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 193d5e7..84bda95 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -15,7 +15,7 @@ jobs: with: github-token: ${{ secrets.GITHUB_TOKEN }} extra-conf: | - extra-experimental-features = nix-command flakes + extra-experimental-features = nix-command flakes pipe-operators - name: Set up cache uses: DeterminateSystems/magic-nix-cache-action@main - name: Build ISO @@ -27,4 +27,3 @@ jobs: uses: softprops/action-gh-release@v1 with: path: path/ - diff --git a/docs/default.nix b/docs/default.nix index f7e9622..65a0659 100644 --- a/docs/default.nix +++ b/docs/default.nix @@ -14,15 +14,35 @@ echo "- [${name}](${name}.md)" >> src/SUMMARY.md ''; system = (build_systems {root = ../example/.;})."example".options; - makeOptionsDocPrograms = name: pkgs.nixosOptionsDoc {options = system.mods.${name};}; + makeOptionsDocPrograms = names: pkgs.nixosOptionsDoc {options = lib.attrByPath (lib.splitString "." names) null system.mods;}; conf = makeOptionsDoc system.conf; - paths = builtins.readDir ../modules/programs; - names = lib.lists.remove "default" ( - map (name: lib.strings.removeSuffix ".nix" name) (lib.attrsets.mapAttrsToList (name: _: name) paths) + basePath = ../modules/programs; + pathToAttrs = path: + lib.attrsets.mapAttrsToList ( + name: meta: { + name = name; + meta = meta; + } + ) + (builtins.readDir path); + pathToStrings = path: prefix: let + mapFn = attrs: + if attrs.meta == "directory" + then pathToStrings "${basePath}/${attrs.name}" attrs.name + else if prefix != "" + then "${prefix}.${attrs.name}" + else attrs.name; + in + map + mapFn + (pathToAttrs path); + filteredNames = builtins.filter (names: !(lib.strings.hasInfix "default" names)) ( + map (name: lib.strings.removeSuffix ".nix" name) (lib.lists.flatten (pathToStrings basePath "")) ); - mods = map makeOptionsDocPrograms names; - docs = lib.strings.concatLines (map generateDocs (lib.lists.zipLists names mods)); - summary = lib.strings.concatStringsSep " " (map summaryAppend names); + deduplicatedNames = map (name: lib.strings.splitString "." name |> lib.lists.unique |> lib.strings.concatStringsSep "." ) filteredNames; + mods = map makeOptionsDocPrograms deduplicatedNames; + docs = lib.strings.concatLines (map generateDocs (lib.lists.zipLists deduplicatedNames mods)); + summary = lib.strings.concatStringsSep " " (map summaryAppend deduplicatedNames); in pkgs.stdenvNoCC.mkDerivation { name = "dashNix-book"; diff --git a/home/default.nix b/home/default.nix index 5cd013a..6e178e2 100644 --- a/home/default.nix +++ b/home/default.nix @@ -35,7 +35,7 @@ ./common.nix ./themes ./sync.nix - ../modules/programs/browser/foxwrappers.nix + ../lib/foxwrappers.nix ] ++ homeMods ++ additionalHomeMods diff --git a/modules/programs/browser/foxwrappers.nix b/lib/foxwrappers.nix similarity index 100% rename from modules/programs/browser/foxwrappers.nix rename to lib/foxwrappers.nix diff --git a/modules/conf.nix b/modules/conf.nix index a9e9734..2cfc57b 100644 --- a/modules/conf.nix +++ b/modules/conf.nix @@ -104,17 +104,6 @@ ''; }; - streamdeck = { - enable = lib.mkOption { - default = false; - example = true; - type = lib.types.bool; - description = '' - Install streamdeck configuration program. - ''; - }; - }; - kernelOverride = lib.mkOption { default = null; type = with lib.types; nullOr package; diff --git a/modules/programs/browser/zen.nix b/modules/programs/browser/zen.nix index 375756c..b9840d0 100644 --- a/modules/programs/browser/zen.nix +++ b/modules/programs/browser/zen.nix @@ -39,7 +39,7 @@ in { (mkExtension "@react-devtools" "https://addons.mozilla.org/firefox/downloads/latest/react-devtools/latest.xpi") (mkExtension "extension@redux.devtools" "https://addons.mozilla.org/firefox/downloads/latest/reduxdevtools/latest.xpi") (mkExtension "private-relay@firefox.com" "https://addons.mozilla.org/firefox/downloads/latest/private-relay/latest.xpi") - (mkExtension "addon@darkreader.org" "file://${pkgs.callPackage ./darkreader.nix {inherit lib stable;}}/latest.xpi") + (mkExtension "addon@darkreader.org" "file://${pkgs.callPackage ../../../patches/darkreader.nix {inherit lib stable;}}/latest.xpi") ]; example = []; type = with lib.types; listOf anything; diff --git a/modules/programs/default.nix b/modules/programs/default.nix index 3248690..f46243c 100644 --- a/modules/programs/default.nix +++ b/modules/programs/default.nix @@ -34,6 +34,7 @@ ./sddm.nix ./sops.nix ./starship.nix + ./streamcontroller.nix ./stylix.nix ./supersonic.nix ./sway.nix diff --git a/modules/programs/hyprland/hyprland.nix b/modules/programs/hyprland/hyprland.nix index fe25f14..25dcc05 100644 --- a/modules/programs/hyprland/hyprland.nix +++ b/modules/programs/hyprland/hyprland.nix @@ -13,95 +13,93 @@ then config.mods.homePackages.browser.meta.mainProgram else config.mods.homePackages.browser.pname; in { - options.mods = { - hyprland = { - enable = lib.mkOption { - default = true; - example = false; - type = lib.types.bool; - description = '' - Enable Hyprland - ''; - }; - monitor = lib.mkOption { - default = [ - # main monitor - "${config.conf.defaultMonitor},${config.conf.defaultMonitorMode},0x0,${config.conf.defaultMonitorScale}" - # all others - ",highrr,auto,1" - ]; - example = ["DP-1,3440x1440@180,2560x0,1,vrr,0"]; - type = with lib.types; listOf str; - description = '' - The monitor configuration for hyprland. - ''; - }; - workspace = lib.mkOption { - default = []; - example = ["2,monitor:DP-1, default:true"]; - type = with lib.types; listOf str; - description = '' - The workspace configuration for hyprland. - ''; - }; - noAtomic = lib.mkOption { - default = false; - example = true; - type = lib.types.bool; - description = '' - Use tearing - ''; - }; - extraAutostart = lib.mkOption { - default = []; - example = ["your application"]; - type = lib.types.listOf lib.types.str; - description = '' - Extra exec_once. - ''; - }; - useDefaultConfig = lib.mkOption { - default = true; - example = false; - type = lib.types.bool; - description = '' - Use preconfigured Hyprland config. - ''; - }; - customConfig = lib.mkOption { - default = {}; - example = {}; - type = with lib.types; attrsOf anything; - description = '' - Custom Hyprland configuration. - Will be merged with default configuration if enabled. - ''; - }; - plugins = lib.mkOption { - default = []; - example = []; - type = with lib.types; listOf package; - description = '' - Plugins to be added to Hyprland. - ''; - }; - pluginConfig = lib.mkOption { - default = {}; - example = {}; - type = with lib.types; attrsOf anything; - description = '' - Plugin configuration to be added to Hyprland. - ''; - }; - hyprspaceEnable = lib.mkOption { - default = false; - type = lib.types.bool; - example = true; - description = '' - Enables Hyprspace plugin for hyprland. - Please note, plugins tend to break VERY often. - ''; - }; + options.mods.hyprland = { + enable = lib.mkOption { + default = true; + example = false; + type = lib.types.bool; + description = '' + Enable Hyprland + ''; + }; + monitor = lib.mkOption { + default = [ + # main monitor + "${config.conf.defaultMonitor},${config.conf.defaultMonitorMode},0x0,${config.conf.defaultMonitorScale}" + # all others + ",highrr,auto,1" + ]; + example = ["DP-1,3440x1440@180,2560x0,1,vrr,0"]; + type = with lib.types; listOf str; + description = '' + The monitor configuration for hyprland. + ''; + }; + workspace = lib.mkOption { + default = []; + example = ["2,monitor:DP-1, default:true"]; + type = with lib.types; listOf str; + description = '' + The workspace configuration for hyprland. + ''; + }; + noAtomic = lib.mkOption { + default = false; + example = true; + type = lib.types.bool; + description = '' + Use tearing + ''; + }; + extraAutostart = lib.mkOption { + default = []; + example = ["your application"]; + type = lib.types.listOf lib.types.str; + description = '' + Extra exec_once. + ''; + }; + useDefaultConfig = lib.mkOption { + default = true; + example = false; + type = lib.types.bool; + description = '' + Use preconfigured Hyprland config. + ''; + }; + customConfig = lib.mkOption { + default = {}; + example = {}; + type = with lib.types; attrsOf anything; + description = '' + Custom Hyprland configuration. + Will be merged with default configuration if enabled. + ''; + }; + plugins = lib.mkOption { + default = []; + example = []; + type = with lib.types; listOf package; + description = '' + Plugins to be added to Hyprland. + ''; + }; + pluginConfig = lib.mkOption { + default = {}; + example = {}; + type = with lib.types; attrsOf anything; + description = '' + Plugin configuration to be added to Hyprland. + ''; + }; + hyprspaceEnable = lib.mkOption { + default = false; + type = lib.types.bool; + example = true; + description = '' + Enables Hyprspace plugin for hyprland. + Please note, plugins tend to break VERY often. + ''; }; }; diff --git a/modules/programs/streamcontroller.nix b/modules/programs/streamcontroller.nix new file mode 100644 index 0000000..4db158b --- /dev/null +++ b/modules/programs/streamcontroller.nix @@ -0,0 +1,37 @@ +{ + lib, + pkgs, + config, + options, + ... +}: { + options.mods = { + streamcontroller = { + enable = lib.mkOption { + default = true; + example = false; + type = lib.types.bool; + description = '' + Enables starship prompt + ''; + }; + configFilePath = lib.mkOption { + default = null; + type = with lib.types; nullOr path; + description = '' + Path to the config json for the streamcontroller. + -> ./something.json + ''; + }; + }; + }; + + config = lib.mkIf config.mods.streamcontroller.enable ( + lib.optionalAttrs (options ? environment.systemPackages) { + programs.streamcontroller.enable = true; + } + // (lib.optionalAttrs (options ? home.file) { + home.file."var/app/com.core447.StreamController/data/pages/defaultpage.json".path = lib.mkIf (!isNull config.mods.streamcontroller.path) config.mods.streamcontroller.path; + }) + ); +} diff --git a/modules/programs/browser/darkeader.patch b/patches/darkeader.patch similarity index 100% rename from modules/programs/browser/darkeader.patch rename to patches/darkeader.patch diff --git a/modules/programs/browser/darkreader.nix b/patches/darkreader.nix similarity index 100% rename from modules/programs/browser/darkreader.nix rename to patches/darkreader.nix From b461a27228a120e66d0e531dcb8832ab0afb3d50 Mon Sep 17 00:00:00 2001 From: DashieTM Date: Sun, 16 Mar 2025 17:49:06 +0100 Subject: [PATCH 014/118] Fix streamcontroller --- modules/programs/browser/brave.nix | 2 +- modules/programs/browser/chromium.nix | 2 +- modules/programs/browser/firefox.nix | 2 +- modules/programs/browser/librewolf.nix | 2 +- modules/programs/browser/zen.nix | 2 +- modules/programs/homePackages.nix | 27 ++++---------------------- modules/programs/streamcontroller.nix | 12 +++++++----- 7 files changed, 16 insertions(+), 33 deletions(-) diff --git a/modules/programs/browser/brave.nix b/modules/programs/browser/brave.nix index 9a09e7e..404fddd 100644 --- a/modules/programs/browser/brave.nix +++ b/modules/programs/browser/brave.nix @@ -14,7 +14,7 @@ }; # TODO configure brave }; - config = lib.mkIf config.mods.browser.brave.enable ( + config = lib.mkIf (config.mods.browser.brave.enable || config.mods.homePackages.browser == "brave") ( lib.optionalAttrs (options ? home.packages) { home.packages = with pkgs; [brave]; } diff --git a/modules/programs/browser/chromium.nix b/modules/programs/browser/chromium.nix index 7ed237a..5d48046 100644 --- a/modules/programs/browser/chromium.nix +++ b/modules/programs/browser/chromium.nix @@ -14,7 +14,7 @@ }; # TODO configure chromium }; - config = lib.mkIf config.mods.browser.chromium.enable ( + config = lib.mkIf (config.mods.browser.chromium.enable || config.mods.homePackages.browser == "chromium") ( lib.optionalAttrs (options ? home.packages) { home.packages = with pkgs; [chromium]; } diff --git a/modules/programs/browser/firefox.nix b/modules/programs/browser/firefox.nix index 1bb07d7..01722c9 100644 --- a/modules/programs/browser/firefox.nix +++ b/modules/programs/browser/firefox.nix @@ -78,7 +78,7 @@ description = "Firefox profiles"; }; }; - config = lib.mkIf config.mods.browser.firefox.enable ( + config = lib.mkIf (config.mods.browser.firefox.enable || config.mods.homePackages.browser == "firefox") ( lib.optionalAttrs (options ? programs.firefox.profiles) { programs.firefox = { enable = true; diff --git a/modules/programs/browser/librewolf.nix b/modules/programs/browser/librewolf.nix index 8bbbfd5..713423c 100644 --- a/modules/programs/browser/librewolf.nix +++ b/modules/programs/browser/librewolf.nix @@ -78,7 +78,7 @@ description = "Librewolf profiles"; }; }; - config = lib.mkIf config.mods.browser.librewolf.enable ( + config = lib.mkIf (config.mods.browser.librewolf.enable || config.mods.homePackages.browser == "librewolf") ( lib.optionalAttrs (options ? home.packages) { programs.librewolf-dashnix = { enable = true; diff --git a/modules/programs/browser/zen.nix b/modules/programs/browser/zen.nix index b9840d0..4c5c078 100644 --- a/modules/programs/browser/zen.nix +++ b/modules/programs/browser/zen.nix @@ -149,7 +149,7 @@ in { description = "Zen profiles"; }; }; - config = lib.mkIf config.mods.browser.zen.enable ( + config = lib.mkIf (config.mods.browser.zen.enable || config.mods.homePackages.browser == "firefox") ( lib.optionalAttrs (options ? home.packages) { programs.zen-browser = { enable = true; diff --git a/modules/programs/homePackages.nix b/modules/programs/homePackages.nix index d96036b..1235bda 100644 --- a/modules/programs/homePackages.nix +++ b/modules/programs/homePackages.nix @@ -80,12 +80,15 @@ in { "firefox" "zen" "librewolf" + "chromium" + "brave" ]) package ); description = "The browser (the enum variants have preconfigured modules)"; }; }; + config = lib.optionalAttrs (options ? home.packages) { home.packages = if config.mods.homePackages.useDefaultPackages @@ -141,29 +144,7 @@ in { warn_timeout = "-1s"; }; }; - programs = - config.mods.homePackages.specialPrograms - // ( - if config.mods.homePackages.browser == "firefox" - then { - firefox = { - enable = true; - }; - } - else if config.mods.homePackages.browser == "zen" - then { - zen-browser = { - enable = true; - }; - } - else if config.mods.homePackages.browser == "librewolf" - then { - librewolf-dashnix = { - enable = true; - }; - } - else {} - ); + programs = config.mods.homePackages.specialPrograms; services = config.mods.homePackages.specialServices; }; } diff --git a/modules/programs/streamcontroller.nix b/modules/programs/streamcontroller.nix index 4db158b..544367f 100644 --- a/modules/programs/streamcontroller.nix +++ b/modules/programs/streamcontroller.nix @@ -1,6 +1,5 @@ { lib, - pkgs, config, options, ... @@ -8,11 +7,11 @@ options.mods = { streamcontroller = { enable = lib.mkOption { - default = true; - example = false; + default = false; + example = true; type = lib.types.bool; description = '' - Enables starship prompt + Enables streamcontroller ''; }; configFilePath = lib.mkOption { @@ -31,7 +30,10 @@ programs.streamcontroller.enable = true; } // (lib.optionalAttrs (options ? home.file) { - home.file."var/app/com.core447.StreamController/data/pages/defaultpage.json".path = lib.mkIf (!isNull config.mods.streamcontroller.path) config.mods.streamcontroller.path; + home.file.".var/app/com.core447.StreamController/data/pages/defaultpage.json" = + lib.mkIf + (!isNull config.mods.streamcontroller.configFilePath) + {source = config.mods.streamcontroller.configFilePath;}; }) ); } From 16e3985e87353f69a2b8c1a811ad51f06cd2b334 Mon Sep 17 00:00:00 2001 From: DashieTM Date: Sun, 16 Mar 2025 17:49:06 +0100 Subject: [PATCH 015/118] Fix streamcontroller --- base/common_hardware.nix | 1 - flake.lock | 2648 ------------------------------ modules/programs/browser/zen.nix | 2 +- 3 files changed, 1 insertion(+), 2650 deletions(-) delete mode 100644 flake.lock diff --git a/base/common_hardware.nix b/base/common_hardware.nix index 988e2ba..ede1c08 100644 --- a/base/common_hardware.nix +++ b/base/common_hardware.nix @@ -88,7 +88,6 @@ in { auto-optimise-store = true; experimental-features = "nix-command flakes pipe-operators"; - }; }; diff --git a/flake.lock b/flake.lock deleted file mode 100644 index 46c9e0f..0000000 --- a/flake.lock +++ /dev/null @@ -1,2648 +0,0 @@ -{ - "nodes": { - "Hyprspace": { - "inputs": { - "hyprland": [ - "hyprland" - ], - "systems": "systems" - }, - "locked": { - "lastModified": 1740777046, - "narHash": "sha256-hPp+DnTYjE6M9Mdau7inbqMeLR1SpSPVyuxd+nabwaA=", - "owner": "KZDKM", - "repo": "Hyprspace", - "rev": "b5c8adb16f4729572c67883da1bcb46e11f195d6", - "type": "github" - }, - "original": { - "owner": "KZDKM", - "repo": "Hyprspace", - "type": "github" - } - }, - "anyrun": { - "inputs": { - "flake-parts": "flake-parts", - "nixpkgs": "nixpkgs", - "systems": "systems_2" - }, - "locked": { - "lastModified": 1735301051, - "narHash": "sha256-jU88Q9tP4vuvWYGQcmOdFwI9e2uMPVYJHbXdiklIH9o=", - "owner": "Kirottu", - "repo": "anyrun", - "rev": "06017e753c8886d5296768dca80745ee09402a2d", - "type": "github" - }, - "original": { - "owner": "Kirottu", - "repo": "anyrun", - "type": "github" - } - }, - "aquamarine": { - "inputs": { - "hyprutils": [ - "hyprland", - "hyprutils" - ], - "hyprwayland-scanner": [ - "hyprland", - "hyprwayland-scanner" - ], - "nixpkgs": [ - "hyprland", - "nixpkgs" - ], - "systems": [ - "hyprland", - "systems" - ] - }, - "locked": { - "lastModified": 1741282631, - "narHash": "sha256-jZE1CmQ53uN1Gq4FjaLFzSSjDqzL0pG4mdRbjBqSmho=", - "owner": "hyprwm", - "repo": "aquamarine", - "rev": "81498562d0f53e613d30368bb5b076784fa86f80", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "aquamarine", - "type": "github" - } - }, - "base16": { - "inputs": { - "fromYaml": "fromYaml" - }, - "locked": { - "lastModified": 1732200724, - "narHash": "sha256-+R1BH5wHhfnycySb7Sy5KbYEaTJZWm1h+LW1OtyhiTs=", - "owner": "SenchoPens", - "repo": "base16.nix", - "rev": "153d52373b0fb2d343592871009a286ec8837aec", - "type": "github" - }, - "original": { - "owner": "SenchoPens", - "repo": "base16.nix", - "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-helix": { - "flake": false, - "locked": { - "lastModified": 1736852337, - "narHash": "sha256-esD42YdgLlEh7koBrSqcT7p2fsMctPAcGl/+2sYJa2o=", - "owner": "tinted-theming", - "repo": "base16-helix", - "rev": "03860521c40b0b9c04818f2218d9cc9efc21e7a5", - "type": "github" - }, - "original": { - "owner": "tinted-theming", - "repo": "base16-helix", - "type": "github" - } - }, - "base16-vim": { - "flake": false, - "locked": { - "lastModified": 1732806396, - "narHash": "sha256-e0bpPySdJf0F68Ndanwm+KWHgQiZ0s7liLhvJSWDNsA=", - "owner": "tinted-theming", - "repo": "base16-vim", - "rev": "577fe8125d74ff456cf942c733a85d769afe58b7", - "type": "github" - }, - "original": { - "owner": "tinted-theming", - "repo": "base16-vim", - "rev": "577fe8125d74ff456cf942c733a85d769afe58b7", - "type": "github" - } - }, - "base16_2": { - "inputs": { - "fromYaml": "fromYaml_2" - }, - "locked": { - "lastModified": 1732200724, - "narHash": "sha256-+R1BH5wHhfnycySb7Sy5KbYEaTJZWm1h+LW1OtyhiTs=", - "owner": "SenchoPens", - "repo": "base16.nix", - "rev": "153d52373b0fb2d343592871009a286ec8837aec", - "type": "github" - }, - "original": { - "owner": "SenchoPens", - "repo": "base16.nix", - "type": "github" - } - }, - "base16_3": { - "inputs": { - "fromYaml": "fromYaml_3" - }, - "locked": { - "lastModified": 1732200724, - "narHash": "sha256-+R1BH5wHhfnycySb7Sy5KbYEaTJZWm1h+LW1OtyhiTs=", - "owner": "SenchoPens", - "repo": "base16.nix", - "rev": "153d52373b0fb2d343592871009a286ec8837aec", - "type": "github" - }, - "original": { - "owner": "SenchoPens", - "repo": "base16.nix", - "type": "github" - } - }, - "blink": { - "inputs": { - "fenix": "fenix_2", - "flake-parts": "flake-parts_2", - "nixpkgs": "nixpkgs_3" - }, - "locked": { - "lastModified": 1741016004, - "narHash": "sha256-2iNZP6Znrk6/orVEKR8VCYWIr71L0cwaRMWjRNbvAjA=", - "owner": "Saghen", - "repo": "blink.cmp", - "rev": "273bb364d8601dd72ca0b657079f4624bc76c3af", - "type": "github" - }, - "original": { - "owner": "Saghen", - "repo": "blink.cmp", - "type": "github" - } - }, - "chaoticNyx": { - "inputs": { - "fenix": "fenix", - "flake-schemas": "flake-schemas", - "home-manager": "home-manager", - "jovian": "jovian", - "nixpkgs": "nixpkgs_2" - }, - "locked": { - "lastModified": 1741572691, - "narHash": "sha256-CsX+uf0w7FGx/bMraCBzU9BQu9A3iaWnY7nV/Sbq6Js=", - "owner": "chaotic-cx", - "repo": "nyx", - "rev": "ebc0b86d16f902b79d6345a4ec365716b4495f3f", - "type": "github" - }, - "original": { - "owner": "chaotic-cx", - "ref": "nyxpkgs-unstable", - "repo": "nyx", - "type": "github" - } - }, - "crane": { - "locked": { - "lastModified": 1739936662, - "narHash": "sha256-x4syUjNUuRblR07nDPeLDP7DpphaBVbUaSoeZkFbGSk=", - "owner": "ipetkov", - "repo": "crane", - "rev": "19de14aaeb869287647d9461cbd389187d8ecdb7", - "type": "github" - }, - "original": { - "owner": "ipetkov", - "repo": "crane", - "type": "github" - } - }, - "dashvim": { - "inputs": { - "base16": "base16_2", - "blink": "blink", - "flake-parts": "flake-parts_3", - "nixpkgs": "nixpkgs_4", - "nixvim": "nixvim" - }, - "locked": { - "lastModified": 1741038146, - "narHash": "sha256-j+GXUXWx88sAdRSRAXdvixnJxfDH8rWcQ473MuhklJ0=", - "owner": "DashieTM", - "repo": "DashVim", - "rev": "cd82156b3b32a6bbb06bc4a4c16e0303d523e655", - "type": "github" - }, - "original": { - "owner": "DashieTM", - "repo": "DashVim", - "type": "github" - } - }, - "disko": { - "inputs": { - "nixpkgs": "nixpkgs_6" - }, - "locked": { - "lastModified": 1736864502, - "narHash": "sha256-ItkIZyebGvNH2dK9jVGzJHGPtb6BSWLN8Gmef16NeY0=", - "owner": "nix-community", - "repo": "disko", - "rev": "0141aabed359f063de7413f80d906e1d98c0c123", - "type": "github" - }, - "original": { - "owner": "nix-community", - "ref": "latest", - "repo": "disko", - "type": "github" - } - }, - "fenix": { - "inputs": { - "nixpkgs": [ - "chaoticNyx", - "nixpkgs" - ], - "rust-analyzer-src": "rust-analyzer-src" - }, - "locked": { - "lastModified": 1741329193, - "narHash": "sha256-niB60+AZBnp535cwvu5jU+K/cKfJeaWqt3GtrDMlLU0=", - "owner": "nix-community", - "repo": "fenix", - "rev": "232581de4261157f316848773574d1f5895805f3", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "fenix", - "type": "github" - } - }, - "fenix_2": { - "inputs": { - "nixpkgs": [ - "dashvim", - "blink", - "nixpkgs" - ], - "rust-analyzer-src": "rust-analyzer-src_2" - }, - "locked": { - "lastModified": 1734676450, - "narHash": "sha256-iwcxhTVe4h5TqW0HsNiOQP27eMBmbBshF+q2UjEy5aU=", - "owner": "nix-community", - "repo": "fenix", - "rev": "46e19fa0eb3260b2c3ee5b2cf89e73343c1296ab", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "fenix", - "type": "github" - } - }, - "firefox-gnome-theme": { - "flake": false, - "locked": { - "lastModified": 1739223196, - "narHash": "sha256-vAxN2f3rvl5q62gQQjZGVSvF93nAsOxntuFz+e/655w=", - "owner": "rafaelmardojai", - "repo": "firefox-gnome-theme", - "rev": "a89108e6272426f4eddd93ba17d0ea101c34fb21", - "type": "github" - }, - "original": { - "owner": "rafaelmardojai", - "repo": "firefox-gnome-theme", - "type": "github" - } - }, - "flake-compat": { - "flake": false, - "locked": { - "lastModified": 1696426674, - "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", - "owner": "edolstra", - "repo": "flake-compat", - "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", - "type": "github" - }, - "original": { - "owner": "edolstra", - "repo": "flake-compat", - "type": "github" - } - }, - "flake-compat_2": { - "locked": { - "lastModified": 1733328505, - "narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=", - "owner": "edolstra", - "repo": "flake-compat", - "rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec", - "type": "github" - }, - "original": { - "owner": "edolstra", - "repo": "flake-compat", - "type": "github" - } - }, - "flake-parts": { - "inputs": { - "nixpkgs-lib": [ - "anyrun", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1727826117, - "narHash": "sha256-K5ZLCyfO/Zj9mPFldf3iwS6oZStJcU4tSpiXTMYaaL0=", - "owner": "hercules-ci", - "repo": "flake-parts", - "rev": "3d04084d54bedc3d6b8b736c70ef449225c361b1", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "flake-parts", - "type": "github" - } - }, - "flake-parts_10": { - "inputs": { - "nixpkgs-lib": [ - "oxipaste", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1722555600, - "narHash": "sha256-XOQkdLafnb/p9ij77byFQjDf5m5QYl9b2REiVClC+x4=", - "owner": "hercules-ci", - "repo": "flake-parts", - "rev": "8471fe90ad337a8074e957b69ca4d0089218391d", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "flake-parts", - "type": "github" - } - }, - "flake-parts_11": { - "inputs": { - "nixpkgs-lib": [ - "oxishut", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1715865404, - "narHash": "sha256-/GJvTdTpuDjNn84j82cU6bXztE0MSkdnTWClUCRub78=", - "owner": "hercules-ci", - "repo": "flake-parts", - "rev": "8dc45382d5206bd292f9c2768b8058a8fd8311d9", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "flake-parts", - "type": "github" - } - }, - "flake-parts_12": { - "inputs": { - "nixpkgs-lib": [ - "reset", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1738453229, - "narHash": "sha256-7H9XgNiGLKN1G1CgRh0vUL4AheZSYzPm+zmZ7vxbJdo=", - "owner": "hercules-ci", - "repo": "flake-parts", - "rev": "32ea77a06711b758da0ad9bd6a844c5740a87abd", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "flake-parts", - "type": "github" - } - }, - "flake-parts_13": { - "inputs": { - "nixpkgs-lib": [ - "reset-plugins", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1715865404, - "narHash": "sha256-/GJvTdTpuDjNn84j82cU6bXztE0MSkdnTWClUCRub78=", - "owner": "hercules-ci", - "repo": "flake-parts", - "rev": "8dc45382d5206bd292f9c2768b8058a8fd8311d9", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "flake-parts", - "type": "github" - } - }, - "flake-parts_14": { - "inputs": { - "nixpkgs-lib": [ - "stylix", - "nur", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1733312601, - "narHash": "sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c=", - "owner": "hercules-ci", - "repo": "flake-parts", - "rev": "205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "flake-parts", - "type": "github" - } - }, - "flake-parts_2": { - "inputs": { - "nixpkgs-lib": "nixpkgs-lib" - }, - "locked": { - "lastModified": 1733312601, - "narHash": "sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c=", - "owner": "hercules-ci", - "repo": "flake-parts", - "rev": "205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "flake-parts", - "type": "github" - } - }, - "flake-parts_3": { - "inputs": { - "nixpkgs-lib": "nixpkgs-lib_2" - }, - "locked": { - "lastModified": 1740872218, - "narHash": "sha256-ZaMw0pdoUKigLpv9HiNDH2Pjnosg7NBYMJlHTIsHEUo=", - "owner": "hercules-ci", - "repo": "flake-parts", - "rev": "3876f6b87db82f33775b1ef5ea343986105db764", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "flake-parts", - "type": "github" - } - }, - "flake-parts_4": { - "inputs": { - "nixpkgs-lib": [ - "dashvim", - "nixvim", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1738453229, - "narHash": "sha256-7H9XgNiGLKN1G1CgRh0vUL4AheZSYzPm+zmZ7vxbJdo=", - "owner": "hercules-ci", - "repo": "flake-parts", - "rev": "32ea77a06711b758da0ad9bd6a844c5740a87abd", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "flake-parts", - "type": "github" - } - }, - "flake-parts_5": { - "inputs": { - "nixpkgs-lib": [ - "hyprdock", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1715865404, - "narHash": "sha256-/GJvTdTpuDjNn84j82cU6bXztE0MSkdnTWClUCRub78=", - "owner": "hercules-ci", - "repo": "flake-parts", - "rev": "8dc45382d5206bd292f9c2768b8058a8fd8311d9", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "flake-parts", - "type": "github" - } - }, - "flake-parts_6": { - "inputs": { - "nixpkgs-lib": [ - "nur", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1733312601, - "narHash": "sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c=", - "owner": "hercules-ci", - "repo": "flake-parts", - "rev": "205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "flake-parts", - "type": "github" - } - }, - "flake-parts_7": { - "inputs": { - "nixpkgs-lib": [ - "oxicalc", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1715865404, - "narHash": "sha256-/GJvTdTpuDjNn84j82cU6bXztE0MSkdnTWClUCRub78=", - "owner": "hercules-ci", - "repo": "flake-parts", - "rev": "8dc45382d5206bd292f9c2768b8058a8fd8311d9", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "flake-parts", - "type": "github" - } - }, - "flake-parts_8": { - "inputs": { - "nixpkgs-lib": [ - "oxidash", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1715865404, - "narHash": "sha256-/GJvTdTpuDjNn84j82cU6bXztE0MSkdnTWClUCRub78=", - "owner": "hercules-ci", - "repo": "flake-parts", - "rev": "8dc45382d5206bd292f9c2768b8058a8fd8311d9", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "flake-parts", - "type": "github" - } - }, - "flake-parts_9": { - "inputs": { - "nixpkgs-lib": [ - "oxinoti", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1715865404, - "narHash": "sha256-/GJvTdTpuDjNn84j82cU6bXztE0MSkdnTWClUCRub78=", - "owner": "hercules-ci", - "repo": "flake-parts", - "rev": "8dc45382d5206bd292f9c2768b8058a8fd8311d9", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "flake-parts", - "type": "github" - } - }, - "flake-schemas": { - "locked": { - "lastModified": 1721999734, - "narHash": "sha256-G5CxYeJVm4lcEtaO87LKzOsVnWeTcHGKbKxNamNWgOw=", - "rev": "0a5c42297d870156d9c57d8f99e476b738dcd982", - "revCount": 75, - "type": "tarball", - "url": "https://api.flakehub.com/f/pinned/DeterminateSystems/flake-schemas/0.1.5/0190ef2f-61e0-794b-ba14-e82f225e55e6/source.tar.gz" - }, - "original": { - "type": "tarball", - "url": "https://flakehub.com/f/DeterminateSystems/flake-schemas/%3D0.1.5.tar.gz" - } - }, - "flake-utils": { - "inputs": { - "systems": "systems_3" - }, - "locked": { - "lastModified": 1731533236, - "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "flake-utils_2": { - "inputs": { - "systems": "systems_5" - }, - "locked": { - "lastModified": 1705309234, - "narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "flake-utils_3": { - "inputs": { - "systems": "systems_6" - }, - "locked": { - "lastModified": 1705309234, - "narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "flake-utils_4": { - "inputs": { - "systems": "systems_7" - }, - "locked": { - "lastModified": 1705309234, - "narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "flake-utils_5": { - "inputs": { - "systems": "systems_8" - }, - "locked": { - "lastModified": 1705309234, - "narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "flake-utils_6": { - "inputs": { - "systems": [ - "stylix", - "systems" - ] - }, - "locked": { - "lastModified": 1731533236, - "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "fromYaml": { - "flake": false, - "locked": { - "lastModified": 1731966426, - "narHash": "sha256-lq95WydhbUTWig/JpqiB7oViTcHFP8Lv41IGtayokA8=", - "owner": "SenchoPens", - "repo": "fromYaml", - "rev": "106af9e2f715e2d828df706c386a685698f3223b", - "type": "github" - }, - "original": { - "owner": "SenchoPens", - "repo": "fromYaml", - "type": "github" - } - }, - "fromYaml_2": { - "flake": false, - "locked": { - "lastModified": 1731966426, - "narHash": "sha256-lq95WydhbUTWig/JpqiB7oViTcHFP8Lv41IGtayokA8=", - "owner": "SenchoPens", - "repo": "fromYaml", - "rev": "106af9e2f715e2d828df706c386a685698f3223b", - "type": "github" - }, - "original": { - "owner": "SenchoPens", - "repo": "fromYaml", - "type": "github" - } - }, - "fromYaml_3": { - "flake": false, - "locked": { - "lastModified": 1731966426, - "narHash": "sha256-lq95WydhbUTWig/JpqiB7oViTcHFP8Lv41IGtayokA8=", - "owner": "SenchoPens", - "repo": "fromYaml", - "rev": "106af9e2f715e2d828df706c386a685698f3223b", - "type": "github" - }, - "original": { - "owner": "SenchoPens", - "repo": "fromYaml", - "type": "github" - } - }, - "git-hooks": { - "inputs": { - "flake-compat": [ - "stylix", - "flake-compat" - ], - "gitignore": "gitignore_2", - "nixpkgs": [ - "stylix", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1737465171, - "narHash": "sha256-R10v2hoJRLq8jcL4syVFag7nIGE7m13qO48wRIukWNg=", - "owner": "cachix", - "repo": "git-hooks.nix", - "rev": "9364dc02281ce2d37a1f55b6e51f7c0f65a75f17", - "type": "github" - }, - "original": { - "owner": "cachix", - "repo": "git-hooks.nix", - "type": "github" - } - }, - "gitignore": { - "inputs": { - "nixpkgs": [ - "hyprland", - "pre-commit-hooks", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1709087332, - "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=", - "owner": "hercules-ci", - "repo": "gitignore.nix", - "rev": "637db329424fd7e46cf4185293b9cc8c88c95394", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "gitignore.nix", - "type": "github" - } - }, - "gitignore_2": { - "inputs": { - "nixpkgs": [ - "stylix", - "git-hooks", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1709087332, - "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=", - "owner": "hercules-ci", - "repo": "gitignore.nix", - "rev": "637db329424fd7e46cf4185293b9cc8c88c95394", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "gitignore.nix", - "type": "github" - } - }, - "gnome-shell": { - "flake": false, - "locked": { - "lastModified": 1732369855, - "narHash": "sha256-JhUWbcYPjHO3Xs3x9/Z9RuqXbcp5yhPluGjwsdE2GMg=", - "owner": "GNOME", - "repo": "gnome-shell", - "rev": "dadd58f630eeea41d645ee225a63f719390829dc", - "type": "github" - }, - "original": { - "owner": "GNOME", - "ref": "47.2", - "repo": "gnome-shell", - "type": "github" - } - }, - "home-manager": { - "inputs": { - "nixpkgs": [ - "chaoticNyx", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1741393072, - "narHash": "sha256-+Su28oU1FBvptj1AO0geJP+BcIJghSVxaNFagvW5K2M=", - "owner": "nix-community", - "repo": "home-manager", - "rev": "d2c014e1c73195d1958abec0c5ca6112b07b79da", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "home-manager", - "type": "github" - } - }, - "home-manager_2": { - "inputs": { - "nixpkgs": [ - "unstable" - ] - }, - "locked": { - "lastModified": 1741579508, - "narHash": "sha256-skRbH+UF2ES+msEa+KWi7AQFX73S+QsGlPsyCU6XyE0=", - "owner": "nix-community", - "repo": "home-manager", - "rev": "744f749dd6fbc1489591ea370b95156858629cb9", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "home-manager", - "type": "github" - } - }, - "home-manager_3": { - "inputs": { - "nixpkgs": [ - "stylix", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1740347597, - "narHash": "sha256-st5q9egkPGz8TUcVVlIQX7y6G3AzHob+6M963bwVq74=", - "owner": "nix-community", - "repo": "home-manager", - "rev": "12e26a74e5eb1a31e13daaa08858689e25ebd449", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "home-manager", - "type": "github" - } - }, - "hyprcursor": { - "inputs": { - "hyprlang": [ - "hyprland", - "hyprlang" - ], - "nixpkgs": [ - "hyprland", - "nixpkgs" - ], - "systems": [ - "hyprland", - "systems" - ] - }, - "locked": { - "lastModified": 1738664950, - "narHash": "sha256-xIeGNM+iivwVHkv9tHwOqoUP5dDrtees34bbFKKMZYs=", - "owner": "hyprwm", - "repo": "hyprcursor", - "rev": "7c6d165e1eb9045a996551eb9f121b6d1b30adc3", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "hyprcursor", - "type": "github" - } - }, - "hyprdock": { - "inputs": { - "flake-parts": "flake-parts_5", - "nixpkgs": "nixpkgs_7" - }, - "locked": { - "lastModified": 1733264848, - "narHash": "sha256-HVlpDNoxteGWBWn2rybr03uVt4k3AOpswBpa8acbzcY=", - "owner": "DashieTM", - "repo": "hyprdock", - "rev": "a67de182fd3c38dbc3186df9985443062b850e2b", - "type": "github" - }, - "original": { - "owner": "DashieTM", - "repo": "hyprdock", - "type": "github" - } - }, - "hyprgraphics": { - "inputs": { - "hyprutils": [ - "hyprland", - "hyprutils" - ], - "nixpkgs": [ - "hyprland", - "nixpkgs" - ], - "systems": [ - "hyprland", - "systems" - ] - }, - "locked": { - "lastModified": 1739049071, - "narHash": "sha256-3+7TpXMrbsUXSwgr5VAKAnmkzMb6JO+Rvc9XRb5NMg4=", - "owner": "hyprwm", - "repo": "hyprgraphics", - "rev": "175c6b29b6ff82100539e7c4363a35a02c74dd73", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "hyprgraphics", - "type": "github" - } - }, - "hyprland": { - "inputs": { - "aquamarine": "aquamarine", - "hyprcursor": "hyprcursor", - "hyprgraphics": "hyprgraphics", - "hyprland-protocols": "hyprland-protocols", - "hyprland-qtutils": "hyprland-qtutils", - "hyprlang": "hyprlang", - "hyprutils": "hyprutils", - "hyprwayland-scanner": "hyprwayland-scanner", - "nixpkgs": "nixpkgs_8", - "pre-commit-hooks": "pre-commit-hooks", - "systems": "systems_4", - "xdph": "xdph" - }, - "locked": { - "lastModified": 1741461862, - "narHash": "sha256-oq8drhL7ejjGjcv2Hg5gdESbnCMgv+vVsxiKHNnHmBQ=", - "ref": "refs/heads/main", - "rev": "d30cc19d253a3db784ad10c3084f58cbb52d325a", - "revCount": 5874, - "submodules": true, - "type": "git", - "url": "https://github.com/hyprwm/Hyprland" - }, - "original": { - "submodules": true, - "type": "git", - "url": "https://github.com/hyprwm/Hyprland" - } - }, - "hyprland-protocols": { - "inputs": { - "nixpkgs": [ - "hyprland", - "nixpkgs" - ], - "systems": [ - "hyprland", - "systems" - ] - }, - "locked": { - "lastModified": 1738422629, - "narHash": "sha256-5v+bv75wJWvahyM2xcMTSNNxmV8a7hb01Eey5zYnBJw=", - "owner": "hyprwm", - "repo": "hyprland-protocols", - "rev": "755aef8dab49d0fc4663c715fa4ad221b2aedaed", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "hyprland-protocols", - "type": "github" - } - }, - "hyprland-qt-support": { - "inputs": { - "hyprlang": [ - "hyprland", - "hyprland-qtutils", - "hyprlang" - ], - "nixpkgs": [ - "hyprland", - "hyprland-qtutils", - "nixpkgs" - ], - "systems": [ - "hyprland", - "hyprland-qtutils", - "systems" - ] - }, - "locked": { - "lastModified": 1737634706, - "narHash": "sha256-nGCibkfsXz7ARx5R+SnisRtMq21IQIhazp6viBU8I/A=", - "owner": "hyprwm", - "repo": "hyprland-qt-support", - "rev": "8810df502cdee755993cb803eba7b23f189db795", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "hyprland-qt-support", - "type": "github" - } - }, - "hyprland-qtutils": { - "inputs": { - "hyprland-qt-support": "hyprland-qt-support", - "hyprlang": [ - "hyprland", - "hyprlang" - ], - "hyprutils": [ - "hyprland", - "hyprland-qtutils", - "hyprlang", - "hyprutils" - ], - "nixpkgs": [ - "hyprland", - "nixpkgs" - ], - "systems": [ - "hyprland", - "systems" - ] - }, - "locked": { - "lastModified": 1739048983, - "narHash": "sha256-REhTcXq4qs3B3cCDtLlYDz0GZvmsBSh947Ub6pQWGTQ=", - "owner": "hyprwm", - "repo": "hyprland-qtutils", - "rev": "3504a293c8f8db4127cb0f7cfc1a318ffb4316f8", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "hyprland-qtutils", - "type": "github" - } - }, - "hyprlang": { - "inputs": { - "hyprutils": [ - "hyprland", - "hyprutils" - ], - "nixpkgs": [ - "hyprland", - "nixpkgs" - ], - "systems": [ - "hyprland", - "systems" - ] - }, - "locked": { - "lastModified": 1741191527, - "narHash": "sha256-kM+11Nch47Xwfgtw2EpRitJuORy4miwoMuRi5tyMBDY=", - "owner": "hyprwm", - "repo": "hyprlang", - "rev": "72df3861f1197e41b078faa3e38eedd60e00018d", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "hyprlang", - "type": "github" - } - }, - "hyprutils": { - "inputs": { - "nixpkgs": [ - "hyprland", - "nixpkgs" - ], - "systems": [ - "hyprland", - "systems" - ] - }, - "locked": { - "lastModified": 1741123584, - "narHash": "sha256-mprerMlucqtirmbx6L3VoFnF2bGYc2WSUCj7tuc6xTQ=", - "owner": "hyprwm", - "repo": "hyprutils", - "rev": "6b0154b183f9539097f13af9b5da78ca24da6df2", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "hyprutils", - "type": "github" - } - }, - "hyprwayland-scanner": { - "inputs": { - "nixpkgs": [ - "hyprland", - "nixpkgs" - ], - "systems": [ - "hyprland", - "systems" - ] - }, - "locked": { - "lastModified": 1739870480, - "narHash": "sha256-SiDN5BGxa/1hAsqhgJsS03C3t2QrLgBT8u+ENJ0Qzwc=", - "owner": "hyprwm", - "repo": "hyprwayland-scanner", - "rev": "206367a08dc5ac4ba7ad31bdca391d098082e64b", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "hyprwayland-scanner", - "type": "github" - } - }, - "ironbar": { - "inputs": { - "crane": "crane", - "naersk": "naersk", - "nixpkgs": [ - "unstable" - ], - "rust-overlay": "rust-overlay" - }, - "locked": { - "lastModified": 1741037542, - "narHash": "sha256-ZyodYB5R2KJzTZjIHZMA8AwDfaZIuOD/5vDP2VvrE1Q=", - "owner": "JakeStanger", - "repo": "ironbar", - "rev": "00e5ac8191edd5e039c4ea1b96845b14047298b2", - "type": "github" - }, - "original": { - "owner": "JakeStanger", - "repo": "ironbar", - "type": "github" - } - }, - "ixx": { - "inputs": { - "flake-utils": [ - "dashvim", - "nixvim", - "nuschtosSearch", - "flake-utils" - ], - "nixpkgs": [ - "dashvim", - "nixvim", - "nuschtosSearch", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1729958008, - "narHash": "sha256-EiOq8jF4Z/zQe0QYVc3+qSKxRK//CFHMB84aYrYGwEs=", - "owner": "NuschtOS", - "repo": "ixx", - "rev": "9fd01aad037f345350eab2cd45e1946cc66da4eb", - "type": "github" - }, - "original": { - "owner": "NuschtOS", - "ref": "v0.0.6", - "repo": "ixx", - "type": "github" - } - }, - "jovian": { - "inputs": { - "nix-github-actions": "nix-github-actions", - "nixpkgs": [ - "chaoticNyx", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1741338475, - "narHash": "sha256-+vAXiFRQ6ykBX7iFI20rV+xMyOVNtULbFWy6BHKPP+0=", - "owner": "Jovian-Experiments", - "repo": "Jovian-NixOS", - "rev": "1821e6ae980ff6175d28065ad6d0c87560d2b8ea", - "type": "github" - }, - "original": { - "owner": "Jovian-Experiments", - "repo": "Jovian-NixOS", - "type": "github" - } - }, - "naersk": { - "inputs": { - "nixpkgs": "nixpkgs_9" - }, - "locked": { - "lastModified": 1739824009, - "narHash": "sha256-fcNrCMUWVLMG3gKC5M9CBqVOAnJtyRvGPxptQFl5mVg=", - "owner": "nix-community", - "repo": "naersk", - "rev": "e5130d37369bfa600144c2424270c96f0ef0e11d", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "naersk", - "type": "github" - } - }, - "nix-flatpak": { - "locked": { - "lastModified": 1739444422, - "narHash": "sha256-iAVVHi7X3kWORftY+LVbRiStRnQEob2TULWyjMS6dWg=", - "owner": "gmodena", - "repo": "nix-flatpak", - "rev": "5e54c3ca05a7c7d968ae1ddeabe01d2a9bc1e177", - "type": "github" - }, - "original": { - "owner": "gmodena", - "repo": "nix-flatpak", - "type": "github" - } - }, - "nix-github-actions": { - "inputs": { - "nixpkgs": [ - "chaoticNyx", - "jovian", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1729697500, - "narHash": "sha256-VFTWrbzDlZyFHHb1AlKRiD/qqCJIripXKiCSFS8fAOY=", - "owner": "zhaofengli", - "repo": "nix-github-actions", - "rev": "e418aeb728b6aa5ca8c5c71974e7159c2df1d8cf", - "type": "github" - }, - "original": { - "owner": "zhaofengli", - "ref": "matrix-name", - "repo": "nix-github-actions", - "type": "github" - } - }, - "nixpkgs": { - "locked": { - "lastModified": 1730200266, - "narHash": "sha256-l253w0XMT8nWHGXuXqyiIC/bMvh1VRszGXgdpQlfhvU=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "807e9154dcb16384b1b765ebe9cd2bba2ac287fd", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-lib": { - "locked": { - "lastModified": 1733096140, - "narHash": "sha256-1qRH7uAUsyQI7R1Uwl4T+XvdNv778H0Nb5njNrqvylY=", - "type": "tarball", - "url": "https://github.com/NixOS/nixpkgs/archive/5487e69da40cbd611ab2cadee0b4637225f7cfae.tar.gz" - }, - "original": { - "type": "tarball", - "url": "https://github.com/NixOS/nixpkgs/archive/5487e69da40cbd611ab2cadee0b4637225f7cfae.tar.gz" - } - }, - "nixpkgs-lib_2": { - "locked": { - "lastModified": 1740872140, - "narHash": "sha256-3wHafybyRfpUCLoE8M+uPVZinImg3xX+Nm6gEfN3G8I=", - "type": "tarball", - "url": "https://github.com/NixOS/nixpkgs/archive/6d3702243441165a03f699f64416f635220f4f15.tar.gz" - }, - "original": { - "type": "tarball", - "url": "https://github.com/NixOS/nixpkgs/archive/6d3702243441165a03f699f64416f635220f4f15.tar.gz" - } - }, - "nixpkgs_10": { - "locked": { - "lastModified": 1741379970, - "narHash": "sha256-Wh7esNh7G24qYleLvgOSY/7HlDUzWaL/n4qzlBePpiw=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "36fd87baa9083f34f7f5027900b62ee6d09b1f2f", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_11": { - "locked": { - "lastModified": 1716137900, - "narHash": "sha256-sowPU+tLQv8GlqtVtsXioTKeaQvlMz/pefcdwg8MvfM=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "6c0b7a92c30122196a761b440ac0d46d3d9954f1", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_12": { - "locked": { - "lastModified": 1716137900, - "narHash": "sha256-sowPU+tLQv8GlqtVtsXioTKeaQvlMz/pefcdwg8MvfM=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "6c0b7a92c30122196a761b440ac0d46d3d9954f1", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_13": { - "locked": { - "lastModified": 1706487304, - "narHash": "sha256-LE8lVX28MV2jWJsidW13D2qrHU/RUUONendL2Q/WlJg=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "90f456026d284c22b3e3497be980b2e47d0b28ac", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_14": { - "locked": { - "lastModified": 1716137900, - "narHash": "sha256-sowPU+tLQv8GlqtVtsXioTKeaQvlMz/pefcdwg8MvfM=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "6c0b7a92c30122196a761b440ac0d46d3d9954f1", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_15": { - "locked": { - "lastModified": 1706487304, - "narHash": "sha256-LE8lVX28MV2jWJsidW13D2qrHU/RUUONendL2Q/WlJg=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "90f456026d284c22b3e3497be980b2e47d0b28ac", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_16": { - "locked": { - "lastModified": 1723637854, - "narHash": "sha256-med8+5DSWa2UnOqtdICndjDAEjxr5D7zaIiK4pn0Q7c=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "c3aa7b8938b17aebd2deecf7be0636000d62a2b9", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_17": { - "locked": { - "lastModified": 1716137900, - "narHash": "sha256-sowPU+tLQv8GlqtVtsXioTKeaQvlMz/pefcdwg8MvfM=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "6c0b7a92c30122196a761b440ac0d46d3d9954f1", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_18": { - "locked": { - "lastModified": 1706487304, - "narHash": "sha256-LE8lVX28MV2jWJsidW13D2qrHU/RUUONendL2Q/WlJg=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "90f456026d284c22b3e3497be980b2e47d0b28ac", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_19": { - "locked": { - "lastModified": 1739446958, - "narHash": "sha256-+/bYK3DbPxMIvSL4zArkMX0LQvS7rzBKXnDXLfKyRVc=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "2ff53fe64443980e139eaa286017f53f88336dd0", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_2": { - "locked": { - "lastModified": 1741379970, - "narHash": "sha256-Wh7esNh7G24qYleLvgOSY/7HlDUzWaL/n4qzlBePpiw=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "36fd87baa9083f34f7f5027900b62ee6d09b1f2f", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_20": { - "locked": { - "lastModified": 1736320768, - "narHash": "sha256-nIYdTAiKIGnFNugbomgBJR+Xv5F1ZQU+HfaBqJKroC0=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "4bc9c909d9ac828a039f288cf872d16d38185db8", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_21": { - "locked": { - "lastModified": 1716948383, - "narHash": "sha256-SzDKxseEcHR5KzPXLwsemyTR/kaM9whxeiJohbL04rs=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "ad57eef4ef0659193044870c731987a6df5cf56b", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_22": { - "locked": { - "lastModified": 1706487304, - "narHash": "sha256-LE8lVX28MV2jWJsidW13D2qrHU/RUUONendL2Q/WlJg=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "90f456026d284c22b3e3497be980b2e47d0b28ac", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_23": { - "locked": { - "lastModified": 1731763621, - "narHash": "sha256-ddcX4lQL0X05AYkrkV2LMFgGdRvgap7Ho8kgon3iWZk=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "c69a9bffbecde46b4b939465422ddc59493d3e4d", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_24": { - "locked": { - "lastModified": 1740367490, - "narHash": "sha256-WGaHVAjcrv+Cun7zPlI41SerRtfknGQap281+AakSAw=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "0196c0175e9191c474c26ab5548db27ef5d34b05", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_25": { - "locked": { - "lastModified": 1741513245, - "narHash": "sha256-7rTAMNTY1xoBwz0h7ZMtEcd8LELk9R5TzBPoHuhNSCk=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "e3e32b642a31e6714ec1b712de8c91a3352ce7e1", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_3": { - "locked": { - "lastModified": 1736166416, - "narHash": "sha256-U47xeACNBpkSO6IcCm0XvahsVXpJXzjPIQG7TZlOToU=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "b30f97d8c32d804d2d832ee837d0f1ca0695faa5", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_4": { - "locked": { - "lastModified": 1740828860, - "narHash": "sha256-cjbHI+zUzK5CPsQZqMhE3npTyYFt9tJ3+ohcfaOF/WM=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "303bd8071377433a2d8f76e684ec773d70c5b642", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_5": { - "locked": { - "lastModified": 1738797219, - "narHash": "sha256-KRwX9Z1XavpgeSDVM/THdFd6uH8rNm/6R+7kIbGa+2s=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "1da52dd49a127ad74486b135898da2cef8c62665", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_6": { - "locked": { - "lastModified": 1736241350, - "narHash": "sha256-CHd7yhaDigUuJyDeX0SADbTM9FXfiWaeNyY34FL1wQU=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "8c9fd3e564728e90829ee7dbac6edc972971cd0f", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_7": { - "locked": { - "lastModified": 1716330097, - "narHash": "sha256-8BO3B7e3BiyIDsaKA0tY8O88rClYRTjvAp66y+VBUeU=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "5710852ba686cc1fd0d3b8e22b3117d43ba374c2", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_8": { - "locked": { - "lastModified": 1741246872, - "narHash": "sha256-Q6pMP4a9ed636qilcYX8XUguvKl/0/LGXhHcRI91p0U=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "10069ef4cf863633f57238f179a0297de84bd8d3", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_9": { - "locked": { - "lastModified": 1740547748, - "narHash": "sha256-Ly2fBL1LscV+KyCqPRufUBuiw+zmWrlJzpWOWbahplg=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "3a05eebede89661660945da1f151959900903b6a", - "type": "github" - }, - "original": { - "id": "nixpkgs", - "type": "indirect" - } - }, - "nixvim": { - "inputs": { - "flake-parts": "flake-parts_4", - "nixpkgs": "nixpkgs_5", - "nuschtosSearch": "nuschtosSearch" - }, - "locked": { - "lastModified": 1740520037, - "narHash": "sha256-TpZMYjOre+6GhKDVHFwoW2iBWqpNQppQTuqIAo+OBV8=", - "owner": "nix-community", - "repo": "nixvim", - "rev": "6f8d8f7aee84f377f52c8bb58385015f9168a666", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "nixvim", - "type": "github" - } - }, - "nur": { - "inputs": { - "flake-parts": "flake-parts_6", - "nixpkgs": "nixpkgs_10", - "treefmt-nix": "treefmt-nix" - }, - "locked": { - "lastModified": 1741581473, - "narHash": "sha256-GN1Jkhs5jBJnMzbY5ok8fK07Vr/RSOxOL+QMSx5mAHA=", - "owner": "nix-community", - "repo": "NUR", - "rev": "05607425540ace50b41392637ea33b23bff0d2c7", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "NUR", - "type": "github" - } - }, - "nur_2": { - "inputs": { - "flake-parts": "flake-parts_14", - "nixpkgs": [ - "stylix", - "nixpkgs" - ], - "treefmt-nix": "treefmt-nix_2" - }, - "locked": { - "lastModified": 1740408283, - "narHash": "sha256-2xECnhgF3MU9YjmvOkrRp8wRFo2OjjewgCtlfckhL5s=", - "owner": "nix-community", - "repo": "NUR", - "rev": "496a4a11162bdffb9a7b258942de138873f019f7", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "NUR", - "type": "github" - } - }, - "nuschtosSearch": { - "inputs": { - "flake-utils": "flake-utils", - "ixx": "ixx", - "nixpkgs": [ - "dashvim", - "nixvim", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1738508923, - "narHash": "sha256-4DaDrQDAIxlWhTjH6h/+xfG05jt3qDZrZE/7zDLQaS4=", - "owner": "NuschtOS", - "repo": "search", - "rev": "86e2038290859006e05ca7201425ea5b5de4aecb", - "type": "github" - }, - "original": { - "owner": "NuschtOS", - "repo": "search", - "type": "github" - } - }, - "oxicalc": { - "inputs": { - "flake-parts": "flake-parts_7", - "nixpkgs": "nixpkgs_11" - }, - "locked": { - "lastModified": 1733264508, - "narHash": "sha256-5JN+XBh4HFuxiinRW2rRNTTknmuCnE4g8djxCMsGirE=", - "owner": "DashieTM", - "repo": "OxiCalc", - "rev": "82f3632cbcf02e6ad5326082cd6d43d64edb0a13", - "type": "github" - }, - "original": { - "owner": "DashieTM", - "repo": "OxiCalc", - "type": "github" - } - }, - "oxidash": { - "inputs": { - "flake-parts": "flake-parts_8", - "nixpkgs": "nixpkgs_12", - "rust-overlay": "rust-overlay_2" - }, - "locked": { - "lastModified": 1733264230, - "narHash": "sha256-hrQ+d2qHR/lMW5s8iQ6S3GAGeidRToih963Y5lUjDaE=", - "owner": "DashieTM", - "repo": "OxiDash", - "rev": "fae92da1f0cd44efbeb75c3b3407430dc9a69448", - "type": "github" - }, - "original": { - "owner": "DashieTM", - "repo": "OxiDash", - "type": "github" - } - }, - "oxinoti": { - "inputs": { - "flake-parts": "flake-parts_9", - "nixpkgs": "nixpkgs_14", - "rust-overlay": "rust-overlay_3" - }, - "locked": { - "lastModified": 1733261311, - "narHash": "sha256-g6kbtp1MQUBavadCoJdSB1/2TtaNzjtC7wn48luJQ5k=", - "owner": "DashieTM", - "repo": "OxiNoti", - "rev": "68c48590ffdae7b70339de0f1d4807a45435db9b", - "type": "github" - }, - "original": { - "owner": "DashieTM", - "repo": "OxiNoti", - "type": "github" - } - }, - "oxipaste": { - "inputs": { - "flake-parts": "flake-parts_10", - "nixpkgs": "nixpkgs_16" - }, - "locked": { - "lastModified": 1737624143, - "narHash": "sha256-256aX66hq37tVhfimOmFrrHOba+E7hMvsVYxEvVPrmI=", - "owner": "DashieTM", - "repo": "OxiPaste", - "rev": "54beb71d3545825d4888f971fe54b1bc0dc2a62a", - "type": "github" - }, - "original": { - "owner": "DashieTM", - "repo": "OxiPaste", - "type": "github" - } - }, - "oxishut": { - "inputs": { - "flake-parts": "flake-parts_11", - "nixpkgs": "nixpkgs_17", - "rust-overlay": "rust-overlay_4" - }, - "locked": { - "lastModified": 1733262922, - "narHash": "sha256-fBgCJPyIBHMOJ4C54PmCVItcHwu7gTrVeSKkWkXXv2A=", - "owner": "DashieTM", - "repo": "OxiShut", - "rev": "3d3060e4e3668dbd8bd1f7b3a81728245de58d94", - "type": "github" - }, - "original": { - "owner": "DashieTM", - "repo": "OxiShut", - "type": "github" - } - }, - "pre-commit-hooks": { - "inputs": { - "flake-compat": "flake-compat", - "gitignore": "gitignore", - "nixpkgs": [ - "hyprland", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1741379162, - "narHash": "sha256-srpAbmJapkaqGRE3ytf3bj4XshspVR5964OX5LfjDWc=", - "owner": "cachix", - "repo": "git-hooks.nix", - "rev": "b5a62751225b2f62ff3147d0a334055ebadcd5cc", - "type": "github" - }, - "original": { - "owner": "cachix", - "repo": "git-hooks.nix", - "type": "github" - } - }, - "reset": { - "inputs": { - "flake-parts": "flake-parts_12", - "nixpkgs": "nixpkgs_19", - "rust-overlay": "rust-overlay_5" - }, - "locked": { - "lastModified": 1739632626, - "narHash": "sha256-ReEPsodGJDp3AUOoi+t7pQZaYZiZFxyz9TDEveSiBkI=", - "owner": "Xetibo", - "repo": "ReSet", - "rev": "f229ed7dea514bc7307cea8682553afd9584eaaa", - "type": "github" - }, - "original": { - "owner": "Xetibo", - "repo": "ReSet", - "type": "github" - } - }, - "reset-plugins": { - "inputs": { - "flake-parts": "flake-parts_13", - "nixpkgs": "nixpkgs_21", - "rust-overlay": "rust-overlay_6" - }, - "locked": { - "lastModified": 1718300175, - "narHash": "sha256-kPeJJ/au+jV4jhyAhkLI3uwqK7pEDjdVJvwDmtQq8/k=", - "owner": "Xetibo", - "repo": "ReSet-Plugins", - "rev": "8d3af2fab9425f8b89fb7b82b4e23eba12a42f85", - "type": "github" - }, - "original": { - "owner": "Xetibo", - "repo": "ReSet-Plugins", - "type": "github" - } - }, - "root": { - "inputs": { - "Hyprspace": "Hyprspace", - "anyrun": "anyrun", - "base16": "base16", - "chaoticNyx": "chaoticNyx", - "dashvim": "dashvim", - "disko": "disko", - "home-manager": "home-manager_2", - "hyprdock": "hyprdock", - "hyprland": "hyprland", - "ironbar": "ironbar", - "nix-flatpak": "nix-flatpak", - "nur": "nur", - "oxicalc": "oxicalc", - "oxidash": "oxidash", - "oxinoti": "oxinoti", - "oxipaste": "oxipaste", - "oxishut": "oxishut", - "reset": "reset", - "reset-plugins": "reset-plugins", - "sops-nix": "sops-nix", - "stable": "stable", - "stylix": "stylix", - "unstable": "unstable", - "zen-browser": "zen-browser" - } - }, - "rust-analyzer-src": { - "flake": false, - "locked": { - "lastModified": 1741300343, - "narHash": "sha256-Engmn908XKEy/hmriudPQbX1QWr7ySpmQg9HbTigiME=", - "owner": "rust-lang", - "repo": "rust-analyzer", - "rev": "21a88a3767c4a6b3f211ed12174b923be851e1c6", - "type": "github" - }, - "original": { - "owner": "rust-lang", - "ref": "nightly", - "repo": "rust-analyzer", - "type": "github" - } - }, - "rust-analyzer-src_2": { - "flake": false, - "locked": { - "lastModified": 1734622712, - "narHash": "sha256-2Oc2LbFypF1EG3zTVIVcuT5XFJ7R3oAwu2tS8B0qQ0I=", - "owner": "rust-lang", - "repo": "rust-analyzer", - "rev": "fe027d79d22f2a7645da4143f5cc0f5f56239b97", - "type": "github" - }, - "original": { - "owner": "rust-lang", - "ref": "nightly", - "repo": "rust-analyzer", - "type": "github" - } - }, - "rust-overlay": { - "inputs": { - "nixpkgs": [ - "ironbar", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1740709839, - "narHash": "sha256-4dF++MXIXna/AwlZWDKr7bgUmY4xoEwvkF1GewjNrt0=", - "owner": "oxalica", - "repo": "rust-overlay", - "rev": "b4270835bf43c6f80285adac6f66a26d83f0f277", - "type": "github" - }, - "original": { - "owner": "oxalica", - "repo": "rust-overlay", - "type": "github" - } - }, - "rust-overlay_2": { - "inputs": { - "flake-utils": "flake-utils_2", - "nixpkgs": "nixpkgs_13" - }, - "locked": { - "lastModified": 1716171463, - "narHash": "sha256-lc7wOh5BjYUoxdhcPkeUY8BmuL2qtRaHlW1403RW48E=", - "owner": "oxalica", - "repo": "rust-overlay", - "rev": "04d61d14803854fd8453ec43c5c53a471e5407a8", - "type": "github" - }, - "original": { - "owner": "oxalica", - "repo": "rust-overlay", - "type": "github" - } - }, - "rust-overlay_3": { - "inputs": { - "flake-utils": "flake-utils_3", - "nixpkgs": "nixpkgs_15" - }, - "locked": { - "lastModified": 1716171463, - "narHash": "sha256-lc7wOh5BjYUoxdhcPkeUY8BmuL2qtRaHlW1403RW48E=", - "owner": "oxalica", - "repo": "rust-overlay", - "rev": "04d61d14803854fd8453ec43c5c53a471e5407a8", - "type": "github" - }, - "original": { - "owner": "oxalica", - "repo": "rust-overlay", - "type": "github" - } - }, - "rust-overlay_4": { - "inputs": { - "flake-utils": "flake-utils_4", - "nixpkgs": "nixpkgs_18" - }, - "locked": { - "lastModified": 1716171463, - "narHash": "sha256-lc7wOh5BjYUoxdhcPkeUY8BmuL2qtRaHlW1403RW48E=", - "owner": "oxalica", - "repo": "rust-overlay", - "rev": "04d61d14803854fd8453ec43c5c53a471e5407a8", - "type": "github" - }, - "original": { - "owner": "oxalica", - "repo": "rust-overlay", - "type": "github" - } - }, - "rust-overlay_5": { - "inputs": { - "nixpkgs": "nixpkgs_20" - }, - "locked": { - "lastModified": 1739586408, - "narHash": "sha256-UN9hRKRE1eLU8C0cioTZubaCZQTA8NDc8/4vCpS5pS0=", - "owner": "oxalica", - "repo": "rust-overlay", - "rev": "3dbc0ce1c0690b83cfb9a9a51fbe90c3bc8f9916", - "type": "github" - }, - "original": { - "owner": "oxalica", - "repo": "rust-overlay", - "type": "github" - } - }, - "rust-overlay_6": { - "inputs": { - "flake-utils": "flake-utils_5", - "nixpkgs": "nixpkgs_22" - }, - "locked": { - "lastModified": 1717035469, - "narHash": "sha256-MzH+yjKULH3HCRj9QCTwBvqq4LZkR0ZqRE/QfGOGC2E=", - "owner": "oxalica", - "repo": "rust-overlay", - "rev": "095702e63a40e86f339d11864da9dc965b70a01e", - "type": "github" - }, - "original": { - "owner": "oxalica", - "repo": "rust-overlay", - "type": "github" - } - }, - "sops-nix": { - "inputs": { - "nixpkgs": "nixpkgs_23" - }, - "locked": { - "lastModified": 1741043164, - "narHash": "sha256-9lfmSZLz6eq9Ygr6cCmvQiiBEaPb54pUBcjvbEMPORc=", - "owner": "Mic92", - "repo": "sops-nix", - "rev": "3f2412536eeece783f0d0ad3861417f347219f4d", - "type": "github" - }, - "original": { - "owner": "Mic92", - "repo": "sops-nix", - "type": "github" - } - }, - "stable": { - "locked": { - "lastModified": 1741445498, - "narHash": "sha256-F5Em0iv/CxkN5mZ9hRn3vPknpoWdcdCyR0e4WklHwiE=", - "owner": "NixOs", - "repo": "nixpkgs", - "rev": "52e3095f6d812b91b22fb7ad0bfc1ab416453634", - "type": "github" - }, - "original": { - "owner": "NixOs", - "ref": "nixos-24.11", - "repo": "nixpkgs", - "type": "github" - } - }, - "stylix": { - "inputs": { - "base16": "base16_3", - "base16-fish": "base16-fish", - "base16-helix": "base16-helix", - "base16-vim": "base16-vim", - "firefox-gnome-theme": "firefox-gnome-theme", - "flake-compat": "flake-compat_2", - "flake-utils": "flake-utils_6", - "git-hooks": "git-hooks", - "gnome-shell": "gnome-shell", - "home-manager": "home-manager_3", - "nixpkgs": "nixpkgs_24", - "nur": "nur_2", - "systems": "systems_9", - "tinted-foot": "tinted-foot", - "tinted-kitty": "tinted-kitty", - "tinted-schemes": "tinted-schemes", - "tinted-tmux": "tinted-tmux", - "tinted-zed": "tinted-zed" - }, - "locked": { - "lastModified": 1741533345, - "narHash": "sha256-wStpjHkVAuwYvs3oNSLWz8A2QkicfrGlP4rw2+OiyAU=", - "owner": "danth", - "repo": "stylix", - "rev": "a76068262cfc16c04f9c07a6458715548b067450", - "type": "github" - }, - "original": { - "owner": "danth", - "repo": "stylix", - "type": "github" - } - }, - "systems": { - "locked": { - "lastModified": 1689347949, - "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", - "owner": "nix-systems", - "repo": "default-linux", - "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default-linux", - "type": "github" - } - }, - "systems_2": { - "locked": { - "lastModified": 1689347949, - "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", - "owner": "nix-systems", - "repo": "default-linux", - "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default-linux", - "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": 1689347949, - "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", - "owner": "nix-systems", - "repo": "default-linux", - "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default-linux", - "type": "github" - } - }, - "systems_5": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "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" - } - }, - "systems_8": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, - "systems_9": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, - "tinted-foot": { - "flake": false, - "locked": { - "lastModified": 1726913040, - "narHash": "sha256-+eDZPkw7efMNUf3/Pv0EmsidqdwNJ1TaOum6k7lngDQ=", - "owner": "tinted-theming", - "repo": "tinted-foot", - "rev": "fd1b924b6c45c3e4465e8a849e67ea82933fcbe4", - "type": "github" - }, - "original": { - "owner": "tinted-theming", - "repo": "tinted-foot", - "rev": "fd1b924b6c45c3e4465e8a849e67ea82933fcbe4", - "type": "github" - } - }, - "tinted-kitty": { - "flake": false, - "locked": { - "lastModified": 1716423189, - "narHash": "sha256-2xF3sH7UIwegn+2gKzMpFi3pk5DlIlM18+vj17Uf82U=", - "owner": "tinted-theming", - "repo": "tinted-kitty", - "rev": "eb39e141db14baef052893285df9f266df041ff8", - "type": "github" - }, - "original": { - "owner": "tinted-theming", - "repo": "tinted-kitty", - "rev": "eb39e141db14baef052893285df9f266df041ff8", - "type": "github" - } - }, - "tinted-schemes": { - "flake": false, - "locked": { - "lastModified": 1740351358, - "narHash": "sha256-Hdk850xgAd3DL8KX0AbyU7tC834d3Lej1jOo3duWiOA=", - "owner": "tinted-theming", - "repo": "schemes", - "rev": "a1bc2bd89e693e7e3f5764cfe8114e2ae150e184", - "type": "github" - }, - "original": { - "owner": "tinted-theming", - "repo": "schemes", - "type": "github" - } - }, - "tinted-tmux": { - "flake": false, - "locked": { - "lastModified": 1740272597, - "narHash": "sha256-/etfUV3HzAaLW3RSJVwUaW8ULbMn3v6wbTlXSKbcoWQ=", - "owner": "tinted-theming", - "repo": "tinted-tmux", - "rev": "b6c7f46c8718cc484f2db8b485b06e2a98304cd0", - "type": "github" - }, - "original": { - "owner": "tinted-theming", - "repo": "tinted-tmux", - "type": "github" - } - }, - "tinted-zed": { - "flake": false, - "locked": { - "lastModified": 1725758778, - "narHash": "sha256-8P1b6mJWyYcu36WRlSVbuj575QWIFZALZMTg5ID/sM4=", - "owner": "tinted-theming", - "repo": "base16-zed", - "rev": "122c9e5c0e6f27211361a04fae92df97940eccf9", - "type": "github" - }, - "original": { - "owner": "tinted-theming", - "repo": "base16-zed", - "type": "github" - } - }, - "treefmt-nix": { - "inputs": { - "nixpkgs": [ - "nur", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1733222881, - "narHash": "sha256-JIPcz1PrpXUCbaccEnrcUS8jjEb/1vJbZz5KkobyFdM=", - "owner": "numtide", - "repo": "treefmt-nix", - "rev": "49717b5af6f80172275d47a418c9719a31a78b53", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "treefmt-nix", - "type": "github" - } - }, - "treefmt-nix_2": { - "inputs": { - "nixpkgs": [ - "stylix", - "nur", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1733222881, - "narHash": "sha256-JIPcz1PrpXUCbaccEnrcUS8jjEb/1vJbZz5KkobyFdM=", - "owner": "numtide", - "repo": "treefmt-nix", - "rev": "49717b5af6f80172275d47a418c9719a31a78b53", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "treefmt-nix", - "type": "github" - } - }, - "unstable": { - "locked": { - "lastModified": 1741851582, - "narHash": "sha256-cPfs8qMccim2RBgtKGF+x9IBCduRvd/N5F4nYpU0TVE=", - "owner": "NixOs", - "repo": "nixpkgs", - "rev": "6607cf789e541e7873d40d3a8f7815ea92204f32", - "type": "github" - }, - "original": { - "owner": "NixOs", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "xdph": { - "inputs": { - "hyprland-protocols": [ - "hyprland", - "hyprland-protocols" - ], - "hyprlang": [ - "hyprland", - "hyprlang" - ], - "hyprutils": [ - "hyprland", - "hyprutils" - ], - "hyprwayland-scanner": [ - "hyprland", - "hyprwayland-scanner" - ], - "nixpkgs": [ - "hyprland", - "nixpkgs" - ], - "systems": [ - "hyprland", - "systems" - ] - }, - "locked": { - "lastModified": 1737634991, - "narHash": "sha256-dBAnb7Kbnier30cA7AgxVSxxARmxKZ1vHZT33THSIr8=", - "owner": "hyprwm", - "repo": "xdg-desktop-portal-hyprland", - "rev": "e09dfe2726c8008f983e45a0aa1a3b7416aaeb8a", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "xdg-desktop-portal-hyprland", - "type": "github" - } - }, - "zen-browser": { - "inputs": { - "nixpkgs": "nixpkgs_25" - }, - "locked": { - "lastModified": 1741838758, - "narHash": "sha256-nGTC/y9e+1+QIVCzIbiSpPiXM2HfS8YwIDCp52CcOQ4=", - "owner": "youwen5", - "repo": "zen-browser-flake", - "rev": "03a7fc89bc48344aed00e01b409c1d6ffc4c52ce", - "type": "github" - }, - "original": { - "owner": "youwen5", - "repo": "zen-browser-flake", - "type": "github" - } - } - }, - "root": "root", - "version": 7 -} diff --git a/modules/programs/browser/zen.nix b/modules/programs/browser/zen.nix index 4c5c078..a3b6095 100644 --- a/modules/programs/browser/zen.nix +++ b/modules/programs/browser/zen.nix @@ -149,7 +149,7 @@ in { description = "Zen profiles"; }; }; - config = lib.mkIf (config.mods.browser.zen.enable || config.mods.homePackages.browser == "firefox") ( + config = lib.mkIf (config.mods.browser.zen.enable || config.mods.homePackages.browser == "zen") ( lib.optionalAttrs (options ? home.packages) { programs.zen-browser = { enable = true; From 41b539eea86d6d418ff3ec7a5de5565a75fe3887 Mon Sep 17 00:00:00 2001 From: DashieTM Date: Mon, 17 Mar 2025 20:43:38 +0100 Subject: [PATCH 016/118] Theme ironbar --- modules/conf.nix | 16 -------- modules/programs/browser/zen.nix | 1 + modules/programs/coding.nix | 1 + modules/programs/hyprland/ironbar.nix | 57 +++++++++++++++++---------- 4 files changed, 39 insertions(+), 36 deletions(-) diff --git a/modules/conf.nix b/modules/conf.nix index 2cfc57b..55ec2b9 100644 --- a/modules/conf.nix +++ b/modules/conf.nix @@ -79,22 +79,6 @@ ''; }; - ironbar = { - modules = lib.mkOption { - default = []; - example = [ - { - type = "upower"; - class = "memory-usage"; - } - ]; - type = with lib.types; listOf attrs; - description = '' - Adds modules to ironbar. See https://github.com/JakeStanger/ironbar/wiki/ for more information. - ''; - }; - }; - bootParams = lib.mkOption { default = []; example = ["resume=something"]; diff --git a/modules/programs/browser/zen.nix b/modules/programs/browser/zen.nix index a3b6095..b1c3169 100644 --- a/modules/programs/browser/zen.nix +++ b/modules/programs/browser/zen.nix @@ -110,6 +110,7 @@ in { zen.view.welcome-screen.seen = true; zen.theme.accent-color = "#b4bbff"; extensions.autoDisableScopes = 0; + cookiebanners.service.mode = 2; }; isDefault = true; id = 0; diff --git a/modules/programs/coding.nix b/modules/programs/coding.nix index f69835d..781f9e1 100644 --- a/modules/programs/coding.nix +++ b/modules/programs/coding.nix @@ -251,6 +251,7 @@ default = with pkgs; [ # broke #bear + gdb gcc clang-tools ]; diff --git a/modules/programs/hyprland/ironbar.nix b/modules/programs/hyprland/ironbar.nix index cb16289..8e60c8b 100644 --- a/modules/programs/hyprland/ironbar.nix +++ b/modules/programs/hyprland/ironbar.nix @@ -1,10 +1,14 @@ { lib, config, + pkgs, + inputs, options, ... }: let username = config.conf.username; + base16 = pkgs.callPackage inputs.base16.lib {}; + scheme = base16.mkSchemeAttrs config.stylix.base16Scheme; in { options.mods = { hyprland.ironbar = { @@ -22,6 +26,19 @@ in { Use preconfigured ironbar config. ''; }; + modules = lib.mkOption { + default = []; + example = [ + { + type = "upower"; + class = "memory-usage"; + } + ]; + type = with lib.types; listOf attrs; + description = '' + Adds modules to ironbar. See https://github.com/JakeStanger/ironbar/wiki/ for more information. + ''; + }; customConfig = lib.mkOption { default = {}; example = {}; @@ -61,11 +78,14 @@ in { style = if config.mods.hyprland.ironbar.useDefaultCss then + /* + css + */ '' @import url("/home/${username}/.config/gtk-3.0/gtk.css"); * { - color: #71bbe6; + color: #${scheme.base0D}; padding: 0px; margin: 0px; } @@ -77,8 +97,7 @@ in { .workspaces { margin: 2px 0px 0px 5px; border-radius: 10px; - /* background-color: #2b2c3b; */ - background-color: #1E1E2E; + background-color: #${scheme.base00}; padding: 2px 5px 2px 5px; } @@ -91,16 +110,16 @@ in { } .workspaces .item:hover { - background-color: #3e4152; + background-color: #${scheme.base02}; } .workspaces .item.focused { - background-color: #3e4152; + background-color: #${scheme.base02}; } .audio-box { padding: 2em; - background-color: #1E1E2E; + background-color: #${scheme.base00}; border-radius: 5px; } @@ -121,10 +140,8 @@ in { } .focused { - /* margin: 2px 0px 0px 0px; */ padding: 0px 5px 0px 5px; - /* background-color: 1a1b26; */ - background-color: #1E1E2E; + background-color: #${scheme.base00}; font-size: 17px; border-radius: 10px; } @@ -132,7 +149,7 @@ in { #bar #end { margin: 0px 5px 0px 0px; padding: 0px 5px 0px 5px; - background-color: #1E1E2E; + background-color: #${scheme.base00}; border-radius: 10px; } @@ -141,7 +158,7 @@ in { margin: 0em 3px; border-radius: 100%; font-size: 13px; - background-color: #1E1E2E; + background-color: #${scheme.base00}; } .popup-button-box { @@ -151,19 +168,19 @@ in { .clock { padding: 0px 5px 0px 5px; font-size: 17px; - background-color: #1E1E2E; + background-color: #${scheme.base00}; } .clock:hover { - background-color: #3e4152; + background-color: #${scheme.base02}; } .custom button { - background-color: #1E1E2E; + background-color: #${scheme.base00}; } .custom button:hover { - background-color: #3e4152; + background-color: #${scheme.base02}; } .memory-usage { @@ -172,11 +189,11 @@ in { } .memory-usage:hover { - background-color: #3e4152; + background-color: #${scheme.base02}; } .popup-clock { - background-color: #1E1E2E; + background-color: #${scheme.base00}; border-radius: 5px; padding: 2px 8px 10px 8px; } @@ -192,7 +209,7 @@ in { } .popup-clock .calendar:selected { - background-color: #3e4152; + background-color: #${scheme.base02}; } '' + config.mods.hyprland.ironbar.customCss @@ -206,11 +223,11 @@ in { then { end = - config.conf.ironbar.modules + config.mods.hyprland.ironbar.modules ++ [ { type = "sys_info"; - format = [" {memory_percent}"]; + format = [" {memory_percent}"]; interval.memory = 30; class = "memory-usage"; } From 867e56cdf1927f5d00cb296d8247c6f8357e693d Mon Sep 17 00:00:00 2001 From: DashieTM Date: Thu, 27 Mar 2025 14:38:55 +0100 Subject: [PATCH 017/118] Add orca slicer --- modules/programs/homePackages.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/modules/programs/homePackages.nix b/modules/programs/homePackages.nix index 1235bda..4714f91 100644 --- a/modules/programs/homePackages.nix +++ b/modules/programs/homePackages.nix @@ -59,6 +59,12 @@ in { type = lib.types.bool; description = "Adds the ncspot spotify client"; }; + orcaSlicer = lib.mkOption { + default = false; + example = true; + type = lib.types.bool; + description = "Enables orca slicer"; + }; nextcloudClient = lib.mkOption { default = false; example = true; @@ -96,6 +102,7 @@ in { with pkgs; [ (lib.mkIf config.mods.homePackages.ncspot ncspot) + (lib.mkIf config.mods.homePackages.orcaSlicer orca-slicer) (lib.mkIf config.mods.homePackages.vesktop fixedVesktop) (lib.mkIf config.mods.homePackages.nextcloudClient nextcloud-client) (lib.mkIf (!isNull config.mods.homePackages.matrixClient) config.mods.homePackages.matrixClient) From 46f4507034c629d17bb8124858e24c1d2044e16b Mon Sep 17 00:00:00 2001 From: DashieTM Date: Fri, 28 Mar 2025 08:05:56 +0100 Subject: [PATCH 018/118] Update hyprland windowrules --- modules/programs/hyprland/hyprland.nix | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/modules/programs/hyprland/hyprland.nix b/modules/programs/hyprland/hyprland.nix index 25dcc05..ab8bf53 100644 --- a/modules/programs/hyprland/hyprland.nix +++ b/modules/programs/hyprland/hyprland.nix @@ -341,22 +341,16 @@ in { windowrule = [ # window rules - "tile,^(.*)(Spotify)(.*)$" - "float,^(.*)(OxiCalc)(.*)$" - "float,^(.*)(winecfg.exe)(.*)$" - "float,^(.*)(speed.exe)(.*)$" - "float,^(.*)(copyq)(.*)$" - "center,^(.*)(swappy)(.*)$" - "float,title:^(.*)(Spirit)(.*)$" + "float,class:^(.*)(OxiCalc)(.*)$" + "float,class:^(.*)(winecfg.exe)(.*)$" + "float,class:^(.*)(copyq)(.*)$" + "center,class:^(.*)(swappy)(.*)$" "float,title:^(.*)(reset)(.*)$" - "workspace 10 silent,^(.*)(steam)(.*)$" - "workspace 9 silent,^(.*)(dota)(.*)$" - "workspace 9 silent,^(.*)(battlebits)(.*)$" - "workspace 9 silent,^(.*)(aoe)(.*)$" - "suppressevent fullscreen maximize,^(.*)(neovide)(.*)$" - ]; - - windowrulev2 = [ + "workspace 10 silent,class:^(.*)(steam)(.*)$" + "workspace 9 silent,class:^(.*)(dota)(.*)$" + "workspace 9 silent,class:^(.*)(battlebits)(.*)$" + "workspace 9 silent,class:^(.*)(aoe)(.*)$" + "suppressevent fullscreen maximize,class:^(.*)(neovide)(.*)$" "immediate,class:^(.*)(Pal)$" "immediate,class:^(.*)(dota2)$" "immediate,class:^(.*)(needforspeedheat.exe)$" From ac6cf624541aabffb66d80d708713ae79177ed0d Mon Sep 17 00:00:00 2001 From: DashieTM Date: Fri, 11 Apr 2025 09:52:53 +0200 Subject: [PATCH 019/118] Use unstable for adwaita fonts --- modules/programs/stylix.nix | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/modules/programs/stylix.nix b/modules/programs/stylix.nix index cd00501..515f45c 100644 --- a/modules/programs/stylix.nix +++ b/modules/programs/stylix.nix @@ -2,6 +2,7 @@ lib, config, options, + unstable, pkgs, ... }: { @@ -59,17 +60,17 @@ fonts = lib.mkOption { default = { serif = { - package = pkgs.adwaita-fonts; + package = unstable.adwaita-fonts; name = "Adwaita Sans"; }; sansSerif = { - package = pkgs.adwaita-fonts; + package = unstable.adwaita-fonts; name = "Adwaita Sans"; }; monospace = { - package = pkgs.nerd-fonts.jetbrains-mono; + package = unstable.nerd-fonts.jetbrains-mono; name = "JetBrainsMono Nerd Font Mono"; }; From 3527bf2d829adca6ff08f9865321a47d9ef11c1c Mon Sep 17 00:00:00 2001 From: DashieTM Date: Sun, 13 Apr 2025 19:13:46 +0200 Subject: [PATCH 020/118] Pin and Park cores --- modules/programs/gaming.nix | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/modules/programs/gaming.nix b/modules/programs/gaming.nix index 8d1fdd3..2e235bc 100644 --- a/modules/programs/gaming.nix +++ b/modules/programs/gaming.nix @@ -45,6 +45,18 @@ type = lib.types.bool; description = "Whether to use gamemode"; }; + pinCores = lib.mkOption { + default = "false"; + example = "true"; + type = lib.types.str; + description = "Pin Cores gamemode config"; + }; + parkCores = lib.mkOption { + default = "false"; + example = "true"; + type = lib.types.str; + description = "Park Cores gamemode config"; + }; gpuOptimization = lib.mkOption { default = true; example = false; @@ -72,6 +84,10 @@ general = { desiredgov = "performance"; }; + cpu = { + pin_cores = config.mods.gaming.pinCores; + park_cores = config.mods.gaming.parkCores; + }; gpu = lib.mkIf config.mods.gaming.gpuOptimization { apply_gpu_optimisations = "accept-responsibility"; gpu_device = config.mods.gaming.gpuDevice; From 145ca4d804642820b78c9ba4dfa941369c824f50 Mon Sep 17 00:00:00 2001 From: Dashie Date: Sun, 27 Apr 2025 17:03:19 +0200 Subject: [PATCH 021/118] Replace DashieTM with Xetibo as new owner (#6) * Pin and Park cores * Replace DashieTM with Xetibo as new owner --- docs/src/README.md | 2 +- example/flake.nix | 2 +- flake.nix | 14 +++++++------- home/default.nix | 1 + modules/programs/hyprland/anyrun.nix | 9 ++++----- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/docs/src/README.md b/docs/src/README.md index fa1d1e3..1f42122 100644 --- a/docs/src/README.md +++ b/docs/src/README.md @@ -14,7 +14,7 @@ This flake is intended to be used as an input to your own NixOS configuration: ```nix dashNix = { - url = "github:DashieTM/DashNix"; + url = "github:Xetibo/DashNix"; inputs = { # ensure these are here to update the packages on your own nixpkgs.follows = "nixpkgs"; diff --git a/example/flake.nix b/example/flake.nix index c621766..3e7cb65 100644 --- a/example/flake.nix +++ b/example/flake.nix @@ -5,7 +5,7 @@ nixpkgs.url = "github:NixOs/nixpkgs/nixos-unstable"; stable.url = "github:NixOs/nixpkgs/nixos-24.05"; dashNix = { - url = "github:DashieTM/DashNix"; + url = "github:Xetibo/DashNix"; inputs = { nixpkgs.follows = "nixpkgs"; stable.follows = "stable"; diff --git a/flake.nix b/flake.nix index a418e8b..eabe92d 100644 --- a/flake.nix +++ b/flake.nix @@ -36,12 +36,12 @@ disko.url = "github:nix-community/disko/latest"; anyrun.url = "github:Kirottu/anyrun"; - oxicalc.url = "github:DashieTM/OxiCalc"; - oxishut.url = "github:DashieTM/OxiShut"; - oxinoti.url = "github:DashieTM/OxiNoti"; - oxidash.url = "github:DashieTM/OxiDash"; - oxipaste.url = "github:DashieTM/OxiPaste"; - hyprdock.url = "github:DashieTM/hyprdock"; + oxicalc.url = "github:Xetibo/OxiCalc"; + oxishut.url = "github:Xetibo/OxiShut"; + oxinoti.url = "github:Xetibo/OxiNoti"; + oxidash.url = "github:Xetibo/OxiDash"; + oxipaste.url = "github:Xetibo/OxiPaste"; + hyprdock.url = "github:Xetibo/hyprdock"; reset.url = "github:Xetibo/ReSet"; reset-plugins.url = "github:Xetibo/ReSet-Plugins"; @@ -49,7 +49,7 @@ chaoticNyx.url = "github:chaotic-cx/nyx/nyxpkgs-unstable"; dashvim = { - url = "github:DashieTM/DashVim"; + url = "github:Xetibo/DashVim"; }; }; diff --git a/home/default.nix b/home/default.nix index 6e178e2..03c25f9 100644 --- a/home/default.nix +++ b/home/default.nix @@ -30,6 +30,7 @@ }; users.${config.conf.username} = { + disabledModules = ["programs/anyrun.nix"]; imports = [ ./common.nix diff --git a/modules/programs/hyprland/anyrun.nix b/modules/programs/hyprland/anyrun.nix index 832a0be..5b17669 100644 --- a/modules/programs/hyprland/anyrun.nix +++ b/modules/programs/hyprland/anyrun.nix @@ -58,8 +58,8 @@ }; config = lib.mkIf config.mods.hyprland.anyrun.enable ( - lib.optionalAttrs (options ? programs.anyrun) { - programs.anyrun = { + lib.optionalAttrs (options ? home.packages) { + programs.anyrun = lib.mkForce { enable = true; config = if config.mods.hyprland.anyrun.useDefaultConfig @@ -71,7 +71,6 @@ inputs.anyrun.packages.${pkgs.system}.translate inputs.anyrun.packages.${pkgs.system}.websearch ]; - #position = "center"; hideIcons = false; width = { fraction = 0.3; @@ -92,7 +91,7 @@ '' #window { border-radius: 10px; - background-color: none; + background-color: transparent; } box#main { @@ -113,7 +112,7 @@ } entry#entry { - border: none; + border: 0; border-radius: 10px; margin: 10px 10px 0px 10px; } From 3a0b6081c770b64421b605991e9cd0a8c1ec4b93 Mon Sep 17 00:00:00 2001 From: Dashie Date: Mon, 28 Apr 2025 10:59:49 +0200 Subject: [PATCH 022/118] Add oxirun (#7) --- flake.nix | 1 + modules/programs/oxi/default.nix | 3 ++- modules/programs/oxi/oxirun.nix | 20 ++++++++++++++++++++ 3 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 modules/programs/oxi/oxirun.nix diff --git a/flake.nix b/flake.nix index eabe92d..cbc7dae 100644 --- a/flake.nix +++ b/flake.nix @@ -41,6 +41,7 @@ oxinoti.url = "github:Xetibo/OxiNoti"; oxidash.url = "github:Xetibo/OxiDash"; oxipaste.url = "github:Xetibo/OxiPaste"; + oxirun.url = "github:Xetibo/OxiRun"; hyprdock.url = "github:Xetibo/hyprdock"; reset.url = "github:Xetibo/ReSet"; reset-plugins.url = "github:Xetibo/ReSet-Plugins"; diff --git a/modules/programs/oxi/default.nix b/modules/programs/oxi/default.nix index ad31d84..9c3ac57 100644 --- a/modules/programs/oxi/default.nix +++ b/modules/programs/oxi/default.nix @@ -8,8 +8,9 @@ imports = [ ./oxidash.nix ./oxinoti.nix - ./oxishut.nix ./oxipaste.nix + ./oxirun.nix + ./oxishut.nix ]; options.mods.oxi = { enable = lib.mkOption { diff --git a/modules/programs/oxi/oxirun.nix b/modules/programs/oxi/oxirun.nix new file mode 100644 index 0000000..55f4d75 --- /dev/null +++ b/modules/programs/oxi/oxirun.nix @@ -0,0 +1,20 @@ +{ + lib, + config, + options, + ... +}: { + options.mods.oxi.oxirun = { + enable = lib.mkOption { + default = true; + example = false; + type = lib.types.bool; + description = "Enables OxiRun"; + }; + }; + config = lib.mkIf (config.mods.oxi.oxirun.enable && config.mods.oxi.enable) ( + lib.optionalAttrs (options ? xdg.configFile) { + programs.oxirun.enable = true; + } + ); +} From ed401579869c56f35c1c523149388bf1b7d12c65 Mon Sep 17 00:00:00 2001 From: Dashie Date: Mon, 28 Apr 2025 22:40:33 +0200 Subject: [PATCH 023/118] nh update FLAKE env var (#8) --- base/env.nix | 1 + docs/src/README.md | 4 ++-- ltex.dictionary.en-US.txt | 4 ++++ ltex.hiddenFalsePositives.en-US.txt | 1 + 4 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 ltex.dictionary.en-US.txt create mode 100644 ltex.hiddenFalsePositives.en-US.txt diff --git a/base/env.nix b/base/env.nix index 8d6b97e..c85a06e 100644 --- a/base/env.nix +++ b/base/env.nix @@ -16,6 +16,7 @@ NIXOS_OZONE_WL = "1"; GOPATH = "$HOME/.go"; FLAKE = config.conf.nixosConfigPath; + NH_FLAKE = config.conf.nixosConfigPath; }; }; } diff --git a/docs/src/README.md b/docs/src/README.md index 1f42122..43f7ac8 100644 --- a/docs/src/README.md +++ b/docs/src/README.md @@ -193,13 +193,13 @@ E.g. stable/hosts/yourserver and unstable/hosts/yourdesktop You can find a custom ISO on my NextCloud server: [Link](https://cloud.dashie.org/s/z7G3zS9SXeEt2ERD). With this, you will receive the example config in /iso/example alongside the gnome desktop environment, -as well as a few tools like gnome-disks, neovim, vscodium, a browser etc. +as well as a few tools like gnome-disks, Neovim, Vscodium, a browser etc. Alternatively, you can use whatever NixOS installer and just install your config from there, just make sure to set the drive configuration before. ## Commands -First, copy the readonly config from /iso/example-config to a location of your choice. +First, copy the read-only config from /iso/example-config to a location of your choice. ```sh cp /iso/example-config ~/config -r diff --git a/ltex.dictionary.en-US.txt b/ltex.dictionary.en-US.txt new file mode 100644 index 0000000..9b935cb --- /dev/null +++ b/ltex.dictionary.en-US.txt @@ -0,0 +1,4 @@ +DashNix +HomeManger +Neovim +Vscodium diff --git a/ltex.hiddenFalsePositives.en-US.txt b/ltex.hiddenFalsePositives.en-US.txt new file mode 100644 index 0000000..5088c1d --- /dev/null +++ b/ltex.hiddenFalsePositives.en-US.txt @@ -0,0 +1 @@ +{"rule":"MORFOLOGIK_RULE_EN_US","sentence":"^\\QYou can find a custom ISO on my NextCloud server: Link.\\E$"} From 8cf9a40763605d896729c1a60fb7c06066e91894 Mon Sep 17 00:00:00 2001 From: Dashie Date: Mon, 28 Apr 2025 22:48:29 +0200 Subject: [PATCH 024/118] Fix oxirun (#9) --- lib/default.nix | 1 + ltex.dictionary.en-US.txt | 4 ---- ltex.hiddenFalsePositives.en-US.txt | 1 - 3 files changed, 1 insertion(+), 5 deletions(-) delete mode 100644 ltex.dictionary.en-US.txt delete mode 100644 ltex.hiddenFalsePositives.en-US.txt diff --git a/lib/default.nix b/lib/default.nix index 3b01e7e..db9723c 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -58,6 +58,7 @@ inputs.oxinoti.homeManagerModules.default inputs.oxidash.homeManagerModules.default inputs.oxipaste.homeManagerModules.default + inputs.oxirun.homeManagerModules.default inputs.hyprdock.homeManagerModules.default inputs.hyprland.homeManagerModules.default inputs.reset.homeManagerModules.default diff --git a/ltex.dictionary.en-US.txt b/ltex.dictionary.en-US.txt deleted file mode 100644 index 9b935cb..0000000 --- a/ltex.dictionary.en-US.txt +++ /dev/null @@ -1,4 +0,0 @@ -DashNix -HomeManger -Neovim -Vscodium diff --git a/ltex.hiddenFalsePositives.en-US.txt b/ltex.hiddenFalsePositives.en-US.txt deleted file mode 100644 index 5088c1d..0000000 --- a/ltex.hiddenFalsePositives.en-US.txt +++ /dev/null @@ -1 +0,0 @@ -{"rule":"MORFOLOGIK_RULE_EN_US","sentence":"^\\QYou can find a custom ISO on my NextCloud server: Link.\\E$"} From 32f0512ef5f534ed23baae71c1fc881613fbe912 Mon Sep 17 00:00:00 2001 From: Dashie Date: Fri, 2 May 2025 10:16:15 +0200 Subject: [PATCH 025/118] Secure boot and wsl (#10) - Add secure boot via lanzaboote - Add wsl flag - Remove flatpak flake --- base/common_hardware.nix | 21 +++++++++++++++---- docs/src/README.md | 1 - flake.nix | 7 ++++--- home/common.nix | 8 ++++---- lib/default.nix | 3 ++- modules/conf.nix | 17 ++++++++++++++++ modules/programs/basePackages.nix | 1 + modules/programs/drives.nix | 4 ++-- modules/programs/flatpak.nix | 28 +++----------------------- modules/programs/hyprland/hyprland.nix | 2 +- 10 files changed, 51 insertions(+), 41 deletions(-) diff --git a/base/common_hardware.nix b/base/common_hardware.nix index ede1c08..0688ded 100644 --- a/base/common_hardware.nix +++ b/base/common_hardware.nix @@ -13,16 +13,30 @@ in { #(modulesPath + "/misc/nixpkgs/read-only.nix") ]; + wsl.enable = config.conf.wsl; + # Bootloader. - boot = { + boot = lib.mkIf (!config.conf.wsl) { consoleLogLevel = 0; + + lanzaboote = lib.mkIf config.conf.secureBoot { + enable = true; + pkiBundle = "/var/lib/sbctl"; + }; + loader = { - systemd-boot = lib.mkIf config.conf.useSystemdBootloader { - enable = true; + systemd-boot = { + enable = + if config.conf.secureBoot + then lib.mkForce false + else if config.conf.useSystemdBootloader + then true + else false; configurationLimit = 5; }; efi.canTouchEfiVariables = true; }; + kernelPackages = lib.mkDefault pkgs.linuxPackages_latest; initrd = { verbose = false; @@ -60,7 +74,6 @@ in { # Enable the X11 windowing system. services = { lorri.enable = true; - flatpak.enable = true; xserver.enable = true; fstrim.enable = lib.mkDefault true; # Enable sound with pipewire. diff --git a/docs/src/README.md b/docs/src/README.md index 43f7ac8..0a9e778 100644 --- a/docs/src/README.md +++ b/docs/src/README.md @@ -237,7 +237,6 @@ For package lists, please check the individual modules, as the lists can be long - drives : A drive configuration module - firefox: Enables and configures firefox (extensions and settings) - fish: Enables and configures fish shell -- flatpak : Installs and enables declarative flatpak - gaming : Configures gaming related features (launchers, gamemode) - git : Git key and config module - gnome_services : Gnome services for minimal enviroments -> Window managers etc diff --git a/flake.nix b/flake.nix index cbc7dae..b1ffa47 100644 --- a/flake.nix +++ b/flake.nix @@ -4,10 +4,11 @@ inputs = { unstable.url = "github:NixOs/nixpkgs/nixos-unstable"; stable.url = "github:NixOs/nixpkgs/nixos-24.11"; + nixos-wsl.url = "github:nix-community/NixOS-WSL/main"; nur.url = "github:nix-community/NUR"; - - nix-flatpak = { - url = "github:gmodena/nix-flatpak"; + lanzaboote = { + url = "github:nix-community/lanzaboote/v0.4.2"; + inputs.nixpkgs.follows = "unstable"; }; home-manager = { diff --git a/home/common.nix b/home/common.nix index c1df32a..8d21635 100644 --- a/home/common.nix +++ b/home/common.nix @@ -26,10 +26,10 @@ in { keyboard = null; - file.".local/share/flatpak/overrides/global".text = '' - [Context] - filesystems=xdg-config/gtk-3.0;xdg-config/gtk-4.0 - ''; + #file.".local/share/flatpak/overrides/global".text = lib.mkForce '' + # [Context] + # filesystems=xdg-config/gtk-3.0;xdg-config/gtk-4.0 + #''; }; programs.nix-index = { diff --git a/lib/default.nix b/lib/default.nix index db9723c..2ad1719 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -43,6 +43,8 @@ }, mods ? { nixos = [ + inputs.lanzaboote.nixosModules.lanzaboote + inputs.nixos-wsl.nixosModules.default inputs.home-manager.nixosModules.home-manager inputs.stylix.nixosModules.stylix inputs.disko.nixosModules.disko @@ -62,7 +64,6 @@ inputs.hyprdock.homeManagerModules.default inputs.hyprland.homeManagerModules.default inputs.reset.homeManagerModules.default - inputs.nix-flatpak.homeManagerModules.nix-flatpak inputs.sops-nix.homeManagerModules.sops inputs.dashvim.homeManagerModules.dashvim ../modules diff --git a/modules/conf.nix b/modules/conf.nix index 55ec2b9..c7d26b5 100644 --- a/modules/conf.nix +++ b/modules/conf.nix @@ -20,6 +20,23 @@ ''; }; + wsl = lib.mkOption { + default = false; + example = true; + description = '' + Runs Nix in wsl + ''; + }; + + secureBoot = lib.mkOption { + default = false; + example = true; + description = '' + enables secure boot. + Please don't forget to add your keys. + ''; + }; + useSystemdBootloader = lib.mkOption { default = true; example = false; diff --git a/modules/programs/basePackages.nix b/modules/programs/basePackages.nix index 635a2a7..0f2ff25 100644 --- a/modules/programs/basePackages.nix +++ b/modules/programs/basePackages.nix @@ -74,6 +74,7 @@ seahorse upower xorg.xkbutils + sbctl ] ++ config.mods.basePackages.additionalPackages else config.mods.basePackages.additionalPackages; diff --git a/modules/programs/drives.nix b/modules/programs/drives.nix index 0f67be2..647bf80 100644 --- a/modules/programs/drives.nix +++ b/modules/programs/drives.nix @@ -149,7 +149,7 @@ config = ( lib.optionalAttrs (options ? fileSystems) { - fileSystems = lib.mkIf (config.mods.drives.variant == "manual") ( + fileSystems = lib.mkIf (config.mods.drives.variant == "manual" && !config.conf.wsl) ( builtins.listToAttrs ( map ( { @@ -196,7 +196,7 @@ } ); - swapDevices = lib.mkIf (config.mods.drives.useSwap && config.mods.drives.variant == "manual") [ + swapDevices = lib.mkIf (config.mods.drives.useSwap && config.mods.drives.variant == "manual" && !config.conf.wsl) [ {device = "/dev/disk/by-label/SWAP";} ]; diff --git a/modules/programs/flatpak.nix b/modules/programs/flatpak.nix index 7c13e9b..68ec2da 100644 --- a/modules/programs/flatpak.nix +++ b/modules/programs/flatpak.nix @@ -7,37 +7,15 @@ }: { options.mods.flatpak = { enable = lib.mkOption { - default = true; - example = false; + default = false; + example = true; type = lib.types.bool; description = "Enables the flatpak package manager"; }; - additional_packages = lib.mkOption { - default = []; - example = []; - type = with lib.types; listOf str; - description = "Flatpak packages"; - }; }; config = lib.mkIf config.mods.flatpak.enable ( - lib.optionalAttrs (options ? services.flatpak.remote) { + lib.optionalAttrs (options ? environment.systemPackages) { environment.systemPackages = [pkgs.flatpak]; - services.flatpak.remotes = lib.mkOptionDefault [ - { - name = "flathub-stable"; - location = "https://dl.flathub.org/repo/flathub.flatpakrepo"; - } - ]; - services.flatpak.uninstallUnmanaged = true; - } - // lib.optionalAttrs (options ? services.flatpak.packages) { - services.flatpak.packages = - [ - # fallback if necessary, but generally avoided as nix is superior :) - # default flatseal installation since flatpak permissions are totally not a broken idea - "com.github.tchx84.Flatseal" - ] - ++ config.mods.flatpak.additional_packages; } ); } diff --git a/modules/programs/hyprland/hyprland.nix b/modules/programs/hyprland/hyprland.nix index ab8bf53..4fa4c79 100644 --- a/modules/programs/hyprland/hyprland.nix +++ b/modules/programs/hyprland/hyprland.nix @@ -147,7 +147,7 @@ in { "$mod SUPER,E,exec,nautilus -w" "$mod SUPER,N,exec,neovide" "$mod SUPER,M,exec,oxidash" - "$mod SUPER,R,exec,anyrun" + "$mod SUPER,R,exec,oxirun" "$mod SUPER,G,exec,oxicalc" "$mod SUPER,D,exec,oxishut" "$mod SUPER,A,exec,oxipaste-iced" From 45954db37a269e678f908bb0a83c4bb43d768ea2 Mon Sep 17 00:00:00 2001 From: Dashie Date: Fri, 2 May 2025 12:19:48 +0200 Subject: [PATCH 026/118] Drive encryption (#11) - Add drive encryption with luks - Refactor Hyprland binds - Refactor cache - Minor spelling fixes - Add firefox stylix profiles --- base/common_hardware.nix | 30 ++ docs/src/README.md | 4 +- flake.nix | 32 -- home/common.nix | 5 - modules/conf.nix | 11 +- modules/programs/browser/firefox.nix | 6 + modules/programs/drives.nix | 27 ++ modules/programs/gpu.nix | 2 +- modules/programs/hyprland/anyrun.nix | 4 +- modules/programs/hyprland/hyprland.nix | 505 +++++++++++++------------ 10 files changed, 334 insertions(+), 292 deletions(-) diff --git a/base/common_hardware.nix b/base/common_hardware.nix index 0688ded..87d6279 100644 --- a/base/common_hardware.nix +++ b/base/common_hardware.nix @@ -100,6 +100,36 @@ in { trusted-users = [username]; auto-optimise-store = true; + builders-use-substitutes = true; + + substituters = [ + "https://hyprland.cachix.org" + "https://anyrun.cachix.org" + "https://cache.garnix.io" + "https://oxipaste.cachix.org" + "https://oxinoti.cachix.org" + "https://oxishut.cachix.org" + "https://oxidash.cachix.org" + "https://oxicalc.cachix.org" + "https://hyprdock.cachix.org" + "https://reset.cachix.org" + "https://chaotic-nyx.cachix.org/" + ]; + + trusted-public-keys = [ + "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=" + "anyrun.cachix.org-1:pqBobmOjI7nKlsUMV25u9QHa9btJK65/C8vnO3p346s=" + "cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g=" + "oxipaste.cachix.org-1:n/oA3N3Z+LJP7eIWOwuoLd9QnPyZXqFjLgkahjsdDGc=" + "oxinoti.cachix.org-1:dvSoJl2Pjo5HMaNngdBbSaixK9BSf2N8gzjP2MdGvfc=" + "oxishut.cachix.org-1:axyAGF3XMh1IyMAW4UMbQCdMNovDH0KH6hqLLRJH8jU=" + "oxidash.cachix.org-1:5K2FNHp7AS8VF7LmQkJAUG/dm6UHCz4ngshBVbjFX30=" + "oxicalc.cachix.org-1:qF3krFc20tgSmtR/kt6Ku/T5QiG824z79qU5eRCSBTQ=" + "hyprdock.cachix.org-1:HaROK3fBvFWIMHZau3Vq1TLwUoJE8yRbGLk0lEGzv3Y=" + "reset.cachix.org-1:LfpnUUdG7QM/eOkN7NtA+3+4Ar/UBeYB+3WH+GjP9Xo=" + "chaotic-nyx.cachix.org-1:HfnXSw4pj95iI/n17rIDy40agHj12WfF+Gqk6SonIT8=" + ]; + experimental-features = "nix-command flakes pipe-operators"; }; }; diff --git a/docs/src/README.md b/docs/src/README.md index 0a9e778..d5f1a80 100644 --- a/docs/src/README.md +++ b/docs/src/README.md @@ -5,7 +5,7 @@ -An opinionated flake to bootstrap NixOS systems with default configurations for various programs and services from both NixOS and HomeManger which can be enabled, disabled, configured or replaced at will. +An opinionated flake to bootstrap NixOS systems with default configurations for various programs and services from both NixOS and HomeManager which can be enabled, disabled, configured or replaced at will. # Usage @@ -116,7 +116,7 @@ Here is a minimal required configuration.nix (the TODOs mention a required chang # ]; # or amd, whatever you have gpu.nvidia.enable = true; - kde_connect.enable = true; + kdeConnect.enable = true; # login manager: # default is greetd # greetd = { }; diff --git a/flake.nix b/flake.nix index b1ffa47..e7e7c44 100644 --- a/flake.nix +++ b/flake.nix @@ -124,36 +124,4 @@ modules = ./modules; iso = dashNixLib.buildIso.config.system.build.isoImage; }; - - nixConfig = { - builders-use-substitutes = true; - - extra-substituters = [ - "https://hyprland.cachix.org" - "https://anyrun.cachix.org" - "https://cache.garnix.io" - "https://oxipaste.cachix.org" - "https://oxinoti.cachix.org" - "https://oxishut.cachix.org" - "https://oxidash.cachix.org" - "https://oxicalc.cachix.org" - "https://hyprdock.cachix.org" - "https://reset.cachix.org" - "https://chaotic-nyx.cachix.org/" - ]; - - extra-trusted-public-keys = [ - "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=" - "anyrun.cachix.org-1:pqBobmOjI7nKlsUMV25u9QHa9btJK65/C8vnO3p346s=" - "cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g=" - "oxipaste.cachix.org-1:n/oA3N3Z+LJP7eIWOwuoLd9QnPyZXqFjLgkahjsdDGc=" - "oxinoti.cachix.org-1:dvSoJl2Pjo5HMaNngdBbSaixK9BSf2N8gzjP2MdGvfc=" - "oxishut.cachix.org-1:axyAGF3XMh1IyMAW4UMbQCdMNovDH0KH6hqLLRJH8jU=" - "oxidash.cachix.org-1:5K2FNHp7AS8VF7LmQkJAUG/dm6UHCz4ngshBVbjFX30=" - "oxicalc.cachix.org-1:qF3krFc20tgSmtR/kt6Ku/T5QiG824z79qU5eRCSBTQ=" - "hyprdock.cachix.org-1:HaROK3fBvFWIMHZau3Vq1TLwUoJE8yRbGLk0lEGzv3Y=" - "reset.cachix.org-1:LfpnUUdG7QM/eOkN7NtA+3+4Ar/UBeYB+3WH+GjP9Xo=" - "chaotic-nyx.cachix.org-1:HfnXSw4pj95iI/n17rIDy40agHj12WfF+Gqk6SonIT8=" - ]; - }; } diff --git a/home/common.nix b/home/common.nix index 8d21635..31d67b9 100644 --- a/home/common.nix +++ b/home/common.nix @@ -25,11 +25,6 @@ in { }; keyboard = null; - - #file.".local/share/flatpak/overrides/global".text = lib.mkForce '' - # [Context] - # filesystems=xdg-config/gtk-3.0;xdg-config/gtk-4.0 - #''; }; programs.nix-index = { diff --git a/modules/conf.nix b/modules/conf.nix index c7d26b5..5189e92 100644 --- a/modules/conf.nix +++ b/modules/conf.nix @@ -33,7 +33,16 @@ example = true; description = '' enables secure boot. - Please don't forget to add your keys. + Note: Secure boot is NOT reproducible + Here are the necessary steps: + + create your keys with sbctl -> sudo sbctl create-keys + + build with systemd once -> set this to false and build once + + build with secureBoot true + + verify that your keys are signed (note, only systemd and your generations should now be signed): sudo sbtcl verify + + enroll your keys (microsoft is necessary for windows dualboot support, leave it there): sudo sbctl enroll-keys --microsoft + + reboot with secureboot enabled + Note: Some motherboards have vendor specific keys for secure boot, this may not necessarily work with our self signed keys + You likely have to disable these vendor specific keys (example HP: sure boot) ''; }; diff --git a/modules/programs/browser/firefox.nix b/modules/programs/browser/firefox.nix index 01722c9..4db465a 100644 --- a/modules/programs/browser/firefox.nix +++ b/modules/programs/browser/firefox.nix @@ -80,6 +80,12 @@ }; config = lib.mkIf (config.mods.browser.firefox.enable || config.mods.homePackages.browser == "firefox") ( lib.optionalAttrs (options ? programs.firefox.profiles) { + stylix.targets.firefox.profileNames = + map ( + {name, ...}: + name + ) + config.mods.browser.firefox.profiles; programs.firefox = { enable = true; policies = config.mods.browser.firefox.configuration; diff --git a/modules/programs/drives.nix b/modules/programs/drives.nix index 647bf80..c085144 100644 --- a/modules/programs/drives.nix +++ b/modules/programs/drives.nix @@ -25,6 +25,18 @@ Use swap in drive. ''; }; + useEncryption = lib.mkOption { + default = false; + example = true; + type = lib.types.bool; + description = '' + Enables encryption. + !WARNING! + You need your root drive to be named root exactly! + Otherwise there will not be a root crypt! + !WARNING! + ''; + }; homeAndRootFsTypes = lib.mkOption { default = "ext4"; example = "btrfs"; @@ -149,6 +161,21 @@ config = ( lib.optionalAttrs (options ? fileSystems) { + boot.initrd.luks.devices = lib.mkIf (config.mods.drives.variant == "manual" && config.mods.drives.useEncryption) ( + builtins.listToAttrs ( + map ( + { + name, + drive, + }: { + cryptstorage.device = lib.mkIf (name != "root") drive?device; + cryptoroot.device = lib.mkIf (name == "root") drive?device; + } + ) + config.mods.drives.extraDrives + ) + ); + fileSystems = lib.mkIf (config.mods.drives.variant == "manual" && !config.conf.wsl) ( builtins.listToAttrs ( map ( diff --git a/modules/programs/gpu.nix b/modules/programs/gpu.nix index 56083db..339b694 100644 --- a/modules/programs/gpu.nix +++ b/modules/programs/gpu.nix @@ -87,7 +87,7 @@ (lib.mkIf config.mods.gpu.vapi.enable pkgs.libvdpau-va-gl) (lib.mkIf config.mods.gpu.vapi.enable pkgs.libva) (lib.mkIf config.mods.gpu.vapi.enable pkgs.vaapiVdpau) - (lib.mkIf (config.mods.gpu.intelgpu.enable || config.mods.gpu.amdgpu.enable) pkgs.mesa.drivers) + (lib.mkIf (config.mods.gpu.intelgpu.enable || config.mods.gpu.amdgpu.enable) pkgs.mesa) ]; rocmPackages = [ pkgs.rocmPackages.clr.icd diff --git a/modules/programs/hyprland/anyrun.nix b/modules/programs/hyprland/anyrun.nix index 5b17669..6a3a24e 100644 --- a/modules/programs/hyprland/anyrun.nix +++ b/modules/programs/hyprland/anyrun.nix @@ -10,8 +10,8 @@ hyprland = { anyrun = { enable = lib.mkOption { - default = true; - example = false; + default = false; + example = true; type = lib.types.bool; description = "Enables anyrun"; }; diff --git a/modules/programs/hyprland/hyprland.nix b/modules/programs/hyprland/hyprland.nix index 4fa4c79..ff13a4c 100644 --- a/modules/programs/hyprland/hyprland.nix +++ b/modules/programs/hyprland/hyprland.nix @@ -124,265 +124,272 @@ in { settings = if config.mods.hyprland.useDefaultConfig then - { - "$mod" = "SUPER"; + lib.mkMerge + [ + { + "$mod" = "SUPER"; - bindm = [ - "$mod, mouse:272, movewindow" - "$mod, mouse:273, resizeactive" - ]; - - bind = [ - # screenshots - ''$mod SUPER,S,exec,grim -g "$(slurp)" - | wl-copy'' - ''$mod SUPERSHIFT,S,exec,grim -g "$(slurp)" - | satty -f -'' - ''$mod SUPERSHIFTALT,S,exec,grim -c -g "2560,0 3440x1440" - | wl-copy'' - - # regular programs - "$mod SUPER,F,exec,${browserName}" - (lib.mkIf ( - browserName == "firefox" || browserName == "zen" - ) "$mod SUPERSHIFT,F,exec,${browserName} -p special") - "$mod SUPER,T,exec,kitty -1" - "$mod SUPER,E,exec,nautilus -w" - "$mod SUPER,N,exec,neovide" - "$mod SUPER,M,exec,oxidash" - "$mod SUPER,R,exec,oxirun" - "$mod SUPER,G,exec,oxicalc" - "$mod SUPER,D,exec,oxishut" - "$mod SUPER,A,exec,oxipaste-iced" - "$mod SUPERSHIFT,P,exec,hyprdock --gui" - "$mod SUPERSHIFT,L,exec, playerctl -a pause & hyprlock & systemctl suspend" - "$mod SUPERSHIFT,K,exec, playerctl -a pause & hyprlock & systemctl hibernate" - - # media keys - (lib.mkIf config.mods.scripts.audioControl ",XF86AudioMute,exec, audioControl mute") - (lib.mkIf config.mods.scripts.audioControl ",XF86AudioLowerVolume,exec, audioControl sink -5%") - (lib.mkIf config.mods.scripts.audioControl ",XF86AudioRaiseVolume,exec, audioControl sink +5%") - ",XF86AudioPlay,exec, playerctl play-pause" - ",XF86AudioNext,exec, playerctl next" - ",XF86AudioPrev,exec, playerctl previous" - (lib.mkIf config.mods.scripts.changeBrightness ",XF86MonBrightnessDown,exec, changeBrightness brightness 10%-") - (lib.mkIf config.mods.scripts.changeBrightness ",XF86MonBrightnessUp,exec, changeBrightness brightness +10%") - - # hyprland keybinds - # misc - "$mod SUPER,V,togglefloating," - "$mod SUPER,B,fullscreen," - "$mod SUPER,C,togglesplit" - "$mod SUPER,Q,killactive," - "$mod SUPERSHIFTALT,M,exit," - "$mod SUPERSHIFT,W,togglespecialworkspace" - - # move - "$mod SUPER,left,movewindow,l" - "$mod SUPER,right,movewindow,r" - "$mod SUPER,up,movewindow,u" - "$mod SUPER,down,movewindow,d" - - # workspaces - "$mod SUPER,1,workspace,1" - "$mod SUPER,2,workspace,2" - "$mod SUPER,3,workspace,3" - "$mod SUPER,4,workspace,4" - "$mod SUPER,5,workspace,5" - "$mod SUPER,6,workspace,6" - "$mod SUPER,7,workspace,7" - "$mod SUPER,8,workspace,8" - "$mod SUPER,9,workspace,9" - "$mod SUPER,0,workspace,10" - - # move to workspace - "$mod SUPERSHIFT,1,movetoworkspace,1" - "$mod SUPERSHIFT,2,movetoworkspace,2" - "$mod SUPERSHIFT,3,movetoworkspace,3" - "$mod SUPERSHIFT,4,movetoworkspace,4" - "$mod SUPERSHIFT,5,movetoworkspace,5" - "$mod SUPERSHIFT,6,movetoworkspace,6" - "$mod SUPERSHIFT,7,movetoworkspace,7" - "$mod SUPERSHIFT,8,movetoworkspace,8" - "$mod SUPERSHIFT,9,movetoworkspace,9" - "$mod SUPERSHIFT,0,movetoworkspace,10" - - # move to workspace silent - "$mod SUPERSHIFTALT,1,movetoworkspacesilent,1" - "$mod SUPERSHIFTALT,2,movetoworkspacesilent,2" - "$mod SUPERSHIFTALT,3,movetoworkspacesilent,3" - "$mod SUPERSHIFTALT,4,movetoworkspacesilent,4" - "$mod SUPERSHIFTALT,5,movetoworkspacesilent,5" - "$mod SUPERSHIFTALT,6,movetoworkspacesilent,6" - "$mod SUPERSHIFTALT,7,movetoworkspacesilent,7" - "$mod SUPERSHIFTALT,8,movetoworkspacesilent,8" - "$mod SUPERSHIFTALT,9,movetoworkspacesilent,9" - "$mod SUPERSHIFTALT,0,movetoworkspacesilent,10" - - # preselection - "$mod SUPERALT,j,layoutmsg,preselect l" - "$mod SUPERALT,k,layoutmsg,preselect d" - "$mod SUPERALT,l,layoutmsg,preselect u" - "$mod SUPERALT,semicolon,layoutmsg,preselect r" - "$mod SUPERALT,h,layoutmsg,preselect n" - ]; - - binde = [ - # hyprland keybinds - # focus - "$mod SUPER,J,movefocus,l" - "$mod SUPER,semicolon,movefocus,r" - "$mod SUPER,L,movefocus,u" - "$mod SUPER,K,movefocus,d" - - # resize - "$mod SUPER,U,resizeactive,-20 0" - "$mod SUPER,P,resizeactive,20 0" - "$mod SUPER,O,resizeactive,0 -20" - "$mod SUPER,I,resizeactive,0 20" - ]; - - general = { - gaps_out = "3,5,5,5"; - border_size = 3; - "col.active_border" = lib.mkOverride 51 "0xFFFF0000 0xFF00FF00 0xFF0000FF 45deg"; - # "col.inactive_border" = "0x66333333"; - allow_tearing = lib.mkIf config.mods.hyprland.noAtomic true; - }; - - decoration = { - rounding = 4; - }; - - animations = { - bezier = "penguin,0.05,0.9,0.1,1.0"; - animation = [ - "windowsMove,1,4,default" - "windows,1,7,default,popin 70%" - "windowsOut,1,7,default,popin 70%" - "border,1,10,default" - "fade,1,7,default" - "workspaces,1,6,default" - "layers,1,3,default,popin" + bindm = [ + "$mod, mouse:272, movewindow" + "$mod, mouse:273, resizeactive" ]; - }; - dwindle = { - preserve_split = true; - pseudotile = 0; - permanent_direction_override = false; - }; + bind = [ + # screenshots + ''$mod SUPER,S,exec,grim -g "$(slurp)" - | wl-copy'' + ''$mod SUPERSHIFT,S,exec,grim -g "$(slurp)" - | satty -f -'' + ''$mod SUPERSHIFTALT,S,exec,grim -c -g "2560,0 3440x1440" - | wl-copy'' - input = { - kb_layout = "${config.mods.xkb.layout}"; - kb_variant = "${config.mods.xkb.variant}"; - repeat_delay = 200; - force_no_accel = true; - touchpad = { - natural_scroll = true; - tap-to-click = true; - tap-and-drag = true; + # regular programs + "$mod SUPER,F,exec,${browserName}" + (lib.mkIf ( + browserName == "firefox" || browserName == "zen" + ) "$mod SUPERSHIFT,F,exec,${browserName} -p special") + "$mod SUPER,T,exec,kitty -1" + "$mod SUPER,E,exec,nautilus -w" + "$mod SUPER,N,exec,neovide" + (lib.mkIf (config.mods.hyprland.anyrun.enable) "$mod SUPER,R,exec,anyrun") + (lib.mkIf (config.mods.oxi.oxirun.enable) "$mod SUPER,R,exec,oxirun") + (lib.mkIf (config.mods.oxi.oxidash.enable) "$mod SUPER,M,exec,oxidash") + (lib.mkIf (config.mods.oxi.oxicalc.enable) "$mod SUPER,G,exec,oxicalc") + (lib.mkIf (config.mods.oxi.oxishut.enable) "$mod SUPER,D,exec,oxishut") + (lib.mkIf (config.mods.oxi.oxipaste.enable) "$mod SUPER,A,exec,oxipaste-iced") + (lib.mkIf (config.mods.oxi.hyprdock.enable) "$mod SUPERSHIFT,P,exec,hyprdock --gui") + "$mod SUPERSHIFT,L,exec, playerctl -a pause & hyprlock & systemctl suspend" + "$mod SUPERSHIFT,K,exec, playerctl -a pause & hyprlock & systemctl hibernate" + + # media keys + (lib.mkIf config.mods.scripts.audioControl ",XF86AudioMute,exec, audioControl mute") + (lib.mkIf config.mods.scripts.audioControl ",XF86AudioLowerVolume,exec, audioControl sink -5%") + (lib.mkIf config.mods.scripts.audioControl ",XF86AudioRaiseVolume,exec, audioControl sink +5%") + ",XF86AudioPlay,exec, playerctl play-pause" + ",XF86AudioNext,exec, playerctl next" + ",XF86AudioPrev,exec, playerctl previous" + (lib.mkIf config.mods.scripts.changeBrightness ",XF86MonBrightnessDown,exec, changeBrightness brightness 10%-") + (lib.mkIf config.mods.scripts.changeBrightness ",XF86MonBrightnessUp,exec, changeBrightness brightness +10%") + + # hyprland keybinds + # misc + "$mod SUPER,V,togglefloating," + "$mod SUPER,B,fullscreen," + "$mod SUPER,C,togglesplit" + "$mod SUPER,Q,killactive," + "$mod SUPERSHIFTALT,M,exit," + "$mod SUPERSHIFT,W,togglespecialworkspace" + + # move + "$mod SUPER,left,movewindow,l" + "$mod SUPER,right,movewindow,r" + "$mod SUPER,up,movewindow,u" + "$mod SUPER,down,movewindow,d" + + # workspaces + "$mod SUPER,1,workspace,1" + "$mod SUPER,2,workspace,2" + "$mod SUPER,3,workspace,3" + "$mod SUPER,4,workspace,4" + "$mod SUPER,5,workspace,5" + "$mod SUPER,6,workspace,6" + "$mod SUPER,7,workspace,7" + "$mod SUPER,8,workspace,8" + "$mod SUPER,9,workspace,9" + "$mod SUPER,0,workspace,10" + + # move to workspace + "$mod SUPERSHIFT,1,movetoworkspace,1" + "$mod SUPERSHIFT,2,movetoworkspace,2" + "$mod SUPERSHIFT,3,movetoworkspace,3" + "$mod SUPERSHIFT,4,movetoworkspace,4" + "$mod SUPERSHIFT,5,movetoworkspace,5" + "$mod SUPERSHIFT,6,movetoworkspace,6" + "$mod SUPERSHIFT,7,movetoworkspace,7" + "$mod SUPERSHIFT,8,movetoworkspace,8" + "$mod SUPERSHIFT,9,movetoworkspace,9" + "$mod SUPERSHIFT,0,movetoworkspace,10" + + # move to workspace silent + "$mod SUPERSHIFTALT,1,movetoworkspacesilent,1" + "$mod SUPERSHIFTALT,2,movetoworkspacesilent,2" + "$mod SUPERSHIFTALT,3,movetoworkspacesilent,3" + "$mod SUPERSHIFTALT,4,movetoworkspacesilent,4" + "$mod SUPERSHIFTALT,5,movetoworkspacesilent,5" + "$mod SUPERSHIFTALT,6,movetoworkspacesilent,6" + "$mod SUPERSHIFTALT,7,movetoworkspacesilent,7" + "$mod SUPERSHIFTALT,8,movetoworkspacesilent,8" + "$mod SUPERSHIFTALT,9,movetoworkspacesilent,9" + "$mod SUPERSHIFTALT,0,movetoworkspacesilent,10" + + # preselection + "$mod SUPERALT,j,layoutmsg,preselect l" + "$mod SUPERALT,k,layoutmsg,preselect d" + "$mod SUPERALT,l,layoutmsg,preselect u" + "$mod SUPERALT,semicolon,layoutmsg,preselect r" + "$mod SUPERALT,h,layoutmsg,preselect n" + ]; + + binde = [ + # hyprland keybinds + # focus + "$mod SUPER,J,movefocus,l" + "$mod SUPER,semicolon,movefocus,r" + "$mod SUPER,L,movefocus,u" + "$mod SUPER,K,movefocus,d" + + # resize + "$mod SUPER,U,resizeactive,-20 0" + "$mod SUPER,P,resizeactive,20 0" + "$mod SUPER,O,resizeactive,0 -20" + "$mod SUPER,I,resizeactive,0 20" + ]; + + general = { + gaps_out = "3,5,5,5"; + border_size = 3; + "col.active_border" = lib.mkOverride 51 "0xFFFF0000 0xFF00FF00 0xFF0000FF 45deg"; + # "col.inactive_border" = "0x66333333"; + allow_tearing = lib.mkIf config.mods.hyprland.noAtomic true; }; - }; - misc = { - animate_manual_resizes = 1; - enable_swallow = true; - disable_splash_rendering = true; - disable_hyprland_logo = true; - swallow_regex = "^(.*)(kitty)(.*)$"; - initial_workspace_tracking = 1; - # just doesn't work - enable_anr_dialog = false; - }; + decoration = { + rounding = 4; + }; - cursor = { - enable_hyprcursor = true; - no_hardware_cursors = lib.mkIf config.mods.gpu.nvidia.enable true; - # done with nix, this would break the current setup otherwise - sync_gsettings_theme = false; - }; + animations = { + bezier = "penguin,0.05,0.9,0.1,1.0"; + animation = [ + "windowsMove,1,4,default" + "windows,1,7,default,popin 70%" + "windowsOut,1,7,default,popin 70%" + "border,1,10,default" + "fade,1,7,default" + "workspaces,1,6,default" + "layers,1,3,default,popin" + ]; + }; - gestures = { - workspace_swipe = true; - }; + dwindle = { + preserve_split = true; + pseudotile = 0; + permanent_direction_override = false; + }; - monitor = config.mods.hyprland.monitor; - workspace = config.mods.hyprland.workspace; - - env = [ - "GTK_CSD,0" - ''TERM,"kitty /bin/fish"'' - "XDG_CURRENT_DESKTOP=Hyprland" - "XDG_SESSION_TYPE=wayland" - "XDG_SESSION_DESKTOP=Hyprland" - "HYPRCURSOR_THEME,${config.mods.stylix.cursor.name}" - "HYPRCURSOR_SIZE,${toString config.mods.stylix.cursor.size}" - "XCURSOR_THEME,${config.mods.stylix.cursor.name}" - "XCURSOR_SIZE,${toString config.mods.stylix.cursor.size}" - "QT_QPA_PLATFORM,wayland" - "QT_QPA_PLATFORMTHEME,qt5ct" - "QT_WAYLAND_FORCE_DPI,96" - "QT_AUTO_SCREEN_SCALE_FACTOR,0" - "QT_WAYLAND_DISABLE_WINDOWDECORATION,1" - "QT_SCALE_FACTOR,1" - ''EDITOR,"neovide --novsync --nofork"'' - (lib.mkIf config.mods.hyprland.noAtomic "WLR_DRM_NO_ATOMIC,1") - "GTK_USE_PORTAL, 1" - - (lib.mkIf config.mods.gpu.nvidia.enable "LIBVA_DRIVER_NAME,nvidia") - (lib.mkIf config.mods.gpu.nvidia.enable "XDG_SESSION_TYPE,wayland") - (lib.mkIf config.mods.gpu.nvidia.enable "GBM_BACKEND,nvidia-drm") - (lib.mkIf config.mods.gpu.nvidia.enable "__GLX_VENDOR_LIBRARY_NAME,nvidia") - ]; - - layerrule = [ - # layer rules - # mainly to disable animations within slurp and grim - "noanim, selection" - ]; - - windowrule = [ - # window rules - "float,class:^(.*)(OxiCalc)(.*)$" - "float,class:^(.*)(winecfg.exe)(.*)$" - "float,class:^(.*)(copyq)(.*)$" - "center,class:^(.*)(swappy)(.*)$" - "float,title:^(.*)(reset)(.*)$" - "workspace 10 silent,class:^(.*)(steam)(.*)$" - "workspace 9 silent,class:^(.*)(dota)(.*)$" - "workspace 9 silent,class:^(.*)(battlebits)(.*)$" - "workspace 9 silent,class:^(.*)(aoe)(.*)$" - "suppressevent fullscreen maximize,class:^(.*)(neovide)(.*)$" - "immediate,class:^(.*)(Pal)$" - "immediate,class:^(.*)(dota2)$" - "immediate,class:^(.*)(needforspeedheat.exe)$" - ]; - - exec-once = - [ - # environment - "systemctl --user import-environment" - "dbus-update-activation-environment --systemd --all" - "hyprctl setcursor Bibata-Modern-Classic 24" - - # other programs - "hyprpaper" - "ironbar" - "${browserName}" - "oxipaste_daemon" - "oxinoti" - ] - ++ config.mods.hyprland.extraAutostart; - - plugin = - { - hyprspace = lib.mkIf config.mods.hyprland.hyprspaceEnable { - bind = [ - "SUPER, W, overview:toggle, toggle" - ]; + input = { + kb_layout = "${config.mods.xkb.layout}"; + kb_variant = "${config.mods.xkb.variant}"; + repeat_delay = 200; + force_no_accel = true; + touchpad = { + natural_scroll = true; + tap-to-click = true; + tap-and-drag = true; }; - } - // config.mods.hyprland.pluginConfig; - } - // config.mods.hyprland.customConfig + }; + + misc = { + animate_manual_resizes = 1; + enable_swallow = true; + disable_splash_rendering = true; + disable_hyprland_logo = true; + swallow_regex = "^(.*)(kitty)(.*)$"; + initial_workspace_tracking = 1; + # just doesn't work + enable_anr_dialog = false; + }; + + cursor = { + enable_hyprcursor = true; + no_hardware_cursors = lib.mkIf config.mods.gpu.nvidia.enable true; + # done with nix, this would break the current setup otherwise + sync_gsettings_theme = false; + }; + + gestures = { + workspace_swipe = true; + }; + + monitor = config.mods.hyprland.monitor; + workspace = config.mods.hyprland.workspace; + + env = [ + "GTK_CSD,0" + ''TERM,"kitty /bin/fish"'' + "XDG_CURRENT_DESKTOP=Hyprland" + "XDG_SESSION_TYPE=wayland" + "XDG_SESSION_DESKTOP=Hyprland" + "HYPRCURSOR_THEME,${config.mods.stylix.cursor.name}" + "HYPRCURSOR_SIZE,${toString config.mods.stylix.cursor.size}" + "XCURSOR_THEME,${config.mods.stylix.cursor.name}" + "XCURSOR_SIZE,${toString config.mods.stylix.cursor.size}" + "QT_QPA_PLATFORM,wayland" + "QT_QPA_PLATFORMTHEME,qt5ct" + "QT_WAYLAND_FORCE_DPI,96" + "QT_AUTO_SCREEN_SCALE_FACTOR,0" + "QT_WAYLAND_DISABLE_WINDOWDECORATION,1" + "QT_SCALE_FACTOR,1" + ''EDITOR,"neovide --novsync --nofork"'' + (lib.mkIf config.mods.hyprland.noAtomic "WLR_DRM_NO_ATOMIC,1") + "GTK_USE_PORTAL, 1" + + (lib.mkIf config.mods.gpu.nvidia.enable "LIBVA_DRIVER_NAME,nvidia") + (lib.mkIf config.mods.gpu.nvidia.enable "XDG_SESSION_TYPE,wayland") + (lib.mkIf config.mods.gpu.nvidia.enable "GBM_BACKEND,nvidia-drm") + (lib.mkIf config.mods.gpu.nvidia.enable "__GLX_VENDOR_LIBRARY_NAME,nvidia") + ]; + + layerrule = [ + # layer rules + # mainly to disable animations within slurp and grim + "noanim, selection" + ]; + + windowrule = [ + # window rules + "float,class:^(.*)(OxiCalc)(.*)$" + "float,class:^(.*)(winecfg.exe)(.*)$" + "float,class:^(.*)(copyq)(.*)$" + "center,class:^(.*)(swappy)(.*)$" + "float,title:^(.*)(reset)(.*)$" + "workspace 10 silent,class:^(.*)(steam)(.*)$" + "workspace 9 silent,class:^(.*)(dota)(.*)$" + "workspace 9 silent,class:^(.*)(battlebits)(.*)$" + "workspace 9 silent,class:^(.*)(aoe)(.*)$" + "suppressevent fullscreen maximize,class:^(.*)(neovide)(.*)$" + "immediate,class:^(.*)(Pal)$" + "immediate,class:^(.*)(dota2)$" + "immediate,class:^(.*)(needforspeedheat.exe)$" + ]; + + exec-once = + [ + # environment + "systemctl --user import-environment" + "dbus-update-activation-environment --systemd --all" + "hyprctl setcursor Bibata-Modern-Classic 24" + + # other programs + "hyprpaper" + "ironbar" + "${browserName}" + "oxipaste_daemon" + "oxinoti" + ] + ++ config.mods.hyprland.extraAutostart; + + plugin = + lib.mkMerge + [ + { + hyprspace = lib.mkIf config.mods.hyprland.hyprspaceEnable { + bind = [ + "SUPER, W, overview:toggle, toggle" + ]; + }; + } + config.mods.hyprland.pluginConfig + ]; + } + config.mods.hyprland.customConfig + ] else lib.mkForce config.mods.hyprland.customConfig; plugins = [ From 62ab685cd4349c4b017c3607ab38925e8c817198 Mon Sep 17 00:00:00 2001 From: Dashie Date: Fri, 2 May 2025 12:28:22 +0200 Subject: [PATCH 027/118] Remove vesktop electron override (#12) --- modules/programs/homePackages.nix | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/modules/programs/homePackages.nix b/modules/programs/homePackages.nix index 4714f91..b1303b2 100644 --- a/modules/programs/homePackages.nix +++ b/modules/programs/homePackages.nix @@ -3,12 +3,9 @@ options, config, pkgs, - inputs, ... -}: let - # TODO remove when chromium works again - fixedVesktop = pkgs.vesktop.override {electron = pkgs.electron_33;}; -in { +} +: { options.mods.homePackages = { useDefaultPackages = lib.mkOption { default = true; @@ -103,7 +100,7 @@ in { [ (lib.mkIf config.mods.homePackages.ncspot ncspot) (lib.mkIf config.mods.homePackages.orcaSlicer orca-slicer) - (lib.mkIf config.mods.homePackages.vesktop fixedVesktop) + (lib.mkIf config.mods.homePackages.vesktop vesktop) (lib.mkIf config.mods.homePackages.nextcloudClient nextcloud-client) (lib.mkIf (!isNull config.mods.homePackages.matrixClient) config.mods.homePackages.matrixClient) (lib.mkIf (!isNull config.mods.homePackages.mailClient) config.mods.homePackages.mailClient) From e4d521e10f5ba83000ce2b3e5ae5793d8f632e5d Mon Sep 17 00:00:00 2001 From: DashieTM Date: Mon, 5 May 2025 17:25:26 +0200 Subject: [PATCH 028/118] Add bitlocker fix to lanzaboote --- base/common_hardware.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/base/common_hardware.nix b/base/common_hardware.nix index 87d6279..6f3c94d 100644 --- a/base/common_hardware.nix +++ b/base/common_hardware.nix @@ -22,6 +22,7 @@ in { lanzaboote = lib.mkIf config.conf.secureBoot { enable = true; pkiBundle = "/var/lib/sbctl"; + settings.reboot-for-bitlocker = true; }; loader = { From 711c2a128f41651c90196af29fcfec6971accd01 Mon Sep 17 00:00:00 2001 From: Dashie Date: Tue, 6 May 2025 19:23:00 +0200 Subject: [PATCH 029/118] Add custom fetch (#13) * Remove vesktop electron override * Add custom fetch --- assets/logo2.png | Bin 0 -> 38860 bytes modules/programs/default.nix | 1 + modules/programs/fastfetch.nix | 67 +++++++++++++++++++++++++++++++++ 3 files changed, 68 insertions(+) create mode 100644 assets/logo2.png create mode 100644 modules/programs/fastfetch.nix diff --git a/assets/logo2.png b/assets/logo2.png new file mode 100644 index 0000000000000000000000000000000000000000..beeac559e7f1a4ca67df34b609fba52c894e34de GIT binary patch literal 38860 zcmeAS@N?(olHy`uVBq!ia0y~yVDw~QU{d2?V_;yocc5Yy0|NtRfk$L90|S2|2s5s* zU!KXppuphi;uuoF_$HRULGZniI~L(R^eX5X*al; zx-PDWShUC_+T`1j2&bHacGaKiZkJ6q9_1)+?}}X$@#6cvcYo^d-`ks9R`&kt-O8uW zE^ZSgFYDFpx$y;R%MwGh=5Ky_SW@xG z)ZE8edOZ6hc3o<7KOzt|`OXc|J?qa#&ONYRV2%EEiMq;oo^A3^b>Cgv*>hECKEqbd za}~V{Owvv7q;ekI`$?)VK77HN)pD;&mIWTO*gnx+w14@Jk9E4oV$ZQ2{(tvr4`*HC z?Hxy)mp(qTYhL*rb+)BC-~D@bZhh^=?VWf*Z?h2l*1m`N;%x`FoN8zOGC{JVk=fct zZJVEkpLM|ZZh^m1if@j6EBteoqfo4O)ke!wrIyRNuF73<2d%ZkZu7qPeXx45`&@aq z4=?yWy!i1a>T8Vjj=KBzru;}eZ+d3x3X25S))Nmt7BesvS$QoInQ+BX{@mQ`Kekit zuJ5|Fk9+ct>E8aH4NV9C{@yj2dFd?fSK=i-Z2{JLr}7MUTNb%^7oFEAl!|#MW8h>o zN8feowe#L}(j0wST%PB9`!ini&WmlDx4EqIZQuOs=Y^xw)=Gr4 zzA-PjzDw?fa{N|Hri$lW)_RwC@A>h$)IF}UOg9)8Sm>BoKV<>nflt=-`PnGAKeuT8Nq3s|*q!9L4U6OCVUZ(TL}%Mv}mEUmaD zRP)%hHC&R?&(*j0Zp}X{*t;@}f!%3G9D~^9C9|0;H2au?-@nmwNMe@pKXYICD4Uvy zr$+cI#l1pF1%LKu-AI@H7tOk`D(Ur(BeJ$8+MXNB8zvV-U96nzbHLKtBImqsOc?vi zFl9~~=_UhR23?->_D+({?_O?K@aU^p*JjDJI`-kaT@^8J>x+(u)SR7Ie3W7N`tAB} zXP=yBe<#sBZ|?u^x&MN?V=qZfSTq0H(l?3v@~8G|%u8xk>|ws=ZuzE3^YnaXi#3t_ z`oBW6PG4@{#meb%=(2qG%FWyO_XSvR?wj;0__tQ-zPADYrX@Uzn#xwSll{ABPPf%T zvz4Ov+?(wr{(ji^{h+YN=A#-cDqpQxjJFstrW9uL9ljL4RQKGT;OW0CKm2BSvf*Eo z?8eX!bZcex7AotL<#BsDc@a&HH-n}^$x z6B9ol;j4%^A9!(Y^bzlg$6WP~?|i6#+;WC*-u!jpeEZkS90+gf`y3LL7nQV8e{z*t zk%_l0Z&MKK8Rg~uSz>|NGAr&@RO-!{>G5Tv{=3~PPnX>_P}uWSEAq1STKyXmH724S zHxA8QJ7s2$3n(KAqXPYici+m4Sa`Ly;hnje+A1}4mx2_6IsGOY_ zyeeKszUfGZCCjoc*<*b>)URQK+a#x)9!5fa*c7zc}vxlZ@jbTtX%R!UYvLF zJn=0T_WK>Jf0NLj+gf{5BjK{0#a3w{ksW5@#^39_Sp3Qsz1VF2m}6hj-kH*@J#*!} z5+fUzp7Z|@lp}f3d!kx)u}qCXoal}N3teWuJiWDlWvyJvJ=M!z>gSB(ydU^P^S{|Q zF`@clNNi)Bsiu0tj%8OgEp~r${w^}Zxo?6XPg8((-t7mqlV3lXZC54Tp1am2KHx=u z%&tp+Blqp_`FjQww#N0F;{Il|RvVQlxt|g>?|!({!o%@FE``={uckq64O4CYz(y(v2sj}qM%8d^bHyVb->4mSH-_dTKa^7QY zSirn1X&L@n3{EkIU;LB)I#hCUi}gK}Kh){kV81zTbEJDhlQ{pv+fJ%4+GmumR7eWo z+%&V;^2tVjhl_Ea7!Nj!O`X&9srsQp#`Xt}7u2$|f>NKeEM34j%~M%frF*BK={XaV z`vGnnx&7q%dE_>n2<`HdXZd5z_VuaR+StjvR%AR8RQ9-atyDlJ|3t?9*t0kPzGwB9 zdtw#1%wOtJ)vlRb=kC6Wp0jw$rl!q@XIqyY{PRymlF>Ke{Na5oj3!Q9EizSY&%#^6 zP4gRTulsg8>jc*&*E+S{uVist7|*()@Ygy2u76pT_bN43MyI&nO*NdE zSI_Y!S-R=h+Lxy%{<*|icfx0<-ozs2^Jyxw-<(w3Jj5z4%jWsJTs}~e;c`abbym!! z>5Ctgd9J3pl)#jf-`+PY%l-jll)%#n1js;bNKp403#;i=VWt!#PzJ6Q9a?(Rv;mo0jhu=874ioIM>gv#|!Bj0Tw_3I!0zwvGrctK^@`%+8K4FsLzj)i?R|Yo40O%7t|?m`ju@_ykO}Bz6EiILYhvrimh>wD!DKrTi)dG z#u?tT80~ia&YfMm!;ODGn}b~Y&lfK5!=FA{EL@t=tei0aZ}1GcRm+<8Il9eQIQ7)j zw+AmvP4E8vaFOnZqdgm5$F-m0ILVP$89n*0!37)L#Zm7H%8c(czho*p=2fRI>JgE; zLTJm1mCw#E_$)Z{+E#_yZEjN+sD02n;{IIW_Q|}plL}%k{l4S4Y`zSaym(QE+VxJO zTKzCB#fLKgZrE*mwo>D_;SQ0f;fE(MSvKfz&#m07d|&*}LjIg@v)raGFg_gGbj)On z3cp4{%0|=ToxXafYqGTJU2Nu0pAvj)2ge7Q8*M9C4)zo&{bYN)^1ffG;z#bUzjj8X zwXaBCc~$9Tebd{{=!HG<4DaFuG>lnYiyiKVEYAo!Eq(Bi;a2_TL$_14Vmr=AN`=Op z*m&%t;=QyDKW6#r?Mb=iH8;*?nttP~mpW7XUIr`-dVG0B>7rAUIWs$)>T;*&U$~Gr zr)Bw?_r-U1v+v=3D;uKAl`HT1uyjV@`mk+wA6MMHymXqFt2kTx5k_Sd)ijaWK0Cg- z9@rRj>~nt3y8mB=Yjf<_)VFW>GPyA(qf&3rlS4)x+~$R}q zzwX_W=+HNxvcB)RyrV+wx=XHAIlK1UyTI+gZYPt%k)_J>1*BO|c}HBZo2TDiVi~Xc z(Cy9BOY_$8Dac;laC7^r3I4`~c^joeX4Uod3u*ShW{8@3!6%w^Mqm8a9i98vPn%t1 z0;=Ss?8=f0b6!{NxtCueuCVa->$Cp?IF-a>xpH2VRK#_Ii^X}{-!roQpSUuj?ZeLP z**sqb%zmrMFPyv2$yzh|Yh!iWE1&5~_WyWZx$IgXX?&tJUQ?d`+`Xus$GCE$Uo2W_ z{$+8&9&;Yce}>o2`}elnuJ;e`bvk_RzOv+^`QrSxYa_PF{hcp$b;q5JvenO9+dsH| z{1PQ`t?k(pxeIf@96h4gJ(a!O+vpSfO6Gs>le_2s&PtfJ?aaE3?GGR9?f0nqxS9Rb zmKaMT(QV5$!#j2MGHsgiX#HjOBkUakx6SlEPFQ~?Md@k7Oi#B{=loLM`hKg~bE|$@ z;NAW)M^Dw z;pxv+k0%H9JE&%S==H?nRpD~_+QI4amdit$M!5O}nV?ga@y%?d-mrO;^1b9+Uy$-K^F>hUWTg>mseWw=Pc>4at*ZW6wUVWE(`@p|>aZJ&S z+rkt2PXwDJ@n)syL%6#9=9-=R1E=u>-HUC)wa=1;++hbX4H|8~2oqY6;NyW}VVNG>&wNKGh zkITOw1w4}O@)Fp_WcJ_=C&vd5Ydr=@CtI5i<)7(KmT5oW@>wqXr)BNoQu*Tt?nN(8 z%3MZa9-Tz z4J&F5!flprOnuuYSSrjbCF2sIl)?Ug!7*q3Ap4-T8Ep=tnObvRzG^!EA*bbL`r&PV zWZuub3Chjb(O^uubw+v{7WnGx@|Q3-NmmrCMj+;l;`;7k{$fWFn;FABj*^ERg%*U ztv;l=^Xjuhw%h$V|8Zj>%r&2sT% z&J0P}X?Km?&xvlm+cMShQSad&$A9dKSvAQ>nCsatzP(rWl|DIXH~Y$w5CNwwwy^?ROqhO?x*mpiGx zNcP>VJgeE4Z*%amX{mqrY_-l#^L+NM;KkL_1jgEi(hE%66H5*R>VDAsqIh__;GNAk zS>9QHSUt@!{FFt{1f7F(qipm(TEx9S{&ZdD&b7s5SDNQ;I;vakw{s=S#YWb2Ca<4$ zGx{z_lw1hpb&%_KO4@4A!S7kWw(Vo+CyAa3Iv4L2&scu$;cVH7(RFh-FP3{V<$L4w z1*0(Y*Tzh!Wzw^i?(UskW0uNrY9ICFU+Q{}kac<@j!;hB) zWbc`-?<+t1YEAc+aQ2YomCyf9KUZzJ<@K@d)psjaq>1NA8I%YM&N}jU)8^@=ItpL; zXUWR;2=G`v@L0j}_aSrl-pAVoU({LM6a`4xO(pE3a6hY@;3Vd7<(hN z{GadD4w?6?KHOG*{R+j8-3wk@bv!8e@q>|T+m}-x`DIHk)am^^x5h<*-#zP34$rT< zj7o-kg^maJnuMP}SI$?yeBV*asoWn|%dDEVg{!r#w&c6Y>(wtAzGv!uRofS|^S*ab zc9q0JxhB1bURBbY%l=u~Nca9vR}%QbqyLmYvF^w3H5@*yx-u_JPrqGQFZ9~k;nKda zo6K{I{y&rT6%xAh$Y%?lMi*1G|c{ksnrS8;Z&-ESdqnXx07Q8-Cy;-hqS579T<^!PmrH!N3}<2+BObV0G2)NQ@( z>-EjQZfIhgn!fnd-Hubq3#NToboZx>ML^1))q+AH4>&#S*W6n_DSZ9%*Fnl&%Rj#? zv6{cnFQqL0^)3&4ljn+eSYE!qn<-Kf`>C$yCxxUMMDB7)8 z_pZD4@8R2mZ@16+DQ%kjGTkU^Pik|%i+7QK#10!}VHfGYB?g;VYn6FJc-ZGT*DMH* zJEfy>y*(=Uvs_iJ{jF52Edr*p;pC!zcIU%77m zcjnz6PQu?^w@q0W9=mDR^xKzPo^oYxtGZs-^B}^_VO5Og|37&%{-$%!|DfvEQ{Owo z;we{o>l;&N;Z>q$e^Zy2GBQ@G{?Op|NP7K1RLAvUeKqft_m@Qu>Sp|DD>e~Zw>Tx_ zN$|%Xicj~-OnzyaY0rM5Ina07@^6g-cb)C0U3xO@k-|Ik3ok<$U(f7Jxx9YbbR+vc zJCnn|)aOX>awrzcz5U!CyZYEBo&M;je3j4DUF%)$?e>yA`10YsomaEe;+M%N#LqaM zpgMu`#fP>>rPFVxoqAKye(-bR{I}e1CuZhEtxIH0GkpDvr}pbXyZVIIX$$LI<5xu~ z-n{s5(%si#pYAFy=X<>U#Gj^{%bL zEno8H6Zgpg`&*V=XKv_nJ0H8M?;$s1sb6T!Ixoe}ic120k8Hm3`K~I6bttvjYwBNE zrQr~6wqV9p#d)QhOuPSBoy}R#yZL-tlGvm4{eqS4t_m&^{frknd1kn@9sTi8Z}+-8 zhw4NOzsSuFTRLIOjL+UZJLcPDZPHrUThDy;U}JN_?R}Sj&3vzZbFux0x&rA*G=F%Q7q9;(KeAUbD`}OVhuM~r z3yxO9`OR;PbPz8}vX&iJWyRC1>LDuz$z^X1P^U;T9H z8FL$@HV4s{F;m&P9PJqH&(c(UFHqATt5b|K>HSst1HB*3olUHt*=NMECVQ3l>`LG(TbKq}Ca-_Q`_6BL_bl ztmfJH(Y~sp_>*Dzeg^ zE*0jSX8xtvzrpN;p3(Q0kBgo7<>v=4$o6rQG&+#=BKzy#JCmPm%JK|vop3~_D0s)O zeI9!?OClzpwQ|l){xtPCqphL95u60a&EbB5VB68MD3$NOz)w1NR)#U=^Ym@VjnVSpb=&$%I@j_PS zhVb`a(bB2=?u*?2vt4SgkHQfoYJz3{^(TnWN{M9lz9JX?^$vU{138i{?7 zn62JFS+*iz=JwZV4Dl}_8!Go8YTM1iZ?GzvSH}I?`Tx7S#j-UVtoG2NuJ@l?0#*##9L3DW${3`4fn!~Da zYH#R-Aes7UZ`LMi3jcb?lO@rUgms_G)&nT}y*tqKb9EY{Rnm@ZlCwYhOP*1W? zZ8?*%Nmuo*9`oMW%uilwrgXke_R^kmdbZ)>E3CqWQa;N+aP>IneEvIS(~Zq}bE~bG zI_k7sk6SM4Fm6@DN zl##@XyD~2-J6}IP{guPnJFVL)!TZO-KPMj~q^G#u-l}!UkxjYOQsRBwqB6H>rmg#| z<@UdJe)EEL{tH>Ym2*QQ_9?ZdL{vlsxmyU#KF7wx-od=(h^@lu&klY1dG*2f!@pW^ zoLnI9v+?nzsqfC0+}+ypI;L-5jr!{&tN%9LW~`iOB4x2p{z*BL+|G5Yzc|n75}st+ z+HNa8`*CRToN3n|XKH;v(pX#+5qanLy0iCMy-j5u%$}vU%k(&K{{A#K>PTDRWrHHe zg|@s4@5+x+F^x*}fR{FYy=+V!J0sY6ql zuP`m&HvG$3QU9G+KO3&O(-HiVlbheW)a-!eL$T7V+`T`Gl2!DLo4j1lMV&Zt{Xws~ z^qoIjRc_ZVKJd_aTN-O@J*(N>@Z}a86eoxR&P4Jpk)rx#SSw_7-j>mjXz5D#l zqb-8<m_@I8KbUOPv!B2F`vE``7iIlN%1HD{OBq4VrO! zv(oNQvw~M#;r0oFtp%9!K1asFWv%eK^oPQ(;!%YmEfc;RI&2hH_R(R>JHm`1Za|%BZ_pzR4rBNkc>K`6H%MpULexkGpGes~^T6 zTys#O=zHU#qL#=VKYh9Tq>bdixtM-SR#cJyc_2xC?NaNjoI8&9%C9T%cYJrOB+_vI zwt{uXnlJbt`qpUvjWbyplrr-Fu`JbHj^7HIr;mLn@<7(2i;v(@Ucb_r7@#W)= znsDN(lK16(DsTO@Ht_tB57YTCI4P08Ch))JW3{92ckWibc|pgo>#14mvhat(yRYBR zlFSr1ae#IH6{~aebf-@(-la6{_R}*5k}{M}D{`FpbldI0pGisa7m|J~TAdp%(R%;X z--)*0d0Juv?q%=vT9Rqhz!4aK`^3u+HA}?qiSt=0Dy$C{ykNJ4kJ0n*q_~U~m$UW0 zg}>B#zDID9>K^OZcbm+#6*(K%ZTyq-cK^;&?*~p(#T?!~doFRytFq$%zd4(i+h6>g zbsxvJjs2Wk1W}2N6aOE+xNB&YCyjbd__} zS%&PgyIjv*dP*~@_PlqLoaG~S^6Nal1v3omkG%<MrQ zy?1XHD~pQW@)_Ba?PAwAZ~ykNqwcWUYUcfab!XQq&9zy5ees!mF8jVjCP^*s%_sgR zudAJy&&+Y+K!nB|&b3}844l6#XLPbR#@{KE_^%TYcTd&LBWs_1ET2EKdi9s4C$B$j z5xA6@S;xz#7INTpMRJT0EZxx850inRSWLX4Wt2e-E^m|Em8o z{o9nyG3`m`f498aH+xqP)8m&+LBD@md?zrCN zKRx$IoDiz;zd!Cq%Gahz>*vqEBQAZT{p8UnFU)zC$EctB^83cJAHE(gUMpVC`+L2% z!lv3YkWYbSy5J;5pU%}8$19Tr%pU27ef<6)$!l#`$-FPu)^SI&ITrs}^uPD%eDS-E zt;!j)x1WddJWMNt1@8*>~5NYxyrtnX|td z_wRD8e{EJD`Tne9=Wn5&d&^z?jXh^IzGm2Eo%l~y@tI#<#D=ov^D(0C&op(Xot`|S|wmf9?a`(ce$s!__ebY}WzUGVlcyRio zj7Qrao?g&7br;X1O3Bb!Q(hzr7ESExPkW%f2ir_U2u%F8&y?&xM`0@M~gAO3a+8AFKGcxnASn$Nr~d ztxWF6gU=r@IK{F#wid;y>Nlr|xzCg{xv)!gd)KskcO8sBSQp+}%dHWjovC!9q5XOF z*R$s=cJ^G-oVe)b`(s6xmfuvT8pVE4u+i8n_vQA_#=UBVQ}v`Cy*kcua)*WX!`4lo z_!FOh%UyXQ_?4~ig&mjGeVHSl9{BR0r^N2BcbLtVpo@%8EMKZs1Ozb_-&@J8{y{XWa_Q4% z<<(mRr&#WN@{IShd(i0*2QxR+DHw0u(a0yWj(2N~K(Scg^YzE?)-QdOFCYF{yyk}7 zw3q%#Np90Dc0JIz5xKfuZ^zu*xBIH6xihz>Y>*97|14H#lrig&bIu9N2e^iamgs*|Es6lu6~>t$@V075^1S~&?t|+#9T^Xw2UQ&x3@^<1 zy`Y)hsv%(a!e*}6g>r2NEnPW&?5|tl;KpgSM@&#R`vXhsyYpOiHxC*9IV@16z3l|Y zNr^n!NP7hxrvndH`n_iFQuSr$HF~i2m-Fixv(ld!O+I(7@!RvazXM)J?o6|~(i|fe z{>yVe_tpz}Zil_xrw1|#I;j7ZXYu=WH2a&>>t6v(+B+_Q%#54<_3$~PtW9+mj+1Ze zT16~aI)N$M<&>Sjrt!@f3xnR>>t0v|PJ4B^(N)iI?^3l&^~_^#R_kUuEDvP5=xA8^ zE+pxCfaN2lxy>`n*_W>7WXcaRJ|_-!NY6#iY`n%n+qyVt?VSuct| z?zr{eVe0F=N}VNfqU9^ti^LS!xhDViU(Vk?|HQ8ks+GIEmh4ZdbvYExwkAj}Uv~D1 z)9;tw**E91n}=IX`L3kNKi0^5r29_)$}FpK;b0Tf`|m4#eZo)qnECU4Xz^VbS$pbY zVO!M?j%7>A+hqC=mq8zlScBGO&tE(x)Yr`5)+)(JPBx>Yf43&i z$epvSZ0+e^54APE1ii@+HF!Al*D1!DrBQjGeiknH>ab5lD|Y(owP^`yTg})kOJ%3s zeAVOo_O}Sf30_kP)qwpb#q;EnW;9$7zaF|-|I!2LrT17TpYLVfP}i`1vgL|5w;iOm zx1K)H7sh^viP5tusIh))|5rY_DM^!cTbMm>TTl2LsWp+`mFug3>Yh)jFM7^iKU&7Y zZOs^FxhvscQ1@0=USYd;E4*3kWOij-0+r5!g*!JMmE;fkee%T#=F>B0t&yLW&}nP# zQqIrLmmc2zwE4{Kpr!HlGbXe8DV%YgvQVzdNHz4hP34Zqtlhz(#T=F29rev*EFKrxT0O7h>fjb+?z zf7~l?1h!Qzu-%_?@526OkG}i&G}=t}*=T6iYQNbWdYENS`u+>Q7S&D0$Zv+ z>^Ytu_;X=H+~oG3yZWkH>}v848a(_r;VsLg+kOg&*AwY-O7IH|Wjy zIZJk%*Ut5|HD~QhE(V;cGud-&sm#2#eY*M_HT64}+nNcz***Kk&ja`PFFPAKhCJ}? zQUxs?J0j!p;mA^lpEG;5%?RMPt?Zxv@v`SPPvSA9R!zxe_c5Jn z6*`%>XJ3}vvP6a6&(>w_6;^KVx~4hpax%IgcQLmhNs!^(vH+cz4m&kFrZ9`x@bWp= zEmYDqxxyTIEhSjhD!KZ4@r^a#B;DtQX&M`JhcG7Z<6@6^zw+tTS>{fgE?8UpMl`X% z4XN*_J+W}sG$(VXr|owZYJLd0E%94$>6w(|M-IQUxE39YpLkJR=+#2@_aBX-&aX=Q zBX&^w-D;7@QGFZJHE+*_Ylh{(Nqc(;MM<3r$tQ|C<=dfoc>>$#E&^V*P- z1L+Y z3fI@p+WAJv;^uW7k%9>037q-*myYkbocPzkK=6N?)mMjU{8|1L^?A9{_m7*e{wSDX zw6S2p+Lh1N^PXMF-ni$sshnXEmft$a?q9Xb&@e@%s64wFLin-#<0{N`7RY->-5z!Z6VG`&E|T z`}>X02iI8|9pyXb9>HF+V0Lo+ibVO}kDSZC`BeM7RG(9)>HlEq$L_se{FkJ=woG?b z*dF{j(qwESj_yRzq7VT-uv2GPBZEnP? z>xSsBvDZ>wz#h@wuw>sl{=zaYBf0Ks|F&Od6QtR1&3%gO!@mUPSn*#nxIF3i+HEGfjW4vVxn;%7d{Dl^K4|jny*?#VZkt|WvCyj6;PNUz zKEK~__u+Ek?nE}${Y5if|B2KV=$OszZTPZLRnI zxW3iMy?&PmGiI09zQ^+m59$YX?iAa0!Et}jzbN&j|8ec|LG|mWPQA_1 zo}iv9KBpn^qUq#6yWK2jd9P*Yngddq}6 z9|Je?%CW>RF{xUr`D5y@EOFON{hU8>{Z%Cu95%Bb#+{hLCG{!(`$NsVo$1eldy*P`%>NtZ?#A13-kG;mCv|?bOxoorbM^(xT)*eI zF00ek*fi#^+%e@18RJUQK*U89HX`9WuynXi<$72VkI@7dmom6Niosz2m1 z{aDUa(zLGMNp(enqUD}Q69+3f9bva$-tDYkr$5nBo6F2D*EaveQSF-ha#>riL`~gc z)&6Xmmt@g`(w@?}4`jp?|AbDpDOz7XOU-^s*8QuK>{+!Ow{(RjeE%i(Tw|%u`<#PL zLTL`^EB5}a*@@dz+zZ>S0D5=3iGL_P1_)&8FqM z{1I#X{WbeSwmq4u&iM0kZu9M$8CgE}tJW#_C$Ku-xIIIAlk?LqYsaVUSL%2~jyFaN z-2ZVpB|*&d*wg!Ze48_4v-nC%mSp5ly7Ru2x%Jl%#}h#tcQ<)HIn$``bmrW{g2$7; zOT0cI>FIIwQ0tNe{*yocvENQIx@8_&e|pKpoOW_!f;C4E|PU}m-7##cqH+@81h1**Py_01)sCT{Djliv?CMn3%5 zyF0r$G1lGe(_L1zKtmZ1!{<^0uY;%F=6wXD6lS* z<-Eif;fRN}lXl%%?{wvwGJUqeMo!No1D`R!V-@~V05X2q;{Ra7zg z-`!t}YV)V~XheAk8G33vs+aGpIKQ@Fqu<2qJYUWT+lrZz}?rVix&!0*ST%s&E$;D&2aK!%Ri~a&k zU*DBGEvXfm5^mAAUt!9N&#(5at-5S@ta$gIqM(LfXPFOP`BAWZy|e-U+Jb8#Ha~fF zPcj>Hs8uRFQT{aNZL^;QB;Gti-^rh5T9iHY@Y~PDhbP3Z^-%u@UYr{6@VpkMak-y(mJ*#e|&)>}-DisX1ue)#UYTFvYBl9hW_cucr)64{$Z|j~IEU7>8 z?dX+O#@J8mCwW%ikZ%9jZ~V~c`j>))E1wsoUA=UrK9TRab%eF#@|(*uY%VUV&Eq~e zNmI`3QN!<;(xsnYF4v!{&euBi<-?e~y%Tob;r|zV_+Ho+M}te<0_VPW-P!OYT>HbZ zr`PYq@2-tG8~+Luyeyv8d2ft1SzhPeUw!?YmV&0lm6@l`B-iU)m#c_hF^l>2)hia^2|VgA z<=S8BpJ){Iz8kz#NuiYeNOhTH`tp5mqF=Ieo?WcsQ?M#^ihAPgwvv0omttE*9?naW zth#tk{+esj|ixRq>Z+dD_StUxDSu)w8!dY7VxbM&me zal4bd-mbnVZIbKQQ@^ck?YT{#thkvzS+KMOH9AfFry)@s5wXrX>*9~7uCF-@Tx1%4 zAMmv(jys(E^z)bEuO~#T9fJ2P7uomIJ!#oil@-iJrG_0P@q z4rTmlDs$yRW3S$i!@tYc3r(0Y$L_M-u{s04e{Omzoj10YcE&$?e%XSvpX>Vz-Y>QX zM9OzQJ^V&TefB+{g9|jC6*x%F-2DEUenDSHmp+?+olHi=hB9>>UH^&E7ma+=9roxa z%n(=>qkB0dH8YWulbim0PvSeA)x3x8WP^Ju zn@rEPJ?4$Sbrw9aQj=w7&tSX%XhQ9__dgdkZ+AQMr}W@i1D^;+Z4uFcBJNWi0xe9( zZ$Ew1|L?WVmrE7$*K_5AI6uYJZdq7$@9R0UxLU2nRt~2&=03f;d`r0B{ws3-m!4k1 zcQ2V={Z+~J&$pECm-enJxwi2BxnDnC+EsgPU!KSD__Ecu8A*bZOq$kd6rK;*CBvZp zKK${MyU)+B&n#}w^-2n5w&9y9Kg%s?1@PT_@;Y$&NrQ(67bG&JEVACUb>+9CD}KNB{ZSLY zFH6=!R?X32o^pS`-?92tnPQ$?U#}m$A8WQCV9!_PBH>#m+KOyZr{xlik$+@gh&l-^f4fBP!Db&z8RLz) zCOcOtwN_bOJ;$=;c!kwBsn3nJhv#nl=55i(DKU*-xqC(QcBbm29^R>eInB-6<#T1P z_)K{1GV@>Yj6|m7_@$G+wFZ8>99hIe&;zGkYLv?2Se=bgG64aE(P&ow#ov7}h}ou0^DsS`<` zPRX*=tu!>?C|WvU(kih@DSsJ$3I@3Ul1$6lmDGH`@f3gLjTEL?7saeTFK`I5=b62A z#~&**-;l3=&mIYuy}sjVOlRG%)3tB+O-vA(<|uxL`Ebk9>?`Y+MC7dB#`G|>xlRrTVo+GY0Bn{yo={1a~;jR zmHO@=N zYHg}J5cDEw>M2i)LLE1Sl|QOZO>UnQ6H-@pd&7^J?c#Ura_oaQtlp?1b3?dy*&YWz zho{Gr4o=_^kt+NB?`Q5z5s${}Iebn_FBC#}Y0SDqDf);-LA>NoSqfiRI+4U#HvjDfO?*5Iug?=nG-ngF2$<@$3A9dng1h?Z z@)<|2?mQekZ`rCCIrmvM8}9sYrS#TC(WpQ)3vm^V{>2B?Lwxinwc5K*Q=g2+%|V* zEquh~Bpm)FmTuAHf`#FJICPxxDL0f)=FhbaeMmz?N$_T)QgV0%6@Z-0lP1&2*| zZlzq>2gR(2tgRlOws`Gite&X#KrY_l*@3K`C&kY*J}uRfOVl*1Sje-3?d5iPzT|0l3(4;*3?2_Z?i{!a6uTXcsIb%=d5!U1Ug*Vg~kCtqF?0)+0lRkdvOVWgpd@NFch(y1zu(;Se)HKZI?nkd=3$P`?$85yZ=Wj97kI*Z z(!owlH;=pQ0a9EOoz5xF79E*s00+_`r2JLFogJtt}^hV{E;? zKyo+Vf(PNoBKH@@?Qe?z`%3XotgOkGXLd!^n@`Vl4)|HP)0SK1mt17f&&&%?K1^X* z^6HI9@s9nDn#GN$cD;6o^{6%FG1K#ef_9s~CCn@T%vpEx;md4} z9bXh4b!jN%T(^z3_?9x|_p)Mc0kLoO@oDkXw104&o7cM6vrFhD^TBWV8HLAwodV5P z%_zC{SmA@tSEiMJF8IWA0cS@MH+(@+Oph#)q zfua{TKdtnYZJGH~PwKG1eGf&+E4SSbuAlYh#vNZ|V-2y|r53JrZT)j`swKPq?S@(X~-_j@61j z367`WJ2h2C-nVy#FE4+0 z@5UE1mMyxv^wZ@=-IX&Fe|OJ`|MsflU*N2D)A^sqD=1ZOzu+@Hp51=3$Tdgy3#VmQ zoj-o`sP#GF=8_8mp0yXajy`JgiLNcUlhDq4Nkq8QE_2Hxj+$F6yK^7TxHY}DWv0&> znH3R=C$pNg?Bm-{o&RpK^3Q~z_thV)-m!n2wfEGngYm~AZcDu`dy~6YX?m~)JJ;(4 z+#ULho2Dr;Pu?bMvGb~H@Xl|WUpap-xugHaeO>ce!IRI_1t#r!;92pbQgU9M$Pc5b z5!<~2*UilFky+uPcysBYqE%;vtLBuf{8Q6*_RH;iT!IBn{#>PHT-h9R4*E}dxzwb! zl%r~DShnkA^?wt*CR9CWm@)sjxmkIQ@~k*5d2SoE+^*VpnXf!D)Z{D}g0)?z#Pde_ z$h{49FxZ{BUjB@I;AvmGIKGf26W(yWd0O3dEVHMu#`#Ck&y(BKtQUNmys!3ca`rr@ zUlU8_)oHGAzHwRswCyx*0$+2r8LNVQqOa4&#k?C@UdQm6tl8`{QPj07vu4=2XCeX z>wKHX_-l@c@a^Ye|NAWtD6+5G)$m6yNWnyM!f(DLcmD~etCFP@CCd(~Jvjeluhpp&7MjF({?8F{x6ey_W_!MV=p5XI8=*dw+wQL09KuCa-m}S9N}^e7aZdzT~7t zzGJVe)%g}iyqMJ^)Ny@tp@fGv4{Ow|W7lj}PMNtzjqisXhi|Re9bf18=M{4@-fJi? z;4LjOS-_lO{CB^j>xa}b-$$3`{1)f5(s*h2cUjrn8FMEohsHYO-8vCFn`ee$?&e85 zpPx$ItI2D>q&;y@_330a;Y-FQZ7CIYHU%<0alRgGKli=xdtGhZEfX2;uv$CBBt7d^ z!14y~#NX{PAG*clPE21}@^wmk)6b$e|5zWLo1lEP;ZlLWN0*Mec>I%fx*SQb`ue+a zo1R{c-Sjo)qWI_I4W0Kroj>=t#%V0iP%YFA)6^2} zWLcJ0n9J;wy>5q2pKY8KQg_Jw^3T=HY*E{{opO0PA+P@4zTJr;D`$4R3r;n%-!1zr zUD!Eh&eH~?_gYWZ_5Kq%Z&Vx1nQk>9aKY+0=D)A+c;4uiQR1KR=<0>duIIcn&hZ*M z$XBGss=mxFii|oKsK>o}y4&vuzrzd)WRm68-?}6uJy1T9lJuP6t@m`>3vbj?t-BpF z=K8#ud*8#zsUv0b5DqQRkz~wk$HQMx-0&fkjH9X{UvAW-8!8x8TBpwzIP;V@|t&WJ#ui> z*{-PYGW(VAgeQB#+8b2XT{5y(+4pgAE0@Qiof$c2?^~o7YtCgW>U4c5U&8p-`=7y) z7GcAs&o^W)QkvJBRC#n}v1q}RxeYBwzqz+O(kQE0R{K$A#T0SH4gT9C`Ep7aRzA0p z+_L#yL5~02ht@Y@5>{x@}gPHqo1x2yd{eZ5;28@XHqolT&#v`^Fd zl7ez#xP34C`JJaH-FT(8N@?2d!?P#f-zf2ac8#`&`KLe~U-RCJ)27*cmHAuat5BnU zrDECk{?(T8%a&g#NiP0W5Fb5p(g`{DY4U{y6mXjmn;7 zs~0YA|E&4P`+?E~N2}iONWJ%dmrJiKeie6j-LIxomom5bF4x^T$7}bksvo;voi63b z-`Eh{eb%jx(am5lJ<6Ms|-(((|vem<(K~=okNlt9Z!lSomx*|{#MvFWaLtt^+u{-r&yo2uIXIt1&a-yOJypi09cI_;oA(`@@fWw-|m{6g2HNkC^WBgg`F^k=tY|KaZNn;_29%+Od_|RoRv{B&^pU?ZqoAEx4Np7xa3x4u9(j3H~l`--o0*D zX3zT?<8nl3R@<~I8*kX{i*~aV=-U7JyT?Y}gy}M@bN+fY*?wNBq-(Kze{RmB6&fGD zw=6EKdnG3m_9tSWAJ={JH;eK$|7b`2YuVK}xkHNQ>O$khUMB~B0X`|450~b8=C|9g znR9B_s`70gx4zv|FDJKh5BJjR{dde_^Xi&q6#SM=z5X)m*VzS|-kHpeEj0~&{p)hc=Q+Pz$Mg4sv0&ua@jcTyq0-=uR( zxqEem_@fPrBYqq=($-LrjGpRoGr0Tc+_ifTzx}-MhL72iyH(XGg3cxr<5uul@SSsd z_VB=~#|^93mF}IqT&n2T0`Hf#vFFu9b=faH(vw>A!SiMh5pU z)huy2$I!da`j3E;*tUa#E`|?|n#ak+>^dy-$xHTQuekZg?++usW|i_7I|iRJkJ{>1 z@^hbroomDymLuw)!jcaZD4cDaSF_k@@7qh;4*y7hSvB=XbfuF}OkVD)T0!mB=+w5! zJUhACEli&3i)8Rm@cAkdv8il z`r+KZ-$m|AOjX~vmH&I>(H5nS6(9C;&QW?kXZfPtlInM#B92f|jmo-$xhGXC z%aanE9gL1#aIewOpjLXhWMhEVcl--utXR&2s+o5e6 zx9TsLz5D69j%$*NTTYcO@|hg_r_;G9m}MvbtcRC;4mrGk%ustUJ@K^a6PX8n-#*sH ztrY7E`E%K~jz96*ck7>R6IjogzD?Yi@g!>Q%i|l{J*#JO>7?epoICf{v|7d&QHqzp z-FZI8cI~TzQ=&?K^1R_$(WxKvJ!i2lxst!2yzqg1fIqk8p6JHs-yUT>ayiQF`9AGR zmELitLr?VO)8*veE?jg$P0*5n`U0ehFtu&`5@KUsF>cJA7*-6y{= za;v8YaxRi|y^*tLMxF2NPtO=+Z=9{t-EfBO;-6FJo^RXp@_hTQGeIiyKB{YOS1H7E zrTa`@rE;dhAaL%}Q>8Cl-UZJ&^Rr=d{g(c%?>|qSYOpztLFR$cw`D$ucHi)-a9Heh z;oj_BIpH_T(woFJJ39ELM%(~oAouhjKl#JyydR*OpS-MHjf z{=Y>YF>}<0mJtsjgOojc#p||0Qv&256xoYKzTCU)63GbcIa(W|Qk8y&0 zl{wSi{qD2cxy~HXnXKcU;;=SeUn>6hq?j%IVo}sHs0;_j#u_pBE=QSs2gCfp)+> z`y>7|Bl*`uuJ0l_%5Po>-v7$K@|g_3yU4D_JvwuD%{BTP*0JE`+pmi4iC(6Y*9P## zwCjqNvbLRn_TJF(XLu{0ruNNHb(PzEPxBwP=sr+sVo|<(r{H(azx&@pr=1tG(SB|c z0@~-q!&o`dKLr)eL+AA`SNJrf%0hO_BYu zCZ6%|$(cu12~RR9nzJF6nO!3PWK4xLyJS*;b{ZmuYhKYHL>s7~`4(Ab$lyz>5;cO9ai1{a=^xncBv-9q(`x<9u4 zd8am$_3NSa7KPx+I=D6%ITgjqY{Yr{2PhZ`AyKSs~Xk~48vBj@@ z-tX!e$~Z463P1T2v~>H?eNO@{63??NS>eC@E}PbD<}FOzSvnuW&E+%h2HsRY-TUj6 z=p+eyAMS-QdiS`}TPt)kSwpiAy?&*Aw`$#sZq8dgTaQoPUVOuC>r=ySpUY)Re!Dhb zbkV=@Td`_Yrp&YLdn`Xl+Le^I*1p(by;SJ%VX;GRSBXtJGNEPik2r~Bi^swnLn5Th z)=o)fes!n#;{R<%yv_#M)6J)u!K|3zW#w6S z#QMZVbcEAAa-USL=$BZb!#5#)xqI`&S+Ojuxo4aVyLRH!;%(u!JL9WeayBgDFFswm zdFMXMuMBx7CVtYrBdnOZ{<=g^*gNa%CNIy+{!j8f_Dbc6|IulVvT9RBZtrIM_jbh^ zHfFyI`MY{P{ZO_pl&%+Py5`MX{cHNE7g4+TW|b{J`DWg;wL9*_vU|#3FlDlQlAG?C z`ERN3l=TVEwllTIWPjjXe$#yF#T^}Ci!PsjeEoF!)Y9dWM40yX(_wh$lJ&(HZ9e*-sx(JE!znzvM z@_g5w#z(r}1%kHR@%;Y6I)!_B?4=d|HRk={@^P9|{^>(3mqO!9;Z+Jvb|z1bD6vda zpZtw4U*?!S-_EeDu1DmVmp(fXlgK@NkHpVLnR{VP4Jxb7JFZ~=WE;8C;h}X@b5+Ae zzV<^K=KV-|$)dvBH|5AlbCruu)%{D{?=&~K}aHsh&F{ME~ogjRZQ=xJ2$E_HYqb3Bdn`L1oc6hW zTVkv0ufK|TyJL^O6XW$qB}>J2$8G(f(Qp4J=+>h6d+ob*6fHI@*u6Nz*yR?x-(vDY zo6UF5eOg!Zz4X}b)2&xS#UGj&7rco0dP`=7_QaE_vIa+audur=*(30Kr&hz8&X6`+ z=LpvZLY6o1RT^|y|z`ROk=?5&EsvLkD!(Qx0x;1C}oR_~?RL&}BhdKxe zzgS)UZo>mj!?<6;QetcFcD|azy~kjdy5av>OD;Jtn=(J6NXBRR>0qZHt^KF2TH9;> zTD@iFo;uKp6!V|Q^@EoG>!g00zI*x8SCJ8Qp;kQ&!hIhDRt6qOT30K3__(8{e&)7X zpR>XWFA8UJSUuevw|MG>>*fME@+{H838(u~UfC=?lj41VQCY?Nz!ydTPAd(L^Fh1+ z-4tk_c>QA*!>w%YLY_VT$=$^sJA2P3&NHvR|7H7A=kC2+<@viBz7=I|zQEoz|9NEM zPcC0KbM~GISI!oG3EzH5HGaDD({r(S%`CS5r3@7jJhV7 z3*T8-e!rWlx~)LtUthj+U4JjjZSC&m@4ZsQZf4A9e!j<1VE>Bw>f3mxO<$J+I(sZ6 zRWD3aVX8vx!s_ep3${*nVp`j{&N4@8N(Il97Us5(QaAmKnPj5>M7*2yZQ-&Eo|6tA zC*@b4E?=NGS-7$)U&iCjw!{RpoAaa3O`TXCrgF%Uc}=`Ccj3gIHl3up&wX}vvOA|9 z-WHa2|G~X=Ul-3^oU+R&N*)w$N3-+Q4rr=0^JmCwMSpROZ&oti-&F6w)%Hz|Y4J;j zSFLtTjn16M`dnq^$CiRl5Su4_bHWXea%YdaEpGh#Grq|#d&nTFwODA%>)xIn^8_ae z8gEfA`MP*ca^c(ApT6>L++(GhQmG0Wll#Xg-%{_u9y~d6{ma?16Mx?2H*gL**!?&- zP0O)E-nVdKR7%v|h(}VPP2X;xNwrqiS_VEZ?}XxJ##UyI&8YI**(b=U9T>0-Z+8`W-~Z^x#Xd{_2k&8a-e&Kn+2Lar?rT4FrS z;%ub)`vF>YeMZlvi69V`JIIj21(PsN{Wu3^=xEvL|ynx?oQx%MquP~ZS z{!?eLuj>Ak+>oY{5Ap8~b9l~_He4bt*7305QNgyZDlMOjPTyW$$(r~ibEk#2ii*Zt z?{l^O_czU+cIS5T%e4ol<=wv$vUJUpo4b}Q7y2^OheLC^{W`;GKO#3M@^juUEP4E= z?{4ZYAFDV%2}Mc$`k4iDZ@xGre)|E#8G#cbzTyE#4lT8nvAOeU+0hqAqS-IFKa7!i zw1R4OxpOY(zYqJ)-n$@?+-fHzvfrKU%vmi|qoFY|oxq zylf`lZa>c3r%kmS12^w-ulco1z;;r=T=6+|?`FJL19Rf7J^GdL~u;rVnC`B?G!MK9AIR{XO%Bg%X&$SSmH-`U%yhl4{pZr$L2{akgw z?&Z`=7mF0W_;zjUj%(pnE9*G!@^N$R>kY~qmYdW#I7l2hHY0w2>c;cTS+;+cg0>I6 z^xJ!)e9pwwPX4^3p5+_XuJ=lj{8ceWTxb`=8*A>krdP_ZHJDtyzdes<@;z|$F7J)m zF_N2v`WBpK=u&)Wr!M&SbOk4uf%YLLWfkR=w7*QxGZuXQ`ET*%lb20yrRyKe`M~(X zbyY&)_Z+jv-*L~k8Gch<@jZO!yQ22ZvmdfJi`Vep7GP&nc2=A5l*MNI>qRS<*IC&c z{n`KN>v^jMNlP!T7MfW;>FXqZ3+cNCw=9o^rx{Hwbhv+8K=S0%&JLf~4_2yfurIN? zV$Q^0>f^j1yxoWQl-xdY3)EowN#V^2q1?mPZi zU0~8|_9<^F|E}V{yQ%A{uZ_?lwdtv{M*B}Rp5T5klkdgJJ;K_}C!eO>TiGmM_Nc*yAF>QkA|6hD_+c4bQ`^RbU@ zG2dg~Y@YbxD(mld>wgjZj}_`&c6DC&m&4rgq56XSU3|AT_Iv+Yxod&?=X1wcPriS( zXrcL+4;MW`c+#h{Dm;9FaeK01o;%~w}vFeG9y3Mx* zUL{JlY~WiE=b`HHmUoT~=R&!%i;m9gY7abrQgp%f_XRtJzaf_dE->28EawuBYdUpi zPcXavqgRJHPAXaKPFh*5HEpGGib(UX2LeofIwg!hE#~YuDUgnx{!m10`SqU{F5XKy z@7`>GI@g2!gIlkbBX5A7Jqx=qR|Lmb1NPaCRZIFWRr=rjCjRDrg8nbopH?qt+*^2Y zbrAovx$*1YKX2up=xO|t$x@(VH`kHNuV*RNeN($JeOHL=4;P)yzq6tWFKT`%X-NrS zob=?{QQxh0wRT(mGUS{@19{FLG`;WlWO0DZ>Wz0{YXLa93=4T&1zjIX1{A)OfAa7i z?^(W^bEfnAJpN)hYlTpWen^wkw|4Les(U8?SjuGAA0Bi=VC$VHpPx4fPWt)zOm^ds zo9vDfxeLse3#{7JuqWlRPY~OQv-$~p$|lB4^WT;0Gygy1zIR?nXj6y3r_tp+!KDBH-+na<^zXT{X2X1mlkiVeJt=?SZ9xZ=*J6h zI%+guF?78(s%)PiIY~e~VRf>$tjUvG?w~Cq=}B!-^A`mlTPx%eH#@DRh271gXLW)6 z{oqWapMNY9T2lVmyw2NL5%Z|O#)m>7~>jEk*x>J<4=gji`#d4Wx$N69Pr++-FmfrrOwq--zmeQQF z|3xk5ynAL6eC(3#hAn$-OW1DT)w#q{XmG|>;#9xp_KwB}*STb-%~@~sKrMr9!s}fY z4I!KJVuh4i?%w&D{CL6YTLn^zkxyiEr4Jk4=CVprUH_o)NJgEQ+>y-v-i>?*-!}9u z4pM)g^IBqd+DZRYyqU{<-W@DC7;r;FK2lMTIXZsJ`&NrT+s{aMxk!dDFbz5zC3t6I z#j3R@>mrsNT+;p6;X$r8U+nvwyMfbp$S8leOo{CXe$IOEhmoschoA4sFS;B_&mL{8 z@!YWIgwQ9UCpS!Hf7#o$Wcp5x7hm_BI9HV?_e!p3<6Wu!4|gtmy>sC^?Ep@$&q6MJ zJ(|ZVr(9tBH#ut>lU~f3r)%X`KQM@FWp?w>;?Y#`=8OEu#j-|!-Qi6ZUhQj&KW@_H zbTj>PAnxtV6QWL4*UY&2A9e?57D%`pin6Re*R}crm+emW=B%Gzii-KKS*`mP+4DKB za!pBvvG$V!*L9QqXZ`Tg7M=S4!ExOshoajOqJF!{!3wSU?lEZ=X?4?E>!#>D4Rd|gRl$)msnimTJPR`9fZQCqxW zpF;ja?Iw1H^V{t6?=LTrtlak2;Gd+AjDDctbD_)8xxpFp?lk*4&RM{4z&7G<&BoXT zdsG5^^YGyR)tH}96R>$elDcKo^O$gDGe>XbX{J;jeRDywuqj$cqZUHrq< zPpnqG%Yt7zHK@s5chIzavgFUYqmQ%x2XmZrx&`V0$9A)ZG`-`g&E$TmxZP~>f&{;= zXIwII_b1(P*VN9O7IWoc-~8o5j_P;g6J9S7P_Vsvf1mK52(FeX9bWd^1a__3>zi1< z`qs{%CqJZ~S&J+CeO{_HOS9tO+Xvk1!ahI!&l2ol#2Lb{d`4OF@?R5+RG;P47H2W8 zu#9-uc1S1)e!EwLI-K9nE&F3z&x%z&U_O5l+`#mmCw5r=v z*3x`x<(q34YUBQS-OhR~owdO@L|^tmc3^V%XPy)P`n-^vO$M@?Rqohd)QWJR_9vcR*8?t4AEaH*uACuYa`+%doI;)w+B^c%!p_F&$#+{G62iH7rH0vwR)phbT zDXa48pHa}fZZ>n}x$IrHXS%TQ?YVFyJn@=yVL%eYM7zBfT$`sPC%sTm_Oh6r>+aDi zZ5*a`(e=&DxQ)TxH#WH3Z7;ihE9AG*lE<+N#k+NmRIE2;+T@}3?7|(6lQJ_xJVeiA z{A*Zx!MJtH**k6J=O1hk`W>3QSz_AGx-a3`YmcNJ_!aqOM)$EDh3&IYu-nA)TI%`ucILIYcu3%FDg;g*yAgEbRCG{`9v`;?KuP zxqBarzcDP332Tr$R`|-nCD`)R4A%1>-~WcL2yDl`A_;PNzwos7LQANJ0X`fVEf^kie(&z0>8zI?BD&a?pS zAMLk|?|Gg}>>7F1SrOK>s1<(|v%AT|P zrpd&$antT`?KpFHWyaQR4bv`~HmaAtxi;4$9>)SQ{zD zu=&b?j>F|od%12`$xi3xH=94dpMHJ4uhsRZ_t%{eJAE_X;Ckgs51pfC^6G3GYP(&7 z0)9^^<-B#Yydv#m_K|5f7Mm=X%IxNmm0B)0*Kz)ZM>$1ux;3E-9V(pu{<*>upLj-c z4Xf-6^LfI><~J`E+ev$0Ua))48(r>oj0bI)j9(gayG`(RKDaG0Ui6>OlS{2Dg`YGC zPI8<##ntn0(-paji`}q(wHMnmY=pXIDcDvi^bVH zyM5h?Gr|%?>-Gh5YE39*H8Td?NpSR@&j*dPl-HYEiq~)7E@^!*h<%y`zvbGrNkQ*p zJ?mO;uq+B<=V{?vo$&kR3$ELeON3n7Q`k%j4{&(;_MBTjdtCvGEKxcJL3N$jS0^3^r}RQe3H9RK|mNI%DM(qd<{LSEj| zjC}1))y$Vaa7#Z^|E@J*&Y@XXcPwG}TbS6pI7?NnllR7i6&qR~Nj}(lq42FK;$!~m9cf+4pgZnpZ%JA8Y+Wt_5` zp3d8R^MBSW-96HZeJxEtw;$3Mi+okU_3i2B4c42OGBSC zdfz+s_~(V94Cl?&L3X@dE4edy_P3`l5Ni1w_(s<4*P8N|NpgWa^-3ALHRr6z6=IZY zR$^vXsx2`3lC1aiK;u&Fxz2&Pw`Ep|#kF=@DnDB<8)?z>C(23nh31wDmHlB8uiq2( zzAW$BD$2B-?ev@1iw}hx$emmM`TXC+Z0=*JQr}K6Dyvkd^#0=xVCZ*xt1kVpRL}p; z{;x3^w_h@O2ke=D=~tD=pI0Z=gkDQto@8^&&Sc?sPX`OWg5~XT#;p^J4se|GxEX1& zsqNVlxeVWWDTg;E3)U|_drVTxG2g*At*@;y^;ObqjWwYg&fMc+&z_$8%HzDL;mrC2 zVJ}~`M{a6DZX#BkS^vz!$ zE~{zG*ayTsyFxpaZkH)UV^7G3#YNag58fwIM)-bx6aOj`HcCwx9vsKmsk z`yGcjv?fmXiL?Rbbh&-cdP>`mCnOwG3YR;-vp(d`@`dZYw_V%ld~*fM&Usz|b%*k7 zza<-Fe7`Ys%Fbs0h(mLy?d;kqWy;<&p=Z|O%15gU?>@fB(zI!cf?ocd`wLwe62!iU z_msqGx_9sU-okwQaM4o6GOyPUH$0ma^ZIzW|DQSa2lsXG?>{JWj8R$T@Qy{Rc}~Y1 z>9vavFPHqa@!{T2cIQ=$oR^-^`)Cxv`DjB};u?RyWUnakh4&WBd37xOrTvG$b>THH zc%RL)NN7p%pK~#AAII$XO}f`EhVs?sgzvt#GqU}r(*Lf#ZMtni+R6N_AD>6w{J}K& z7~7nQK4-%8zrBw6Q(t|bN!>kkX?_0J-RVLC5sq^8jEXZEr>HJCa9>o-k#(BNgLO?h z+9#rqoG4~x^yT2{wh=6aGjLc!RXB~W3JzzG!v7N&<26$PGMylWg=`fatR znvapKZEWcFSNGo8ef_O^x%TzE_j5kqeRp~Lt9e%CQt$XJ7QRkoJuLB|EIw_9g*i)V z!gtm!y>D;Sv!7FMPSTt>{n2gN$&WWrNtnv$SlDs4Raa1Ft6kW4!8(z$qq+@~u67w* zp0X&=uIK;$sAE$({7zb@OfRls>56dWWUEk%Y?`7mJI=;uUvs=x@jeEXb@}t$cekBA zcwn#Tr8z=R?s0Eh)9wDHv}eXDdj}=fdxhuZFS^+YS~1J0I4`d#Vf9{qM1D$Bon6&= zk1CT11@CUw@~Jvszh*l@=!?^fs#BT@R;>OP-)zhjKcf_Q*S-2-!VCxFl>TRHtISoG zpSxE)!6fCt@8pl4KlB#p@8-40$hVFznXkk7^#ISVj049KfAF1H&8D}uz3R5bhKJYu zoM)TtiR-F-qHp>lb*i((f#*~BgC%a1+L<0d5yw-#NZT&(TBX&FWUogPH^qv~Sz>s} zm$U1g;K?8}Zz~>dFaBN21AZm53r?10{(W-FE9ubL&hZCzK5blaW#ha{JRf{EndnDF z#n023zKCV|zo}Pv@13@`FSc*pzd+?>%!(_qswd|9s>F=C1{+zq~y4&Toa}ODvTe-vjW|Qdq z#ddkuK56MEmGp_7T~i{#ys+*^d*Pd~7JnRVx<<6S78}bfG ze2wng{NB4=eLnZ`+odaJ9G%;y@O8C8X$a%D*NeJm8NS%5wPCBC&y$%;79PH1X!_CO zQj=4B;<^ieTar&!PZYZnkyu}Uch}Lg0&CuLnY*MHH+=d2k<+`YIVIwZ)`7db4C@RN z<^?e+)ztYVhOYLt9ui9X~hNTl&bdC5dlL*rF~svF4=1?N_%{=6Ool{W-nt z)b$Ow{>lcQnG$s8Nmvm7^?8j`79{Pk@^PMiy|BR~*XP>J!;Y8E6y7|ss&D1T>I(+h zi`{DT&4df9zwNR;blA|TtTT1R{Rn^mS$o=(cD-9GYR8k((7dFvIp~y1QPSlL|GZWf zOWpcbzkBzO#{plD&6#;1UU(H>@`0CsN~;+plLe%WS{V1KTek3Aj_;d&`+KE#RDILj zLgpM-U7uMm)*Wh3<-T^w-`y)%U9_qA(Y zo37szlr9--;CgTG@549lD6Cl={YUD;*1Z!B9xXZi>x;(WrwS{3PGvMq)7!T0NU#C- z;)`ahroDYz_gn0YhVxD(#tgxwhtA1e?OOF#A^))QO#kq;KTDG;H00k|J@lJB`?36j z+@-1Z{LI^~q#Y4Bs`4cB^s*y)GMAQoQ4MMmWB3q1wdobRcC={h{>q$#3d}Z>Wl|P( z{nN9KS=Y4l`0OO3c|5z)w(o4cdw6sDf*Z}Ua{Jg)JTJT7GIMG+U9*XYSw`jbgyc^v z`!oy9AKsec+Pg*h@%J2i_Nfxi788W7G)__Y+p2!$=Qp9Qm)9oQznWnv&TsvQK>Hg4l-OVYY{10Zk zpPJ)(H2+ZR9>u&lc6D`ySrXe48k2d&3YWDv${Idf`6PmwPG&d-bd>ba_*Jdija%W=25=rPsVtKO*r`FCtO@%_^HBjb*ocq9(2nU;4E) z%jCRDcEW?{vT1ia(pTNBP4cnWwxOkV`V42otH*d^7KIgi30$l%ZV36il0&|~Ipv2; z`+CN!XL7sdvbermwVm_$k!3y2zn8w^k14Zfxzc`BxxH@(Q|g67yVIq2{rtMRp*f|u z$5t=jy7NVJ0ekpTHJK96&v*9yb=ugn%22hV`(@jw$PR`n%_%G@?n{$yUUAV*dh#^z zrL?Pm&l1z>=kA%C1AkT8*#-plJmHeIOB2XBdsG<;VKz(Vw#_4|5y#qKG)rhQHEaWk*Q zFOGb73VSR#@7uP`u3w{{)TziFxx3HZMoQTAyM6M;XX`XXHue=rK2VU<+aGnoIQE-i zz@DvQPoGYiWV1c9?*GB3yDDtA=Q*YR!(1$9~PZYB!%uje56#9wXnRt=|G? zIEsmxoY~8wYWdpu`(^deOMR^q#RFCUx=o#NaKn?eMQba}B-p%XA7Wtl40dyxD0{a0 zcKZU3yv<5G3=+2a9eEphi1(Qmf6+4Lb1hRAY;Bsu9lGmSM3rQ~Z^x^zxwF}sBR-mz zi&IM1w$2a|p zQvLVE`{A4IC0;=@_x@<~SmZTfwvdURHoI8uJpJuk`x=6t+Ds1dS{`S>;_*3sqI~d_ z1G$aW6U46kC=A{Z{^RKT!!c3z?0tL07-y?19BjKRk;ymd7>}!g^S2+&Zy8z^H!XD0 z)je)0`TM!o*0N649nU|k2=aNK5HHgE==Hs$5rnoN@-V|_MdEbgPkj1 ze&4dVzNJ@nW5FgCO~?KBc9?!Dx9&20bmqj?O-@gF3MPd3WqxTWyj{rsuCF(4vr%ud z>z#RbFS)%+J9N&$>q1nj*e|9@;sMQ#o`3h%tc+LWn-psIt=it3GbT>Uclkw^lmGI| z#p~C2nWs%&eekqTXoX$jF^k>(iqg1uy`h(TrIev(rHmrfN4U(gewlaw5Ixg?q+{9si;ZI#<^hI z@|N1}O}3NI%bY~JPlxAU^1K$GTm!NLpZ+*epEU+_qY|zJ6^ex0>%_h{~@Il(F0S&njQ-0zt+*{jHr`PRWliwzDq7Kt?VSm~}# z_&=+FvwLFd-OZmDZ;4DW?fa~pP{MkQlS$#}(GO3A9Tg(XYS=71+Rkqj;(h$=Yc1pS zuJ|CPXZ%k@>yx^cdc2vTbHkjaHb-#t$@0RZe}#`;t8Bd;WO2%VcGQ8700I>QRbMk?8y&Pj^l;p(LQWa zQ}RAmpRkwXP~P$3p@+eI5t%l@LkSMo#r1jOvxGix{`^w-M%7o9+H)sghx<(V>G*eJ z%payT8?&iuL>a93YW^Y@93|Cn?4I^X`fciMB4v+wOKI_hp}&vSmTUzeke z>E`)`&z^kbDv)q8Wd5P}^l%8<9dA$T56yun_IsVw0XT@28whJ!4 zSbam^XPSJ(q<_LI`q-ab*!3v=>8EFvwZeb24xF**f4TYHlm$~1UKj1R+b{=|^;SI( z;Z*X9%$VbP>Zok+qi(IjCreLu+HVcFJo}ludV%hRuD8o(#NB)B^~>vf(XODGxl)g&FL*y+>#cmA zy(QoGqPyyuHL^2&CvD*I;1pukbo}%8i)mL@YlXm-Pb*n^U3?zv1nt>a>ilMVoJ{6? zjqXJf)@(*q-zP-on=JaxdG>Rcd*#Q(jQE{lI&NMUWSwuD?77D--M(|X(T@vf7}!0} zGH+P<>skBD;2EcPFuGq>thW>RVw3g$$E=t}u1BhuTWy>)U-mgvPX2ANJm28j%9G5J+|Zn2@NbHDaDAbagYc z@O3GR=!S|V zpZ9H%-<1{C*1Sa1`E_2AEA#4AyL4u4e!{UcsP)s+;K}DbH1&fTmohMK^t*Sr#6I^W z_v+{!-4XsjCVkaaS%2u!#AjC1_w}x~bmW`V#`E$=&tKCSnZ zqp!cO$Lf1?Uc8m+%58sc^1QTAD%06hQ{S=tR$SA4u$ljs#I>XIaG)EO*YkbO=4Rke8h zbfGJcV=qiT5`4nsue`s|9m^6>sp|Lf1=o^m?gA^5UvA#m?za6>e1B^2WBvz9<%?%c z`8Q#T$I{M6-*fESjp8m&5Zb~u{q@5*w&*W^8&6lSKUVlZ0MsDV+UsDjb|(XaxSyws zW60v>_x~8)HpRL3+%sMy_bIE<`|*Ygv3KU(lgLv&A%6HuprzT{ixal~Jv(Rj(W^U* zf4V*0wdc!}?T9%~aY{v}tvoYac zwhJ-u@V^48J7#_K{j&4C&Et7@PtG=R|5$e8pJ}4@+Zj2r{IZ`9Ukg_JCpK-vd$GK_ zRqe?S<}H-*;QXWzy6yGpMc#iF9C-z%!*!KK4O-6gyB8n ztyf`j;BLI&$lxO)tUcXEJ*<7=Gnd<4YhFx~<=AIk@tyH}db#B>os`P$`|DIJJZ70) zt8fu)EYdqOOQtJRW!~EvLcg1)zm;^_$h^RpJ7Z44o97>lteg10SH3J~V^$DMYbd(Q zbD?O?)NMX%V&)zGdsca=ZBxyQvnF9Oy^65m z6uj-wsn?$k-UhEa>-_5U#n;`BSG9d>HLr{NDB<0e|KQ`%sX-oRm<*X^cJTDA-%@qt zw!WNZZ`>6Jk?Bc2CBaSKR?lIu;+%eSd)U4C)vrLK8h+nSzmT)vUN3a2*S1Yh>-dY_ zT&d*wA2-`NO9sFGCz3Y#caqu9=Ukl;I=fzQOI!()+&sJtBQuZ#ddG5Sz+_zW9t7O?W@%K9S+;?quIq$x3bt-??$)f^3Rbq0E2b8Lv zHYHA+eJuHiqlxP5^QHHbChANmvD%olPii}xRUps0%M-6nmla}89 zdoZvnLGZbR&Z9efIbU$;Tr+umdfNRZbMJ>SGRvr}PM8of!{dsO{*x#14WcHM)xyOu zzQ4@*y+8NTinqD@${*=3sEJ}_d(bJKqua>P6>zij=8vp1hpagdihPd?S8gav3hwng zEjHIRGG^|{h>UD`(-VrXqFx6#+3lO__~rc!*L(4ezITo~fV^m-kvL<@>zO9Z)1O>+ zK5(q%>^~59^9OUuOTD3yQ`9 zr>3i=%$B^z%p7snPwdm&%?ACPxobXp|NiRqu;E!q*2N(HWtwlh7=9Wv%o0%8T`;q* z>BaH1iG{CqZ~Dq8OzkWAk`VSqD>8Ws&y(WS`fd$(lvCzTOFpj06M4MjgGbN&mdVR| zZzvuTJ|SaaJvp;hcBP%R>-6tYQw3+8TBViJpub&PWtG(KuiyOci0^OmKUC&_b$jiv zEbh~Je#^!8z6riJT|#V$)JBD;_xSH#6mRfS)Rgl}zr`2Ic{1XcaTBkCmYLbA}?>H;(sZJc{P6{Bi|&&30X`jiqp%4ryqCE z=N-p* zr*`90Wn9lwV!D2?K6J?M@hW){k#o4}^s%+K?wviGa_ildWphQ_LH*f)msgqfPVN+$ z^|eR$V&Tp^)Bnfcm?!?Jb@c+}65GW;6(>%JD_Ill_WJnq)zcYmUkp*4UN2ggyZYqz zCf|>9rKRLtKk{y6U;Fb@TI-g#&*b>@l@^ADvSxhRuJPexFPBx(bgi_8^hu#M70NU9 zo;t7K^vo;Tx=vYi^3l(S0`5&OTF1JMkuhk`_3)CO6K8pv(~td`!8p&e?u@JN-lE`! z4Tt_p&AAmdIeF(IXKQn_ZTlB{)$dDxlvt5gwNGo0g2j(Vf2y@^A9K}inh>G7$!7AJ zNsXVfmQC@08u0w!S;Z@*DUYU=uG4z@#qsnrjtS-~4{y>_WyD7l*~`|8l`m;3&`=goa^ed}2U_LEX_ z@#Vq#SKRhQE$-(181d%Kf?tI*ZACY4&u2XvsN`SLb>~kf|C9tnk5GdH-&Iy8&G;kj z`Q@nL&zK@swkq!b8jUKugZ`eBeVX=v_c4C1wYC-APK(~Vp2&Ob9=DX|mHWMkSsAu* zs%ptI&oi7?IV-=|LCouC%5>G%-AZd-OHA(nKKEsKrQOAH*_5s99ydOuZA$q0?eO~l zI?LxX&hvaF-+VzgVt(`vrY7D=XhT^>*uNhVv@fJdYyNj zZ~aJ}Yk0tMQy<%&`)cO0E8M4_=D3u;Te@uO<@e7*Cr#L|bzS{X@%}R@w{9z6Ilc-y ze;_o?Gx_+o@<%iC%n!y~-x#VGuJe0OvC^~x<|UI@zBKsln{>*gE$Xbsf?6FpL1q~h zWu;pprhm&maouQg7b}%5S@%1pQuFPOGsjfTYWH5**>QWr)rCK{P5FGMcH7St#cUQH z*KV>WoSET%&spKuR=4fj^_~PB?z&P|F2BWep6UL$#j(yIr?WTRG%IH|wVT1{dv*29 zinTm9Qg)|a`Sh!2f_*`D9N$&>?JwMHs&+iRV5Ym?Q_nYbPWP4i*0YW?C}gQ)@}tYDuY|30K=d4s&K# z|G2TWq*o1~h#a{jTBUmL>>XU~bXm&<>WIe*LC)tbJpTm0kCV#S<-9BGZ0yJ#1*f2!>dGN|s{exHU zUv1xA5~y|cUZDKGP17Ag-JB^0r6x^3cOXY7e35Cb&CF9&TRy;=4t*+I}F27yh!gy}R){~(8RUA`WojP&Hk?k8kHhrq$n{bSOQX$(X zpG!LwFXji>nHTO;D4bE}9TMe`yVB>kqsQ-+UvG12c_!-^95D9$C&80^K*_Q=BDvJO zWU`2QLBpDNj#pA`**#;=NUt%UnOiF*+Vt;wg7Ds%ZY6qVU!orRc2pZPzm|BQaB_aj zBp!>cMzd8udhA*l`@Bq4_2<)LuM!)YQ@-|uE}53Ld2M~up=%yfSB0q^jdH)##`R*= zL&^1a5)Tw2Qn(%{DK5W^};u(w&Wl$Bc?rWtmmhYh4ao@7mJ) z^URe=iZUwMnI_JkRPWySXTVvdrcyC=!`#1Rk4&aE^c>|WnDFGhgDa26rk?%go$7r4 z(#Fpwe%C7Mur_2CH9D~Rwy4n2yDbi_3-&K^x)7&U)Od8({gh3)_f0OEZCklZ^1;lM z(*F1**B*;sy>j!(?!T_Dzj&NXNG&}K$}wpxnytM~oYQ-v{#RBywBF2OmJ^Fm`*P`9 z&$L`pG}027nQbQDabVpq(aX5Kt52oq`ys<;2g-Jo7d4oqS!7)j;G1M>x#pqe)H5cXZ&h5fWYc`!`h`!NcmC&HS z{dK~G=3O^#S0CULJ31}FyM3eMMv)W$wdUqNp5wvlV&swvnv6G^_iER4*K2FrSWeV0 zG3u1R@-<<@=ZVG#9F2-jt@cjbxBO{{;?r=R4N|w?MI873>Cw-)Z3AcN5r+7@>lYKM zOHHTG{*tNEzn@{JVO;9f@5{3<-~6`u%3~uXs=)4PwxiC6baBt-5n(TPdZe`kI`%&bvTKt|=Kv%;sJosS)x1x1f9onjo^ z%RT>jVj`PQVng#1P346r`4;6LS)%-|;a88Eu-OV##d*HV=KjBT;eh@OMrP0u!2yLA zCJXhiSMoJouCvOGSid{r=$+GVzAXa9!kGhXY!)7Q3l{y06X9YvQFb_IaFU8W-{uOprO{CcC#xf3xiES*+88cilav*5jYpyivRK_Q78>8-sWXCg>dX zlHKz4srC8EPIdPf!i!Um?$dqBbDSai21{Ck1apj5u7v8=`vEVqZZ;=f^1b5s>U-F{ zspq!Et-jB+n}4n1gZ-5-O=;( zerxva=~MoPb2%9|xkng=NIhqW+&zEWtq(ovleQZ6iB?{`Zd>SoTXwt%x;DJd5@Ux8Aw2Jn@x%w)ylU$t!bihgXWNtW~+uz$NkE z^jj{ERjqnI?`;%6$S=(F#69Bdv3)mdX2x>QUtRT~F?~|0!KqqX_BT&Y%&_k6d0jSL zW$u)dTXt7J|8S5egq7K5@|v#1Px&g7j!o_pozKehmQg6$$>s#(rT-C|mdLSLc)WUO zYqa*~y>l;{UTmJIDHD0IeVed-<&(=bZIT9)8TZ{WD~_2GarOG;P5sJCcXx*Qa3(Ma zO!{=gXW7?v3<5f*crp?j(kDe_^t)-EY}8HM%I;C|n}PjA#<4kDSEM&IFRAkDb@X}m z*!+>*gQ&S|4}+fmU6ed`)n&G8XL(pa#k;^ap6OGgZMIF5`RTnk?b6HMUhex>vzfEg z+5Q+GaJ*z+9;$dV|8#ajM!#C}d+*fS^@}~tSEsT~F*x8D#M%3-sYiDAhg!uay;3?g z>(_hSzq(+0s1dW56;th&S{ix(o0j|0Szb~T$MPZ zxA*P)14~ZKD{{QM`M;;>mj4G0q;ANh9S{eN*j@~)b?V!o-+ndlP3m5)yVvd4{*p-Q zp4oT_l)lb-pWT|axjSspk|T2$TDv_;+4)mgzGYpzr~$JeXp&56QE!0o$%Rp`aWf&&Xtau7s|GA8^h8RY(VZlzINh?l~)!mHF#6E^qA)^!?|%kRs{L5CA0B> za-br!;8MwH&h~*T-fsxYf^cw%ye|w)?_8JcF z*cYtceDj)p<@99Ev<1IF)pl+2vTI50clMk-#XreASn}iIQ>;7GjRWq2O1XC*xpQiF zZTy>Fj3v=)EN^-O^@=aQJAu4u(Sg6@-6`|?s(qeYOvG+D^ zJ>y`&R^fd!;m_3;lcxDPPt^a`PWiiYzJKbrUwfu}|9Z9M@*5W807X!yn6M)1o!Zg^ zPTPw!CFOsAoWiHK+0tR!!w&ze8q6{(*(C{kcTGLBSfLxdsA zQvX};Qp>6fJ*4-iu)P9Fmzv&rI#-sXP37+10yaL)r(dqj_@>(Y{-?fiKtIU;#{=~r z7i-PlCA&Oa@$EzXlV7HVPkDK2`3%Oi2FVrvY@cj(my2=f`hI Date: Tue, 6 May 2025 19:34:05 +0200 Subject: [PATCH 030/118] Fix zen config --- modules/programs/browser/zen.nix | 30 +++++++++++++++--------------- modules/programs/fastfetch.nix | 2 +- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/modules/programs/browser/zen.nix b/modules/programs/browser/zen.nix index b1c3169..29a61b5 100644 --- a/modules/programs/browser/zen.nix +++ b/modules/programs/browser/zen.nix @@ -103,14 +103,14 @@ in { name = "${config.conf.username}"; value = { settings = { - zen.view.compact.hide-tabbar = false; - zen.view.compact.hide-toolbar = true; - zen.view.sidebar-expanded = false; - zen.view.use-single-toolbar = false; - zen.view.welcome-screen.seen = true; - zen.theme.accent-color = "#b4bbff"; - extensions.autoDisableScopes = 0; - cookiebanners.service.mode = 2; + "zen.view.compact.hide-tabbar" = false; + "zen.view.compact.hide-toolbar" = true; + "zen.view.sidebar-expanded" = false; + "zen.view.use-single-toolbar" = false; + "zen.view.welcome-screen.seen" = true; + "zen.theme.accent-color" = "#b4bbff"; + "extensions.autoDisableScopes" = 0; + "cookiebanners.service.mode" = 2; }; isDefault = true; id = 0; @@ -120,13 +120,13 @@ in { name = "special"; value = { settings = { - zen.view.compact.hide-tabbar = false; - zen.view.compact.hide-toolbar = true; - zen.view.sidebar-expanded = false; - zen.view.use-single-toolbar = false; - zen.view.welcome-screen.seen = true; - zen.theme.accent-color = "#b4bbff"; - extensions.autoDisableScopes = 0; + "zen.view.compact.hide-tabbar" = false; + "zen.view.compact.hide-toolbar" = true; + "zen.view.sidebar-expanded" = false; + "zen.view.use-single-toolbar" = false; + "zen.view.welcome-screen.seen" = true; + "zen.theme.accent-color" = "#b4bbff"; + "extensions.autoDisableScopes" = 0; }; isDefault = false; id = 1; diff --git a/modules/programs/fastfetch.nix b/modules/programs/fastfetch.nix index 60e51cd..9652bf3 100644 --- a/modules/programs/fastfetch.nix +++ b/modules/programs/fastfetch.nix @@ -23,7 +23,7 @@ source = ../../assets/logo2.png; width = 35; padding = { - top = 2; + top = 1; }; }; modules = [ From 4d5638baca7d9752bbfd0e2e0b93a3320529585a Mon Sep 17 00:00:00 2001 From: DashieTM Date: Tue, 6 May 2025 21:49:40 +0200 Subject: [PATCH 031/118] Add SystemLocalTime for duabloot --- base/common_hardware.nix | 10 ++++------ modules/conf.nix | 9 ++++++++- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/base/common_hardware.nix b/base/common_hardware.nix index 6f3c94d..e5b9029 100644 --- a/base/common_hardware.nix +++ b/base/common_hardware.nix @@ -59,25 +59,23 @@ in { ++ config.conf.bootParams; }; - # Enable networking networking = { useDHCP = lib.mkDefault true; networkmanager.enable = true; hostName = hostName; }; - # Set your time zone. - time.timeZone = config.conf.timezone; + time = { + timeZone = config.conf.timezone; + hardwareClockInLocalTime = config.conf.systemLocalTime; + }; - # Select internationalisation properties. i18n.defaultLocale = config.conf.locale; - # Enable the X11 windowing system. services = { lorri.enable = true; xserver.enable = true; fstrim.enable = lib.mkDefault true; - # Enable sound with pipewire. pulseaudio.enable = false; pipewire = { enable = true; diff --git a/modules/conf.nix b/modules/conf.nix index 5189e92..d7a8dc2 100644 --- a/modules/conf.nix +++ b/modules/conf.nix @@ -1,7 +1,6 @@ { lib, config, - pkgs, options, ... }: { @@ -20,6 +19,14 @@ ''; }; + systemLocalTime = lib.mkOption { + default = false; + example = true; + description = '' + System time for dualbooting + ''; + }; + wsl = lib.mkOption { default = false; example = true; From 207b5165a3e259be98e1b5aa23110b2c84627d8c Mon Sep 17 00:00:00 2001 From: DashieTM Date: Wed, 7 May 2025 13:01:54 +0200 Subject: [PATCH 032/118] Hyprland hardware cursor fix --- modules/programs/hyprland/hyprland.nix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/modules/programs/hyprland/hyprland.nix b/modules/programs/hyprland/hyprland.nix index ff13a4c..9ba4c3e 100644 --- a/modules/programs/hyprland/hyprland.nix +++ b/modules/programs/hyprland/hyprland.nix @@ -27,7 +27,6 @@ in { # main monitor "${config.conf.defaultMonitor},${config.conf.defaultMonitorMode},0x0,${config.conf.defaultMonitorScale}" # all others - ",highrr,auto,1" ]; example = ["DP-1,3440x1440@180,2560x0,1,vrr,0"]; type = with lib.types; listOf str; @@ -298,7 +297,7 @@ in { cursor = { enable_hyprcursor = true; - no_hardware_cursors = lib.mkIf config.mods.gpu.nvidia.enable true; + no_hardware_cursors = lib.mkDefault config.mods.gpu.nvidia.enable; # done with nix, this would break the current setup otherwise sync_gsettings_theme = false; }; From 786217106b6ac93f180d4fa3ed5ede6860d494b6 Mon Sep 17 00:00:00 2001 From: Dashie Date: Fri, 9 May 2025 23:27:37 +0200 Subject: [PATCH 033/118] Add lib.mkDefault for non configurable defaults (#15) --- base/common_hardware.nix | 83 ++++++++++++++++++++-------------------- base/env.nix | 21 +++++----- base/xkb_layout.nix | 8 +++- home/common.nix | 25 ++++++------ home/default.nix | 10 +++-- lib/default.nix | 1 + lib/override.nix | 1 + modules/programs/gpu.nix | 3 +- 8 files changed, 82 insertions(+), 70 deletions(-) create mode 100644 lib/override.nix diff --git a/base/common_hardware.nix b/base/common_hardware.nix index e5b9029..8eb4e78 100644 --- a/base/common_hardware.nix +++ b/base/common_hardware.nix @@ -1,4 +1,5 @@ { + mkDashDefault, pkgs, config, lib, @@ -10,19 +11,18 @@ in { imports = [ (modulesPath + "/installer/scan/not-detected.nix") - #(modulesPath + "/misc/nixpkgs/read-only.nix") ]; - wsl.enable = config.conf.wsl; + wsl.enable = mkDashDefault config.conf.wsl; # Bootloader. boot = lib.mkIf (!config.conf.wsl) { - consoleLogLevel = 0; + consoleLogLevel = mkDashDefault 0; lanzaboote = lib.mkIf config.conf.secureBoot { - enable = true; - pkiBundle = "/var/lib/sbctl"; - settings.reboot-for-bitlocker = true; + enable = mkDashDefault true; + pkiBundle = mkDashDefault "/var/lib/sbctl"; + settings.reboot-for-bitlocker = mkDashDefault true; }; loader = { @@ -32,15 +32,15 @@ in { then lib.mkForce false else if config.conf.useSystemdBootloader then true - else false; + else mkDashDefault false; configurationLimit = 5; }; - efi.canTouchEfiVariables = true; + efi.canTouchEfiVariables = mkDashDefault true; }; - kernelPackages = lib.mkDefault pkgs.linuxPackages_latest; + kernelPackages = mkDashDefault pkgs.linuxPackages_latest; initrd = { - verbose = false; + verbose = mkDashDefault false; availableKernelModules = [ "nvme" "xhci_pci" @@ -60,46 +60,46 @@ in { }; networking = { - useDHCP = lib.mkDefault true; - networkmanager.enable = true; - hostName = hostName; + useDHCP = mkDashDefault true; + networkmanager.enable = mkDashDefault true; + hostName = mkDashDefault hostName; }; time = { - timeZone = config.conf.timezone; - hardwareClockInLocalTime = config.conf.systemLocalTime; + timeZone = mkDashDefault config.conf.timezone; + hardwareClockInLocalTime = mkDashDefault config.conf.systemLocalTime; }; - i18n.defaultLocale = config.conf.locale; + i18n.defaultLocale = mkDashDefault config.conf.locale; services = { - lorri.enable = true; - xserver.enable = true; - fstrim.enable = lib.mkDefault true; - pulseaudio.enable = false; + lorri.enable = mkDashDefault true; + xserver.enable = mkDashDefault true; + fstrim.enable = mkDashDefault true; + pulseaudio.enable = mkDashDefault false; pipewire = { - enable = true; + enable = mkDashDefault true; alsa = { - enable = true; - support32Bit = true; + enable = mkDashDefault true; + support32Bit = mkDashDefault true; }; - jack.enable = true; - pulse.enable = true; + jack.enable = mkDashDefault true; + pulse.enable = mkDashDefault true; }; }; - nixpkgs.hostPlatform = lib.mkDefault config.conf.system; + nixpkgs.hostPlatform = mkDashDefault config.conf.system; nix = { gc = { - automatic = true; - dates = "weekly"; - options = "--delete-older-than 7d --delete-generations +5"; + automatic = mkDashDefault true; + dates = mkDashDefault "weekly"; + options = mkDashDefault "--delete-older-than 7d --delete-generations +5"; }; settings = { trusted-users = [username]; - auto-optimise-store = true; + auto-optimise-store = mkDashDefault true; - builders-use-substitutes = true; + builders-use-substitutes = mkDashDefault true; substituters = [ "https://hyprland.cachix.org" @@ -129,29 +129,30 @@ in { "chaotic-nyx.cachix.org-1:HfnXSw4pj95iI/n17rIDy40agHj12WfF+Gqk6SonIT8=" ]; - experimental-features = "nix-command flakes pipe-operators"; + experimental-features = mkDashDefault "nix-command flakes pipe-operators"; }; }; hardware = { cpu.${config.conf.cpu}.updateMicrocode = - lib.mkDefault config.hardware.enableRedistributableFirmware; + mkDashDefault + config.hardware.enableRedistributableFirmware; }; - security.rtkit.enable = true; + security.rtkit.enable = mkDashDefault true; environment.variables = { - XDG_CACHE_HOME = "$HOME/.cache"; - DIRENV_LOG_FORMAT = ""; - QT_QPA_PLATFORMTHEME = "qt5ct"; + XDG_CACHE_HOME = mkDashDefault "$HOME/.cache"; + DIRENV_LOG_FORMAT = mkDashDefault ""; + QT_QPA_PLATFORMTHEME = mkDashDefault "qt5ct"; }; # allows user change later on users = { - mutableUsers = true; + mutableUsers = mkDashDefault true; users.${username} = { - isNormalUser = true; - description = username; + isNormalUser = mkDashDefault true; + description = mkDashDefault username; extraGroups = [ "networkmanager" "wheel" @@ -167,7 +168,7 @@ in { ]; # this password will only last for the first login # e.g. login, then change to whatever else, this also ensures no public hash is available - password = "firstlogin"; + password = mkDashDefault "firstlogin"; }; }; } diff --git a/base/env.nix b/base/env.nix index c85a06e..95248dc 100644 --- a/base/env.nix +++ b/base/env.nix @@ -1,22 +1,23 @@ { + mkDashDefault, pkgs, config, ... }: { environment = { variables = { - GSETTINGS_SCHEMA_DIR = "${pkgs.glib.getSchemaPath pkgs.gsettings-desktop-schemas}"; - NEOVIDE_MAXIMIZED = "0"; - GPG_TTY = "$(tty)"; - EDITOR = "neovide --no-fork"; - SUDO_EDITOR = "neovide --no-fork"; - SCRIPTS = "$HOME/.config/scripts"; + GSETTINGS_SCHEMA_DIR = mkDashDefault "${pkgs.glib.getSchemaPath pkgs.gsettings-desktop-schemas}"; + NEOVIDE_MAXIMIZED = mkDashDefault "0"; + GPG_TTY = mkDashDefault "$(tty)"; + EDITOR = mkDashDefault "neovide --no-fork"; + SUDO_EDITOR = mkDashDefault "neovide --no-fork"; + SCRIPTS = mkDashDefault "$HOME/.config/scripts"; }; sessionVariables = { - NIXOS_OZONE_WL = "1"; - GOPATH = "$HOME/.go"; - FLAKE = config.conf.nixosConfigPath; - NH_FLAKE = config.conf.nixosConfigPath; + NIXOS_OZONE_WL = mkDashDefault "1"; + GOPATH = mkDashDefault "$HOME/.go"; + FLAKE = mkDashDefault config.conf.nixosConfigPath; + NH_FLAKE = mkDashDefault config.conf.nixosConfigPath; }; }; } diff --git a/base/xkb_layout.nix b/base/xkb_layout.nix index 0324c99..db4fa60 100644 --- a/base/xkb_layout.nix +++ b/base/xkb_layout.nix @@ -1,4 +1,8 @@ -{pkgs, ...}: let +{ + mkDashDefault, + pkgs, + ... +}: let layout = pkgs.writeText "dashie" '' xkb_symbols "dashie" { @@ -10,7 +14,7 @@ }; ''; in { - environment.systemPackages = [pkgs.xorg.xkbcomp]; + environment.systemPackages = mkDashDefault [pkgs.xorg.xkbcomp]; services.xserver.xkb.extraLayouts.dashie = { description = "US layout with 'umlaut'"; languages = ["eng"]; diff --git a/home/common.nix b/home/common.nix index 31d67b9..1a3ccf3 100644 --- a/home/common.nix +++ b/home/common.nix @@ -1,4 +1,5 @@ { + mkDashDefault, config, lib, ... @@ -6,30 +7,30 @@ username = config.conf.username; in { manual = { - html.enable = false; - json.enable = false; - manpages.enable = false; + html.enable = mkDashDefault false; + json.enable = mkDashDefault false; + manpages.enable = mkDashDefault false; }; - fonts.fontconfig.enable = true; + fonts.fontconfig.enable = mkDashDefault true; home = { - username = username; - homeDirectory = "/home/${username}"; + username = mkDashDefault username; + homeDirectory = mkDashDefault "/home/${username}"; sessionPath = ["$HOME/.cargo/bin"]; - enableNixpkgsReleaseCheck = false; + enableNixpkgsReleaseCheck = mkDashDefault false; sessionVariables = { - GOROOT = "$HOME/.go"; - QT_QPA_PLATFORMTHEME = "qt5ct"; + GOROOT = mkDashDefault "$HOME/.go"; + QT_QPA_PLATFORMTHEME = mkDashDefault "qt5ct"; }; - keyboard = null; + keyboard = mkDashDefault null; }; programs.nix-index = { - enable = true; - enableFishIntegration = true; + enable = mkDashDefault true; + enableFishIntegration = mkDashDefault true; }; nix = { diff --git a/home/default.nix b/home/default.nix index 03c25f9..c459466 100644 --- a/home/default.nix +++ b/home/default.nix @@ -1,4 +1,5 @@ { + mkDashDefault, additionalHomeConfig, additionalHomeMods, additionalInputs, @@ -16,17 +17,18 @@ ... }: { xdg = { - portal.config.common.default = "*"; + portal.config.common.default = mkDashDefault "*"; portal = { - enable = true; + enable = mkDashDefault true; extraPortals = [pkgs.xdg-desktop-portal-gtk]; }; }; home-manager = { - useGlobalPkgs = true; - useUserPackages = true; + useGlobalPkgs = mkDashDefault true; + useUserPackages = mkDashDefault true; extraSpecialArgs = { inherit inputs root additionalInputs alternativePkgs system stable unstable; + mkDashDefault = import ../lib/override.nix {inherit lib;}; }; users.${config.conf.username} = { diff --git a/lib/default.nix b/lib/default.nix index 2ad1719..9e0d75a 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -105,6 +105,7 @@ homeMods = mods.home; additionalHomeMods = additionalMods.home; additionalInputs = additionalInputs; + mkDashDefault = import ./override.nix {inherit lib;}; }; in inputs.unstable.lib.nixosSystem { diff --git a/lib/override.nix b/lib/override.nix new file mode 100644 index 0000000..4d222f8 --- /dev/null +++ b/lib/override.nix @@ -0,0 +1 @@ +{lib, ...}: value: lib.mkOverride 999 value diff --git a/modules/programs/gpu.nix b/modules/programs/gpu.nix index 339b694..9bc2a4a 100644 --- a/modules/programs/gpu.nix +++ b/modules/programs/gpu.nix @@ -1,4 +1,5 @@ { + mkDashDefault, lib, config, options, @@ -100,7 +101,7 @@ ]; in { enable = true; - enable32Bit = lib.mkDefault true; + enable32Bit = mkDashDefault true; extraPackages = amdPackages ++ (lib.lists.optionals (config.mods.gpu.vapi.rocm.enable && config.mods.gpu.amdgpu.enable) rocmPackages); From f699577158104a6846e245f762acc812c96739dc Mon Sep 17 00:00:00 2001 From: Dashie Date: Fri, 9 May 2025 23:27:54 +0200 Subject: [PATCH 034/118] Add fancontrol (#16) --- flake.nix | 3 +++ lib/default.nix | 1 + modules/programs/default.nix | 1 + modules/programs/fancontrol.nix | 36 +++++++++++++++++++++++++++++++++ 4 files changed, 41 insertions(+) create mode 100644 modules/programs/fancontrol.nix diff --git a/flake.nix b/flake.nix index e7e7c44..bbddc3a 100644 --- a/flake.nix +++ b/flake.nix @@ -32,6 +32,9 @@ zen-browser.url = "github:youwen5/zen-browser-flake"; + # TODO move to upstream repository after merged nix flake pr + fancontrol.url = "git+https://github.com/DashieTM/fancontrol-gui?ref=nix-flake"; + stylix.url = "github:danth/stylix"; base16.url = "github:SenchoPens/base16.nix"; disko.url = "github:nix-community/disko/latest"; diff --git a/lib/default.nix b/lib/default.nix index 9e0d75a..3ee4fc8 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -66,6 +66,7 @@ inputs.reset.homeManagerModules.default inputs.sops-nix.homeManagerModules.sops inputs.dashvim.homeManagerModules.dashvim + inputs.fancontrol.homeManagerModules.default ../modules ]; }, diff --git a/modules/programs/default.nix b/modules/programs/default.nix index f454717..17be977 100644 --- a/modules/programs/default.nix +++ b/modules/programs/default.nix @@ -7,6 +7,7 @@ ./coding.nix ./containers.nix ./drives.nix + ./fancontrol.nix ./fastfetch.nix ./fish.nix ./flatpak.nix diff --git a/modules/programs/fancontrol.nix b/modules/programs/fancontrol.nix new file mode 100644 index 0000000..87be9af --- /dev/null +++ b/modules/programs/fancontrol.nix @@ -0,0 +1,36 @@ +{ + lib, + config, + options, + ... +}: { + options.mods.fancontrol = { + enable = lib.mkOption { + default = false; + example = true; + type = lib.types.bool; + description = "Enables fancontrol-gui with needed drivers"; + }; + forceId = lib.mkOption { + default = null; + example = "force_id=0x8628"; + type = with lib.types; nullOr str; + description = "Modprobe options for the it87 driver. Information at: https://wiki.archlinux.org/title/Lm_sensors#Gigabyte_B250/Z370/B450M/B560M/B660M/Z690/B550_motherboards"; + }; + }; + config = lib.mkIf config.mods.fancontrol.enable ( + lib.optionalAttrs (options ? home.packages) { + programs.fancontrol-gui.enable = true; + } + // (lib.optionalAttrs (options ? boot.kernelModules) { + boot = { + kernelParams = ["acpi_enforce_resources=lax"]; + extraModulePackages = with config.boot.kernelPackages; [liquidtux it87]; + kernelModules = ["v4l2loopback" "it87"]; + extraModprobeConfig = lib.mkIf (config.mods.fancontrol.forceId != null) '' + options it87 ${config.mods.fancontrol.forceId} + ''; + }; + }) + ); +} From 1cb30eadca4c01298647096233de85ff9ec8f0b8 Mon Sep 17 00:00:00 2001 From: Dashie Date: Fri, 9 May 2025 23:29:53 +0200 Subject: [PATCH 035/118] Add penpot (#17) * basePackages use mkDashDefault * Add penpot --- base/env.nix | 1 + modules/programs/basePackages.nix | 28 ++++++++++++++------------ modules/programs/coding.nix | 7 +++++++ modules/programs/hyprland/hyprland.nix | 3 ++- 4 files changed, 25 insertions(+), 14 deletions(-) diff --git a/base/env.nix b/base/env.nix index 95248dc..0eaf068 100644 --- a/base/env.nix +++ b/base/env.nix @@ -2,6 +2,7 @@ mkDashDefault, pkgs, config, + lib, ... }: { environment = { diff --git a/modules/programs/basePackages.nix b/modules/programs/basePackages.nix index 0f2ff25..3531f77 100644 --- a/modules/programs/basePackages.nix +++ b/modules/programs/basePackages.nix @@ -1,4 +1,5 @@ { + mkDashDefault, config, lib, options, @@ -84,14 +85,15 @@ if config.mods.basePackages.enable then { - upower.enable = true; + preload.enable = mkDashDefault true; + upower.enable = mkDashDefault true; dbus = { - enable = true; + enable = mkDashDefault true; }; avahi = { - enable = true; - nssmdns4 = true; - openFirewall = true; + enable = mkDashDefault true; + nssmdns4 = mkDashDefault true; + openFirewall = mkDashDefault true; }; } // config.mods.basePackages.specialServices @@ -102,23 +104,23 @@ then { nix-ld = { - enable = true; + enable = mkDashDefault true; libraries = with pkgs; [ jdk zlib ]; }; direnv = { - package = pkgs.direnv; - silent = false; - loadInNixShell = true; - direnvrcExtra = ""; + package = mkDashDefault pkgs.direnv; + silent = mkDashDefault false; + loadInNixShell = mkDashDefault true; + direnvrcExtra = mkDashDefault ""; nix-direnv = { - enable = true; - package = pkgs.nix-direnv; + enable = mkDashDefault true; + package = mkDashDefault pkgs.nix-direnv; }; }; - gnupg.agent.enable = true; + gnupg.agent.enable = mkDashDefault true; } // config.mods.basePackages.specialPrograms else config.mods.basePackages.specialPrograms; diff --git a/modules/programs/coding.nix b/modules/programs/coding.nix index 781f9e1..46007ee 100644 --- a/modules/programs/coding.nix +++ b/modules/programs/coding.nix @@ -47,6 +47,12 @@ description = "Extensions to be installed"; }; }; + penpot = lib.mkOption { + default = false; + example = true; + type = lib.types.bool; + description = "Enables penpot"; + }; useDefaultPackages = lib.mkOption { default = true; example = false; @@ -469,6 +475,7 @@ [ (lib.mkIf config.mods.coding.dashvim neovide) (lib.mkIf config.mods.coding.jetbrains jetbrains-toolbox) + (lib.mkIf config.mods.coding.penpot pkgs.penpot-desktop) ] ++ config.mods.coding.additionalPackages ++ (lib.lists.optionals config.mods.coding.useDefaultPackages basePackages) diff --git a/modules/programs/hyprland/hyprland.nix b/modules/programs/hyprland/hyprland.nix index 9ba4c3e..c6ce857 100644 --- a/modules/programs/hyprland/hyprland.nix +++ b/modules/programs/hyprland/hyprland.nix @@ -1,4 +1,5 @@ { + mkDashDefault, config, lib, options, @@ -297,7 +298,7 @@ in { cursor = { enable_hyprcursor = true; - no_hardware_cursors = lib.mkDefault config.mods.gpu.nvidia.enable; + no_hardware_cursors = mkDashDefault config.mods.gpu.nvidia.enable; # done with nix, this would break the current setup otherwise sync_gsettings_theme = false; }; From cee415973f2f60e71a9b124e6354d6940eb08398 Mon Sep 17 00:00:00 2001 From: DashieTM Date: Sat, 10 May 2025 13:29:37 +0200 Subject: [PATCH 036/118] Add gh --- base/common_hardware.nix | 348 ++++---- base/env.nix | 48 +- flake.nix | 260 +++--- home/common.nix | 82 +- home/default.nix | 98 +-- lib/default.nix | 288 +++---- modules/programs/basePackages.nix | 256 +++--- modules/programs/coding.nix | 1066 +++++++++++++----------- modules/programs/default.nix | 98 +-- modules/programs/fancontrol.nix | 72 +- modules/programs/fish.nix | 1 + modules/programs/git.nix | 4 +- modules/programs/hyprland/hyprland.nix | 804 +++++++++--------- 13 files changed, 1747 insertions(+), 1678 deletions(-) diff --git a/base/common_hardware.nix b/base/common_hardware.nix index 8eb4e78..45b7779 100644 --- a/base/common_hardware.nix +++ b/base/common_hardware.nix @@ -1,174 +1,174 @@ -{ - mkDashDefault, - pkgs, - config, - lib, - hostName, - modulesPath, - ... -}: let - username = config.conf.username; -in { - imports = [ - (modulesPath + "/installer/scan/not-detected.nix") - ]; - - wsl.enable = mkDashDefault config.conf.wsl; - - # Bootloader. - boot = lib.mkIf (!config.conf.wsl) { - consoleLogLevel = mkDashDefault 0; - - lanzaboote = lib.mkIf config.conf.secureBoot { - enable = mkDashDefault true; - pkiBundle = mkDashDefault "/var/lib/sbctl"; - settings.reboot-for-bitlocker = mkDashDefault true; - }; - - loader = { - systemd-boot = { - enable = - if config.conf.secureBoot - then lib.mkForce false - else if config.conf.useSystemdBootloader - then true - else mkDashDefault false; - configurationLimit = 5; - }; - efi.canTouchEfiVariables = mkDashDefault true; - }; - - kernelPackages = mkDashDefault pkgs.linuxPackages_latest; - initrd = { - verbose = mkDashDefault false; - availableKernelModules = [ - "nvme" - "xhci_pci" - "ahci" - "usbhid" - "usb_storage" - "sd_mod" - ]; - }; - kernelParams = - [ - ''resume="PARTLABEL=SWAP"'' - ''quiet'' - ''udev.log_level=3'' - ] - ++ config.conf.bootParams; - }; - - networking = { - useDHCP = mkDashDefault true; - networkmanager.enable = mkDashDefault true; - hostName = mkDashDefault hostName; - }; - - time = { - timeZone = mkDashDefault config.conf.timezone; - hardwareClockInLocalTime = mkDashDefault config.conf.systemLocalTime; - }; - - i18n.defaultLocale = mkDashDefault config.conf.locale; - - services = { - lorri.enable = mkDashDefault true; - xserver.enable = mkDashDefault true; - fstrim.enable = mkDashDefault true; - pulseaudio.enable = mkDashDefault false; - pipewire = { - enable = mkDashDefault true; - alsa = { - enable = mkDashDefault true; - support32Bit = mkDashDefault true; - }; - jack.enable = mkDashDefault true; - pulse.enable = mkDashDefault true; - }; - }; - - nixpkgs.hostPlatform = mkDashDefault config.conf.system; - nix = { - gc = { - automatic = mkDashDefault true; - dates = mkDashDefault "weekly"; - options = mkDashDefault "--delete-older-than 7d --delete-generations +5"; - }; - settings = { - trusted-users = [username]; - auto-optimise-store = mkDashDefault true; - - builders-use-substitutes = mkDashDefault true; - - substituters = [ - "https://hyprland.cachix.org" - "https://anyrun.cachix.org" - "https://cache.garnix.io" - "https://oxipaste.cachix.org" - "https://oxinoti.cachix.org" - "https://oxishut.cachix.org" - "https://oxidash.cachix.org" - "https://oxicalc.cachix.org" - "https://hyprdock.cachix.org" - "https://reset.cachix.org" - "https://chaotic-nyx.cachix.org/" - ]; - - trusted-public-keys = [ - "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=" - "anyrun.cachix.org-1:pqBobmOjI7nKlsUMV25u9QHa9btJK65/C8vnO3p346s=" - "cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g=" - "oxipaste.cachix.org-1:n/oA3N3Z+LJP7eIWOwuoLd9QnPyZXqFjLgkahjsdDGc=" - "oxinoti.cachix.org-1:dvSoJl2Pjo5HMaNngdBbSaixK9BSf2N8gzjP2MdGvfc=" - "oxishut.cachix.org-1:axyAGF3XMh1IyMAW4UMbQCdMNovDH0KH6hqLLRJH8jU=" - "oxidash.cachix.org-1:5K2FNHp7AS8VF7LmQkJAUG/dm6UHCz4ngshBVbjFX30=" - "oxicalc.cachix.org-1:qF3krFc20tgSmtR/kt6Ku/T5QiG824z79qU5eRCSBTQ=" - "hyprdock.cachix.org-1:HaROK3fBvFWIMHZau3Vq1TLwUoJE8yRbGLk0lEGzv3Y=" - "reset.cachix.org-1:LfpnUUdG7QM/eOkN7NtA+3+4Ar/UBeYB+3WH+GjP9Xo=" - "chaotic-nyx.cachix.org-1:HfnXSw4pj95iI/n17rIDy40agHj12WfF+Gqk6SonIT8=" - ]; - - experimental-features = mkDashDefault "nix-command flakes pipe-operators"; - }; - }; - - hardware = { - cpu.${config.conf.cpu}.updateMicrocode = - mkDashDefault - config.hardware.enableRedistributableFirmware; - }; - - security.rtkit.enable = mkDashDefault true; - - environment.variables = { - XDG_CACHE_HOME = mkDashDefault "$HOME/.cache"; - DIRENV_LOG_FORMAT = mkDashDefault ""; - QT_QPA_PLATFORMTHEME = mkDashDefault "qt5ct"; - }; - - # allows user change later on - users = { - mutableUsers = mkDashDefault true; - users.${username} = { - isNormalUser = mkDashDefault true; - description = mkDashDefault username; - extraGroups = [ - "networkmanager" - "wheel" - "gamemode" - "docker" - "vboxusers" - "video" - "audio" - ]; - packages = with pkgs; [ - home-manager - xdg-desktop-portal-gtk - ]; - # this password will only last for the first login - # e.g. login, then change to whatever else, this also ensures no public hash is available - password = mkDashDefault "firstlogin"; - }; - }; -} +{ + mkDashDefault, + pkgs, + config, + lib, + hostName, + modulesPath, + ... +}: let + username = config.conf.username; +in { + imports = [ + (modulesPath + "/installer/scan/not-detected.nix") + ]; + + wsl.enable = mkDashDefault config.conf.wsl; + + # Bootloader. + boot = lib.mkIf (!config.conf.wsl) { + consoleLogLevel = mkDashDefault 0; + + lanzaboote = lib.mkIf config.conf.secureBoot { + enable = mkDashDefault true; + pkiBundle = mkDashDefault "/var/lib/sbctl"; + settings.reboot-for-bitlocker = mkDashDefault true; + }; + + loader = { + systemd-boot = { + enable = + if config.conf.secureBoot + then lib.mkForce false + else if config.conf.useSystemdBootloader + then true + else mkDashDefault false; + configurationLimit = 5; + }; + efi.canTouchEfiVariables = mkDashDefault true; + }; + + kernelPackages = mkDashDefault pkgs.linuxPackages_latest; + initrd = { + verbose = mkDashDefault false; + availableKernelModules = [ + "nvme" + "xhci_pci" + "ahci" + "usbhid" + "usb_storage" + "sd_mod" + ]; + }; + kernelParams = + [ + ''resume="PARTLABEL=SWAP"'' + ''quiet'' + ''udev.log_level=3'' + ] + ++ config.conf.bootParams; + }; + + networking = { + useDHCP = mkDashDefault true; + networkmanager.enable = mkDashDefault true; + hostName = mkDashDefault hostName; + }; + + time = { + timeZone = mkDashDefault config.conf.timezone; + hardwareClockInLocalTime = mkDashDefault config.conf.systemLocalTime; + }; + + i18n.defaultLocale = mkDashDefault config.conf.locale; + + services = { + lorri.enable = mkDashDefault true; + xserver.enable = mkDashDefault true; + fstrim.enable = mkDashDefault true; + pulseaudio.enable = mkDashDefault false; + pipewire = { + enable = mkDashDefault true; + alsa = { + enable = mkDashDefault true; + support32Bit = mkDashDefault true; + }; + jack.enable = mkDashDefault true; + pulse.enable = mkDashDefault true; + }; + }; + + nixpkgs.hostPlatform = mkDashDefault config.conf.system; + nix = { + gc = { + automatic = mkDashDefault true; + dates = mkDashDefault "weekly"; + options = mkDashDefault "--delete-older-than 7d --delete-generations +5"; + }; + settings = { + trusted-users = [username]; + auto-optimise-store = mkDashDefault true; + + builders-use-substitutes = mkDashDefault true; + + substituters = [ + "https://hyprland.cachix.org" + "https://anyrun.cachix.org" + "https://cache.garnix.io" + "https://oxipaste.cachix.org" + "https://oxinoti.cachix.org" + "https://oxishut.cachix.org" + "https://oxidash.cachix.org" + "https://oxicalc.cachix.org" + "https://hyprdock.cachix.org" + "https://reset.cachix.org" + "https://chaotic-nyx.cachix.org/" + ]; + + trusted-public-keys = [ + "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=" + "anyrun.cachix.org-1:pqBobmOjI7nKlsUMV25u9QHa9btJK65/C8vnO3p346s=" + "cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g=" + "oxipaste.cachix.org-1:n/oA3N3Z+LJP7eIWOwuoLd9QnPyZXqFjLgkahjsdDGc=" + "oxinoti.cachix.org-1:dvSoJl2Pjo5HMaNngdBbSaixK9BSf2N8gzjP2MdGvfc=" + "oxishut.cachix.org-1:axyAGF3XMh1IyMAW4UMbQCdMNovDH0KH6hqLLRJH8jU=" + "oxidash.cachix.org-1:5K2FNHp7AS8VF7LmQkJAUG/dm6UHCz4ngshBVbjFX30=" + "oxicalc.cachix.org-1:qF3krFc20tgSmtR/kt6Ku/T5QiG824z79qU5eRCSBTQ=" + "hyprdock.cachix.org-1:HaROK3fBvFWIMHZau3Vq1TLwUoJE8yRbGLk0lEGzv3Y=" + "reset.cachix.org-1:LfpnUUdG7QM/eOkN7NtA+3+4Ar/UBeYB+3WH+GjP9Xo=" + "chaotic-nyx.cachix.org-1:HfnXSw4pj95iI/n17rIDy40agHj12WfF+Gqk6SonIT8=" + ]; + + experimental-features = mkDashDefault "nix-command flakes pipe-operators"; + }; + }; + + hardware = { + cpu.${config.conf.cpu}.updateMicrocode = + mkDashDefault + config.hardware.enableRedistributableFirmware; + }; + + security.rtkit.enable = mkDashDefault true; + + environment.variables = { + XDG_CACHE_HOME = mkDashDefault "$HOME/.cache"; + DIRENV_LOG_FORMAT = mkDashDefault ""; + QT_QPA_PLATFORMTHEME = mkDashDefault "qt5ct"; + }; + + # allows user change later on + users = { + mutableUsers = mkDashDefault true; + users.${username} = { + isNormalUser = mkDashDefault true; + description = mkDashDefault username; + extraGroups = [ + "networkmanager" + "wheel" + "gamemode" + "docker" + "vboxusers" + "video" + "audio" + ]; + packages = with pkgs; [ + home-manager + xdg-desktop-portal-gtk + ]; + # this password will only last for the first login + # e.g. login, then change to whatever else, this also ensures no public hash is available + password = mkDashDefault "firstlogin"; + }; + }; +} diff --git a/base/env.nix b/base/env.nix index 0eaf068..7937030 100644 --- a/base/env.nix +++ b/base/env.nix @@ -1,24 +1,24 @@ -{ - mkDashDefault, - pkgs, - config, - lib, - ... -}: { - environment = { - variables = { - GSETTINGS_SCHEMA_DIR = mkDashDefault "${pkgs.glib.getSchemaPath pkgs.gsettings-desktop-schemas}"; - NEOVIDE_MAXIMIZED = mkDashDefault "0"; - GPG_TTY = mkDashDefault "$(tty)"; - EDITOR = mkDashDefault "neovide --no-fork"; - SUDO_EDITOR = mkDashDefault "neovide --no-fork"; - SCRIPTS = mkDashDefault "$HOME/.config/scripts"; - }; - sessionVariables = { - NIXOS_OZONE_WL = mkDashDefault "1"; - GOPATH = mkDashDefault "$HOME/.go"; - FLAKE = mkDashDefault config.conf.nixosConfigPath; - NH_FLAKE = mkDashDefault config.conf.nixosConfigPath; - }; - }; -} +{ + mkDashDefault, + pkgs, + config, + lib, + ... +}: { + environment = { + variables = { + GSETTINGS_SCHEMA_DIR = mkDashDefault "${pkgs.glib.getSchemaPath pkgs.gsettings-desktop-schemas}"; + NEOVIDE_MAXIMIZED = mkDashDefault "0"; + GPG_TTY = mkDashDefault "$(tty)"; + EDITOR = mkDashDefault "neovide --no-fork"; + SUDO_EDITOR = mkDashDefault "neovide --no-fork"; + SCRIPTS = mkDashDefault "$HOME/.config/scripts"; + }; + sessionVariables = { + NIXOS_OZONE_WL = mkDashDefault "1"; + GOPATH = mkDashDefault "$HOME/.go"; + FLAKE = mkDashDefault config.conf.nixosConfigPath; + NH_FLAKE = mkDashDefault config.conf.nixosConfigPath; + }; + }; +} diff --git a/flake.nix b/flake.nix index bbddc3a..6290e63 100644 --- a/flake.nix +++ b/flake.nix @@ -1,130 +1,130 @@ -{ - description = "DashNix"; - - inputs = { - unstable.url = "github:NixOs/nixpkgs/nixos-unstable"; - stable.url = "github:NixOs/nixpkgs/nixos-24.11"; - nixos-wsl.url = "github:nix-community/NixOS-WSL/main"; - nur.url = "github:nix-community/NUR"; - lanzaboote = { - url = "github:nix-community/lanzaboote/v0.4.2"; - inputs.nixpkgs.follows = "unstable"; - }; - - home-manager = { - url = "github:nix-community/home-manager"; - inputs.nixpkgs.follows = "unstable"; - }; - - sops-nix.url = "github:Mic92/sops-nix"; - - Hyprspace = { - url = "github:KZDKM/Hyprspace"; - inputs.hyprland.follows = "hyprland"; - }; - - hyprland.url = "git+https://github.com/hyprwm/Hyprland?submodules=1"; - - ironbar = { - url = "github:JakeStanger/ironbar"; - inputs.nixpkgs.follows = "unstable"; - }; - - zen-browser.url = "github:youwen5/zen-browser-flake"; - - # TODO move to upstream repository after merged nix flake pr - fancontrol.url = "git+https://github.com/DashieTM/fancontrol-gui?ref=nix-flake"; - - stylix.url = "github:danth/stylix"; - base16.url = "github:SenchoPens/base16.nix"; - disko.url = "github:nix-community/disko/latest"; - - anyrun.url = "github:Kirottu/anyrun"; - oxicalc.url = "github:Xetibo/OxiCalc"; - oxishut.url = "github:Xetibo/OxiShut"; - oxinoti.url = "github:Xetibo/OxiNoti"; - oxidash.url = "github:Xetibo/OxiDash"; - oxipaste.url = "github:Xetibo/OxiPaste"; - oxirun.url = "github:Xetibo/OxiRun"; - hyprdock.url = "github:Xetibo/hyprdock"; - reset.url = "github:Xetibo/ReSet"; - reset-plugins.url = "github:Xetibo/ReSet-Plugins"; - - # absolute insanity - chaoticNyx.url = "github:chaotic-cx/nyx/nyxpkgs-unstable"; - - dashvim = { - url = "github:Xetibo/DashVim"; - }; - }; - - outputs = {self, ...} @ inputs: let - currentSystem = "x86_64-linux"; - permittedPackages = [ - "olm-3.2.16" - # well done dotnet... - # this is just for omnisharp - "dotnet-core-combined" - "dotnet-wrapped-combined" - "dotnet-combined" - "dotnet-sdk-6.0.428" - "dotnet-sdk-wrapped-6.0.428" - "dotnet-sdk-6.0.136" - "dotnet-sdk-wrapped-6.0.136" - "dotnet-sdk-7.0.120" - "dotnet-sdk-wrapped-7.0.120" - "dotnet-sdk-7.0.410" - "dotnet-sdk-wrapped-7.0.410" - "jitsi-meet-1.0.8043" - "nextcloud-27.1.11" - ]; - stable = import inputs.stable { - system = currentSystem; - config = { - allowUnfree = true; - permittedInsecurePackages = permittedPackages; - }; - overlays = [ - inputs.nur.overlays.default - inputs.chaoticNyx.overlays.default - ]; - }; - unstable = import inputs.unstable { - system = currentSystem; - config = { - allowUnsupportedSystem = true; - permittedInsecurePackages = permittedPackages; - # Often happens with neovim, this should not block everything. - allowBroken = true; - allowUnfree = true; - }; - overlays = [ - inputs.nur.overlays.default - inputs.chaoticNyx.overlays.default - ]; - }; - in rec { - dashNixLib = import ./lib { - inherit - self - inputs - unstable - stable - ; - system = currentSystem; - lib = inputs.unstable.lib; - }; - docs = import ./docs { - inherit inputs; - pkgs = unstable; - system = currentSystem; - lib = inputs.unstable.lib; - build_systems = dashNixLib.build_systems; - }; - dashNixInputs = inputs; - stablePkgs = stable; - unstablePkgs = unstable; - modules = ./modules; - iso = dashNixLib.buildIso.config.system.build.isoImage; - }; -} +{ + description = "DashNix"; + + inputs = { + unstable.url = "github:NixOs/nixpkgs/nixos-unstable"; + stable.url = "github:NixOs/nixpkgs/nixos-24.11"; + nixos-wsl.url = "github:nix-community/NixOS-WSL/main"; + nur.url = "github:nix-community/NUR"; + lanzaboote = { + url = "github:nix-community/lanzaboote/v0.4.2"; + inputs.nixpkgs.follows = "unstable"; + }; + + home-manager = { + url = "github:nix-community/home-manager"; + inputs.nixpkgs.follows = "unstable"; + }; + + sops-nix.url = "github:Mic92/sops-nix"; + + Hyprspace = { + url = "github:KZDKM/Hyprspace"; + inputs.hyprland.follows = "hyprland"; + }; + + hyprland.url = "git+https://github.com/hyprwm/Hyprland?submodules=1"; + + ironbar = { + url = "github:JakeStanger/ironbar"; + inputs.nixpkgs.follows = "unstable"; + }; + + zen-browser.url = "github:youwen5/zen-browser-flake"; + + # TODO move to upstream repository after merged nix flake pr + fancontrol.url = "git+https://github.com/DashieTM/fancontrol-gui?ref=nix-flake"; + + stylix.url = "github:danth/stylix"; + base16.url = "github:SenchoPens/base16.nix"; + disko.url = "github:nix-community/disko/latest"; + + anyrun.url = "github:Kirottu/anyrun"; + oxicalc.url = "github:Xetibo/OxiCalc"; + oxishut.url = "github:Xetibo/OxiShut"; + oxinoti.url = "github:Xetibo/OxiNoti"; + oxidash.url = "github:Xetibo/OxiDash"; + oxipaste.url = "github:Xetibo/OxiPaste"; + oxirun.url = "github:Xetibo/OxiRun"; + hyprdock.url = "github:Xetibo/hyprdock"; + reset.url = "github:Xetibo/ReSet"; + reset-plugins.url = "github:Xetibo/ReSet-Plugins"; + + # absolute insanity + chaoticNyx.url = "github:chaotic-cx/nyx/nyxpkgs-unstable"; + + dashvim = { + url = "github:Xetibo/DashVim"; + }; + }; + + outputs = {self, ...} @ inputs: let + currentSystem = "x86_64-linux"; + permittedPackages = [ + "olm-3.2.16" + # well done dotnet... + # this is just for omnisharp + "dotnet-core-combined" + "dotnet-wrapped-combined" + "dotnet-combined" + "dotnet-sdk-6.0.428" + "dotnet-sdk-wrapped-6.0.428" + "dotnet-sdk-6.0.136" + "dotnet-sdk-wrapped-6.0.136" + "dotnet-sdk-7.0.120" + "dotnet-sdk-wrapped-7.0.120" + "dotnet-sdk-7.0.410" + "dotnet-sdk-wrapped-7.0.410" + "jitsi-meet-1.0.8043" + "nextcloud-27.1.11" + ]; + stable = import inputs.stable { + system = currentSystem; + config = { + allowUnfree = true; + permittedInsecurePackages = permittedPackages; + }; + overlays = [ + inputs.nur.overlays.default + inputs.chaoticNyx.overlays.default + ]; + }; + unstable = import inputs.unstable { + system = currentSystem; + config = { + allowUnsupportedSystem = true; + permittedInsecurePackages = permittedPackages; + # Often happens with neovim, this should not block everything. + allowBroken = true; + allowUnfree = true; + }; + overlays = [ + inputs.nur.overlays.default + inputs.chaoticNyx.overlays.default + ]; + }; + in rec { + dashNixLib = import ./lib { + inherit + self + inputs + unstable + stable + ; + system = currentSystem; + lib = inputs.unstable.lib; + }; + docs = import ./docs { + inherit inputs; + pkgs = unstable; + system = currentSystem; + lib = inputs.unstable.lib; + build_systems = dashNixLib.build_systems; + }; + dashNixInputs = inputs; + stablePkgs = stable; + unstablePkgs = unstable; + modules = ./modules; + iso = dashNixLib.buildIso.config.system.build.isoImage; + }; +} diff --git a/home/common.nix b/home/common.nix index 1a3ccf3..11be1e2 100644 --- a/home/common.nix +++ b/home/common.nix @@ -1,41 +1,41 @@ -{ - mkDashDefault, - config, - lib, - ... -}: let - username = config.conf.username; -in { - manual = { - html.enable = mkDashDefault false; - json.enable = mkDashDefault false; - manpages.enable = mkDashDefault false; - }; - - fonts.fontconfig.enable = mkDashDefault true; - - home = { - username = mkDashDefault username; - homeDirectory = mkDashDefault "/home/${username}"; - sessionPath = ["$HOME/.cargo/bin"]; - - enableNixpkgsReleaseCheck = mkDashDefault false; - sessionVariables = { - GOROOT = mkDashDefault "$HOME/.go"; - QT_QPA_PLATFORMTHEME = mkDashDefault "qt5ct"; - }; - - keyboard = mkDashDefault null; - }; - - programs.nix-index = { - enable = mkDashDefault true; - enableFishIntegration = mkDashDefault true; - }; - - nix = { - extraOptions = lib.mkIf (config ? sops.secrets && config.sops.secrets ? access.path) '' - !include ${config.sops.secrets.access.path} - ''; - }; -} +{ + mkDashDefault, + config, + lib, + ... +}: let + username = config.conf.username; +in { + manual = { + html.enable = mkDashDefault false; + json.enable = mkDashDefault false; + manpages.enable = mkDashDefault false; + }; + + fonts.fontconfig.enable = mkDashDefault true; + + home = { + username = mkDashDefault username; + homeDirectory = mkDashDefault "/home/${username}"; + sessionPath = ["$HOME/.cargo/bin"]; + + enableNixpkgsReleaseCheck = mkDashDefault false; + sessionVariables = { + GOROOT = mkDashDefault "$HOME/.go"; + QT_QPA_PLATFORMTHEME = mkDashDefault "qt5ct"; + }; + + keyboard = mkDashDefault null; + }; + + programs.nix-index = { + enable = mkDashDefault true; + enableFishIntegration = mkDashDefault true; + }; + + nix = { + extraOptions = lib.mkIf (config ? sops.secrets && config.sops.secrets ? access.path) '' + !include ${config.sops.secrets.access.path} + ''; + }; +} diff --git a/home/default.nix b/home/default.nix index c459466..af3d656 100644 --- a/home/default.nix +++ b/home/default.nix @@ -1,49 +1,49 @@ -{ - mkDashDefault, - additionalHomeConfig, - additionalHomeMods, - additionalInputs, - config, - homeMods, - inputs, - lib, - mod, - pkgs, - root, - alternativePkgs, - system, - stable, - unstable, - ... -}: { - xdg = { - portal.config.common.default = mkDashDefault "*"; - portal = { - enable = mkDashDefault true; - extraPortals = [pkgs.xdg-desktop-portal-gtk]; - }; - }; - home-manager = { - useGlobalPkgs = mkDashDefault true; - useUserPackages = mkDashDefault true; - extraSpecialArgs = { - inherit inputs root additionalInputs alternativePkgs system stable unstable; - mkDashDefault = import ../lib/override.nix {inherit lib;}; - }; - - users.${config.conf.username} = { - disabledModules = ["programs/anyrun.nix"]; - imports = - [ - ./common.nix - ./themes - ./sync.nix - ../lib/foxwrappers.nix - ] - ++ homeMods - ++ additionalHomeMods - ++ lib.optional (builtins.pathExists mod) mod - ++ lib.optional (builtins.pathExists additionalHomeConfig) additionalHomeConfig; - }; - }; -} +{ + mkDashDefault, + additionalHomeConfig, + additionalHomeMods, + additionalInputs, + config, + homeMods, + inputs, + lib, + mod, + pkgs, + root, + alternativePkgs, + system, + stable, + unstable, + ... +}: { + xdg = { + portal.config.common.default = mkDashDefault "*"; + portal = { + enable = mkDashDefault true; + extraPortals = [pkgs.xdg-desktop-portal-gtk]; + }; + }; + home-manager = { + useGlobalPkgs = mkDashDefault true; + useUserPackages = mkDashDefault true; + extraSpecialArgs = { + inherit inputs root additionalInputs alternativePkgs system stable unstable; + mkDashDefault = import ../lib/override.nix {inherit lib;}; + }; + + users.${config.conf.username} = { + disabledModules = ["programs/anyrun.nix"]; + imports = + [ + ./common.nix + ./themes + ./sync.nix + ../lib/foxwrappers.nix + ] + ++ homeMods + ++ additionalHomeMods + ++ lib.optional (builtins.pathExists mod) mod + ++ lib.optional (builtins.pathExists additionalHomeConfig) additionalHomeConfig; + }; + }; +} diff --git a/lib/default.nix b/lib/default.nix index 3ee4fc8..2cdc15a 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -1,144 +1,144 @@ -{ - inputs, - lib, - unstable, - self, - stable, - system, - ... -}: { - /* - * - # build_systems - - Builds system given a list of system names which are placed within your hosts/ directory. Note that each system has its own directory in hosts/ as well. - - A minimal configuration requires the file configuration.nix within each system directory, this will be the base config that is used across both NisOS and home-manager, specific optional files can also be added, hardware.nix for NisOS configuration and home.nix for home-manager configuration. - - The second parameter is the root of your configuration, which should be ./. in most cases. - - `root` - - : the root path of your configuration - - # Example usage - :::{.example} - ```nix - nixosConfigurations = build_systems { root = ./.; }; - ``` - ::: - */ - # let - # paths = builtins.readDir ; - # names = lib.lists.remove "default" ( - # map (name: lib.strings.removeSuffix ".nix" name) (lib.attrsets.mapAttrsToList (name: _: name) paths) - # ); - - # in - build_systems = { - root, - additionalMods ? { - nixos = []; - home = []; - }, - mods ? { - nixos = [ - inputs.lanzaboote.nixosModules.lanzaboote - inputs.nixos-wsl.nixosModules.default - inputs.home-manager.nixosModules.home-manager - inputs.stylix.nixosModules.stylix - inputs.disko.nixosModules.disko - ../base - ../home - ../modules - ]; - home = [ - inputs.anyrun.homeManagerModules.default - inputs.ironbar.homeManagerModules.default - inputs.oxicalc.homeManagerModules.default - inputs.oxishut.homeManagerModules.default - inputs.oxinoti.homeManagerModules.default - inputs.oxidash.homeManagerModules.default - inputs.oxipaste.homeManagerModules.default - inputs.oxirun.homeManagerModules.default - inputs.hyprdock.homeManagerModules.default - inputs.hyprland.homeManagerModules.default - inputs.reset.homeManagerModules.default - inputs.sops-nix.homeManagerModules.sops - inputs.dashvim.homeManagerModules.dashvim - inputs.fancontrol.homeManagerModules.default - ../modules - ]; - }, - additionalInputs ? {}, - overridePkgs ? false, - ... - }: - builtins.listToAttrs ( - map - (name: { - name = name; - value = let - mod = root + /hosts/${name}/configuration.nix; - additionalNixosConfig = root + /hosts/${name}/hardware.nix; - additionalHomeConfig = root + /hosts/${name}/home.nix; - args = { - inherit - self - inputs - mod - additionalHomeConfig - system - root - stable - unstable - ; - pkgs = lib.mkForce ( - if overridePkgs - then stable - else unstable - ); - alternativePkgs = - if overridePkgs - then unstable - else stable; - hostName = name; - homeMods = mods.home; - additionalHomeMods = additionalMods.home; - additionalInputs = additionalInputs; - mkDashDefault = import ./override.nix {inherit lib;}; - }; - in - inputs.unstable.lib.nixosSystem { - modules = - [ - {_module.args = args;} - mod - ] - ++ mods.nixos - ++ additionalMods.nixos - ++ inputs.unstable.lib.optional (builtins.pathExists additionalNixosConfig) additionalNixosConfig - ++ inputs.unstable.lib.optional (builtins.pathExists mod) mod; - }; - }) - ( - lib.lists.remove "" ( - lib.attrsets.mapAttrsToList (name: fType: - if fType == "directory" - then name - else "") ( - builtins.readDir (root + /hosts) - ) - ) - ) - ); - - buildIso = inputs.unstable.lib.nixosSystem { - specialArgs = { - inherit self inputs unstable; - }; - modules = [ - ../iso/configuration.nix - ]; - }; -} +{ + inputs, + lib, + unstable, + self, + stable, + system, + ... +}: { + /* + * + # build_systems + + Builds system given a list of system names which are placed within your hosts/ directory. Note that each system has its own directory in hosts/ as well. + + A minimal configuration requires the file configuration.nix within each system directory, this will be the base config that is used across both NisOS and home-manager, specific optional files can also be added, hardware.nix for NisOS configuration and home.nix for home-manager configuration. + + The second parameter is the root of your configuration, which should be ./. in most cases. + + `root` + + : the root path of your configuration + + # Example usage + :::{.example} + ```nix + nixosConfigurations = build_systems { root = ./.; }; + ``` + ::: + */ + # let + # paths = builtins.readDir ; + # names = lib.lists.remove "default" ( + # map (name: lib.strings.removeSuffix ".nix" name) (lib.attrsets.mapAttrsToList (name: _: name) paths) + # ); + + # in + build_systems = { + root, + additionalMods ? { + nixos = []; + home = []; + }, + mods ? { + nixos = [ + inputs.lanzaboote.nixosModules.lanzaboote + inputs.nixos-wsl.nixosModules.default + inputs.home-manager.nixosModules.home-manager + inputs.stylix.nixosModules.stylix + inputs.disko.nixosModules.disko + ../base + ../home + ../modules + ]; + home = [ + inputs.anyrun.homeManagerModules.default + inputs.ironbar.homeManagerModules.default + inputs.oxicalc.homeManagerModules.default + inputs.oxishut.homeManagerModules.default + inputs.oxinoti.homeManagerModules.default + inputs.oxidash.homeManagerModules.default + inputs.oxipaste.homeManagerModules.default + inputs.oxirun.homeManagerModules.default + inputs.hyprdock.homeManagerModules.default + inputs.hyprland.homeManagerModules.default + inputs.reset.homeManagerModules.default + inputs.sops-nix.homeManagerModules.sops + inputs.dashvim.homeManagerModules.dashvim + inputs.fancontrol.homeManagerModules.default + ../modules + ]; + }, + additionalInputs ? {}, + overridePkgs ? false, + ... + }: + builtins.listToAttrs ( + map + (name: { + name = name; + value = let + mod = root + /hosts/${name}/configuration.nix; + additionalNixosConfig = root + /hosts/${name}/hardware.nix; + additionalHomeConfig = root + /hosts/${name}/home.nix; + args = { + inherit + self + inputs + mod + additionalHomeConfig + system + root + stable + unstable + ; + pkgs = lib.mkForce ( + if overridePkgs + then stable + else unstable + ); + alternativePkgs = + if overridePkgs + then unstable + else stable; + hostName = name; + homeMods = mods.home; + additionalHomeMods = additionalMods.home; + additionalInputs = additionalInputs; + mkDashDefault = import ./override.nix {inherit lib;}; + }; + in + inputs.unstable.lib.nixosSystem { + modules = + [ + {_module.args = args;} + mod + ] + ++ mods.nixos + ++ additionalMods.nixos + ++ inputs.unstable.lib.optional (builtins.pathExists additionalNixosConfig) additionalNixosConfig + ++ inputs.unstable.lib.optional (builtins.pathExists mod) mod; + }; + }) + ( + lib.lists.remove "" ( + lib.attrsets.mapAttrsToList (name: fType: + if fType == "directory" + then name + else "") ( + builtins.readDir (root + /hosts) + ) + ) + ) + ); + + buildIso = inputs.unstable.lib.nixosSystem { + specialArgs = { + inherit self inputs unstable; + }; + modules = [ + ../iso/configuration.nix + ]; + }; +} diff --git a/modules/programs/basePackages.nix b/modules/programs/basePackages.nix index 3531f77..eb21428 100644 --- a/modules/programs/basePackages.nix +++ b/modules/programs/basePackages.nix @@ -1,128 +1,128 @@ -{ - mkDashDefault, - config, - lib, - options, - pkgs, - ... -}: { - options.mods = { - basePackages = { - enable = lib.mkOption { - default = true; - example = false; - type = lib.types.bool; - description = '' - Enables default system packages. - ''; - }; - additionalPackages = lib.mkOption { - default = []; - example = [pkgs.openssl]; - type = with lib.types; listOf package; - description = '' - Additional packages to install. - Note that these are installed even if base packages is disabled, e.g. you can also use this as the only packages to install. - ''; - }; - specialPrograms = lib.mkOption { - default = {}; - example = {}; - type = with lib.types; attrsOf anything; - description = '' - special program configuration to be added which require programs.something notation. - ''; - }; - specialServices = lib.mkOption { - default = {}; - example = {}; - type = with lib.types; attrsOf anything; - description = '' - special services configuration to be added which require an services.something notation. - ''; - }; - }; - }; - - config = lib.optionalAttrs (options ? environment.systemPackages) { - environment.systemPackages = - if config.mods.basePackages.enable - then - with pkgs; - [ - adwaita-icon-theme - dbus - dconf - direnv - glib - gnome.nixos-gsettings-overrides - gsettings-desktop-schemas - gtk-layer-shell - gtk3 - gtk4 - gtk4-layer-shell - hicolor-icon-theme - icon-library - kdePackages.breeze-icons - kdePackages.breeze - libsForQt5.breeze-qt5 - kdePackages.qtstyleplugin-kvantum - libsForQt5.qtstyleplugin-kvantum - libadwaita - libxkbcommon - alejandra - openssl - seahorse - upower - xorg.xkbutils - sbctl - ] - ++ config.mods.basePackages.additionalPackages - else config.mods.basePackages.additionalPackages; - - gtk.iconCache.enable = false; - services = - if config.mods.basePackages.enable - then - { - preload.enable = mkDashDefault true; - upower.enable = mkDashDefault true; - dbus = { - enable = mkDashDefault true; - }; - avahi = { - enable = mkDashDefault true; - nssmdns4 = mkDashDefault true; - openFirewall = mkDashDefault true; - }; - } - // config.mods.basePackages.specialServices - else config.mods.basePackages.specialServices; - - programs = - if config.mods.basePackages.enable - then - { - nix-ld = { - enable = mkDashDefault true; - libraries = with pkgs; [ - jdk - zlib - ]; - }; - direnv = { - package = mkDashDefault pkgs.direnv; - silent = mkDashDefault false; - loadInNixShell = mkDashDefault true; - direnvrcExtra = mkDashDefault ""; - nix-direnv = { - enable = mkDashDefault true; - package = mkDashDefault pkgs.nix-direnv; - }; - }; - gnupg.agent.enable = mkDashDefault true; - } - // config.mods.basePackages.specialPrograms - else config.mods.basePackages.specialPrograms; - }; -} +{ + mkDashDefault, + config, + lib, + options, + pkgs, + ... +}: { + options.mods = { + basePackages = { + enable = lib.mkOption { + default = true; + example = false; + type = lib.types.bool; + description = '' + Enables default system packages. + ''; + }; + additionalPackages = lib.mkOption { + default = []; + example = [pkgs.openssl]; + type = with lib.types; listOf package; + description = '' + Additional packages to install. + Note that these are installed even if base packages is disabled, e.g. you can also use this as the only packages to install. + ''; + }; + specialPrograms = lib.mkOption { + default = {}; + example = {}; + type = with lib.types; attrsOf anything; + description = '' + special program configuration to be added which require programs.something notation. + ''; + }; + specialServices = lib.mkOption { + default = {}; + example = {}; + type = with lib.types; attrsOf anything; + description = '' + special services configuration to be added which require an services.something notation. + ''; + }; + }; + }; + + config = lib.optionalAttrs (options ? environment.systemPackages) { + environment.systemPackages = + if config.mods.basePackages.enable + then + with pkgs; + [ + adwaita-icon-theme + dbus + dconf + direnv + glib + gnome.nixos-gsettings-overrides + gsettings-desktop-schemas + gtk-layer-shell + gtk3 + gtk4 + gtk4-layer-shell + hicolor-icon-theme + icon-library + kdePackages.breeze-icons + kdePackages.breeze + libsForQt5.breeze-qt5 + kdePackages.qtstyleplugin-kvantum + libsForQt5.qtstyleplugin-kvantum + libadwaita + libxkbcommon + alejandra + openssl + seahorse + upower + xorg.xkbutils + sbctl + ] + ++ config.mods.basePackages.additionalPackages + else config.mods.basePackages.additionalPackages; + + gtk.iconCache.enable = false; + services = + if config.mods.basePackages.enable + then + { + preload.enable = mkDashDefault true; + upower.enable = mkDashDefault true; + dbus = { + enable = mkDashDefault true; + }; + avahi = { + enable = mkDashDefault true; + nssmdns4 = mkDashDefault true; + openFirewall = mkDashDefault true; + }; + } + // config.mods.basePackages.specialServices + else config.mods.basePackages.specialServices; + + programs = + if config.mods.basePackages.enable + then + { + nix-ld = { + enable = mkDashDefault true; + libraries = with pkgs; [ + jdk + zlib + ]; + }; + direnv = { + package = mkDashDefault pkgs.direnv; + silent = mkDashDefault false; + loadInNixShell = mkDashDefault true; + direnvrcExtra = mkDashDefault ""; + nix-direnv = { + enable = mkDashDefault true; + package = mkDashDefault pkgs.nix-direnv; + }; + }; + gnupg.agent.enable = mkDashDefault true; + } + // config.mods.basePackages.specialPrograms + else config.mods.basePackages.specialPrograms; + }; +} diff --git a/modules/programs/coding.nix b/modules/programs/coding.nix index 46007ee..781d9dd 100644 --- a/modules/programs/coding.nix +++ b/modules/programs/coding.nix @@ -1,499 +1,567 @@ -{ - lib, - config, - pkgs, - options, - ... -}: { - options.mods = { - coding = { - enable = lib.mkOption { - default = true; - example = false; - type = lib.types.bool; - description = '' - Enables coding packages. - ''; - }; - dashvim = lib.mkOption { - default = true; - example = false; - type = lib.types.bool; - description = '' - Enables dashvim package. - ''; - }; - jetbrains = lib.mkOption { - default = false; - example = true; - type = lib.types.bool; - description = '' - Enables jetbrains toolbox. - ''; - }; - vscodium = { - enable = lib.mkOption { - default = false; - example = true; - type = lib.types.bool; - description = '' - Enables vscodium. - ''; - }; - extensions = lib.mkOption { - default = []; - example = []; - type = with lib.types; listOf package; - description = "Extensions to be installed"; - }; - }; - penpot = lib.mkOption { - default = false; - example = true; - type = lib.types.bool; - description = "Enables penpot"; - }; - useDefaultPackages = lib.mkOption { - default = true; - example = false; - type = lib.types.bool; - description = "Use default base packages (only additionalPackages are installed if false)"; - }; - additionalPackages = lib.mkOption { - default = []; - example = []; - type = with lib.types; listOf package; - description = "Additional packages to be installed"; - }; - languages = { - haskell = { - enable = lib.mkOption { - default = true; - example = false; - type = lib.types.bool; - description = '' - Enables haskell. - ''; - }; - packages = lib.mkOption { - default = with pkgs; [ - haskellPackages.cabal-install - ghc - haskellPackages.haskell-language-server - ]; - example = []; - type = with lib.types; listOf package; - description = '' - haskell packages - ''; - }; - }; - typst = { - enable = lib.mkOption { - default = true; - example = false; - type = lib.types.bool; - description = '' - Enables typst. - ''; - }; - packages = lib.mkOption { - default = with pkgs; [ - typst - tinymist - ltex-ls - ]; - example = []; - type = with lib.types; listOf package; - description = '' - typst packages - ''; - }; - }; - go = { - enable = lib.mkOption { - default = true; - example = false; - type = lib.types.bool; - description = '' - Enables go. - ''; - }; - packages = lib.mkOption { - default = with pkgs; [ - go - gopls - ]; - example = []; - type = with lib.types; listOf package; - description = '' - Go packages - ''; - }; - }; - rust = { - enable = lib.mkOption { - default = true; - example = false; - type = lib.types.bool; - description = '' - Enables rust. - ''; - }; - packages = lib.mkOption { - default = with pkgs; [rustup]; - example = []; - type = with lib.types; listOf package; - description = '' - Rust packages - ''; - }; - }; - ts-js = { - enable = lib.mkOption { - default = true; - example = false; - type = lib.types.bool; - description = '' - Enables TS/JS. - ''; - }; - packages = lib.mkOption { - default = with pkgs; [ - nodejs_20 - deno - typescript - nodePackages.typescript-language-server - nodePackages.prettier - ]; - example = []; - type = with lib.types; listOf package; - description = '' - TS/JS packages - ''; - }; - }; - zig = { - enable = lib.mkOption { - default = true; - example = false; - type = lib.types.bool; - description = '' - Enables zig. - ''; - }; - packages = lib.mkOption { - default = with pkgs; [ - zig - zls - ]; - example = []; - type = with lib.types; listOf package; - description = '' - zig packages - ''; - }; - }; - java = { - enable = lib.mkOption { - default = true; - example = false; - type = lib.types.bool; - description = '' - Enables java. - ''; - }; - packages = lib.mkOption { - default = with pkgs; [ - gradle - maven - jdt-language-server - temurin-jre-bin - ]; - example = []; - type = with lib.types; listOf package; - description = '' - Java packages - ''; - }; - }; - dotnet = { - enable = lib.mkOption { - default = true; - example = false; - type = lib.types.bool; - description = '' - Enables C#/F#. - ''; - }; - packages = lib.mkOption { - default = with pkgs; [ - #.! - dotnet-sdk - omnisharp-roslyn - csharpier - netcoredbg - #fsharp - fsharp - fsautocomplete - ]; - example = []; - type = with lib.types; listOf package; - description = '' - C#/F# packages - ''; - }; - }; - C-CPP = { - enable = lib.mkOption { - default = true; - example = false; - type = lib.types.bool; - description = '' - Enables C/C++. - ''; - }; - packages = lib.mkOption { - default = with pkgs; [ - # broke - #bear - gdb - gcc - clang-tools - ]; - example = []; - type = with lib.types; listOf package; - description = '' - C/C++ packages - ''; - }; - }; - python = { - enable = lib.mkOption { - default = true; - example = false; - type = lib.types.bool; - description = '' - Enables python. - ''; - }; - packages = lib.mkOption { - default = with pkgs; [ - python3 - python312Packages.python-lsp-server - python312Packages.python-lsp-ruff - python312Packages.python-lsp-black - ]; - example = []; - type = with lib.types; listOf package; - description = '' - python packages - ''; - }; - }; - configFiles = { - enable = lib.mkOption { - default = true; - example = false; - type = lib.types.bool; - description = '' - Enables Json/toml/yaml etc. - ''; - }; - packages = lib.mkOption { - default = with pkgs; [ - #yaml - yamlfmt - yamllint - yaml-language-server - - #json - jq - ]; - example = []; - type = with lib.types; listOf package; - description = '' - packages for said filetypes - ''; - }; - }; - bash = { - enable = lib.mkOption { - default = true; - example = false; - type = lib.types.bool; - description = '' - Enables bash. - ''; - }; - packages = lib.mkOption { - default = with pkgs; [ - bash-language-server - shfmt - ]; - example = []; - type = with lib.types; listOf package; - description = '' - bash packages - ''; - }; - }; - html-css = { - enable = lib.mkOption { - default = true; - example = false; - type = lib.types.bool; - description = '' - Enables html/css. - ''; - }; - packages = lib.mkOption { - default = with pkgs; [ - tailwindcss - tailwindcss-language-server - # html-tidy - ]; - example = []; - type = with lib.types; listOf package; - description = '' - html/css packages - ''; - }; - }; - sql = { - enable = lib.mkOption { - default = true; - example = false; - type = lib.types.bool; - description = '' - Enables sql. - ''; - }; - packages = lib.mkOption { - default = with pkgs; [ - nodePackages.sql-formatter - sqls - ]; - example = []; - type = with lib.types; listOf package; - description = '' - sql packages - ''; - }; - }; - gleam = { - enable = lib.mkOption { - default = true; - example = false; - type = lib.types.bool; - description = '' - Enables gleam. - ''; - }; - packages = lib.mkOption { - default = with pkgs; [gleam]; - example = []; - type = with lib.types; listOf package; - description = '' - gleam packages - ''; - }; - }; - asm = { - enable = lib.mkOption { - default = true; - example = false; - type = lib.types.bool; - description = '' - Enables assembly. - ''; - }; - packages = lib.mkOption { - default = with pkgs; [asm-lsp]; - example = []; - type = with lib.types; listOf package; - description = '' - assembly packages - ''; - }; - }; - }; - }; - }; - - config = let - basePackages = with pkgs; [ - gitui - meson - ninja - tree-sitter - unzip - pkg-config - sqlite - plantuml - d-spy - tmux - tmate - ]; - font_family = "${config.mods.stylix.fonts.monospace.name}"; - in - lib.mkIf config.mods.coding.enable ( - lib.optionalAttrs (options ? home.packages) { - programs.dashvim = lib.mkIf config.mods.coding.dashvim { - enable = true; - colorscheme = config.mods.stylix.colorscheme; - }; - programs.vscode = lib.mkIf config.mods.coding.vscodium.enable { - enable = true; - package = pkgs.vscodium; - profiles.default.extensions = config.mods.coding.vscodium.extensions; - }; - xdg.configFile."neovide/config.toml" = lib.mkIf config.mods.coding.dashvim { - source = (pkgs.formats.toml {}).generate "neovide" { - font = { - size = 12; - normal = { - family = font_family; - style = ""; - }; - bold = { - family = font_family; - style = "ExtraBold"; - }; - italic = { - family = font_family; - style = "Italic"; - }; - bold_italic = { - family = font_family; - style = "Bold Italic"; - }; - }; - }; - }; - home.packages = with pkgs; - [ - (lib.mkIf config.mods.coding.dashvim neovide) - (lib.mkIf config.mods.coding.jetbrains jetbrains-toolbox) - (lib.mkIf config.mods.coding.penpot pkgs.penpot-desktop) - ] - ++ config.mods.coding.additionalPackages - ++ (lib.lists.optionals config.mods.coding.useDefaultPackages basePackages) - ++ (lib.lists.optionals config.mods.coding.languages.haskell.enable config.mods.coding.languages.haskell.packages) - ++ (lib.lists.optionals config.mods.coding.languages.rust.enable config.mods.coding.languages.rust.packages) - ++ (lib.lists.optionals config.mods.coding.languages.go.enable config.mods.coding.languages.go.packages) - ++ (lib.lists.optionals config.mods.coding.languages.java.enable config.mods.coding.languages.java.packages) - ++ (lib.lists.optionals config.mods.coding.languages.dotnet.enable config.mods.coding.languages.dotnet.packages) - ++ (lib.lists.optionals config.mods.coding.languages.bash.enable config.mods.coding.languages.bash.packages) - ++ (lib.lists.optionals config.mods.coding.languages.C-CPP.enable config.mods.coding.languages.C-CPP.packages) - ++ (lib.lists.optionals config.mods.coding.languages.asm.enable config.mods.coding.languages.asm.packages) - ++ (lib.lists.optionals config.mods.coding.languages.sql.enable config.mods.coding.languages.sql.packages) - ++ (lib.lists.optionals config.mods.coding.languages.html-css.enable config.mods.coding.languages.html-css.packages) - ++ (lib.lists.optionals config.mods.coding.languages.configFiles.enable config.mods.coding.languages.configFiles.packages) - ++ (lib.lists.optionals config.mods.coding.languages.ts-js.enable config.mods.coding.languages.ts-js.packages) - ++ (lib.lists.optionals config.mods.coding.languages.typst.enable config.mods.coding.languages.typst.packages) - ++ (lib.lists.optionals config.mods.coding.languages.zig.enable config.mods.coding.languages.zig.packages) - ++ (lib.lists.optionals config.mods.coding.languages.gleam.enable config.mods.coding.languages.gleam.packages); - } - ); -} +{ + lib, + config, + pkgs, + options, + ... +}: let + font_family = "${config.mods.stylix.fonts.monospace.name}"; +in { + options.mods = { + coding = { + enable = lib.mkOption { + default = true; + example = false; + type = lib.types.bool; + description = '' + Enables coding packages. + ''; + }; + dashvim = lib.mkOption { + default = true; + example = false; + type = lib.types.bool; + description = '' + Enables dashvim package. + ''; + }; + jetbrains = lib.mkOption { + default = false; + example = true; + type = lib.types.bool; + description = '' + Enables jetbrains toolbox. + ''; + }; + vscodium = { + enable = lib.mkOption { + default = false; + example = true; + type = lib.types.bool; + description = '' + Enables vscodium. + ''; + }; + extensions = lib.mkOption { + default = []; + example = []; + type = with lib.types; listOf package; + description = "Extensions to be installed"; + }; + }; + penpot = lib.mkOption { + default = false; + example = true; + type = lib.types.bool; + description = "Enables penpot"; + }; + neovide = { + enable = lib.mkOption { + default = false; + example = true; + type = lib.types.bool; + description = "Enables neovide"; + }; + config = lib.mkOption { + default = { + font = { + size = 12; + normal = { + family = font_family; + style = ""; + }; + bold = { + family = font_family; + style = "ExtraBold"; + }; + italic = { + family = font_family; + style = "Italic"; + }; + bold_italic = { + family = font_family; + style = "Bold Italic"; + }; + }; + }; + example = {}; + type = with lib.types; attrsOf anything; + description = "Config for neovide"; + }; + }; + gh = { + enable = lib.mkOption { + default = true; + example = false; + type = lib.types.bool; + description = "Enables and configures gh"; + }; + config = lib.mkOption { + default = { + version = 1; + git_protocol = "ssh"; + editor = ""; + prompt = "enabled"; + prefer_editor_prompt = "disabled"; + pager = ""; + aliases = { + co = "pr checkout"; + }; + http_unix_socket = ""; + browser = ""; + }; + example = {}; + type = with lib.types; attrsOf anything; + description = "config for gh. Keep in mind, empty values refer to using environment variables"; + }; + hosts = lib.mkOption { + default = { + "github.com" = { + git_protocol = "ssh"; + users = { + ${config.mods.git.username} = ""; + }; + user = "${config.mods.git.username}"; + }; + }; + example = {}; + type = with lib.types; attrsOf anything; + description = "hosts for gh"; + }; + }; + useDefaultPackages = lib.mkOption { + default = true; + example = false; + type = lib.types.bool; + description = "Use default base packages (only additionalPackages are installed if false)"; + }; + additionalPackages = lib.mkOption { + default = []; + example = []; + type = with lib.types; listOf package; + description = "Additional packages to be installed"; + }; + languages = { + haskell = { + enable = lib.mkOption { + default = true; + example = false; + type = lib.types.bool; + description = '' + Enables haskell. + ''; + }; + packages = lib.mkOption { + default = with pkgs; [ + haskellPackages.cabal-install + ghc + haskellPackages.haskell-language-server + ]; + example = []; + type = with lib.types; listOf package; + description = '' + haskell packages + ''; + }; + }; + typst = { + enable = lib.mkOption { + default = true; + example = false; + type = lib.types.bool; + description = '' + Enables typst. + ''; + }; + packages = lib.mkOption { + default = with pkgs; [ + typst + tinymist + ltex-ls + ]; + example = []; + type = with lib.types; listOf package; + description = '' + typst packages + ''; + }; + }; + go = { + enable = lib.mkOption { + default = true; + example = false; + type = lib.types.bool; + description = '' + Enables go. + ''; + }; + packages = lib.mkOption { + default = with pkgs; [ + go + gopls + ]; + example = []; + type = with lib.types; listOf package; + description = '' + Go packages + ''; + }; + }; + rust = { + enable = lib.mkOption { + default = true; + example = false; + type = lib.types.bool; + description = '' + Enables rust. + ''; + }; + packages = lib.mkOption { + default = with pkgs; [rustup]; + example = []; + type = with lib.types; listOf package; + description = '' + Rust packages + ''; + }; + }; + ts-js = { + enable = lib.mkOption { + default = true; + example = false; + type = lib.types.bool; + description = '' + Enables TS/JS. + ''; + }; + packages = lib.mkOption { + default = with pkgs; [ + nodejs_20 + deno + typescript + nodePackages.typescript-language-server + nodePackages.prettier + ]; + example = []; + type = with lib.types; listOf package; + description = '' + TS/JS packages + ''; + }; + }; + zig = { + enable = lib.mkOption { + default = true; + example = false; + type = lib.types.bool; + description = '' + Enables zig. + ''; + }; + packages = lib.mkOption { + default = with pkgs; [ + zig + zls + ]; + example = []; + type = with lib.types; listOf package; + description = '' + zig packages + ''; + }; + }; + java = { + enable = lib.mkOption { + default = true; + example = false; + type = lib.types.bool; + description = '' + Enables java. + ''; + }; + packages = lib.mkOption { + default = with pkgs; [ + gradle + maven + jdt-language-server + temurin-jre-bin + ]; + example = []; + type = with lib.types; listOf package; + description = '' + Java packages + ''; + }; + }; + dotnet = { + enable = lib.mkOption { + default = true; + example = false; + type = lib.types.bool; + description = '' + Enables C#/F#. + ''; + }; + packages = lib.mkOption { + default = with pkgs; [ + #.! + dotnet-sdk + omnisharp-roslyn + csharpier + netcoredbg + fsharp + fsautocomplete + ]; + example = []; + type = with lib.types; listOf package; + description = '' + C#/F# packages + ''; + }; + }; + C-CPP = { + enable = lib.mkOption { + default = true; + example = false; + type = lib.types.bool; + description = '' + Enables C/C++. + ''; + }; + packages = lib.mkOption { + default = with pkgs; [ + bear + gdb + gcc + clang-tools + ]; + example = []; + type = with lib.types; listOf package; + description = '' + C/C++ packages + ''; + }; + }; + python = { + enable = lib.mkOption { + default = true; + example = false; + type = lib.types.bool; + description = '' + Enables python. + ''; + }; + packages = lib.mkOption { + default = with pkgs; [ + python3 + python312Packages.python-lsp-server + python312Packages.python-lsp-ruff + python312Packages.python-lsp-black + ]; + example = []; + type = with lib.types; listOf package; + description = '' + python packages + ''; + }; + }; + configFiles = { + enable = lib.mkOption { + default = true; + example = false; + type = lib.types.bool; + description = '' + Enables Json/toml/yaml etc. + ''; + }; + packages = lib.mkOption { + default = with pkgs; [ + #yaml + yamlfmt + yamllint + yaml-language-server + + #json + jq + ]; + example = []; + type = with lib.types; listOf package; + description = '' + packages for said filetypes + ''; + }; + }; + bash = { + enable = lib.mkOption { + default = true; + example = false; + type = lib.types.bool; + description = '' + Enables bash. + ''; + }; + packages = lib.mkOption { + default = with pkgs; [ + bash-language-server + shfmt + ]; + example = []; + type = with lib.types; listOf package; + description = '' + bash packages + ''; + }; + }; + html-css = { + enable = lib.mkOption { + default = true; + example = false; + type = lib.types.bool; + description = '' + Enables html/css. + ''; + }; + packages = lib.mkOption { + default = with pkgs; [ + tailwindcss + tailwindcss-language-server + # html-tidy + ]; + example = []; + type = with lib.types; listOf package; + description = '' + html/css packages + ''; + }; + }; + sql = { + enable = lib.mkOption { + default = true; + example = false; + type = lib.types.bool; + description = '' + Enables sql. + ''; + }; + packages = lib.mkOption { + default = with pkgs; [ + nodePackages.sql-formatter + sqls + ]; + example = []; + type = with lib.types; listOf package; + description = '' + sql packages + ''; + }; + }; + gleam = { + enable = lib.mkOption { + default = true; + example = false; + type = lib.types.bool; + description = '' + Enables gleam. + ''; + }; + packages = lib.mkOption { + default = with pkgs; [gleam]; + example = []; + type = with lib.types; listOf package; + description = '' + gleam packages + ''; + }; + }; + asm = { + enable = lib.mkOption { + default = true; + example = false; + type = lib.types.bool; + description = '' + Enables assembly. + ''; + }; + packages = lib.mkOption { + default = with pkgs; [asm-lsp]; + example = []; + type = with lib.types; listOf package; + description = '' + assembly packages + ''; + }; + }; + }; + }; + }; + + config = let + basePackages = with pkgs; [ + gitui + meson + ninja + tree-sitter + unzip + pkg-config + sqlite + plantuml + d-spy + tmux + tmate + ]; + in + lib.mkIf config.mods.coding.enable ( + lib.optionalAttrs (options ? home.packages) { + programs.dashvim = lib.mkIf config.mods.coding.dashvim { + enable = true; + colorscheme = config.mods.stylix.colorscheme; + }; + programs.vscode = lib.mkIf config.mods.coding.vscodium.enable { + enable = true; + package = pkgs.vscodium; + profiles.default.extensions = config.mods.coding.vscodium.extensions; + }; + xdg.configFile."neovide/config.toml" = lib.mkIf (config.mods.coding.dashvim || config.mods.coding.neovide.enable) { + source = + (pkgs.formats.toml {}).generate "neovide" + config.mods.coding.neovide.config; + }; + + xdg.configFile."gh/config.yml" = lib.mkIf config.mods.coding.gh.enable { + source = + (pkgs.formats.yaml {}).generate "config" + config.mods.coding.gh.config; + }; + xdg.configFile."gh/hosts.yml" = lib.mkIf config.mods.coding.gh.enable { + source = + (pkgs.formats.yaml {}).generate "hosts" + config.mods.coding.gh.hosts; + }; + + home.packages = with pkgs; + [ + (lib.mkIf (config.mods.coding.dashvim || config.mods.coding.neovide.enable) neovide) + (lib.mkIf config.mods.coding.jetbrains jetbrains-toolbox) + (lib.mkIf config.mods.coding.penpot pkgs.penpot-desktop) + (lib.mkIf config.mods.coding.gh.enable gh) + ] + ++ config.mods.coding.additionalPackages + ++ (lib.lists.optionals config.mods.coding.useDefaultPackages basePackages) + ++ (lib.lists.optionals config.mods.coding.languages.haskell.enable config.mods.coding.languages.haskell.packages) + ++ (lib.lists.optionals config.mods.coding.languages.rust.enable config.mods.coding.languages.rust.packages) + ++ (lib.lists.optionals config.mods.coding.languages.go.enable config.mods.coding.languages.go.packages) + ++ (lib.lists.optionals config.mods.coding.languages.java.enable config.mods.coding.languages.java.packages) + ++ (lib.lists.optionals config.mods.coding.languages.dotnet.enable config.mods.coding.languages.dotnet.packages) + ++ (lib.lists.optionals config.mods.coding.languages.bash.enable config.mods.coding.languages.bash.packages) + ++ (lib.lists.optionals config.mods.coding.languages.C-CPP.enable config.mods.coding.languages.C-CPP.packages) + ++ (lib.lists.optionals config.mods.coding.languages.asm.enable config.mods.coding.languages.asm.packages) + ++ (lib.lists.optionals config.mods.coding.languages.sql.enable config.mods.coding.languages.sql.packages) + ++ (lib.lists.optionals config.mods.coding.languages.html-css.enable config.mods.coding.languages.html-css.packages) + ++ (lib.lists.optionals config.mods.coding.languages.configFiles.enable config.mods.coding.languages.configFiles.packages) + ++ (lib.lists.optionals config.mods.coding.languages.ts-js.enable config.mods.coding.languages.ts-js.packages) + ++ (lib.lists.optionals config.mods.coding.languages.typst.enable config.mods.coding.languages.typst.packages) + ++ (lib.lists.optionals config.mods.coding.languages.zig.enable config.mods.coding.languages.zig.packages) + ++ (lib.lists.optionals config.mods.coding.languages.gleam.enable config.mods.coding.languages.gleam.packages); + } + ); +} diff --git a/modules/programs/default.nix b/modules/programs/default.nix index 17be977..b1d5103 100644 --- a/modules/programs/default.nix +++ b/modules/programs/default.nix @@ -1,49 +1,49 @@ -{ - imports = [ - ./acpid.nix - ./basePackages.nix - ./bluetooth.nix - ./browser - ./coding.nix - ./containers.nix - ./drives.nix - ./fancontrol.nix - ./fastfetch.nix - ./fish.nix - ./flatpak.nix - ./gaming.nix - ./gdm.nix - ./git.nix - ./gnome.nix - ./gnomeServices.nix - ./gpu.nix - ./greetd.nix - ./homePackages.nix - ./hyprland - ./kde.nix - ./kdeConnect.nix - ./keepassxc.nix - ./kitty.nix - ./media.nix - ./mime.nix - ./ncspot.nix - ./nextcloud.nix - ./oxi - ./piper.nix - ./plymouth.nix - ./printing.nix - ./scripts.nix - ./sddm.nix - ./sops.nix - ./starship.nix - ./streamcontroller.nix - ./stylix.nix - ./supersonic.nix - ./sway.nix - ./teams.nix - ./virtmanager.nix - ./xkb.nix - ./xone.nix - ./yazi - ]; -} +{ + imports = [ + ./acpid.nix + ./basePackages.nix + ./bluetooth.nix + ./browser + ./coding.nix + ./containers.nix + ./drives.nix + ./fancontrol.nix + ./fastfetch.nix + ./fish.nix + ./flatpak.nix + ./gaming.nix + ./gdm.nix + ./git.nix + ./gnome.nix + ./gnomeServices.nix + ./gpu.nix + ./greetd.nix + ./homePackages.nix + ./hyprland + ./kde.nix + ./kdeConnect.nix + ./keepassxc.nix + ./kitty.nix + ./media.nix + ./mime.nix + ./ncspot.nix + ./nextcloud.nix + ./oxi + ./piper.nix + ./plymouth.nix + ./printing.nix + ./scripts.nix + ./sddm.nix + ./sops.nix + ./starship.nix + ./streamcontroller.nix + ./stylix.nix + ./supersonic.nix + ./sway.nix + ./teams.nix + ./virtmanager.nix + ./xkb.nix + ./xone.nix + ./yazi + ]; +} diff --git a/modules/programs/fancontrol.nix b/modules/programs/fancontrol.nix index 87be9af..f7a2e3a 100644 --- a/modules/programs/fancontrol.nix +++ b/modules/programs/fancontrol.nix @@ -1,36 +1,36 @@ -{ - lib, - config, - options, - ... -}: { - options.mods.fancontrol = { - enable = lib.mkOption { - default = false; - example = true; - type = lib.types.bool; - description = "Enables fancontrol-gui with needed drivers"; - }; - forceId = lib.mkOption { - default = null; - example = "force_id=0x8628"; - type = with lib.types; nullOr str; - description = "Modprobe options for the it87 driver. Information at: https://wiki.archlinux.org/title/Lm_sensors#Gigabyte_B250/Z370/B450M/B560M/B660M/Z690/B550_motherboards"; - }; - }; - config = lib.mkIf config.mods.fancontrol.enable ( - lib.optionalAttrs (options ? home.packages) { - programs.fancontrol-gui.enable = true; - } - // (lib.optionalAttrs (options ? boot.kernelModules) { - boot = { - kernelParams = ["acpi_enforce_resources=lax"]; - extraModulePackages = with config.boot.kernelPackages; [liquidtux it87]; - kernelModules = ["v4l2loopback" "it87"]; - extraModprobeConfig = lib.mkIf (config.mods.fancontrol.forceId != null) '' - options it87 ${config.mods.fancontrol.forceId} - ''; - }; - }) - ); -} +{ + lib, + config, + options, + ... +}: { + options.mods.fancontrol = { + enable = lib.mkOption { + default = false; + example = true; + type = lib.types.bool; + description = "Enables fancontrol-gui with needed drivers"; + }; + forceId = lib.mkOption { + default = null; + example = "force_id=0x8628"; + type = with lib.types; nullOr str; + description = "Modprobe options for the it87 driver. Information at: https://wiki.archlinux.org/title/Lm_sensors#Gigabyte_B250/Z370/B450M/B560M/B660M/Z690/B550_motherboards"; + }; + }; + config = lib.mkIf config.mods.fancontrol.enable ( + lib.optionalAttrs (options ? home.packages) { + programs.fancontrol-gui.enable = true; + } + // (lib.optionalAttrs (options ? boot.kernelModules) { + boot = { + kernelParams = ["acpi_enforce_resources=lax"]; + extraModulePackages = with config.boot.kernelPackages; [liquidtux it87]; + kernelModules = ["v4l2loopback" "it87"]; + extraModprobeConfig = lib.mkIf (config.mods.fancontrol.forceId != null) '' + options it87 ${config.mods.fancontrol.forceId} + ''; + }; + }) + ); +} diff --git a/modules/programs/fish.nix b/modules/programs/fish.nix index fc89e95..2f18036 100644 --- a/modules/programs/fish.nix +++ b/modules/programs/fish.nix @@ -52,6 +52,7 @@ in { alias rebuild='nh os switch -- --accept-flake-config' alias update='nix flake update --flake $FLAKE --accept-flake-config' + alias gcli='gh' abbr --add ls 'lsd' abbr --add :q 'exit' abbr --add gh 'git push origin' diff --git a/modules/programs/git.nix b/modules/programs/git.nix index dec2aa5..9189329 100644 --- a/modules/programs/git.nix +++ b/modules/programs/git.nix @@ -6,13 +6,13 @@ }: { options.mods.git = { username = lib.mkOption { - default = "DashieTM"; + default = ""; example = "globi"; type = lib.types.str; description = "Git user name"; }; email = lib.mkOption { - default = "fabio.lenherr@gmail.com"; + default = ""; example = "globi@globus.glob"; type = lib.types.str; description = "Git email"; diff --git a/modules/programs/hyprland/hyprland.nix b/modules/programs/hyprland/hyprland.nix index c6ce857..049041d 100644 --- a/modules/programs/hyprland/hyprland.nix +++ b/modules/programs/hyprland/hyprland.nix @@ -1,402 +1,402 @@ -{ - mkDashDefault, - config, - lib, - options, - pkgs, - inputs, - ... -}: let - browserName = - if (builtins.isString config.mods.homePackages.browser) - then config.mods.homePackages.browser - else if config.mods.homePackages.browser ? meta && config.mods.homePackages.browser.meta ? mainProgram - then config.mods.homePackages.browser.meta.mainProgram - else config.mods.homePackages.browser.pname; -in { - options.mods.hyprland = { - enable = lib.mkOption { - default = true; - example = false; - type = lib.types.bool; - description = '' - Enable Hyprland - ''; - }; - monitor = lib.mkOption { - default = [ - # main monitor - "${config.conf.defaultMonitor},${config.conf.defaultMonitorMode},0x0,${config.conf.defaultMonitorScale}" - # all others - ]; - example = ["DP-1,3440x1440@180,2560x0,1,vrr,0"]; - type = with lib.types; listOf str; - description = '' - The monitor configuration for hyprland. - ''; - }; - workspace = lib.mkOption { - default = []; - example = ["2,monitor:DP-1, default:true"]; - type = with lib.types; listOf str; - description = '' - The workspace configuration for hyprland. - ''; - }; - noAtomic = lib.mkOption { - default = false; - example = true; - type = lib.types.bool; - description = '' - Use tearing - ''; - }; - extraAutostart = lib.mkOption { - default = []; - example = ["your application"]; - type = lib.types.listOf lib.types.str; - description = '' - Extra exec_once. - ''; - }; - useDefaultConfig = lib.mkOption { - default = true; - example = false; - type = lib.types.bool; - description = '' - Use preconfigured Hyprland config. - ''; - }; - customConfig = lib.mkOption { - default = {}; - example = {}; - type = with lib.types; attrsOf anything; - description = '' - Custom Hyprland configuration. - Will be merged with default configuration if enabled. - ''; - }; - plugins = lib.mkOption { - default = []; - example = []; - type = with lib.types; listOf package; - description = '' - Plugins to be added to Hyprland. - ''; - }; - pluginConfig = lib.mkOption { - default = {}; - example = {}; - type = with lib.types; attrsOf anything; - description = '' - Plugin configuration to be added to Hyprland. - ''; - }; - hyprspaceEnable = lib.mkOption { - default = false; - type = lib.types.bool; - example = true; - description = '' - Enables Hyprspace plugin for hyprland. - Please note, plugins tend to break VERY often. - ''; - }; - }; - - config = lib.mkIf config.mods.hyprland.enable ( - lib.optionalAttrs (options ? wayland.windowManager.hyprland) { - # install Hyprland related packages - home.packages = with pkgs; [ - xorg.xprop - grim - slurp - satty - xdg-desktop-portal-gtk - # xdg-desktop-portal-hyprland - copyq - wl-clipboard - hyprcursor - hyprpicker - ]; - - wayland.windowManager.hyprland = { - enable = true; - settings = - if config.mods.hyprland.useDefaultConfig - then - lib.mkMerge - [ - { - "$mod" = "SUPER"; - - bindm = [ - "$mod, mouse:272, movewindow" - "$mod, mouse:273, resizeactive" - ]; - - bind = [ - # screenshots - ''$mod SUPER,S,exec,grim -g "$(slurp)" - | wl-copy'' - ''$mod SUPERSHIFT,S,exec,grim -g "$(slurp)" - | satty -f -'' - ''$mod SUPERSHIFTALT,S,exec,grim -c -g "2560,0 3440x1440" - | wl-copy'' - - # regular programs - "$mod SUPER,F,exec,${browserName}" - (lib.mkIf ( - browserName == "firefox" || browserName == "zen" - ) "$mod SUPERSHIFT,F,exec,${browserName} -p special") - "$mod SUPER,T,exec,kitty -1" - "$mod SUPER,E,exec,nautilus -w" - "$mod SUPER,N,exec,neovide" - (lib.mkIf (config.mods.hyprland.anyrun.enable) "$mod SUPER,R,exec,anyrun") - (lib.mkIf (config.mods.oxi.oxirun.enable) "$mod SUPER,R,exec,oxirun") - (lib.mkIf (config.mods.oxi.oxidash.enable) "$mod SUPER,M,exec,oxidash") - (lib.mkIf (config.mods.oxi.oxicalc.enable) "$mod SUPER,G,exec,oxicalc") - (lib.mkIf (config.mods.oxi.oxishut.enable) "$mod SUPER,D,exec,oxishut") - (lib.mkIf (config.mods.oxi.oxipaste.enable) "$mod SUPER,A,exec,oxipaste-iced") - (lib.mkIf (config.mods.oxi.hyprdock.enable) "$mod SUPERSHIFT,P,exec,hyprdock --gui") - "$mod SUPERSHIFT,L,exec, playerctl -a pause & hyprlock & systemctl suspend" - "$mod SUPERSHIFT,K,exec, playerctl -a pause & hyprlock & systemctl hibernate" - - # media keys - (lib.mkIf config.mods.scripts.audioControl ",XF86AudioMute,exec, audioControl mute") - (lib.mkIf config.mods.scripts.audioControl ",XF86AudioLowerVolume,exec, audioControl sink -5%") - (lib.mkIf config.mods.scripts.audioControl ",XF86AudioRaiseVolume,exec, audioControl sink +5%") - ",XF86AudioPlay,exec, playerctl play-pause" - ",XF86AudioNext,exec, playerctl next" - ",XF86AudioPrev,exec, playerctl previous" - (lib.mkIf config.mods.scripts.changeBrightness ",XF86MonBrightnessDown,exec, changeBrightness brightness 10%-") - (lib.mkIf config.mods.scripts.changeBrightness ",XF86MonBrightnessUp,exec, changeBrightness brightness +10%") - - # hyprland keybinds - # misc - "$mod SUPER,V,togglefloating," - "$mod SUPER,B,fullscreen," - "$mod SUPER,C,togglesplit" - "$mod SUPER,Q,killactive," - "$mod SUPERSHIFTALT,M,exit," - "$mod SUPERSHIFT,W,togglespecialworkspace" - - # move - "$mod SUPER,left,movewindow,l" - "$mod SUPER,right,movewindow,r" - "$mod SUPER,up,movewindow,u" - "$mod SUPER,down,movewindow,d" - - # workspaces - "$mod SUPER,1,workspace,1" - "$mod SUPER,2,workspace,2" - "$mod SUPER,3,workspace,3" - "$mod SUPER,4,workspace,4" - "$mod SUPER,5,workspace,5" - "$mod SUPER,6,workspace,6" - "$mod SUPER,7,workspace,7" - "$mod SUPER,8,workspace,8" - "$mod SUPER,9,workspace,9" - "$mod SUPER,0,workspace,10" - - # move to workspace - "$mod SUPERSHIFT,1,movetoworkspace,1" - "$mod SUPERSHIFT,2,movetoworkspace,2" - "$mod SUPERSHIFT,3,movetoworkspace,3" - "$mod SUPERSHIFT,4,movetoworkspace,4" - "$mod SUPERSHIFT,5,movetoworkspace,5" - "$mod SUPERSHIFT,6,movetoworkspace,6" - "$mod SUPERSHIFT,7,movetoworkspace,7" - "$mod SUPERSHIFT,8,movetoworkspace,8" - "$mod SUPERSHIFT,9,movetoworkspace,9" - "$mod SUPERSHIFT,0,movetoworkspace,10" - - # move to workspace silent - "$mod SUPERSHIFTALT,1,movetoworkspacesilent,1" - "$mod SUPERSHIFTALT,2,movetoworkspacesilent,2" - "$mod SUPERSHIFTALT,3,movetoworkspacesilent,3" - "$mod SUPERSHIFTALT,4,movetoworkspacesilent,4" - "$mod SUPERSHIFTALT,5,movetoworkspacesilent,5" - "$mod SUPERSHIFTALT,6,movetoworkspacesilent,6" - "$mod SUPERSHIFTALT,7,movetoworkspacesilent,7" - "$mod SUPERSHIFTALT,8,movetoworkspacesilent,8" - "$mod SUPERSHIFTALT,9,movetoworkspacesilent,9" - "$mod SUPERSHIFTALT,0,movetoworkspacesilent,10" - - # preselection - "$mod SUPERALT,j,layoutmsg,preselect l" - "$mod SUPERALT,k,layoutmsg,preselect d" - "$mod SUPERALT,l,layoutmsg,preselect u" - "$mod SUPERALT,semicolon,layoutmsg,preselect r" - "$mod SUPERALT,h,layoutmsg,preselect n" - ]; - - binde = [ - # hyprland keybinds - # focus - "$mod SUPER,J,movefocus,l" - "$mod SUPER,semicolon,movefocus,r" - "$mod SUPER,L,movefocus,u" - "$mod SUPER,K,movefocus,d" - - # resize - "$mod SUPER,U,resizeactive,-20 0" - "$mod SUPER,P,resizeactive,20 0" - "$mod SUPER,O,resizeactive,0 -20" - "$mod SUPER,I,resizeactive,0 20" - ]; - - general = { - gaps_out = "3,5,5,5"; - border_size = 3; - "col.active_border" = lib.mkOverride 51 "0xFFFF0000 0xFF00FF00 0xFF0000FF 45deg"; - # "col.inactive_border" = "0x66333333"; - allow_tearing = lib.mkIf config.mods.hyprland.noAtomic true; - }; - - decoration = { - rounding = 4; - }; - - animations = { - bezier = "penguin,0.05,0.9,0.1,1.0"; - animation = [ - "windowsMove,1,4,default" - "windows,1,7,default,popin 70%" - "windowsOut,1,7,default,popin 70%" - "border,1,10,default" - "fade,1,7,default" - "workspaces,1,6,default" - "layers,1,3,default,popin" - ]; - }; - - dwindle = { - preserve_split = true; - pseudotile = 0; - permanent_direction_override = false; - }; - - input = { - kb_layout = "${config.mods.xkb.layout}"; - kb_variant = "${config.mods.xkb.variant}"; - repeat_delay = 200; - force_no_accel = true; - touchpad = { - natural_scroll = true; - tap-to-click = true; - tap-and-drag = true; - }; - }; - - misc = { - animate_manual_resizes = 1; - enable_swallow = true; - disable_splash_rendering = true; - disable_hyprland_logo = true; - swallow_regex = "^(.*)(kitty)(.*)$"; - initial_workspace_tracking = 1; - # just doesn't work - enable_anr_dialog = false; - }; - - cursor = { - enable_hyprcursor = true; - no_hardware_cursors = mkDashDefault config.mods.gpu.nvidia.enable; - # done with nix, this would break the current setup otherwise - sync_gsettings_theme = false; - }; - - gestures = { - workspace_swipe = true; - }; - - monitor = config.mods.hyprland.monitor; - workspace = config.mods.hyprland.workspace; - - env = [ - "GTK_CSD,0" - ''TERM,"kitty /bin/fish"'' - "XDG_CURRENT_DESKTOP=Hyprland" - "XDG_SESSION_TYPE=wayland" - "XDG_SESSION_DESKTOP=Hyprland" - "HYPRCURSOR_THEME,${config.mods.stylix.cursor.name}" - "HYPRCURSOR_SIZE,${toString config.mods.stylix.cursor.size}" - "XCURSOR_THEME,${config.mods.stylix.cursor.name}" - "XCURSOR_SIZE,${toString config.mods.stylix.cursor.size}" - "QT_QPA_PLATFORM,wayland" - "QT_QPA_PLATFORMTHEME,qt5ct" - "QT_WAYLAND_FORCE_DPI,96" - "QT_AUTO_SCREEN_SCALE_FACTOR,0" - "QT_WAYLAND_DISABLE_WINDOWDECORATION,1" - "QT_SCALE_FACTOR,1" - ''EDITOR,"neovide --novsync --nofork"'' - (lib.mkIf config.mods.hyprland.noAtomic "WLR_DRM_NO_ATOMIC,1") - "GTK_USE_PORTAL, 1" - - (lib.mkIf config.mods.gpu.nvidia.enable "LIBVA_DRIVER_NAME,nvidia") - (lib.mkIf config.mods.gpu.nvidia.enable "XDG_SESSION_TYPE,wayland") - (lib.mkIf config.mods.gpu.nvidia.enable "GBM_BACKEND,nvidia-drm") - (lib.mkIf config.mods.gpu.nvidia.enable "__GLX_VENDOR_LIBRARY_NAME,nvidia") - ]; - - layerrule = [ - # layer rules - # mainly to disable animations within slurp and grim - "noanim, selection" - ]; - - windowrule = [ - # window rules - "float,class:^(.*)(OxiCalc)(.*)$" - "float,class:^(.*)(winecfg.exe)(.*)$" - "float,class:^(.*)(copyq)(.*)$" - "center,class:^(.*)(swappy)(.*)$" - "float,title:^(.*)(reset)(.*)$" - "workspace 10 silent,class:^(.*)(steam)(.*)$" - "workspace 9 silent,class:^(.*)(dota)(.*)$" - "workspace 9 silent,class:^(.*)(battlebits)(.*)$" - "workspace 9 silent,class:^(.*)(aoe)(.*)$" - "suppressevent fullscreen maximize,class:^(.*)(neovide)(.*)$" - "immediate,class:^(.*)(Pal)$" - "immediate,class:^(.*)(dota2)$" - "immediate,class:^(.*)(needforspeedheat.exe)$" - ]; - - exec-once = - [ - # environment - "systemctl --user import-environment" - "dbus-update-activation-environment --systemd --all" - "hyprctl setcursor Bibata-Modern-Classic 24" - - # other programs - "hyprpaper" - "ironbar" - "${browserName}" - "oxipaste_daemon" - "oxinoti" - ] - ++ config.mods.hyprland.extraAutostart; - - plugin = - lib.mkMerge - [ - { - hyprspace = lib.mkIf config.mods.hyprland.hyprspaceEnable { - bind = [ - "SUPER, W, overview:toggle, toggle" - ]; - }; - } - config.mods.hyprland.pluginConfig - ]; - } - config.mods.hyprland.customConfig - ] - else lib.mkForce config.mods.hyprland.customConfig; - plugins = - [ - (lib.mkIf config.mods.hyprland.hyprspaceEnable inputs.Hyprspace.packages.${pkgs.system}.Hyprspace) - ] - ++ config.mods.hyprland.plugins; - }; - } - ); -} +{ + mkDashDefault, + config, + lib, + options, + pkgs, + inputs, + ... +}: let + browserName = + if (builtins.isString config.mods.homePackages.browser) + then config.mods.homePackages.browser + else if config.mods.homePackages.browser ? meta && config.mods.homePackages.browser.meta ? mainProgram + then config.mods.homePackages.browser.meta.mainProgram + else config.mods.homePackages.browser.pname; +in { + options.mods.hyprland = { + enable = lib.mkOption { + default = true; + example = false; + type = lib.types.bool; + description = '' + Enable Hyprland + ''; + }; + monitor = lib.mkOption { + default = [ + # main monitor + "${config.conf.defaultMonitor},${config.conf.defaultMonitorMode},0x0,${config.conf.defaultMonitorScale}" + # all others + ]; + example = ["DP-1,3440x1440@180,2560x0,1,vrr,0"]; + type = with lib.types; listOf str; + description = '' + The monitor configuration for hyprland. + ''; + }; + workspace = lib.mkOption { + default = []; + example = ["2,monitor:DP-1, default:true"]; + type = with lib.types; listOf str; + description = '' + The workspace configuration for hyprland. + ''; + }; + noAtomic = lib.mkOption { + default = false; + example = true; + type = lib.types.bool; + description = '' + Use tearing + ''; + }; + extraAutostart = lib.mkOption { + default = []; + example = ["your application"]; + type = lib.types.listOf lib.types.str; + description = '' + Extra exec_once. + ''; + }; + useDefaultConfig = lib.mkOption { + default = true; + example = false; + type = lib.types.bool; + description = '' + Use preconfigured Hyprland config. + ''; + }; + customConfig = lib.mkOption { + default = {}; + example = {}; + type = with lib.types; attrsOf anything; + description = '' + Custom Hyprland configuration. + Will be merged with default configuration if enabled. + ''; + }; + plugins = lib.mkOption { + default = []; + example = []; + type = with lib.types; listOf package; + description = '' + Plugins to be added to Hyprland. + ''; + }; + pluginConfig = lib.mkOption { + default = {}; + example = {}; + type = with lib.types; attrsOf anything; + description = '' + Plugin configuration to be added to Hyprland. + ''; + }; + hyprspaceEnable = lib.mkOption { + default = false; + type = lib.types.bool; + example = true; + description = '' + Enables Hyprspace plugin for hyprland. + Please note, plugins tend to break VERY often. + ''; + }; + }; + + config = lib.mkIf config.mods.hyprland.enable ( + lib.optionalAttrs (options ? wayland.windowManager.hyprland) { + # install Hyprland related packages + home.packages = with pkgs; [ + xorg.xprop + grim + slurp + satty + xdg-desktop-portal-gtk + # xdg-desktop-portal-hyprland + copyq + wl-clipboard + hyprcursor + hyprpicker + ]; + + wayland.windowManager.hyprland = { + enable = true; + settings = + if config.mods.hyprland.useDefaultConfig + then + lib.mkMerge + [ + { + "$mod" = "SUPER"; + + bindm = [ + "$mod, mouse:272, movewindow" + "$mod, mouse:273, resizeactive" + ]; + + bind = [ + # screenshots + ''$mod SUPER,S,exec,grim -g "$(slurp)" - | wl-copy'' + ''$mod SUPERSHIFT,S,exec,grim -g "$(slurp)" - | satty -f -'' + ''$mod SUPERSHIFTALT,S,exec,grim -c -g "2560,0 3440x1440" - | wl-copy'' + + # regular programs + "$mod SUPER,F,exec,${browserName}" + (lib.mkIf ( + browserName == "firefox" || browserName == "zen" + ) "$mod SUPERSHIFT,F,exec,${browserName} -p special") + "$mod SUPER,T,exec,kitty -1" + "$mod SUPER,E,exec,nautilus -w" + "$mod SUPER,N,exec,neovide" + (lib.mkIf (config.mods.hyprland.anyrun.enable) "$mod SUPER,R,exec,anyrun") + (lib.mkIf (config.mods.oxi.oxirun.enable) "$mod SUPER,R,exec,oxirun") + (lib.mkIf (config.mods.oxi.oxidash.enable) "$mod SUPER,M,exec,oxidash") + (lib.mkIf (config.mods.oxi.oxicalc.enable) "$mod SUPER,G,exec,oxicalc") + (lib.mkIf (config.mods.oxi.oxishut.enable) "$mod SUPER,D,exec,oxishut") + (lib.mkIf (config.mods.oxi.oxipaste.enable) "$mod SUPER,A,exec,oxipaste-iced") + (lib.mkIf (config.mods.oxi.hyprdock.enable) "$mod SUPERSHIFT,P,exec,hyprdock --gui") + "$mod SUPERSHIFT,L,exec, playerctl -a pause & hyprlock & systemctl suspend" + "$mod SUPERSHIFT,K,exec, playerctl -a pause & hyprlock & systemctl hibernate" + + # media keys + (lib.mkIf config.mods.scripts.audioControl ",XF86AudioMute,exec, audioControl mute") + (lib.mkIf config.mods.scripts.audioControl ",XF86AudioLowerVolume,exec, audioControl sink -5%") + (lib.mkIf config.mods.scripts.audioControl ",XF86AudioRaiseVolume,exec, audioControl sink +5%") + ",XF86AudioPlay,exec, playerctl play-pause" + ",XF86AudioNext,exec, playerctl next" + ",XF86AudioPrev,exec, playerctl previous" + (lib.mkIf config.mods.scripts.changeBrightness ",XF86MonBrightnessDown,exec, changeBrightness brightness 10%-") + (lib.mkIf config.mods.scripts.changeBrightness ",XF86MonBrightnessUp,exec, changeBrightness brightness +10%") + + # hyprland keybinds + # misc + "$mod SUPER,V,togglefloating," + "$mod SUPER,B,fullscreen," + "$mod SUPER,C,togglesplit" + "$mod SUPER,Q,killactive," + "$mod SUPERSHIFTALT,M,exit," + "$mod SUPERSHIFT,W,togglespecialworkspace" + + # move + "$mod SUPER,left,movewindow,l" + "$mod SUPER,right,movewindow,r" + "$mod SUPER,up,movewindow,u" + "$mod SUPER,down,movewindow,d" + + # workspaces + "$mod SUPER,1,workspace,1" + "$mod SUPER,2,workspace,2" + "$mod SUPER,3,workspace,3" + "$mod SUPER,4,workspace,4" + "$mod SUPER,5,workspace,5" + "$mod SUPER,6,workspace,6" + "$mod SUPER,7,workspace,7" + "$mod SUPER,8,workspace,8" + "$mod SUPER,9,workspace,9" + "$mod SUPER,0,workspace,10" + + # move to workspace + "$mod SUPERSHIFT,1,movetoworkspace,1" + "$mod SUPERSHIFT,2,movetoworkspace,2" + "$mod SUPERSHIFT,3,movetoworkspace,3" + "$mod SUPERSHIFT,4,movetoworkspace,4" + "$mod SUPERSHIFT,5,movetoworkspace,5" + "$mod SUPERSHIFT,6,movetoworkspace,6" + "$mod SUPERSHIFT,7,movetoworkspace,7" + "$mod SUPERSHIFT,8,movetoworkspace,8" + "$mod SUPERSHIFT,9,movetoworkspace,9" + "$mod SUPERSHIFT,0,movetoworkspace,10" + + # move to workspace silent + "$mod SUPERSHIFTALT,1,movetoworkspacesilent,1" + "$mod SUPERSHIFTALT,2,movetoworkspacesilent,2" + "$mod SUPERSHIFTALT,3,movetoworkspacesilent,3" + "$mod SUPERSHIFTALT,4,movetoworkspacesilent,4" + "$mod SUPERSHIFTALT,5,movetoworkspacesilent,5" + "$mod SUPERSHIFTALT,6,movetoworkspacesilent,6" + "$mod SUPERSHIFTALT,7,movetoworkspacesilent,7" + "$mod SUPERSHIFTALT,8,movetoworkspacesilent,8" + "$mod SUPERSHIFTALT,9,movetoworkspacesilent,9" + "$mod SUPERSHIFTALT,0,movetoworkspacesilent,10" + + # preselection + "$mod SUPERALT,j,layoutmsg,preselect l" + "$mod SUPERALT,k,layoutmsg,preselect d" + "$mod SUPERALT,l,layoutmsg,preselect u" + "$mod SUPERALT,semicolon,layoutmsg,preselect r" + "$mod SUPERALT,h,layoutmsg,preselect n" + ]; + + binde = [ + # hyprland keybinds + # focus + "$mod SUPER,J,movefocus,l" + "$mod SUPER,semicolon,movefocus,r" + "$mod SUPER,L,movefocus,u" + "$mod SUPER,K,movefocus,d" + + # resize + "$mod SUPER,U,resizeactive,-20 0" + "$mod SUPER,P,resizeactive,20 0" + "$mod SUPER,O,resizeactive,0 -20" + "$mod SUPER,I,resizeactive,0 20" + ]; + + general = { + gaps_out = "3,5,5,5"; + border_size = 3; + "col.active_border" = lib.mkOverride 51 "0xFFFF0000 0xFF00FF00 0xFF0000FF 45deg"; + # "col.inactive_border" = "0x66333333"; + allow_tearing = lib.mkIf config.mods.hyprland.noAtomic true; + }; + + decoration = { + rounding = 4; + }; + + animations = { + bezier = "penguin,0.05,0.9,0.1,1.0"; + animation = [ + "windowsMove,1,4,default" + "windows,1,7,default,popin 70%" + "windowsOut,1,7,default,popin 70%" + "border,1,10,default" + "fade,1,7,default" + "workspaces,1,6,default" + "layers,1,3,default,popin" + ]; + }; + + dwindle = { + preserve_split = true; + pseudotile = 0; + permanent_direction_override = false; + }; + + input = { + kb_layout = "${config.mods.xkb.layout}"; + kb_variant = "${config.mods.xkb.variant}"; + repeat_delay = 200; + force_no_accel = true; + touchpad = { + natural_scroll = true; + tap-to-click = true; + tap-and-drag = true; + }; + }; + + misc = { + animate_manual_resizes = 1; + enable_swallow = true; + disable_splash_rendering = true; + disable_hyprland_logo = true; + swallow_regex = "^(.*)(kitty)(.*)$"; + initial_workspace_tracking = 1; + # just doesn't work + enable_anr_dialog = false; + }; + + cursor = { + enable_hyprcursor = true; + no_hardware_cursors = mkDashDefault config.mods.gpu.nvidia.enable; + # done with nix, this would break the current setup otherwise + sync_gsettings_theme = false; + }; + + gestures = { + workspace_swipe = true; + }; + + monitor = config.mods.hyprland.monitor; + workspace = config.mods.hyprland.workspace; + + env = [ + "GTK_CSD,0" + ''TERM,"kitty /bin/fish"'' + "XDG_CURRENT_DESKTOP=Hyprland" + "XDG_SESSION_TYPE=wayland" + "XDG_SESSION_DESKTOP=Hyprland" + "HYPRCURSOR_THEME,${config.mods.stylix.cursor.name}" + "HYPRCURSOR_SIZE,${toString config.mods.stylix.cursor.size}" + "XCURSOR_THEME,${config.mods.stylix.cursor.name}" + "XCURSOR_SIZE,${toString config.mods.stylix.cursor.size}" + "QT_QPA_PLATFORM,wayland" + "QT_QPA_PLATFORMTHEME,qt5ct" + "QT_WAYLAND_FORCE_DPI,96" + "QT_AUTO_SCREEN_SCALE_FACTOR,0" + "QT_WAYLAND_DISABLE_WINDOWDECORATION,1" + "QT_SCALE_FACTOR,1" + ''EDITOR,"neovide --novsync --nofork"'' + (lib.mkIf config.mods.hyprland.noAtomic "WLR_DRM_NO_ATOMIC,1") + "GTK_USE_PORTAL, 1" + + (lib.mkIf config.mods.gpu.nvidia.enable "LIBVA_DRIVER_NAME,nvidia") + (lib.mkIf config.mods.gpu.nvidia.enable "XDG_SESSION_TYPE,wayland") + (lib.mkIf config.mods.gpu.nvidia.enable "GBM_BACKEND,nvidia-drm") + (lib.mkIf config.mods.gpu.nvidia.enable "__GLX_VENDOR_LIBRARY_NAME,nvidia") + ]; + + layerrule = [ + # layer rules + # mainly to disable animations within slurp and grim + "noanim, selection" + ]; + + windowrule = [ + # window rules + "float,class:^(.*)(OxiCalc)(.*)$" + "float,class:^(.*)(winecfg.exe)(.*)$" + "float,class:^(.*)(copyq)(.*)$" + "center,class:^(.*)(swappy)(.*)$" + "float,title:^(.*)(reset)(.*)$" + "workspace 10 silent,class:^(.*)(steam)(.*)$" + "workspace 9 silent,class:^(.*)(dota)(.*)$" + "workspace 9 silent,class:^(.*)(battlebits)(.*)$" + "workspace 9 silent,class:^(.*)(aoe)(.*)$" + "suppressevent fullscreen maximize,class:^(.*)(neovide)(.*)$" + "immediate,class:^(.*)(Pal)$" + "immediate,class:^(.*)(dota2)$" + "immediate,class:^(.*)(needforspeedheat.exe)$" + ]; + + exec-once = + [ + # environment + "systemctl --user import-environment" + "dbus-update-activation-environment --systemd --all" + "hyprctl setcursor Bibata-Modern-Classic 24" + + # other programs + "hyprpaper" + "ironbar" + "${browserName}" + "oxipaste_daemon" + "oxinoti" + ] + ++ config.mods.hyprland.extraAutostart; + + plugin = + lib.mkMerge + [ + { + hyprspace = lib.mkIf config.mods.hyprland.hyprspaceEnable { + bind = [ + "SUPER, W, overview:toggle, toggle" + ]; + }; + } + config.mods.hyprland.pluginConfig + ]; + } + config.mods.hyprland.customConfig + ] + else lib.mkForce config.mods.hyprland.customConfig; + plugins = + [ + (lib.mkIf config.mods.hyprland.hyprspaceEnable inputs.Hyprspace.packages.${pkgs.system}.Hyprspace) + ] + ++ config.mods.hyprland.plugins; + }; + } + ); +} From 62ce845f7102552094ed6a9e90f3556334f3076b Mon Sep 17 00:00:00 2001 From: DashieTM Date: Sat, 10 May 2025 13:52:33 +0200 Subject: [PATCH 037/118] Nextcloud: remove default username --- modules/programs/nextcloud.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/programs/nextcloud.nix b/modules/programs/nextcloud.nix index 16b2d29..31216ee 100644 --- a/modules/programs/nextcloud.nix +++ b/modules/programs/nextcloud.nix @@ -8,13 +8,13 @@ description = "Enable nextcloud"; }; username = lib.mkOption { - default = "DashieTM"; + default = ""; example = "globi"; type = lib.types.str; description = "Your username"; }; url = lib.mkOption { - default = "cloud.dashie.org"; + default = ""; example = "cloud.globi.org"; type = lib.types.str; description = "Your url"; From 4e7aa1e0f004bfcf72937588d1069b54e08a7375 Mon Sep 17 00:00:00 2001 From: DashieTM Date: Sat, 10 May 2025 13:57:09 +0200 Subject: [PATCH 038/118] conf: default username to DashNix --- modules/conf.nix | 398 +++++++++++++++++++++++------------------------ 1 file changed, 199 insertions(+), 199 deletions(-) diff --git a/modules/conf.nix b/modules/conf.nix index d7a8dc2..93ec67e 100644 --- a/modules/conf.nix +++ b/modules/conf.nix @@ -1,199 +1,199 @@ -{ - lib, - config, - options, - ... -}: { - options.conf = { - system = lib.mkOption { - default = "x86_64-linux"; - # no fisherprice unix support - type = with lib.types; (enum [ - "x86_64-linux" - "aarch64-linux" - "aarch64-linux-android" - ]); - example = "aarch64-linux"; - description = '' - System architecture. - ''; - }; - - systemLocalTime = lib.mkOption { - default = false; - example = true; - description = '' - System time for dualbooting - ''; - }; - - wsl = lib.mkOption { - default = false; - example = true; - description = '' - Runs Nix in wsl - ''; - }; - - secureBoot = lib.mkOption { - default = false; - example = true; - description = '' - enables secure boot. - Note: Secure boot is NOT reproducible - Here are the necessary steps: - + create your keys with sbctl -> sudo sbctl create-keys - + build with systemd once -> set this to false and build once - + build with secureBoot true - + verify that your keys are signed (note, only systemd and your generations should now be signed): sudo sbtcl verify - + enroll your keys (microsoft is necessary for windows dualboot support, leave it there): sudo sbctl enroll-keys --microsoft - + reboot with secureboot enabled - Note: Some motherboards have vendor specific keys for secure boot, this may not necessarily work with our self signed keys - You likely have to disable these vendor specific keys (example HP: sure boot) - ''; - }; - - useSystemdBootloader = lib.mkOption { - default = true; - example = false; - description = '' - use systemd bootloader. - ''; - }; - - cpu = lib.mkOption { - # TODO: how to enable arm? - default = "amd"; - type = with lib.types; (enum [ - "amd" - "intel" - ]); - example = "intel"; - description = '' - cpu microcode. - ''; - }; - - additionalBootKernalParams = lib.mkOption { - default = [ - "video=${config.conf.defaultMonitor}:${config.conf.defaultMonitorMode}" - ]; - example = []; - type = with lib.types; listOf str; - description = '' - additional kernelParams passed to bootloader - ''; - }; - - defaultMonitor = lib.mkOption { - default = ""; - example = "eDP-1"; - type = lib.types.str; - description = '' - main monitor - ''; - }; - - defaultMonitorMode = lib.mkOption { - default = ""; - example = "3440x1440@180"; - type = lib.types.str; - description = '' - main monitor mode: width x height @ refreshrate - ''; - }; - - defaultMonitorScale = lib.mkOption { - default = "1"; - example = "1.5"; - type = lib.types.str; - description = '' - main monitor scaling - ''; - }; - - bootParams = lib.mkOption { - default = []; - example = ["resume=something"]; - type = with lib.types; listOf str; - description = '' - Boot params - ''; - }; - - kernelOverride = lib.mkOption { - default = null; - type = with lib.types; nullOr package; - description = '' - kernel to be used - Has no examples as doc complains... - #example = pkgs.linuxPackages_xanmod_latest; - ''; - }; - - username = lib.mkOption { - default = "dashie"; - example = "pingpang"; - type = lib.types.str; - description = '' - The username. - ''; - }; - - timezone = lib.mkOption { - default = "Europe/Zurich"; - example = "Europe/Berlin"; - type = lib.types.str; - description = '' - The timezone. - ''; - }; - - locale = lib.mkOption { - default = "en_US.UTF-8"; - example = "de_DE.UTF-8"; - type = lib.types.str; - description = '' - The locale. - ''; - }; - - nixosConfigPath = lib.mkOption { - default = "/home/${config.conf.username}/gits/nixos/."; - example = "yourpath/."; - type = lib.types.str; - description = '' - The path for your build command, you can then simply type rebuild to switch to a new configuration. - ''; - }; - - systemStateVersion = lib.mkOption { - example = "24.11"; - default = "23.05"; - type = lib.types.str; - description = '' - System state version - ''; - }; - homeStateVersion = lib.mkOption { - default = "24.11"; - example = "23.05"; - type = lib.types.str; - description = '' - Home state version - ''; - }; - }; - - config = - (lib.optionalAttrs (options ? system.stateVersion) { - boot = { - kernelPackages = lib.mkIf (config.conf.kernelOverride != null) config.conf.kernel; - kernelParams = config.conf.additionalBootKernalParams; - }; - system.stateVersion = config.conf.systemStateVersion; - }) - // (lib.optionalAttrs (options ? home.stateVersion) { - home.stateVersion = config.conf.homeStateVersion; - }); -} +{ + lib, + config, + options, + ... +}: { + options.conf = { + system = lib.mkOption { + default = "x86_64-linux"; + # no fisherprice unix support + type = with lib.types; (enum [ + "x86_64-linux" + "aarch64-linux" + "aarch64-linux-android" + ]); + example = "aarch64-linux"; + description = '' + System architecture. + ''; + }; + + systemLocalTime = lib.mkOption { + default = false; + example = true; + description = '' + System time for dualbooting + ''; + }; + + wsl = lib.mkOption { + default = false; + example = true; + description = '' + Runs Nix in wsl + ''; + }; + + secureBoot = lib.mkOption { + default = false; + example = true; + description = '' + enables secure boot. + Note: Secure boot is NOT reproducible + Here are the necessary steps: + + create your keys with sbctl -> sudo sbctl create-keys + + build with systemd once -> set this to false and build once + + build with secureBoot true + + verify that your keys are signed (note, only systemd and your generations should now be signed): sudo sbtcl verify + + enroll your keys (microsoft is necessary for windows dualboot support, leave it there): sudo sbctl enroll-keys --microsoft + + reboot with secureboot enabled + Note: Some motherboards have vendor specific keys for secure boot, this may not necessarily work with our self signed keys + You likely have to disable these vendor specific keys (example HP: sure boot) + ''; + }; + + useSystemdBootloader = lib.mkOption { + default = true; + example = false; + description = '' + use systemd bootloader. + ''; + }; + + cpu = lib.mkOption { + # TODO: how to enable arm? + default = "amd"; + type = with lib.types; (enum [ + "amd" + "intel" + ]); + example = "intel"; + description = '' + cpu microcode. + ''; + }; + + additionalBootKernalParams = lib.mkOption { + default = [ + "video=${config.conf.defaultMonitor}:${config.conf.defaultMonitorMode}" + ]; + example = []; + type = with lib.types; listOf str; + description = '' + additional kernelParams passed to bootloader + ''; + }; + + defaultMonitor = lib.mkOption { + default = ""; + example = "eDP-1"; + type = lib.types.str; + description = '' + main monitor + ''; + }; + + defaultMonitorMode = lib.mkOption { + default = ""; + example = "3440x1440@180"; + type = lib.types.str; + description = '' + main monitor mode: width x height @ refreshrate + ''; + }; + + defaultMonitorScale = lib.mkOption { + default = "1"; + example = "1.5"; + type = lib.types.str; + description = '' + main monitor scaling + ''; + }; + + bootParams = lib.mkOption { + default = []; + example = ["resume=something"]; + type = with lib.types; listOf str; + description = '' + Boot params + ''; + }; + + kernelOverride = lib.mkOption { + default = null; + type = with lib.types; nullOr package; + description = '' + kernel to be used + Has no examples as doc complains... + #example = pkgs.linuxPackages_xanmod_latest; + ''; + }; + + username = lib.mkOption { + default = "DashNix"; + example = "pingpang"; + type = lib.types.str; + description = '' + The username. + ''; + }; + + timezone = lib.mkOption { + default = "Europe/Zurich"; + example = "Europe/Berlin"; + type = lib.types.str; + description = '' + The timezone. + ''; + }; + + locale = lib.mkOption { + default = "en_US.UTF-8"; + example = "de_DE.UTF-8"; + type = lib.types.str; + description = '' + The locale. + ''; + }; + + nixosConfigPath = lib.mkOption { + default = "/home/${config.conf.username}/gits/nixos/."; + example = "yourpath/."; + type = lib.types.str; + description = '' + The path for your build command, you can then simply type rebuild to switch to a new configuration. + ''; + }; + + systemStateVersion = lib.mkOption { + example = "24.11"; + default = "23.05"; + type = lib.types.str; + description = '' + System state version + ''; + }; + homeStateVersion = lib.mkOption { + default = "24.11"; + example = "23.05"; + type = lib.types.str; + description = '' + Home state version + ''; + }; + }; + + config = + (lib.optionalAttrs (options ? system.stateVersion) { + boot = { + kernelPackages = lib.mkIf (config.conf.kernelOverride != null) config.conf.kernel; + kernelParams = config.conf.additionalBootKernalParams; + }; + system.stateVersion = config.conf.systemStateVersion; + }) + // (lib.optionalAttrs (options ? home.stateVersion) { + home.stateVersion = config.conf.homeStateVersion; + }); +} From 11a41563c879caf8f43e4773ef9bdf2ed263b3c2 Mon Sep 17 00:00:00 2001 From: DashieTM Date: Sat, 10 May 2025 13:59:37 +0200 Subject: [PATCH 039/118] general: Remove all default dashie references --- base/xkb_layout.nix | 46 ++++++++++++++++++++-------------------- modules/programs/git.nix | 16 ++------------ modules/programs/xkb.nix | 2 +- 3 files changed, 26 insertions(+), 38 deletions(-) diff --git a/base/xkb_layout.nix b/base/xkb_layout.nix index db4fa60..ce87b6e 100644 --- a/base/xkb_layout.nix +++ b/base/xkb_layout.nix @@ -1,23 +1,23 @@ -{ - mkDashDefault, - pkgs, - ... -}: let - layout = pkgs.writeText "dashie" '' - xkb_symbols "dashie" - { - include "us(basic)" - include "level3(ralt_switch)" - key { [ a, A, adiaeresis, Adiaeresis ] }; - key { [ o, O, odiaeresis, Odiaeresis ] }; - key { [ u, U, udiaeresis, Udiaeresis ] }; - }; - ''; -in { - environment.systemPackages = mkDashDefault [pkgs.xorg.xkbcomp]; - services.xserver.xkb.extraLayouts.dashie = { - description = "US layout with 'umlaut'"; - languages = ["eng"]; - symbolsFile = "${layout}"; - }; -} +{ + mkDashDefault, + pkgs, + ... +}: let + layout = pkgs.writeText "enIntUmlaut" '' + xkb_symbols "enIntUmlaut" + { + include "us(basic)" + include "level3(ralt_switch)" + key { [ a, A, adiaeresis, Adiaeresis ] }; + key { [ o, O, odiaeresis, Odiaeresis ] }; + key { [ u, U, udiaeresis, Udiaeresis ] }; + }; + ''; +in { + environment.systemPackages = mkDashDefault [pkgs.xorg.xkbcomp]; + services.xserver.xkb.extraLayouts.enIntUmlaut = { + description = "US layout with 'umlaut'"; + languages = ["eng"]; + symbolsFile = "${layout}"; + }; +} diff --git a/modules/programs/git.nix b/modules/programs/git.nix index 9189329..ed2719e 100644 --- a/modules/programs/git.nix +++ b/modules/programs/git.nix @@ -34,27 +34,15 @@ description = "Additional git config"; }; sshConfig = lib.mkOption { - default = '' + default = ""; + example = '' Host github.com ${ if (config ? sops.secrets && config.sops.secrets ? hub.path) then "IdentityFile ${config.sops.secrets.hub.path}" else "" } - Host gitlab.com - ${ - if (config ? sops.secrets && config.sops.secrets ? lab.path) - then "IdentityFile ${config.sops.secrets.lab.path}" - else "" - } - Host dashie.org - ${ - if (config ? sops.secrets && config.sops.secrets ? dashie.path) - then "IdentityFile ${config.sops.secrets.dashie.path}" - else "" - } ''; - example = ""; type = lib.types.lines; description = "ssh configuration (keys for git)"; }; diff --git a/modules/programs/xkb.nix b/modules/programs/xkb.nix index 7ae8414..f78e5e2 100644 --- a/modules/programs/xkb.nix +++ b/modules/programs/xkb.nix @@ -6,7 +6,7 @@ }: { options.mods.xkb = { layout = lib.mkOption { - default = "dashie"; + default = "enIntUmlaut"; example = "us"; type = lib.types.str; description = "Your layout"; From 7b3ad8a182242ecf4333deafcadd42a0616a9cb3 Mon Sep 17 00:00:00 2001 From: DashieTM Date: Sat, 10 May 2025 14:02:24 +0200 Subject: [PATCH 040/118] onedrive: init --- modules/programs/default.nix | 1 + modules/programs/onedrive.nix | 24 ++++++++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 modules/programs/onedrive.nix diff --git a/modules/programs/default.nix b/modules/programs/default.nix index b1d5103..fdfb163 100644 --- a/modules/programs/default.nix +++ b/modules/programs/default.nix @@ -28,6 +28,7 @@ ./mime.nix ./ncspot.nix ./nextcloud.nix + ./onedrive.nix ./oxi ./piper.nix ./plymouth.nix diff --git a/modules/programs/onedrive.nix b/modules/programs/onedrive.nix new file mode 100644 index 0000000..56bd79d --- /dev/null +++ b/modules/programs/onedrive.nix @@ -0,0 +1,24 @@ +{ + config, + lib, + options, + pkgs, + ... +}: { + options.mods = { + onedrive = { + enable = lib.mkOption { + default = false; + example = true; + type = lib.types.bool; + description = "Enable onedrive program and service"; + }; + }; + }; + config = lib.mkIf config.mods.onedrive.enable ( + lib.optionalAttrs (options ? environment) { + services.onedrive.enable = true; + environment.systemPackages = [pkgs.onedrive]; + } + ); +} From 79a66b1f848029931428e86c979cd0913545d7b3 Mon Sep 17 00:00:00 2001 From: DashieTM Date: Sat, 10 May 2025 22:09:54 +0200 Subject: [PATCH 041/118] cache: adjust to trusted --- base/common_hardware.nix | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/base/common_hardware.nix b/base/common_hardware.nix index 45b7779..5f019da 100644 --- a/base/common_hardware.nix +++ b/base/common_hardware.nix @@ -102,9 +102,12 @@ in { builders-use-substitutes = mkDashDefault true; substituters = [ + "https://chaotic-nyx.cachix.org/" + ]; + + trusted-substituters = [ "https://hyprland.cachix.org" "https://anyrun.cachix.org" - "https://cache.garnix.io" "https://oxipaste.cachix.org" "https://oxinoti.cachix.org" "https://oxishut.cachix.org" @@ -112,13 +115,11 @@ in { "https://oxicalc.cachix.org" "https://hyprdock.cachix.org" "https://reset.cachix.org" - "https://chaotic-nyx.cachix.org/" ]; trusted-public-keys = [ "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=" "anyrun.cachix.org-1:pqBobmOjI7nKlsUMV25u9QHa9btJK65/C8vnO3p346s=" - "cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g=" "oxipaste.cachix.org-1:n/oA3N3Z+LJP7eIWOwuoLd9QnPyZXqFjLgkahjsdDGc=" "oxinoti.cachix.org-1:dvSoJl2Pjo5HMaNngdBbSaixK9BSf2N8gzjP2MdGvfc=" "oxishut.cachix.org-1:axyAGF3XMh1IyMAW4UMbQCdMNovDH0KH6hqLLRJH8jU=" From ea385722b05570fc7ce4c791275276b1739f1bc9 Mon Sep 17 00:00:00 2001 From: DashieTM Date: Sun, 11 May 2025 11:33:20 +0200 Subject: [PATCH 042/118] Gaming: direct_scanout in Hyprland --- modules/programs/hyprland/hyprland.nix | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/modules/programs/hyprland/hyprland.nix b/modules/programs/hyprland/hyprland.nix index 049041d..5c1fe9a 100644 --- a/modules/programs/hyprland/hyprland.nix +++ b/modules/programs/hyprland/hyprland.nix @@ -254,6 +254,10 @@ in { rounding = 4; }; + render = { + direct_scanout = mkDashDefault config.mods.gaming.enable; + }; + animations = { bezier = "penguin,0.05,0.9,0.1,1.0"; animation = [ @@ -298,7 +302,11 @@ in { cursor = { enable_hyprcursor = true; - no_hardware_cursors = mkDashDefault config.mods.gpu.nvidia.enable; + no_hardware_cursors = mkDashDefault ( + if config.mods.gpu.nvidia.enable + then 2 + else 0 + ); # done with nix, this would break the current setup otherwise sync_gsettings_theme = false; }; From 2b704cc5e7e9f8e9ecafca826b50925a7acb9024 Mon Sep 17 00:00:00 2001 From: DashieTM Date: Sun, 11 May 2025 12:53:38 +0200 Subject: [PATCH 043/118] browser: fixup firefox forks --- modules/programs/browser/ffextensions.nix | 46 ++++ modules/programs/browser/firefox.nix | 23 +- modules/programs/browser/librewolf.nix | 24 +- modules/programs/browser/zen.nix | 312 ++++++++++------------ 4 files changed, 226 insertions(+), 179 deletions(-) create mode 100644 modules/programs/browser/ffextensions.nix diff --git a/modules/programs/browser/ffextensions.nix b/modules/programs/browser/ffextensions.nix new file mode 100644 index 0000000..27b1598 --- /dev/null +++ b/modules/programs/browser/ffextensions.nix @@ -0,0 +1,46 @@ +{ + lib, + stable, + pkgs, + name, + ... +}: let + mkExtension = id: install_url: { + ${id} = { + inherit install_url; + installation_mode = "normal_installed"; + }; + }; +in { + options.mods.browser.${name}.extensions = lib.mkOption { + default = [ + (mkExtension "uBlock0@raymondhill.net" "https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi") + (mkExtension "{a6c4a591-f1b2-4f03-b3ff-767e5bedf4e7}" "https://addons.mozilla.org/firefox/downloads/latest/user-agent-string-switcher/latest.xpi") + (mkExtension "{d7742d87-e61d-4b78-b8a1-b469842139fa}" "https://addons.mozilla.org/firefox/downloads/latest/vimium-ff/latest.xpi") + (mkExtension "firefox@ghostery.com" "https://addons.mozilla.org/firefox/downloads/latest/ghostery/latest.xpi") + (mkExtension "CanvasBlocker@kkapsner.de" "https://addons.mozilla.org/firefox/downloads/latest/canvasblocker/latest.xpi") + (mkExtension "jid1-KKzOGWgsW3Ao4Q@jetpack" "https://addons.mozilla.org/firefox/downloads/latest/i-dont-care-about-cookies/latest.xpi") + (mkExtension "keepassxc-browser@keepassxc.org" "https://addons.mozilla.org/firefox/downloads/latest/keepassxc-browser/latest.xpi") + (mkExtension "@react-devtools" "https://addons.mozilla.org/firefox/downloads/latest/react-devtools/latest.xpi") + (mkExtension "extension@redux.devtools" "https://addons.mozilla.org/firefox/downloads/latest/reduxdevtools/latest.xpi") + (mkExtension "private-relay@firefox.com" "https://addons.mozilla.org/firefox/downloads/latest/private-relay/latest.xpi") + (mkExtension "addon@darkreader.org" "file://${pkgs.callPackage ../../../patches/darkreader.nix {inherit lib stable;}}/latest.xpi") + ]; + example = []; + type = with lib.types; listOf anything; + description = '' + List of extensions via attrsets: + ```nix + # id + # figure out the id via: + # nix run github:tupakkatapa/mozid -- 'https://addons.mozilla.org/en/firefox/addon/ublock-origin' + "uBlock0@raymondhill.net" = { + # install url + install_url = "https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi"; + # method https://mozilla.github.io/policy-templates/#extensionsettings + installation_mode = "force_installed"; + }; + ``` + ''; + }; +} diff --git a/modules/programs/browser/firefox.nix b/modules/programs/browser/firefox.nix index 4db465a..f48f098 100644 --- a/modules/programs/browser/firefox.nix +++ b/modules/programs/browser/firefox.nix @@ -3,9 +3,16 @@ config, options, pkgs, + stable, ... -}: { - options.mods.browser.firefox = { +}: let + name = "firefox"; +in { + imports = [ + (import ./ffextensions.nix + {inherit lib stable pkgs name;}) + ]; + options.mods.browser.${name} = { enable = lib.mkOption { default = false; example = true; @@ -88,7 +95,17 @@ config.mods.browser.firefox.profiles; programs.firefox = { enable = true; - policies = config.mods.browser.firefox.configuration; + package = + pkgs.wrapFirefox + pkgs.firefox-unwrapped + { + pname = "firefox"; + extraPolicies = + config.mods.browser.firefox.configuration + // { + ExtensionSettings = builtins.foldl' (acc: ext: acc // ext) {} config.mods.browser.firefox.extensions; + }; + }; profiles = builtins.listToAttrs config.mods.browser.firefox.profiles; }; } diff --git a/modules/programs/browser/librewolf.nix b/modules/programs/browser/librewolf.nix index 713423c..d0d77ac 100644 --- a/modules/programs/browser/librewolf.nix +++ b/modules/programs/browser/librewolf.nix @@ -3,9 +3,16 @@ config, options, pkgs, + stable, ... -}: { - options.mods.browser.librewolf = { +}: let + name = "librewolf"; +in { + imports = [ + (import ./ffextensions.nix + {inherit lib stable pkgs name;}) + ]; + options.mods.browser.${name} = { enable = lib.mkOption { default = false; example = true; @@ -82,8 +89,17 @@ lib.optionalAttrs (options ? home.packages) { programs.librewolf-dashnix = { enable = true; - package = pkgs.librewolf; - policies = config.mods.browser.librewolf.configuration; + package = + pkgs.wrapFirefox + pkgs.librewolf-unwrapped + { + pname = "librewolf"; + extraPolicies = + config.mods.browser.librewolf.configuration + // { + ExtensionSettings = builtins.foldl' (acc: ext: acc // ext) {} config.mods.browser.librewolf.extensions; + }; + }; profiles = builtins.listToAttrs config.mods.browser.librewolf.profiles; }; } diff --git a/modules/programs/browser/zen.nix b/modules/programs/browser/zen.nix index 29a61b5..080a3cc 100644 --- a/modules/programs/browser/zen.nix +++ b/modules/programs/browser/zen.nix @@ -1,172 +1,140 @@ -# credits to Voronind for darkreader config https://github.com/voronind-com/nix/blob/main/home/program/firefox/default.nix -{ - lib, - config, - options, - inputs, - stable, - system, - pkgs, - ... -}: let - # at time of using this here, stylix might not be evaluated yet - # hence ensure it is by using base16 mkSchemeAttrs - base16 = pkgs.callPackage inputs.base16.lib {}; - scheme = base16.mkSchemeAttrs config.stylix.base16Scheme; - mkExtension = id: install_url: { - ${id} = { - inherit install_url; - installation_mode = "normal_installed"; - }; - }; -in { - options.mods.browser.zen = { - enable = lib.mkOption { - default = false; - example = true; - type = lib.types.bool; - description = "Enables the zen browser"; - }; - extensions = lib.mkOption { - default = [ - (mkExtension "uBlock0@raymondhill.net" "https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi") - (mkExtension "{a6c4a591-f1b2-4f03-b3ff-767e5bedf4e7}" "https://addons.mozilla.org/firefox/downloads/latest/user-agent-string-switcher/latest.xpi") - (mkExtension "{d7742d87-e61d-4b78-b8a1-b469842139fa}" "https://addons.mozilla.org/firefox/downloads/latest/vimium-ff/latest.xpi") - (mkExtension "firefox@ghostery.com" "https://addons.mozilla.org/firefox/downloads/latest/ghostery/latest.xpi") - (mkExtension "CanvasBlocker@kkapsner.de" "https://addons.mozilla.org/firefox/downloads/latest/canvasblocker/latest.xpi") - (mkExtension "jid1-KKzOGWgsW3Ao4Q@jetpack" "https://addons.mozilla.org/firefox/downloads/latest/i-dont-care-about-cookies/latest.xpi") - (mkExtension "keepassxc-browser@keepassxc.org" "https://addons.mozilla.org/firefox/downloads/latest/keepassxc-browser/latest.xpi") - (mkExtension "@react-devtools" "https://addons.mozilla.org/firefox/downloads/latest/react-devtools/latest.xpi") - (mkExtension "extension@redux.devtools" "https://addons.mozilla.org/firefox/downloads/latest/reduxdevtools/latest.xpi") - (mkExtension "private-relay@firefox.com" "https://addons.mozilla.org/firefox/downloads/latest/private-relay/latest.xpi") - (mkExtension "addon@darkreader.org" "file://${pkgs.callPackage ../../../patches/darkreader.nix {inherit lib stable;}}/latest.xpi") - ]; - example = []; - type = with lib.types; listOf anything; - description = '' - List of extensions via attrsets: - ```nix - # id - # figure out the id via: - # nix run github:tupakkatapa/mozid -- 'https://addons.mozilla.org/en/firefox/addon/ublock-origin' - "uBlock0@raymondhill.net" = { - # install url - install_url = "https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi"; - # method https://mozilla.github.io/policy-templates/#extensionsettings - installation_mode = "force_installed"; - }; - ``` - ''; - }; - configuration = lib.mkOption { - default = { - EnableTrackingProtection = { - Value = true; - Locked = true; - Cryptomining = true; - Fingerprinting = true; - }; - DisablePocket = true; - CaptivePortal = false; - DisableFirefoxStudies = true; - DisableTelemetry = true; - NoDefaultBookmarks = true; - PasswordManagerEnabled = false; - FirefoxHome = { - Search = true; - Pocket = false; - Snippets = false; - TopSites = true; - Highlights = false; - }; - UserMessaging = { - ExtensionRecommendations = false; - SkipOnboarding = true; - }; - "3rdparty".Extensions = { - "addon@darkreader.org" = { - theme = { - darkSchemeBackgroundColor = "#${scheme.base00}"; - darkSchemeTextColor = "#${scheme.base05}"; - }; - previewNewDesign = true; - }; - }; - }; - example = {}; - type = with lib.types; attrsOf anything; - description = "Zen policy configuration. See https://mozilla.github.io/policy-templates for more information."; - }; - profiles = lib.mkOption { - default = [ - { - name = "${config.conf.username}"; - value = { - settings = { - "zen.view.compact.hide-tabbar" = false; - "zen.view.compact.hide-toolbar" = true; - "zen.view.sidebar-expanded" = false; - "zen.view.use-single-toolbar" = false; - "zen.view.welcome-screen.seen" = true; - "zen.theme.accent-color" = "#b4bbff"; - "extensions.autoDisableScopes" = 0; - "cookiebanners.service.mode" = 2; - }; - isDefault = true; - id = 0; - }; - } - { - name = "special"; - value = { - settings = { - "zen.view.compact.hide-tabbar" = false; - "zen.view.compact.hide-toolbar" = true; - "zen.view.sidebar-expanded" = false; - "zen.view.use-single-toolbar" = false; - "zen.view.welcome-screen.seen" = true; - "zen.theme.accent-color" = "#b4bbff"; - "extensions.autoDisableScopes" = 0; - }; - isDefault = false; - id = 1; - }; - } - ]; - example = [ - { - name = "custom"; - value = { - settings = { - extensions.autoDisableScopes = 0; - }; - extensions.packages = [pkgs.nur.repos.rycee.firefox-addons.darkreader]; - isDefault = true; - id = 0; - }; - } - ]; - type = with lib.types; listOf (attrsOf anything); - description = "Zen profiles"; - }; - }; - config = lib.mkIf (config.mods.browser.zen.enable || config.mods.homePackages.browser == "zen") ( - lib.optionalAttrs (options ? home.packages) { - programs.zen-browser = { - enable = true; - package = - pkgs.wrapFirefox - inputs.zen-browser.packages.${system}.zen-browser-unwrapped - { - pname = "zen-browser"; - extraPolicies = - config.mods.browser.zen.configuration - // { - ExtensionSettings = builtins.foldl' (acc: ext: acc // ext) {} config.mods.browser.zen.extensions; - }; - }; - profiles = builtins.listToAttrs config.mods.browser.zen.profiles; - }; - } - ); -} +# credits to Voronind for darkreader config https://github.com/voronind-com/nix/blob/main/home/program/firefox/default.nix +{ + lib, + config, + options, + inputs, + stable, + system, + pkgs, + ... +}: let + # at time of using this here, stylix might not be evaluated yet + # hence ensure it is by using base16 mkSchemeAttrs + base16 = pkgs.callPackage inputs.base16.lib {}; + scheme = base16.mkSchemeAttrs config.stylix.base16Scheme; + name = "zen"; +in { + imports = [ + (import ./ffextensions.nix + {inherit lib stable pkgs name;}) + ]; + options.mods.browser.${name} = { + enable = lib.mkOption { + default = false; + example = true; + type = lib.types.bool; + description = "Enables the zen browser"; + }; + configuration = lib.mkOption { + default = { + EnableTrackingProtection = { + Value = true; + Locked = true; + Cryptomining = true; + Fingerprinting = true; + }; + DisablePocket = true; + CaptivePortal = false; + DisableFirefoxStudies = true; + DisableTelemetry = true; + NoDefaultBookmarks = true; + PasswordManagerEnabled = false; + FirefoxHome = { + Search = true; + Pocket = false; + Snippets = false; + TopSites = true; + Highlights = false; + }; + UserMessaging = { + ExtensionRecommendations = false; + SkipOnboarding = true; + }; + "3rdparty".Extensions = { + "addon@darkreader.org" = { + theme = { + darkSchemeBackgroundColor = "#${scheme.base00}"; + darkSchemeTextColor = "#${scheme.base05}"; + }; + previewNewDesign = true; + }; + }; + }; + example = {}; + type = with lib.types; attrsOf anything; + description = "Zen policy configuration. See https://mozilla.github.io/policy-templates for more information."; + }; + profiles = lib.mkOption { + default = [ + { + name = "${config.conf.username}"; + value = { + settings = { + "zen.view.compact.hide-tabbar" = false; + "zen.view.compact.hide-toolbar" = true; + "zen.view.sidebar-expanded" = false; + "zen.view.use-single-toolbar" = false; + "zen.view.welcome-screen.seen" = true; + "zen.theme.accent-color" = "#b4bbff"; + "extensions.autoDisableScopes" = 0; + "cookiebanners.service.mode" = 2; + }; + isDefault = true; + id = 0; + }; + } + { + name = "special"; + value = { + settings = { + "zen.view.compact.hide-tabbar" = false; + "zen.view.compact.hide-toolbar" = true; + "zen.view.sidebar-expanded" = false; + "zen.view.use-single-toolbar" = false; + "zen.view.welcome-screen.seen" = true; + "zen.theme.accent-color" = "#b4bbff"; + "extensions.autoDisableScopes" = 0; + }; + isDefault = false; + id = 1; + }; + } + ]; + example = [ + { + name = "custom"; + value = { + settings = { + extensions.autoDisableScopes = 0; + }; + extensions.packages = [pkgs.nur.repos.rycee.firefox-addons.darkreader]; + isDefault = true; + id = 0; + }; + } + ]; + type = with lib.types; listOf (attrsOf anything); + description = "Zen profiles"; + }; + }; + config = lib.mkIf (config.mods.browser.zen.enable || config.mods.homePackages.browser == "zen") ( + lib.optionalAttrs (options ? home.packages) { + programs.zen-browser = { + enable = true; + package = + pkgs.wrapFirefox + inputs.zen-browser.packages.${system}.zen-browser-unwrapped + { + pname = "zen-browser"; + extraPolicies = + config.mods.browser.zen.configuration + // { + ExtensionSettings = builtins.foldl' (acc: ext: acc // ext) {} config.mods.browser.zen.extensions; + }; + }; + profiles = builtins.listToAttrs config.mods.browser.zen.profiles; + }; + } + ); +} From f4e47cbf97f5fbb8d0955d67a065e21d256091f3 Mon Sep 17 00:00:00 2001 From: DashieTM Date: Sun, 11 May 2025 13:13:10 +0200 Subject: [PATCH 044/118] chore: snake_case to camelCase --- docs/default.nix | 6 +++--- docs/src/README.md | 12 ++++++------ example/flake.nix | 2 +- flake.nix | 2 +- lib/default.nix | 6 +++--- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/docs/default.nix b/docs/default.nix index 65a0659..8b3c289 100644 --- a/docs/default.nix +++ b/docs/default.nix @@ -1,7 +1,7 @@ # with friendly help by stylix: https://github.com/danth/stylix/blob/master/docs/default.nix { pkgs, - build_systems, + buildSystems, lib, ... }: let @@ -13,7 +13,7 @@ summaryAppend = name: '' echo "- [${name}](${name}.md)" >> src/SUMMARY.md ''; - system = (build_systems {root = ../example/.;})."example".options; + system = (buildSystems {root = ../example/.;})."example".options; makeOptionsDocPrograms = names: pkgs.nixosOptionsDoc {options = lib.attrByPath (lib.splitString "." names) null system.mods;}; conf = makeOptionsDoc system.conf; basePath = ../modules/programs; @@ -39,7 +39,7 @@ filteredNames = builtins.filter (names: !(lib.strings.hasInfix "default" names)) ( map (name: lib.strings.removeSuffix ".nix" name) (lib.lists.flatten (pathToStrings basePath "")) ); - deduplicatedNames = map (name: lib.strings.splitString "." name |> lib.lists.unique |> lib.strings.concatStringsSep "." ) filteredNames; + deduplicatedNames = map (name: lib.strings.splitString "." name |> lib.lists.unique |> lib.strings.concatStringsSep ".") filteredNames; mods = map makeOptionsDocPrograms deduplicatedNames; docs = lib.strings.concatLines (map generateDocs (lib.lists.zipLists deduplicatedNames mods)); summary = lib.strings.concatStringsSep " " (map summaryAppend deduplicatedNames); diff --git a/docs/src/README.md b/docs/src/README.md index d5f1a80..fabdf0b 100644 --- a/docs/src/README.md +++ b/docs/src/README.md @@ -26,7 +26,7 @@ dashNix = { You can then configure your systems in your flake outputs with a provided library command: ```nix -nixosConfigurations = inputs.dashNix.dashNixLib.build_systems { root = ./.; }; +nixosConfigurations = inputs.dashNix.dashNixLib.buildSystems { root = ./.; }; ``` This command will build each system that is placed within the hosts/ directory. @@ -132,7 +132,7 @@ After logging in the first time, your password will be set to "firstlogin", plea ## Nixos and Home-manager Modules -You can add additional modules or remove all of them by overriding parameters to the build_systems command: +You can add additional modules or remove all of them by overriding parameters to the buildSystems command: ```nix nixosConfigurations = @@ -150,7 +150,7 @@ nixosConfigurations = home = []; } in - inputs.dashNix.dashNixLib.build_systems { root = ./.; inherit mods additionalMods; }; + inputs.dashNix.dashNixLib.buildSystems { root = ./.; inherit mods additionalMods; }; ``` ## Additional Inputs @@ -164,7 +164,7 @@ nixosConfigurations = something.url = "yoururl" } in - inputs.dashNix.dashNixLib.build_systems { root = ./.; inherit additionalInputs; }; + inputs.dashNix.dashNixLib.buildSystems { root = ./.; inherit additionalInputs; }; ``` ## Stable/Unstable @@ -174,12 +174,12 @@ This can be done with the overridePkgs flag for the lib function: ```nix nixosConfigurations = - inputs.dashNix.dashNixLib.build_systems { + inputs.dashNix.dashNixLib.buildSystems { root = ./stable; inherit additionalInputs; overridePkgs = true; } - // inputs.dashNix.dashNixLib.build_systems { + // inputs.dashNix.dashNixLib.buildSystems { root = ./unstable; inherit additionalInputs; }; diff --git a/example/flake.nix b/example/flake.nix index 3e7cb65..640ee54 100644 --- a/example/flake.nix +++ b/example/flake.nix @@ -14,7 +14,7 @@ }; outputs = {...} @ inputs: { - nixosConfigurations = inputs.dashNix.dashNixLib.build_systems {root = ./.;}; + nixosConfigurations = inputs.dashNix.dashNixLib.buildSystems {root = ./.;}; }; nixConfig = { diff --git a/flake.nix b/flake.nix index 6290e63..154187a 100644 --- a/flake.nix +++ b/flake.nix @@ -119,7 +119,7 @@ pkgs = unstable; system = currentSystem; lib = inputs.unstable.lib; - build_systems = dashNixLib.build_systems; + buildSystems = dashNixLib.buildSystems; }; dashNixInputs = inputs; stablePkgs = stable; diff --git a/lib/default.nix b/lib/default.nix index 2cdc15a..79bc9f4 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -9,7 +9,7 @@ }: { /* * - # build_systems + # buildSystems Builds system given a list of system names which are placed within your hosts/ directory. Note that each system has its own directory in hosts/ as well. @@ -24,7 +24,7 @@ # Example usage :::{.example} ```nix - nixosConfigurations = build_systems { root = ./.; }; + nixosConfigurations = buildSystems { root = ./.; }; ``` ::: */ @@ -35,7 +35,7 @@ # ); # in - build_systems = { + buildSystems = { root, additionalMods ? { nixos = []; From 9cc9955425a570c593fe4112e78383abed01ec22 Mon Sep 17 00:00:00 2001 From: DashieTM Date: Sun, 11 May 2025 13:57:38 +0200 Subject: [PATCH 045/118] chore: cleanup all files --- base/common_hardware.nix | 350 ++--- base/env.nix | 48 +- base/xkb_layout.nix | 46 +- docs/src/README.md | 72 +- example/hosts/example/configuration.nix | 105 +- flake.nix | 253 ++-- home/common.nix | 82 +- home/default.nix | 108 +- home/themes/firefoxTheme.nix | 58 +- lib/default.nix | 290 ++--- .../ffextensions.nix => lib/foxextensions.nix | 13 +- lib/importPkgs.nix | 17 + modules/conf.nix | 372 +++--- modules/programs/anyrun.nix | 144 +++ modules/programs/basePackages.nix | 259 ++-- modules/programs/bluetooth.nix | 5 +- modules/programs/browser/firefox.nix | 6 +- modules/programs/browser/librewolf.nix | 6 +- modules/programs/browser/zen.nix | 280 ++-- modules/programs/coding.nix | 1135 +++++++++-------- modules/programs/containers.nix | 5 +- modules/programs/default.nix | 102 +- modules/programs/fancontrol.nix | 72 +- modules/programs/fastfetch.nix | 93 +- modules/programs/gaming.nix | 23 +- modules/programs/gpu.nix | 10 +- modules/programs/greetd.nix | 21 +- .../programs/{hyprland => hypr}/default.nix | 2 - .../programs/{hyprland => hypr}/hyprland.nix | 852 +++++++------ modules/programs/hypr/hyprlock.nix | 61 + modules/programs/hypr/hyprpaper.nix | 36 + modules/programs/hyprland/anyrun.nix | 144 --- modules/programs/hyprland/hyprlock.nix | 58 - modules/programs/hyprland/hyprpaper.nix | 38 - modules/programs/{hyprland => }/ironbar.nix | 271 ++-- modules/programs/keepassxc.nix | 71 +- modules/programs/kitty.nix | 130 +- modules/programs/mime.nix | 9 +- modules/programs/ncspot.nix | 17 +- modules/programs/starship.nix | 3 +- modules/programs/stylix.nix | 9 +- modules/programs/virtmanager.nix | 11 +- patches/darkreader.nix | 40 +- 43 files changed, 2893 insertions(+), 2834 deletions(-) rename modules/programs/browser/ffextensions.nix => lib/foxextensions.nix (85%) create mode 100644 lib/importPkgs.nix create mode 100644 modules/programs/anyrun.nix rename modules/programs/{hyprland => hypr}/default.nix (69%) rename modules/programs/{hyprland => hypr}/hyprland.nix (76%) create mode 100644 modules/programs/hypr/hyprlock.nix create mode 100644 modules/programs/hypr/hyprpaper.nix delete mode 100644 modules/programs/hyprland/anyrun.nix delete mode 100644 modules/programs/hyprland/hyprlock.nix delete mode 100644 modules/programs/hyprland/hyprpaper.nix rename modules/programs/{hyprland => }/ironbar.nix (50%) diff --git a/base/common_hardware.nix b/base/common_hardware.nix index 5f019da..5af3cba 100644 --- a/base/common_hardware.nix +++ b/base/common_hardware.nix @@ -1,175 +1,175 @@ -{ - mkDashDefault, - pkgs, - config, - lib, - hostName, - modulesPath, - ... -}: let - username = config.conf.username; -in { - imports = [ - (modulesPath + "/installer/scan/not-detected.nix") - ]; - - wsl.enable = mkDashDefault config.conf.wsl; - - # Bootloader. - boot = lib.mkIf (!config.conf.wsl) { - consoleLogLevel = mkDashDefault 0; - - lanzaboote = lib.mkIf config.conf.secureBoot { - enable = mkDashDefault true; - pkiBundle = mkDashDefault "/var/lib/sbctl"; - settings.reboot-for-bitlocker = mkDashDefault true; - }; - - loader = { - systemd-boot = { - enable = - if config.conf.secureBoot - then lib.mkForce false - else if config.conf.useSystemdBootloader - then true - else mkDashDefault false; - configurationLimit = 5; - }; - efi.canTouchEfiVariables = mkDashDefault true; - }; - - kernelPackages = mkDashDefault pkgs.linuxPackages_latest; - initrd = { - verbose = mkDashDefault false; - availableKernelModules = [ - "nvme" - "xhci_pci" - "ahci" - "usbhid" - "usb_storage" - "sd_mod" - ]; - }; - kernelParams = - [ - ''resume="PARTLABEL=SWAP"'' - ''quiet'' - ''udev.log_level=3'' - ] - ++ config.conf.bootParams; - }; - - networking = { - useDHCP = mkDashDefault true; - networkmanager.enable = mkDashDefault true; - hostName = mkDashDefault hostName; - }; - - time = { - timeZone = mkDashDefault config.conf.timezone; - hardwareClockInLocalTime = mkDashDefault config.conf.systemLocalTime; - }; - - i18n.defaultLocale = mkDashDefault config.conf.locale; - - services = { - lorri.enable = mkDashDefault true; - xserver.enable = mkDashDefault true; - fstrim.enable = mkDashDefault true; - pulseaudio.enable = mkDashDefault false; - pipewire = { - enable = mkDashDefault true; - alsa = { - enable = mkDashDefault true; - support32Bit = mkDashDefault true; - }; - jack.enable = mkDashDefault true; - pulse.enable = mkDashDefault true; - }; - }; - - nixpkgs.hostPlatform = mkDashDefault config.conf.system; - nix = { - gc = { - automatic = mkDashDefault true; - dates = mkDashDefault "weekly"; - options = mkDashDefault "--delete-older-than 7d --delete-generations +5"; - }; - settings = { - trusted-users = [username]; - auto-optimise-store = mkDashDefault true; - - builders-use-substitutes = mkDashDefault true; - - substituters = [ - "https://chaotic-nyx.cachix.org/" - ]; - - trusted-substituters = [ - "https://hyprland.cachix.org" - "https://anyrun.cachix.org" - "https://oxipaste.cachix.org" - "https://oxinoti.cachix.org" - "https://oxishut.cachix.org" - "https://oxidash.cachix.org" - "https://oxicalc.cachix.org" - "https://hyprdock.cachix.org" - "https://reset.cachix.org" - ]; - - trusted-public-keys = [ - "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=" - "anyrun.cachix.org-1:pqBobmOjI7nKlsUMV25u9QHa9btJK65/C8vnO3p346s=" - "oxipaste.cachix.org-1:n/oA3N3Z+LJP7eIWOwuoLd9QnPyZXqFjLgkahjsdDGc=" - "oxinoti.cachix.org-1:dvSoJl2Pjo5HMaNngdBbSaixK9BSf2N8gzjP2MdGvfc=" - "oxishut.cachix.org-1:axyAGF3XMh1IyMAW4UMbQCdMNovDH0KH6hqLLRJH8jU=" - "oxidash.cachix.org-1:5K2FNHp7AS8VF7LmQkJAUG/dm6UHCz4ngshBVbjFX30=" - "oxicalc.cachix.org-1:qF3krFc20tgSmtR/kt6Ku/T5QiG824z79qU5eRCSBTQ=" - "hyprdock.cachix.org-1:HaROK3fBvFWIMHZau3Vq1TLwUoJE8yRbGLk0lEGzv3Y=" - "reset.cachix.org-1:LfpnUUdG7QM/eOkN7NtA+3+4Ar/UBeYB+3WH+GjP9Xo=" - "chaotic-nyx.cachix.org-1:HfnXSw4pj95iI/n17rIDy40agHj12WfF+Gqk6SonIT8=" - ]; - - experimental-features = mkDashDefault "nix-command flakes pipe-operators"; - }; - }; - - hardware = { - cpu.${config.conf.cpu}.updateMicrocode = - mkDashDefault - config.hardware.enableRedistributableFirmware; - }; - - security.rtkit.enable = mkDashDefault true; - - environment.variables = { - XDG_CACHE_HOME = mkDashDefault "$HOME/.cache"; - DIRENV_LOG_FORMAT = mkDashDefault ""; - QT_QPA_PLATFORMTHEME = mkDashDefault "qt5ct"; - }; - - # allows user change later on - users = { - mutableUsers = mkDashDefault true; - users.${username} = { - isNormalUser = mkDashDefault true; - description = mkDashDefault username; - extraGroups = [ - "networkmanager" - "wheel" - "gamemode" - "docker" - "vboxusers" - "video" - "audio" - ]; - packages = with pkgs; [ - home-manager - xdg-desktop-portal-gtk - ]; - # this password will only last for the first login - # e.g. login, then change to whatever else, this also ensures no public hash is available - password = mkDashDefault "firstlogin"; - }; - }; -} +{ + mkDashDefault, + pkgs, + config, + lib, + hostName, + modulesPath, + ... +}: let + username = config.conf.username; +in { + imports = [ + (modulesPath + "/installer/scan/not-detected.nix") + ]; + + wsl.enable = mkDashDefault config.conf.wsl; + + # Bootloader. + boot = lib.mkIf (!config.conf.wsl) { + consoleLogLevel = mkDashDefault 0; + + lanzaboote = lib.mkIf config.conf.secureBoot { + enable = mkDashDefault true; + pkiBundle = mkDashDefault "/var/lib/sbctl"; + settings.reboot-for-bitlocker = mkDashDefault true; + }; + + loader = { + systemd-boot = { + enable = + if config.conf.secureBoot + then lib.mkForce false + else if config.conf.useSystemdBootloader + then true + else mkDashDefault false; + configurationLimit = 5; + }; + efi.canTouchEfiVariables = mkDashDefault true; + }; + + kernelPackages = mkDashDefault pkgs.linuxPackages_latest; + initrd = { + verbose = mkDashDefault false; + availableKernelModules = [ + "nvme" + "xhci_pci" + "ahci" + "usbhid" + "usb_storage" + "sd_mod" + ]; + }; + kernelParams = + [ + ''resume="PARTLABEL=SWAP"'' + ''quiet'' + ''udev.log_level=3'' + ] + ++ config.conf.bootParams; + }; + + networking = { + useDHCP = mkDashDefault true; + networkmanager.enable = mkDashDefault true; + hostName = mkDashDefault hostName; + }; + + time = { + timeZone = mkDashDefault config.conf.timezone; + hardwareClockInLocalTime = mkDashDefault config.conf.systemLocalTime; + }; + + i18n.defaultLocale = mkDashDefault config.conf.locale; + + services = { + lorri.enable = mkDashDefault true; + xserver.enable = mkDashDefault true; + fstrim.enable = mkDashDefault true; + pulseaudio.enable = mkDashDefault false; + pipewire = { + enable = mkDashDefault true; + alsa = { + enable = mkDashDefault true; + support32Bit = mkDashDefault true; + }; + jack.enable = mkDashDefault true; + pulse.enable = mkDashDefault true; + }; + }; + + nixpkgs.hostPlatform = mkDashDefault config.conf.system; + nix = { + gc = { + automatic = mkDashDefault true; + dates = mkDashDefault "weekly"; + options = mkDashDefault "--delete-older-than 7d --delete-generations +5"; + }; + settings = { + trusted-users = [username]; + auto-optimise-store = mkDashDefault true; + + builders-use-substitutes = mkDashDefault true; + + substituters = [ + "https://chaotic-nyx.cachix.org/" + ]; + + trusted-substituters = [ + "https://hyprland.cachix.org" + "https://anyrun.cachix.org" + "https://oxipaste.cachix.org" + "https://oxinoti.cachix.org" + "https://oxishut.cachix.org" + "https://oxidash.cachix.org" + "https://oxicalc.cachix.org" + "https://hyprdock.cachix.org" + "https://reset.cachix.org" + ]; + + trusted-public-keys = [ + "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=" + "anyrun.cachix.org-1:pqBobmOjI7nKlsUMV25u9QHa9btJK65/C8vnO3p346s=" + "oxipaste.cachix.org-1:n/oA3N3Z+LJP7eIWOwuoLd9QnPyZXqFjLgkahjsdDGc=" + "oxinoti.cachix.org-1:dvSoJl2Pjo5HMaNngdBbSaixK9BSf2N8gzjP2MdGvfc=" + "oxishut.cachix.org-1:axyAGF3XMh1IyMAW4UMbQCdMNovDH0KH6hqLLRJH8jU=" + "oxidash.cachix.org-1:5K2FNHp7AS8VF7LmQkJAUG/dm6UHCz4ngshBVbjFX30=" + "oxicalc.cachix.org-1:qF3krFc20tgSmtR/kt6Ku/T5QiG824z79qU5eRCSBTQ=" + "hyprdock.cachix.org-1:HaROK3fBvFWIMHZau3Vq1TLwUoJE8yRbGLk0lEGzv3Y=" + "reset.cachix.org-1:LfpnUUdG7QM/eOkN7NtA+3+4Ar/UBeYB+3WH+GjP9Xo=" + "chaotic-nyx.cachix.org-1:HfnXSw4pj95iI/n17rIDy40agHj12WfF+Gqk6SonIT8=" + ]; + + experimental-features = mkDashDefault "nix-command flakes pipe-operators"; + }; + }; + + hardware = { + cpu.${config.conf.cpu}.updateMicrocode = + mkDashDefault + config.hardware.enableRedistributableFirmware; + }; + + security.rtkit.enable = mkDashDefault true; + + environment.variables = { + XDG_CACHE_HOME = mkDashDefault "$HOME/.cache"; + DIRENV_LOG_FORMAT = mkDashDefault ""; + QT_QPA_PLATFORMTHEME = mkDashDefault "qt5ct"; + }; + + # allows user change later on + users = { + mutableUsers = mkDashDefault true; + users.${username} = { + isNormalUser = mkDashDefault true; + description = mkDashDefault username; + extraGroups = [ + "networkmanager" + "wheel" + "gamemode" + "docker" + "vboxusers" + "video" + "audio" + ]; + packages = with pkgs; [ + home-manager + xdg-desktop-portal-gtk + ]; + # this password will only last for the first login + # e.g. login, then change to whatever else, this also ensures no public hash is available + password = mkDashDefault "firstlogin"; + }; + }; +} diff --git a/base/env.nix b/base/env.nix index 7937030..0eaf068 100644 --- a/base/env.nix +++ b/base/env.nix @@ -1,24 +1,24 @@ -{ - mkDashDefault, - pkgs, - config, - lib, - ... -}: { - environment = { - variables = { - GSETTINGS_SCHEMA_DIR = mkDashDefault "${pkgs.glib.getSchemaPath pkgs.gsettings-desktop-schemas}"; - NEOVIDE_MAXIMIZED = mkDashDefault "0"; - GPG_TTY = mkDashDefault "$(tty)"; - EDITOR = mkDashDefault "neovide --no-fork"; - SUDO_EDITOR = mkDashDefault "neovide --no-fork"; - SCRIPTS = mkDashDefault "$HOME/.config/scripts"; - }; - sessionVariables = { - NIXOS_OZONE_WL = mkDashDefault "1"; - GOPATH = mkDashDefault "$HOME/.go"; - FLAKE = mkDashDefault config.conf.nixosConfigPath; - NH_FLAKE = mkDashDefault config.conf.nixosConfigPath; - }; - }; -} +{ + mkDashDefault, + pkgs, + config, + lib, + ... +}: { + environment = { + variables = { + GSETTINGS_SCHEMA_DIR = mkDashDefault "${pkgs.glib.getSchemaPath pkgs.gsettings-desktop-schemas}"; + NEOVIDE_MAXIMIZED = mkDashDefault "0"; + GPG_TTY = mkDashDefault "$(tty)"; + EDITOR = mkDashDefault "neovide --no-fork"; + SUDO_EDITOR = mkDashDefault "neovide --no-fork"; + SCRIPTS = mkDashDefault "$HOME/.config/scripts"; + }; + sessionVariables = { + NIXOS_OZONE_WL = mkDashDefault "1"; + GOPATH = mkDashDefault "$HOME/.go"; + FLAKE = mkDashDefault config.conf.nixosConfigPath; + NH_FLAKE = mkDashDefault config.conf.nixosConfigPath; + }; + }; +} diff --git a/base/xkb_layout.nix b/base/xkb_layout.nix index ce87b6e..b399693 100644 --- a/base/xkb_layout.nix +++ b/base/xkb_layout.nix @@ -1,23 +1,23 @@ -{ - mkDashDefault, - pkgs, - ... -}: let - layout = pkgs.writeText "enIntUmlaut" '' - xkb_symbols "enIntUmlaut" - { - include "us(basic)" - include "level3(ralt_switch)" - key { [ a, A, adiaeresis, Adiaeresis ] }; - key { [ o, O, odiaeresis, Odiaeresis ] }; - key { [ u, U, udiaeresis, Udiaeresis ] }; - }; - ''; -in { - environment.systemPackages = mkDashDefault [pkgs.xorg.xkbcomp]; - services.xserver.xkb.extraLayouts.enIntUmlaut = { - description = "US layout with 'umlaut'"; - languages = ["eng"]; - symbolsFile = "${layout}"; - }; -} +{ + mkDashDefault, + pkgs, + ... +}: let + layout = pkgs.writeText "enIntUmlaut" '' + xkb_symbols "enIntUmlaut" + { + include "us(basic)" + include "level3(ralt_switch)" + key { [ a, A, adiaeresis, Adiaeresis ] }; + key { [ o, O, odiaeresis, Odiaeresis ] }; + key { [ u, U, udiaeresis, Udiaeresis ] }; + }; + ''; +in { + environment.systemPackages = mkDashDefault [pkgs.xorg.xkbcomp]; + services.xserver.xkb.extraLayouts.enIntUmlaut = { + description = "US layout with 'umlaut'"; + languages = ["eng"]; + symbolsFile = "${layout}"; + }; +} diff --git a/docs/src/README.md b/docs/src/README.md index fabdf0b..6233312 100644 --- a/docs/src/README.md +++ b/docs/src/README.md @@ -1,4 +1,3 @@ -
![Logo of DashNix](logo.svg) @@ -7,7 +6,6 @@ An opinionated flake to bootstrap NixOS systems with default configurations for various programs and services from both NixOS and HomeManager which can be enabled, disabled, configured or replaced at will. - # Usage This flake is intended to be used as an input to your own NixOS configuration: @@ -57,26 +55,52 @@ Here is a minimal required configuration.nix (the TODOs mention a required chang ```nix {config, ...}: { + # TODO denote important changes + # variables for system - # TODO important changes conf = { - # change this to your monitor and your pc name - # should be something like DP-1 - defaultMonitor = "YOURMONITOR"; - # width x height @ refreshrate - defaultMonitorMode = "1920x1080@60"; - # scale for your main monitor - defaultMonitorScale = "1"; - # your username + # TODO your username username = "YOURNAME"; # TODO only needed when you use intel -> amd is default # cpu = "intel"; + # TODO your xkb layout locale = "something.UTF-8"; + # TODO your timezone timezone = "CONTINENT/CITY"; }; + # modules mods = { # default disk config has root home boot and swap partition, overwrite if you want something different + sops.enable = false; + nextcloud.enable = false; + hypr.hyprland = { + # TODO monitor configuration for hyprland (hyprland is default) + # should be something like DP-1 + defaultMonitor = "YOURMONITOR"; + # width x height @ refreshrate + defaultMonitorMode = "1920x1080@60"; + # scale for your main monitor + defaultMonitorScale = "1"; + # additional configruation can be done as well + # customConfig = { + # monitor = [ + # # default + # "${config.mods.hypr.hyprland.defaultMonitor},${config.mods.hypr.hyprland.defaultMonitorMode},0x0,${config.mods.hypr.hyprland.defaultMonitorScale}" + # # second example monitor + # "DP-2,3440x1440@180,auto,1" + # # all others + # ",highrr,auto,1" + # ]; + # } + }; + gpu.nvidia.enable = true; + kdeConnect.enable = true; + # login manager: + # default is greetd + # greetd = { }; + # sddm = { }; + # gdm = { }; drives = { # default assumes ROOT, BOOT, HOME and SWAP labaled drives exist # for an example without HOME see below @@ -99,29 +123,9 @@ Here is a minimal required configuration.nix (the TODOs mention a required chang # }; # } # ]; - # You can also use disko to format your disks on installation. + # You can also use disko to format your disks on installation. # Please refer to the Documentation about the drives module for an example. }; - sops.enable = false; - nextcloud.enable = false; - # default hyprland monitor config -> uncomment when necessary - # TODO: Add more monitors when needed - # hyprland.monitor = [ - # # default - # "${config.conf.defaultMonitor},${config.conf.defaultMonitorMode},0x0,${config.conf.defaultMonitorScale}" - # # second example monitor - # "DP-2,3440x1440@180,auto,1" - # # all others - # ",highrr,auto,1" - # ]; - # or amd, whatever you have - gpu.nvidia.enable = true; - kdeConnect.enable = true; - # login manager: - # default is greetd - # greetd = { }; - # sddm = { }; - # gdm = { }; }; } ``` @@ -186,7 +190,7 @@ This can be done with the overridePkgs flag for the lib function: ``` You can now place your systems in the respective directories. -Keep in mind that the hosts directory will still need to exist in each variant. +Keep in mind that the hosts directory will still need to exist in each variant. E.g. stable/hosts/yourserver and unstable/hosts/yourdesktop # Installation @@ -212,7 +216,7 @@ Installation via manual configuration: ```sh sudo nixos-install --flake # --root #example -#nixos-install --flake ~/config#globi --root /mnt +#nixos-install --flake ~/config#globi --root /mnt ``` Installation via disko: diff --git a/example/hosts/example/configuration.nix b/example/hosts/example/configuration.nix index b08e1c0..3567918 100644 --- a/example/hosts/example/configuration.nix +++ b/example/hosts/example/configuration.nix @@ -1,71 +1,43 @@ {config, ...}: { + # TODO denote important changes + # variables for system - # TODO important changes conf = { - # change this to your monitor and your pc name - # should be something like DP-1 - defaultMonitor = "YOURMONITOR"; - # width x height @ refreshrate - defaultMonitorMode = "1920x1080@60"; - # scale for your main monitor - defaultMonitorScale = "1"; - # your username + # TODO your username username = "YOURNAME"; # TODO only needed when you use intel -> amd is default # cpu = "intel"; + # TODO your xkb layout locale = "something.UTF-8"; + # TODO your timezone timezone = "CONTINENT/CITY"; }; + # modules mods = { # default disk config has root home boot and swap partition, overwrite if you want something different - drives = { - # WARNING: Only do this when installing for the first time, as I am not sure if disko would format your disk - variant = "disko"; - # default assumes ROOT, BOOT, HOME and SWAP labaled drives exist - # for an example without HOME see below - #defaultDrives.enable = false; - #extraDrives = [ - # { - # name = "boot"; - # drive = { - # device = "/dev/disk/by-label/BOOT"; - # fsType = "vfat"; - # options = [ - # "rw" - # "fmask=0022" - # "dmask=0022" - # "noatime" - # ]; - # }; - # } - # { - # name = ""; - # drive = { - # device = "/dev/disk/by-label/ROOT"; - # fsType = "ext4"; - # options = [ - # "noatime" - # "nodiratime" - # "discard" - # ]; - # }; - # } - #]; - }; sops.enable = false; nextcloud.enable = false; - # default hyprland monitor config -> uncomment when necessary - # TODO: Add more monitors when needed - # hyprland.monitor = [ - # # default - # "${config.conf.defaultMonitor},${config.conf.defaultMonitorMode},0x0,${config.conf.defaultMonitorScale}" - # # second example monitor - # "DP-2,3440x1440@180,auto,1" - # # all others - # ",highrr,auto,1" - # ]; - # or amd, whatever you have + hypr.hyprland = { + # TODO monitor configuration for hyprland (hyprland is default) + # should be something like DP-1 + defaultMonitor = "YOURMONITOR"; + # width x height @ refreshrate + defaultMonitorMode = "1920x1080@60"; + # scale for your main monitor + defaultMonitorScale = "1"; + # additional configruation can be done as well + # customConfig = { + # monitor = [ + # # default + # "${config.mods.hypr.hyprland.defaultMonitor},${config.mods.hypr.hyprland.defaultMonitorMode},0x0,${config.mods.hypr.hyprland.defaultMonitorScale}" + # # second example monitor + # "DP-2,3440x1440@180,auto,1" + # # all others + # ",highrr,auto,1" + # ]; + # } + }; gpu.nvidia.enable = true; kdeConnect.enable = true; # login manager: @@ -73,5 +45,30 @@ # greetd = { }; # sddm = { }; # gdm = { }; + drives = { + # default assumes ROOT, BOOT, HOME and SWAP labaled drives exist + # for an example without HOME see below + # defaultDrives.enable = false; + # extraDrives = [ + # { + # name = "boot"; + # drive = { + # device = "/dev/disk/by-label/BOOT"; + # fsType = "vfat"; + # options = [ "rw" "fmask=0022" "dmask=0022" "noatime" ]; + # }; + # } + # { + # name = ""; + # drive = { + # device = "/dev/disk/by-label/ROOT"; + # fsType = "ext4"; + # options = [ "noatime" "nodiratime" "discard" ]; + # }; + # } + # ]; + # You can also use disko to format your disks on installation. + # Please refer to the Documentation about the drives module for an example. + }; }; } diff --git a/flake.nix b/flake.nix index 154187a..893527f 100644 --- a/flake.nix +++ b/flake.nix @@ -1,130 +1,123 @@ -{ - description = "DashNix"; - - inputs = { - unstable.url = "github:NixOs/nixpkgs/nixos-unstable"; - stable.url = "github:NixOs/nixpkgs/nixos-24.11"; - nixos-wsl.url = "github:nix-community/NixOS-WSL/main"; - nur.url = "github:nix-community/NUR"; - lanzaboote = { - url = "github:nix-community/lanzaboote/v0.4.2"; - inputs.nixpkgs.follows = "unstable"; - }; - - home-manager = { - url = "github:nix-community/home-manager"; - inputs.nixpkgs.follows = "unstable"; - }; - - sops-nix.url = "github:Mic92/sops-nix"; - - Hyprspace = { - url = "github:KZDKM/Hyprspace"; - inputs.hyprland.follows = "hyprland"; - }; - - hyprland.url = "git+https://github.com/hyprwm/Hyprland?submodules=1"; - - ironbar = { - url = "github:JakeStanger/ironbar"; - inputs.nixpkgs.follows = "unstable"; - }; - - zen-browser.url = "github:youwen5/zen-browser-flake"; - - # TODO move to upstream repository after merged nix flake pr - fancontrol.url = "git+https://github.com/DashieTM/fancontrol-gui?ref=nix-flake"; - - stylix.url = "github:danth/stylix"; - base16.url = "github:SenchoPens/base16.nix"; - disko.url = "github:nix-community/disko/latest"; - - anyrun.url = "github:Kirottu/anyrun"; - oxicalc.url = "github:Xetibo/OxiCalc"; - oxishut.url = "github:Xetibo/OxiShut"; - oxinoti.url = "github:Xetibo/OxiNoti"; - oxidash.url = "github:Xetibo/OxiDash"; - oxipaste.url = "github:Xetibo/OxiPaste"; - oxirun.url = "github:Xetibo/OxiRun"; - hyprdock.url = "github:Xetibo/hyprdock"; - reset.url = "github:Xetibo/ReSet"; - reset-plugins.url = "github:Xetibo/ReSet-Plugins"; - - # absolute insanity - chaoticNyx.url = "github:chaotic-cx/nyx/nyxpkgs-unstable"; - - dashvim = { - url = "github:Xetibo/DashVim"; - }; - }; - - outputs = {self, ...} @ inputs: let - currentSystem = "x86_64-linux"; - permittedPackages = [ - "olm-3.2.16" - # well done dotnet... - # this is just for omnisharp - "dotnet-core-combined" - "dotnet-wrapped-combined" - "dotnet-combined" - "dotnet-sdk-6.0.428" - "dotnet-sdk-wrapped-6.0.428" - "dotnet-sdk-6.0.136" - "dotnet-sdk-wrapped-6.0.136" - "dotnet-sdk-7.0.120" - "dotnet-sdk-wrapped-7.0.120" - "dotnet-sdk-7.0.410" - "dotnet-sdk-wrapped-7.0.410" - "jitsi-meet-1.0.8043" - "nextcloud-27.1.11" - ]; - stable = import inputs.stable { - system = currentSystem; - config = { - allowUnfree = true; - permittedInsecurePackages = permittedPackages; - }; - overlays = [ - inputs.nur.overlays.default - inputs.chaoticNyx.overlays.default - ]; - }; - unstable = import inputs.unstable { - system = currentSystem; - config = { - allowUnsupportedSystem = true; - permittedInsecurePackages = permittedPackages; - # Often happens with neovim, this should not block everything. - allowBroken = true; - allowUnfree = true; - }; - overlays = [ - inputs.nur.overlays.default - inputs.chaoticNyx.overlays.default - ]; - }; - in rec { - dashNixLib = import ./lib { - inherit - self - inputs - unstable - stable - ; - system = currentSystem; - lib = inputs.unstable.lib; - }; - docs = import ./docs { - inherit inputs; - pkgs = unstable; - system = currentSystem; - lib = inputs.unstable.lib; - buildSystems = dashNixLib.buildSystems; - }; - dashNixInputs = inputs; - stablePkgs = stable; - unstablePkgs = unstable; - modules = ./modules; - iso = dashNixLib.buildIso.config.system.build.isoImage; - }; -} +{ + description = "DashNix"; + + inputs = { + unstable.url = "github:NixOs/nixpkgs/nixos-unstable"; + stable.url = "github:NixOs/nixpkgs/nixos-24.11"; + nixos-wsl.url = "github:nix-community/NixOS-WSL/main"; + nur.url = "github:nix-community/NUR"; + lanzaboote = { + url = "github:nix-community/lanzaboote/v0.4.2"; + inputs.nixpkgs.follows = "unstable"; + }; + + # Darkreader requires es20, hence a stable pin + pkgsDarkreader.url = "github:NixOs/nixpkgs/nixos-24.11"; + + home-manager = { + url = "github:nix-community/home-manager"; + inputs.nixpkgs.follows = "unstable"; + }; + + sops-nix.url = "github:Mic92/sops-nix"; + + Hyprspace = { + url = "github:KZDKM/Hyprspace"; + inputs.hyprland.follows = "hyprland"; + }; + + hyprland.url = "git+https://github.com/hyprwm/Hyprland?submodules=1"; + + ironbar = { + url = "github:JakeStanger/ironbar"; + inputs.nixpkgs.follows = "unstable"; + }; + + zen-browser.url = "github:youwen5/zen-browser-flake"; + + # TODO move to upstream repository after merged nix flake pr + fancontrol.url = "git+https://github.com/DashieTM/fancontrol-gui?ref=nix-flake"; + + stylix.url = "github:danth/stylix"; + base16.url = "github:SenchoPens/base16.nix"; + disko.url = "github:nix-community/disko/latest"; + + anyrun.url = "github:Kirottu/anyrun"; + oxicalc.url = "github:Xetibo/OxiCalc"; + oxishut.url = "github:Xetibo/OxiShut"; + oxinoti.url = "github:Xetibo/OxiNoti"; + oxidash.url = "github:Xetibo/OxiDash"; + oxipaste.url = "github:Xetibo/OxiPaste"; + oxirun.url = "github:Xetibo/OxiRun"; + hyprdock.url = "github:Xetibo/hyprdock"; + reset.url = "github:Xetibo/ReSet"; + reset-plugins.url = "github:Xetibo/ReSet-Plugins"; + + # absolute insanity + chaoticNyx.url = "github:chaotic-cx/nyx/nyxpkgs-unstable"; + + dashvim = { + url = "github:Xetibo/DashVim"; + }; + }; + + outputs = {self, ...} @ inputs: let + currentSystem = "x86_64-linux"; + permittedPackages = [ + "olm-3.2.16" + # well done dotnet... + # this is just for omnisharp + "dotnet-core-combined" + "dotnet-wrapped-combined" + "dotnet-combined" + "dotnet-sdk-6.0.428" + "dotnet-sdk-wrapped-6.0.428" + "dotnet-sdk-6.0.136" + "dotnet-sdk-wrapped-6.0.136" + "dotnet-sdk-7.0.120" + "dotnet-sdk-wrapped-7.0.120" + "dotnet-sdk-7.0.410" + "dotnet-sdk-wrapped-7.0.410" + "jitsi-meet-1.0.8043" + "nextcloud-27.1.11" + ]; + stable = import ./lib/importPkgs.nix { + inherit inputs permittedPackages currentSystem; + pkgs = inputs.stable; + }; + unstable = import ./lib/importPkgs.nix { + inherit inputs permittedPackages currentSystem; + pkgs = inputs.unstable; + }; + pkgsDarkreader = import ./lib/importPkgs.nix { + inherit inputs permittedPackages currentSystem; + pkgs = inputs.pkgsDarkreader; + }; + in rec { + dashNixLib = import ./lib { + inherit + self + inputs + unstable + stable + ; + dashNixAdditionalProps = { + inherit pkgsDarkreader; + }; + system = currentSystem; + lib = inputs.unstable.lib; + }; + docs = import ./docs { + inherit inputs; + pkgs = unstable; + system = currentSystem; + lib = inputs.unstable.lib; + buildSystems = dashNixLib.buildSystems; + }; + dashNixInputs = inputs; + stablePkgs = stable; + unstablePkgs = unstable; + modules = ./modules; + iso = dashNixLib.buildIso.config.system.build.isoImage; + }; +} diff --git a/home/common.nix b/home/common.nix index 11be1e2..1a3ccf3 100644 --- a/home/common.nix +++ b/home/common.nix @@ -1,41 +1,41 @@ -{ - mkDashDefault, - config, - lib, - ... -}: let - username = config.conf.username; -in { - manual = { - html.enable = mkDashDefault false; - json.enable = mkDashDefault false; - manpages.enable = mkDashDefault false; - }; - - fonts.fontconfig.enable = mkDashDefault true; - - home = { - username = mkDashDefault username; - homeDirectory = mkDashDefault "/home/${username}"; - sessionPath = ["$HOME/.cargo/bin"]; - - enableNixpkgsReleaseCheck = mkDashDefault false; - sessionVariables = { - GOROOT = mkDashDefault "$HOME/.go"; - QT_QPA_PLATFORMTHEME = mkDashDefault "qt5ct"; - }; - - keyboard = mkDashDefault null; - }; - - programs.nix-index = { - enable = mkDashDefault true; - enableFishIntegration = mkDashDefault true; - }; - - nix = { - extraOptions = lib.mkIf (config ? sops.secrets && config.sops.secrets ? access.path) '' - !include ${config.sops.secrets.access.path} - ''; - }; -} +{ + mkDashDefault, + config, + lib, + ... +}: let + username = config.conf.username; +in { + manual = { + html.enable = mkDashDefault false; + json.enable = mkDashDefault false; + manpages.enable = mkDashDefault false; + }; + + fonts.fontconfig.enable = mkDashDefault true; + + home = { + username = mkDashDefault username; + homeDirectory = mkDashDefault "/home/${username}"; + sessionPath = ["$HOME/.cargo/bin"]; + + enableNixpkgsReleaseCheck = mkDashDefault false; + sessionVariables = { + GOROOT = mkDashDefault "$HOME/.go"; + QT_QPA_PLATFORMTHEME = mkDashDefault "qt5ct"; + }; + + keyboard = mkDashDefault null; + }; + + programs.nix-index = { + enable = mkDashDefault true; + enableFishIntegration = mkDashDefault true; + }; + + nix = { + extraOptions = lib.mkIf (config ? sops.secrets && config.sops.secrets ? access.path) '' + !include ${config.sops.secrets.access.path} + ''; + }; +} diff --git a/home/default.nix b/home/default.nix index af3d656..8b6d079 100644 --- a/home/default.nix +++ b/home/default.nix @@ -1,49 +1,59 @@ -{ - mkDashDefault, - additionalHomeConfig, - additionalHomeMods, - additionalInputs, - config, - homeMods, - inputs, - lib, - mod, - pkgs, - root, - alternativePkgs, - system, - stable, - unstable, - ... -}: { - xdg = { - portal.config.common.default = mkDashDefault "*"; - portal = { - enable = mkDashDefault true; - extraPortals = [pkgs.xdg-desktop-portal-gtk]; - }; - }; - home-manager = { - useGlobalPkgs = mkDashDefault true; - useUserPackages = mkDashDefault true; - extraSpecialArgs = { - inherit inputs root additionalInputs alternativePkgs system stable unstable; - mkDashDefault = import ../lib/override.nix {inherit lib;}; - }; - - users.${config.conf.username} = { - disabledModules = ["programs/anyrun.nix"]; - imports = - [ - ./common.nix - ./themes - ./sync.nix - ../lib/foxwrappers.nix - ] - ++ homeMods - ++ additionalHomeMods - ++ lib.optional (builtins.pathExists mod) mod - ++ lib.optional (builtins.pathExists additionalHomeConfig) additionalHomeConfig; - }; - }; -} +{ + mkDashDefault, + additionalHomeConfig, + additionalHomeMods, + additionalInputs, + dashNixAdditionalProps, + config, + homeMods, + inputs, + lib, + mod, + pkgs, + root, + alternativePkgs, + system, + stable, + unstable, + ... +}: { + xdg = { + portal.config.common.default = mkDashDefault "*"; + portal = { + enable = mkDashDefault true; + extraPortals = [pkgs.xdg-desktop-portal-gtk]; + }; + }; + home-manager = { + useGlobalPkgs = mkDashDefault true; + useUserPackages = mkDashDefault true; + extraSpecialArgs = { + inherit + inputs + root + additionalInputs + alternativePkgs + system + stable + unstable + dashNixAdditionalProps + ; + mkDashDefault = import ../lib/override.nix {inherit lib;}; + }; + + users.${config.conf.username} = { + disabledModules = ["programs/anyrun.nix"]; + imports = + [ + ./common.nix + ./themes + ./sync.nix + ../lib/foxwrappers.nix + ] + ++ homeMods + ++ additionalHomeMods + ++ lib.optional (builtins.pathExists mod) mod + ++ lib.optional (builtins.pathExists additionalHomeConfig) additionalHomeConfig; + }; + }; +} diff --git a/home/themes/firefoxTheme.nix b/home/themes/firefoxTheme.nix index 91c5804..c73f07c 100644 --- a/home/themes/firefoxTheme.nix +++ b/home/themes/firefoxTheme.nix @@ -289,37 +289,41 @@ } ''; browsername = config.mods.homePackages.browser; - profiles = - if config.mods.homePackages.browser == "firefox" then - config.mods.browser.firefox.profiles - else if config.mods.homePackages.browser == "zen" then - config.mods.browser.zen.profiles - else if config.mods.homePackages.browser == "librewolf" then - [{name = "default"; value = {};}] - else - []; + profiles = + if config.mods.homePackages.browser == "firefox" + then config.mods.browser.firefox.profiles + else if config.mods.homePackages.browser == "zen" + then config.mods.browser.zen.profiles + else if config.mods.homePackages.browser == "librewolf" + then [ + { + name = "default"; + value = {}; + } + ] + else []; profileNamesFn = builtins.catAttrs "name"; chromesFn = builtins.map ( name: - if (builtins.isString browsername) - then { - ".${browsername}/${name}/chrome/userContent.css" = { - text = userChrome; - }; + if (builtins.isString browsername) + then { + ".${browsername}/${name}/chrome/userContent.css" = { + text = userChrome; + }; - ".${browsername}/${name}/chrome/userChrome.css" = { - text = userContent; - }; - } - else {} + ".${browsername}/${name}/chrome/userChrome.css" = { + text = userContent; + }; + } + else {} ); moduleFn = lib.lists.foldr (attr1: attr2: attr1 // attr2) {}; - mkFirefoxTheme = (profiles: - profiles - |> profileNamesFn - |> chromesFn - |> moduleFn - ); -in - {home.file = mkFirefoxTheme profiles;} + mkFirefoxTheme = ( + profiles: + profiles + |> profileNamesFn + |> chromesFn + |> moduleFn + ); +in {home.file = mkFirefoxTheme profiles;} diff --git a/lib/default.nix b/lib/default.nix index 79bc9f4..40a924a 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -1,144 +1,146 @@ -{ - inputs, - lib, - unstable, - self, - stable, - system, - ... -}: { - /* - * - # buildSystems - - Builds system given a list of system names which are placed within your hosts/ directory. Note that each system has its own directory in hosts/ as well. - - A minimal configuration requires the file configuration.nix within each system directory, this will be the base config that is used across both NisOS and home-manager, specific optional files can also be added, hardware.nix for NisOS configuration and home.nix for home-manager configuration. - - The second parameter is the root of your configuration, which should be ./. in most cases. - - `root` - - : the root path of your configuration - - # Example usage - :::{.example} - ```nix - nixosConfigurations = buildSystems { root = ./.; }; - ``` - ::: - */ - # let - # paths = builtins.readDir ; - # names = lib.lists.remove "default" ( - # map (name: lib.strings.removeSuffix ".nix" name) (lib.attrsets.mapAttrsToList (name: _: name) paths) - # ); - - # in - buildSystems = { - root, - additionalMods ? { - nixos = []; - home = []; - }, - mods ? { - nixos = [ - inputs.lanzaboote.nixosModules.lanzaboote - inputs.nixos-wsl.nixosModules.default - inputs.home-manager.nixosModules.home-manager - inputs.stylix.nixosModules.stylix - inputs.disko.nixosModules.disko - ../base - ../home - ../modules - ]; - home = [ - inputs.anyrun.homeManagerModules.default - inputs.ironbar.homeManagerModules.default - inputs.oxicalc.homeManagerModules.default - inputs.oxishut.homeManagerModules.default - inputs.oxinoti.homeManagerModules.default - inputs.oxidash.homeManagerModules.default - inputs.oxipaste.homeManagerModules.default - inputs.oxirun.homeManagerModules.default - inputs.hyprdock.homeManagerModules.default - inputs.hyprland.homeManagerModules.default - inputs.reset.homeManagerModules.default - inputs.sops-nix.homeManagerModules.sops - inputs.dashvim.homeManagerModules.dashvim - inputs.fancontrol.homeManagerModules.default - ../modules - ]; - }, - additionalInputs ? {}, - overridePkgs ? false, - ... - }: - builtins.listToAttrs ( - map - (name: { - name = name; - value = let - mod = root + /hosts/${name}/configuration.nix; - additionalNixosConfig = root + /hosts/${name}/hardware.nix; - additionalHomeConfig = root + /hosts/${name}/home.nix; - args = { - inherit - self - inputs - mod - additionalHomeConfig - system - root - stable - unstable - ; - pkgs = lib.mkForce ( - if overridePkgs - then stable - else unstable - ); - alternativePkgs = - if overridePkgs - then unstable - else stable; - hostName = name; - homeMods = mods.home; - additionalHomeMods = additionalMods.home; - additionalInputs = additionalInputs; - mkDashDefault = import ./override.nix {inherit lib;}; - }; - in - inputs.unstable.lib.nixosSystem { - modules = - [ - {_module.args = args;} - mod - ] - ++ mods.nixos - ++ additionalMods.nixos - ++ inputs.unstable.lib.optional (builtins.pathExists additionalNixosConfig) additionalNixosConfig - ++ inputs.unstable.lib.optional (builtins.pathExists mod) mod; - }; - }) - ( - lib.lists.remove "" ( - lib.attrsets.mapAttrsToList (name: fType: - if fType == "directory" - then name - else "") ( - builtins.readDir (root + /hosts) - ) - ) - ) - ); - - buildIso = inputs.unstable.lib.nixosSystem { - specialArgs = { - inherit self inputs unstable; - }; - modules = [ - ../iso/configuration.nix - ]; - }; -} +{ + inputs, + lib, + unstable, + self, + stable, + system, + dashNixAdditionalProps ? {}, + ... +}: { + /* + * + # buildSystems + + Builds system given a list of system names which are placed within your hosts/ directory. Note that each system has its own directory in hosts/ as well. + + A minimal configuration requires the file configuration.nix within each system directory, this will be the base config that is used across both NisOS and home-manager, specific optional files can also be added, hardware.nix for NisOS configuration and home.nix for home-manager configuration. + + The second parameter is the root of your configuration, which should be ./. in most cases. + + `root` + + : the root path of your configuration + + # Example usage + :::{.example} + ```nix + nixosConfigurations = buildSystems { root = ./.; }; + ``` + ::: + */ + # let + # paths = builtins.readDir ; + # names = lib.lists.remove "default" ( + # map (name: lib.strings.removeSuffix ".nix" name) (lib.attrsets.mapAttrsToList (name: _: name) paths) + # ); + + # in + buildSystems = { + root, + additionalMods ? { + nixos = []; + home = []; + }, + mods ? { + nixos = [ + inputs.lanzaboote.nixosModules.lanzaboote + inputs.nixos-wsl.nixosModules.default + inputs.home-manager.nixosModules.home-manager + inputs.stylix.nixosModules.stylix + inputs.disko.nixosModules.disko + ../base + ../home + ../modules + ]; + home = [ + inputs.anyrun.homeManagerModules.default + inputs.ironbar.homeManagerModules.default + inputs.oxicalc.homeManagerModules.default + inputs.oxishut.homeManagerModules.default + inputs.oxinoti.homeManagerModules.default + inputs.oxidash.homeManagerModules.default + inputs.oxipaste.homeManagerModules.default + inputs.oxirun.homeManagerModules.default + inputs.hyprdock.homeManagerModules.default + inputs.hyprland.homeManagerModules.default + inputs.reset.homeManagerModules.default + inputs.sops-nix.homeManagerModules.sops + inputs.dashvim.homeManagerModules.dashvim + inputs.fancontrol.homeManagerModules.default + ../modules + ]; + }, + additionalInputs ? {}, + overridePkgs ? false, + ... + }: + builtins.listToAttrs ( + map + (name: { + name = name; + value = let + mod = root + /hosts/${name}/configuration.nix; + additionalNixosConfig = root + /hosts/${name}/hardware.nix; + additionalHomeConfig = root + /hosts/${name}/home.nix; + args = { + inherit + self + inputs + mod + additionalHomeConfig + system + root + stable + unstable + additionalInputs + dashNixAdditionalProps + ; + pkgs = lib.mkForce ( + if overridePkgs + then stable + else unstable + ); + alternativePkgs = + if overridePkgs + then unstable + else stable; + hostName = name; + homeMods = mods.home; + additionalHomeMods = additionalMods.home; + mkDashDefault = import ./override.nix {inherit lib;}; + }; + in + inputs.unstable.lib.nixosSystem { + modules = + [ + {_module.args = args;} + mod + ] + ++ mods.nixos + ++ additionalMods.nixos + ++ inputs.unstable.lib.optional (builtins.pathExists additionalNixosConfig) additionalNixosConfig + ++ inputs.unstable.lib.optional (builtins.pathExists mod) mod; + }; + }) + ( + lib.lists.remove "" ( + lib.attrsets.mapAttrsToList (name: fType: + if fType == "directory" + then name + else "") ( + builtins.readDir (root + /hosts) + ) + ) + ) + ); + + buildIso = inputs.unstable.lib.nixosSystem { + specialArgs = { + inherit self inputs unstable; + }; + modules = [ + ../iso/configuration.nix + ]; + }; +} diff --git a/modules/programs/browser/ffextensions.nix b/lib/foxextensions.nix similarity index 85% rename from modules/programs/browser/ffextensions.nix rename to lib/foxextensions.nix index 27b1598..48603de 100644 --- a/modules/programs/browser/ffextensions.nix +++ b/lib/foxextensions.nix @@ -1,6 +1,6 @@ { lib, - stable, + dashNixAdditionalProps, pkgs, name, ... @@ -24,9 +24,16 @@ in { (mkExtension "@react-devtools" "https://addons.mozilla.org/firefox/downloads/latest/react-devtools/latest.xpi") (mkExtension "extension@redux.devtools" "https://addons.mozilla.org/firefox/downloads/latest/reduxdevtools/latest.xpi") (mkExtension "private-relay@firefox.com" "https://addons.mozilla.org/firefox/downloads/latest/private-relay/latest.xpi") - (mkExtension "addon@darkreader.org" "file://${pkgs.callPackage ../../../patches/darkreader.nix {inherit lib stable;}}/latest.xpi") + (mkExtension "addon@darkreader.org" "file://${pkgs.callPackage ../patches/darkreader.nix {inherit lib dashNixAdditionalProps;}}/latest.xpi") + ]; + example = [ + { + "78272b6fa58f4a1abaac99321d503a20@proton.me" = { + install_url = "https://addons.mozilla.org/en-US/firefox/downloads/latest/proton-pass/latest.xpi"; + installation_mode = "normal_installed"; + }; + } ]; - example = []; type = with lib.types; listOf anything; description = '' List of extensions via attrsets: diff --git a/lib/importPkgs.nix b/lib/importPkgs.nix new file mode 100644 index 0000000..5ce6aad --- /dev/null +++ b/lib/importPkgs.nix @@ -0,0 +1,17 @@ +{ + inputs, + currentSystem, + permittedPackages, + pkgs, +}: +import pkgs { + system = currentSystem; + config = { + allowUnfree = true; + permittedInsecurePackages = permittedPackages; + }; + overlays = [ + inputs.nur.overlays.default + inputs.chaoticNyx.overlays.default + ]; +} diff --git a/modules/conf.nix b/modules/conf.nix index 93ec67e..472e002 100644 --- a/modules/conf.nix +++ b/modules/conf.nix @@ -1,199 +1,173 @@ -{ - lib, - config, - options, - ... -}: { - options.conf = { - system = lib.mkOption { - default = "x86_64-linux"; - # no fisherprice unix support - type = with lib.types; (enum [ - "x86_64-linux" - "aarch64-linux" - "aarch64-linux-android" - ]); - example = "aarch64-linux"; - description = '' - System architecture. - ''; - }; - - systemLocalTime = lib.mkOption { - default = false; - example = true; - description = '' - System time for dualbooting - ''; - }; - - wsl = lib.mkOption { - default = false; - example = true; - description = '' - Runs Nix in wsl - ''; - }; - - secureBoot = lib.mkOption { - default = false; - example = true; - description = '' - enables secure boot. - Note: Secure boot is NOT reproducible - Here are the necessary steps: - + create your keys with sbctl -> sudo sbctl create-keys - + build with systemd once -> set this to false and build once - + build with secureBoot true - + verify that your keys are signed (note, only systemd and your generations should now be signed): sudo sbtcl verify - + enroll your keys (microsoft is necessary for windows dualboot support, leave it there): sudo sbctl enroll-keys --microsoft - + reboot with secureboot enabled - Note: Some motherboards have vendor specific keys for secure boot, this may not necessarily work with our self signed keys - You likely have to disable these vendor specific keys (example HP: sure boot) - ''; - }; - - useSystemdBootloader = lib.mkOption { - default = true; - example = false; - description = '' - use systemd bootloader. - ''; - }; - - cpu = lib.mkOption { - # TODO: how to enable arm? - default = "amd"; - type = with lib.types; (enum [ - "amd" - "intel" - ]); - example = "intel"; - description = '' - cpu microcode. - ''; - }; - - additionalBootKernalParams = lib.mkOption { - default = [ - "video=${config.conf.defaultMonitor}:${config.conf.defaultMonitorMode}" - ]; - example = []; - type = with lib.types; listOf str; - description = '' - additional kernelParams passed to bootloader - ''; - }; - - defaultMonitor = lib.mkOption { - default = ""; - example = "eDP-1"; - type = lib.types.str; - description = '' - main monitor - ''; - }; - - defaultMonitorMode = lib.mkOption { - default = ""; - example = "3440x1440@180"; - type = lib.types.str; - description = '' - main monitor mode: width x height @ refreshrate - ''; - }; - - defaultMonitorScale = lib.mkOption { - default = "1"; - example = "1.5"; - type = lib.types.str; - description = '' - main monitor scaling - ''; - }; - - bootParams = lib.mkOption { - default = []; - example = ["resume=something"]; - type = with lib.types; listOf str; - description = '' - Boot params - ''; - }; - - kernelOverride = lib.mkOption { - default = null; - type = with lib.types; nullOr package; - description = '' - kernel to be used - Has no examples as doc complains... - #example = pkgs.linuxPackages_xanmod_latest; - ''; - }; - - username = lib.mkOption { - default = "DashNix"; - example = "pingpang"; - type = lib.types.str; - description = '' - The username. - ''; - }; - - timezone = lib.mkOption { - default = "Europe/Zurich"; - example = "Europe/Berlin"; - type = lib.types.str; - description = '' - The timezone. - ''; - }; - - locale = lib.mkOption { - default = "en_US.UTF-8"; - example = "de_DE.UTF-8"; - type = lib.types.str; - description = '' - The locale. - ''; - }; - - nixosConfigPath = lib.mkOption { - default = "/home/${config.conf.username}/gits/nixos/."; - example = "yourpath/."; - type = lib.types.str; - description = '' - The path for your build command, you can then simply type rebuild to switch to a new configuration. - ''; - }; - - systemStateVersion = lib.mkOption { - example = "24.11"; - default = "23.05"; - type = lib.types.str; - description = '' - System state version - ''; - }; - homeStateVersion = lib.mkOption { - default = "24.11"; - example = "23.05"; - type = lib.types.str; - description = '' - Home state version - ''; - }; - }; - - config = - (lib.optionalAttrs (options ? system.stateVersion) { - boot = { - kernelPackages = lib.mkIf (config.conf.kernelOverride != null) config.conf.kernel; - kernelParams = config.conf.additionalBootKernalParams; - }; - system.stateVersion = config.conf.systemStateVersion; - }) - // (lib.optionalAttrs (options ? home.stateVersion) { - home.stateVersion = config.conf.homeStateVersion; - }); -} +{ + lib, + config, + options, + ... +}: { + options.conf = { + system = lib.mkOption { + default = "x86_64-linux"; + # no fisherprice unix support + type = with lib.types; (enum [ + "x86_64-linux" + "aarch64-linux" + "aarch64-linux-android" + ]); + example = "aarch64-linux"; + description = '' + System architecture. + ''; + }; + + systemLocalTime = lib.mkOption { + default = false; + example = true; + description = '' + System time for dualbooting + ''; + }; + + wsl = lib.mkOption { + default = false; + example = true; + description = '' + Runs Nix in wsl + ''; + }; + + secureBoot = lib.mkOption { + default = false; + example = true; + description = '' + enables secure boot. + Note: Secure boot is NOT reproducible + Here are the necessary steps: + + create your keys with sbctl -> sudo sbctl create-keys + + build with systemd once -> set this to false and build once + + build with secureBoot true + + verify that your keys are signed (note, only systemd and your generations should now be signed): sudo sbtcl verify + + enroll your keys (microsoft is necessary for windows dualboot support, leave it there): sudo sbctl enroll-keys --microsoft + + reboot with secureboot enabled + Note: Some motherboards have vendor specific keys for secure boot, this may not necessarily work with our self signed keys + You likely have to disable these vendor specific keys (example HP: sure boot) + ''; + }; + + useSystemdBootloader = lib.mkOption { + default = true; + example = false; + description = '' + use systemd bootloader. + ''; + }; + + cpu = lib.mkOption { + # TODO: how to enable arm? + default = "amd"; + type = with lib.types; (enum [ + "amd" + "intel" + ]); + example = "intel"; + description = '' + cpu microcode. + ''; + }; + + additionalBootKernalParams = lib.mkOption { + default = [ + # TODO test if needed + #"video=${config.conf.defaultMonitor}:${config.conf.defaultMonitorMode}" + ]; + example = []; + type = with lib.types; listOf str; + description = '' + additional kernelParams passed to bootloader + ''; + }; + + bootParams = lib.mkOption { + default = []; + example = ["resume=something"]; + type = with lib.types; listOf str; + description = '' + Boot params + ''; + }; + + kernelOverride = lib.mkOption { + default = null; + type = with lib.types; nullOr package; + description = '' + kernel to be used + Has no examples as doc complains... + #example = pkgs.linuxPackages_xanmod_latest; + ''; + }; + + username = lib.mkOption { + default = "DashNix"; + example = "pingpang"; + type = lib.types.str; + description = '' + The username. + ''; + }; + + timezone = lib.mkOption { + default = "Europe/Zurich"; + example = "Europe/Berlin"; + type = lib.types.str; + description = '' + The timezone. + ''; + }; + + locale = lib.mkOption { + default = "en_US.UTF-8"; + example = "de_DE.UTF-8"; + type = lib.types.str; + description = '' + The locale. + ''; + }; + + nixosConfigPath = lib.mkOption { + default = "/home/${config.conf.username}/gits/nixos/."; + example = "yourpath/."; + type = lib.types.str; + description = '' + The path for your build command, you can then simply type rebuild to switch to a new configuration. + ''; + }; + + systemStateVersion = lib.mkOption { + example = "24.11"; + default = "23.05"; + type = lib.types.str; + description = '' + System state version + ''; + }; + homeStateVersion = lib.mkOption { + default = "24.11"; + example = "23.05"; + type = lib.types.str; + description = '' + Home state version + ''; + }; + }; + + config = + (lib.optionalAttrs (options ? system.stateVersion) { + boot = { + kernelPackages = lib.mkIf (config.conf.kernelOverride != null) config.conf.kernel; + kernelParams = config.conf.additionalBootKernalParams; + }; + system.stateVersion = config.conf.systemStateVersion; + }) + // (lib.optionalAttrs (options ? home.stateVersion) { + home.stateVersion = config.conf.homeStateVersion; + }); +} diff --git a/modules/programs/anyrun.nix b/modules/programs/anyrun.nix new file mode 100644 index 0000000..46f4d5c --- /dev/null +++ b/modules/programs/anyrun.nix @@ -0,0 +1,144 @@ +{ + mkDashDefault, + lib, + config, + pkgs, + options, + inputs, + ... +}: { + options.mods.anyrun = { + enable = lib.mkOption { + default = false; + example = true; + type = lib.types.bool; + description = "Enables anyrun"; + }; + useDefaultConfig = lib.mkOption { + default = true; + example = false; + type = lib.types.bool; + description = '' + Use preconfigured anyrun config. + ''; + }; + customConfig = lib.mkOption { + default = {}; + example = {}; + type = with lib.types; attrsOf anything; + description = '' + Custom anyrun configuration. + Will be merged with default configuration if enabled. + ''; + }; + useDefaultCss = lib.mkOption { + default = true; + example = false; + type = lib.types.bool; + description = '' + Use preconfigured anyrun css. + ''; + }; + customCss = lib.mkOption { + default = ''''; + example = '' + #window { + border-radius: none; + } + ''; + type = lib.types.lines; + description = '' + Custom anyrun css. + Will be merged with default css if enabled. + ''; + }; + }; + + config = lib.mkIf config.mods.anyrun.enable ( + lib.optionalAttrs (options ? home.packages) { + programs.anyrun = lib.mkForce { + enable = true; + config = + if config.mods.anyrun.useDefaultConfig + then + lib.mkMerge + [ + { + plugins = [ + inputs.anyrun.packages.${pkgs.system}.applications + inputs.anyrun.packages.${pkgs.system}.rink + inputs.anyrun.packages.${pkgs.system}.translate + inputs.anyrun.packages.${pkgs.system}.websearch + ]; + hideIcons = mkDashDefault false; + width = { + fraction = mkDashDefault 0.3; + }; + y = { + fraction = mkDashDefault 0.5; + }; + layer = mkDashDefault "overlay"; + hidePluginInfo = mkDashDefault true; + closeOnClick = mkDashDefault true; + } + config.mods.anyrun.customConfig + ] + else config.mods.anyrun.customConfig; + + extraCss = + if config.mods.anyrun.useDefaultCss + then + '' + #window { + border-radius: 10px; + background-color: transparent; + } + + box#main { + border-radius: 10px; + } + + list#main { + border-radius: 10px; + margin: 0px 10px 10px 10px; + } + + list#plugin { + border-radius: 10px; + } + + list#match { + border-radius: 10px; + } + + entry#entry { + border: 0; + border-radius: 10px; + margin: 10px 10px 0px 10px; + } + + label#match-desc { + font-size: 12px; + border-radius: 10px; + } + + label#match-title { + font-size: 12px; + border-radius: 10px; + } + + label#plugin { + font-size: 16px; + border-radius: 10px; + } + + * { + border-radius: 10px; + } + '' + + config.mods.anyrun.customCss + else config.mods.anyrun.customCss; + }; + } + ); +} diff --git a/modules/programs/basePackages.nix b/modules/programs/basePackages.nix index eb21428..4a2d157 100644 --- a/modules/programs/basePackages.nix +++ b/modules/programs/basePackages.nix @@ -1,128 +1,131 @@ -{ - mkDashDefault, - config, - lib, - options, - pkgs, - ... -}: { - options.mods = { - basePackages = { - enable = lib.mkOption { - default = true; - example = false; - type = lib.types.bool; - description = '' - Enables default system packages. - ''; - }; - additionalPackages = lib.mkOption { - default = []; - example = [pkgs.openssl]; - type = with lib.types; listOf package; - description = '' - Additional packages to install. - Note that these are installed even if base packages is disabled, e.g. you can also use this as the only packages to install. - ''; - }; - specialPrograms = lib.mkOption { - default = {}; - example = {}; - type = with lib.types; attrsOf anything; - description = '' - special program configuration to be added which require programs.something notation. - ''; - }; - specialServices = lib.mkOption { - default = {}; - example = {}; - type = with lib.types; attrsOf anything; - description = '' - special services configuration to be added which require an services.something notation. - ''; - }; - }; - }; - - config = lib.optionalAttrs (options ? environment.systemPackages) { - environment.systemPackages = - if config.mods.basePackages.enable - then - with pkgs; - [ - adwaita-icon-theme - dbus - dconf - direnv - glib - gnome.nixos-gsettings-overrides - gsettings-desktop-schemas - gtk-layer-shell - gtk3 - gtk4 - gtk4-layer-shell - hicolor-icon-theme - icon-library - kdePackages.breeze-icons - kdePackages.breeze - libsForQt5.breeze-qt5 - kdePackages.qtstyleplugin-kvantum - libsForQt5.qtstyleplugin-kvantum - libadwaita - libxkbcommon - alejandra - openssl - seahorse - upower - xorg.xkbutils - sbctl - ] - ++ config.mods.basePackages.additionalPackages - else config.mods.basePackages.additionalPackages; - - gtk.iconCache.enable = false; - services = - if config.mods.basePackages.enable - then - { - preload.enable = mkDashDefault true; - upower.enable = mkDashDefault true; - dbus = { - enable = mkDashDefault true; - }; - avahi = { - enable = mkDashDefault true; - nssmdns4 = mkDashDefault true; - openFirewall = mkDashDefault true; - }; - } - // config.mods.basePackages.specialServices - else config.mods.basePackages.specialServices; - - programs = - if config.mods.basePackages.enable - then - { - nix-ld = { - enable = mkDashDefault true; - libraries = with pkgs; [ - jdk - zlib - ]; - }; - direnv = { - package = mkDashDefault pkgs.direnv; - silent = mkDashDefault false; - loadInNixShell = mkDashDefault true; - direnvrcExtra = mkDashDefault ""; - nix-direnv = { - enable = mkDashDefault true; - package = mkDashDefault pkgs.nix-direnv; - }; - }; - gnupg.agent.enable = mkDashDefault true; - } - // config.mods.basePackages.specialPrograms - else config.mods.basePackages.specialPrograms; - }; -} +{ + mkDashDefault, + config, + lib, + options, + pkgs, + ... +}: { + options.mods = { + basePackages = { + enable = lib.mkOption { + default = true; + example = false; + type = lib.types.bool; + description = '' + Enables default system packages. + ''; + }; + additionalPackages = lib.mkOption { + default = []; + example = [pkgs.openssl]; + type = with lib.types; listOf package; + description = '' + Additional packages to install. + Note that these are installed even if base packages is disabled, e.g. you can also use this as the only packages to install. + ''; + }; + specialPrograms = lib.mkOption { + default = {}; + example = {}; + type = with lib.types; attrsOf anything; + description = '' + special program configuration to be added which require programs.something notation. + ''; + }; + specialServices = lib.mkOption { + default = {}; + example = {}; + type = with lib.types; attrsOf anything; + description = '' + special services configuration to be added which require an services.something notation. + ''; + }; + }; + }; + + config = lib.optionalAttrs (options ? environment.systemPackages) { + environment.systemPackages = + if config.mods.basePackages.enable + then + with pkgs; + [ + adwaita-icon-theme + dbus + dconf + direnv + glib + gnome.nixos-gsettings-overrides + gsettings-desktop-schemas + gtk-layer-shell + gtk3 + gtk4 + gtk4-layer-shell + hicolor-icon-theme + icon-library + kdePackages.breeze-icons + kdePackages.breeze + libsForQt5.breeze-qt5 + kdePackages.qtstyleplugin-kvantum + libsForQt5.qtstyleplugin-kvantum + libadwaita + libxkbcommon + alejandra + openssl + seahorse + upower + xorg.xkbutils + sbctl + ] + ++ config.mods.basePackages.additionalPackages + else config.mods.basePackages.additionalPackages; + + gtk.iconCache.enable = mkDashDefault false; + services = + if config.mods.basePackages.enable + then + { + preload.enable = mkDashDefault true; + upower.enable = mkDashDefault true; + dbus = { + enable = mkDashDefault true; + }; + avahi = { + enable = mkDashDefault true; + nssmdns4 = mkDashDefault true; + openFirewall = mkDashDefault true; + }; + } + // config.mods.basePackages.specialServices + else config.mods.basePackages.specialServices; + + programs = + if config.mods.basePackages.enable + then + lib.mkMerge + [ + { + nix-ld = { + enable = mkDashDefault true; + libraries = with pkgs; [ + jdk + zlib + ]; + }; + direnv = { + package = mkDashDefault pkgs.direnv; + silent = mkDashDefault false; + loadInNixShell = mkDashDefault true; + direnvrcExtra = mkDashDefault ""; + nix-direnv = { + enable = mkDashDefault true; + package = mkDashDefault pkgs.nix-direnv; + }; + }; + gnupg.agent.enable = mkDashDefault true; + } + config.mods.basePackages.specialPrograms + ] + else config.mods.basePackages.specialPrograms; + }; +} diff --git a/modules/programs/bluetooth.nix b/modules/programs/bluetooth.nix index e09b382..f0e2ef1 100644 --- a/modules/programs/bluetooth.nix +++ b/modules/programs/bluetooth.nix @@ -1,4 +1,5 @@ { + mkDashDefault, lib, config, options, @@ -18,8 +19,8 @@ config = lib.mkIf config.mods.bluetooth.enable ( lib.optionalAttrs (options ? hardware.bluetooth) { hardware.bluetooth = { - enable = true; - powerOnBoot = true; + enable = mkDashDefault true; + powerOnBoot = mkDashDefault true; }; } ); diff --git a/modules/programs/browser/firefox.nix b/modules/programs/browser/firefox.nix index f48f098..5a0abac 100644 --- a/modules/programs/browser/firefox.nix +++ b/modules/programs/browser/firefox.nix @@ -1,16 +1,16 @@ { lib, + dashNixAdditionalProps, config, options, pkgs, - stable, ... }: let name = "firefox"; in { imports = [ - (import ./ffextensions.nix - {inherit lib stable pkgs name;}) + (import ../../../lib/foxextensions.nix + {inherit lib dashNixAdditionalProps pkgs name;}) ]; options.mods.browser.${name} = { enable = lib.mkOption { diff --git a/modules/programs/browser/librewolf.nix b/modules/programs/browser/librewolf.nix index d0d77ac..79f67af 100644 --- a/modules/programs/browser/librewolf.nix +++ b/modules/programs/browser/librewolf.nix @@ -1,16 +1,16 @@ { lib, + dashNixAdditionalProps, config, options, pkgs, - stable, ... }: let name = "librewolf"; in { imports = [ - (import ./ffextensions.nix - {inherit lib stable pkgs name;}) + (import ../../../lib/foxextensions.nix + {inherit lib dashNixAdditionalProps pkgs name;}) ]; options.mods.browser.${name} = { enable = lib.mkOption { diff --git a/modules/programs/browser/zen.nix b/modules/programs/browser/zen.nix index 080a3cc..571edf3 100644 --- a/modules/programs/browser/zen.nix +++ b/modules/programs/browser/zen.nix @@ -1,140 +1,140 @@ -# credits to Voronind for darkreader config https://github.com/voronind-com/nix/blob/main/home/program/firefox/default.nix -{ - lib, - config, - options, - inputs, - stable, - system, - pkgs, - ... -}: let - # at time of using this here, stylix might not be evaluated yet - # hence ensure it is by using base16 mkSchemeAttrs - base16 = pkgs.callPackage inputs.base16.lib {}; - scheme = base16.mkSchemeAttrs config.stylix.base16Scheme; - name = "zen"; -in { - imports = [ - (import ./ffextensions.nix - {inherit lib stable pkgs name;}) - ]; - options.mods.browser.${name} = { - enable = lib.mkOption { - default = false; - example = true; - type = lib.types.bool; - description = "Enables the zen browser"; - }; - configuration = lib.mkOption { - default = { - EnableTrackingProtection = { - Value = true; - Locked = true; - Cryptomining = true; - Fingerprinting = true; - }; - DisablePocket = true; - CaptivePortal = false; - DisableFirefoxStudies = true; - DisableTelemetry = true; - NoDefaultBookmarks = true; - PasswordManagerEnabled = false; - FirefoxHome = { - Search = true; - Pocket = false; - Snippets = false; - TopSites = true; - Highlights = false; - }; - UserMessaging = { - ExtensionRecommendations = false; - SkipOnboarding = true; - }; - "3rdparty".Extensions = { - "addon@darkreader.org" = { - theme = { - darkSchemeBackgroundColor = "#${scheme.base00}"; - darkSchemeTextColor = "#${scheme.base05}"; - }; - previewNewDesign = true; - }; - }; - }; - example = {}; - type = with lib.types; attrsOf anything; - description = "Zen policy configuration. See https://mozilla.github.io/policy-templates for more information."; - }; - profiles = lib.mkOption { - default = [ - { - name = "${config.conf.username}"; - value = { - settings = { - "zen.view.compact.hide-tabbar" = false; - "zen.view.compact.hide-toolbar" = true; - "zen.view.sidebar-expanded" = false; - "zen.view.use-single-toolbar" = false; - "zen.view.welcome-screen.seen" = true; - "zen.theme.accent-color" = "#b4bbff"; - "extensions.autoDisableScopes" = 0; - "cookiebanners.service.mode" = 2; - }; - isDefault = true; - id = 0; - }; - } - { - name = "special"; - value = { - settings = { - "zen.view.compact.hide-tabbar" = false; - "zen.view.compact.hide-toolbar" = true; - "zen.view.sidebar-expanded" = false; - "zen.view.use-single-toolbar" = false; - "zen.view.welcome-screen.seen" = true; - "zen.theme.accent-color" = "#b4bbff"; - "extensions.autoDisableScopes" = 0; - }; - isDefault = false; - id = 1; - }; - } - ]; - example = [ - { - name = "custom"; - value = { - settings = { - extensions.autoDisableScopes = 0; - }; - extensions.packages = [pkgs.nur.repos.rycee.firefox-addons.darkreader]; - isDefault = true; - id = 0; - }; - } - ]; - type = with lib.types; listOf (attrsOf anything); - description = "Zen profiles"; - }; - }; - config = lib.mkIf (config.mods.browser.zen.enable || config.mods.homePackages.browser == "zen") ( - lib.optionalAttrs (options ? home.packages) { - programs.zen-browser = { - enable = true; - package = - pkgs.wrapFirefox - inputs.zen-browser.packages.${system}.zen-browser-unwrapped - { - pname = "zen-browser"; - extraPolicies = - config.mods.browser.zen.configuration - // { - ExtensionSettings = builtins.foldl' (acc: ext: acc // ext) {} config.mods.browser.zen.extensions; - }; - }; - profiles = builtins.listToAttrs config.mods.browser.zen.profiles; - }; - } - ); -} +# credits to Voronind for darkreader config https://github.com/voronind-com/nix/blob/main/home/program/firefox/default.nix +{ + lib, + dashNixAdditionalProps, + config, + options, + inputs, + system, + pkgs, + ... +}: let + # at time of using this here, stylix might not be evaluated yet + # hence ensure it is by using base16 mkSchemeAttrs + base16 = pkgs.callPackage inputs.base16.lib {}; + scheme = base16.mkSchemeAttrs config.stylix.base16Scheme; + name = "zen"; +in { + imports = [ + (import ../../../lib/foxextensions.nix + {inherit lib dashNixAdditionalProps pkgs name;}) + ]; + options.mods.browser.${name} = { + enable = lib.mkOption { + default = false; + example = true; + type = lib.types.bool; + description = "Enables the zen browser"; + }; + configuration = lib.mkOption { + default = { + EnableTrackingProtection = { + Value = true; + Locked = true; + Cryptomining = true; + Fingerprinting = true; + }; + DisablePocket = true; + CaptivePortal = false; + DisableFirefoxStudies = true; + DisableTelemetry = true; + NoDefaultBookmarks = true; + PasswordManagerEnabled = false; + FirefoxHome = { + Search = true; + Pocket = false; + Snippets = false; + TopSites = true; + Highlights = false; + }; + UserMessaging = { + ExtensionRecommendations = false; + SkipOnboarding = true; + }; + "3rdparty".Extensions = { + "addon@darkreader.org" = { + theme = { + darkSchemeBackgroundColor = "#${scheme.base00}"; + darkSchemeTextColor = "#${scheme.base05}"; + }; + previewNewDesign = true; + }; + }; + }; + example = {}; + type = with lib.types; attrsOf anything; + description = "Zen policy configuration. See https://mozilla.github.io/policy-templates for more information."; + }; + profiles = lib.mkOption { + default = [ + { + name = "${config.conf.username}"; + value = { + settings = { + "zen.view.compact.hide-tabbar" = false; + "zen.view.compact.hide-toolbar" = true; + "zen.view.sidebar-expanded" = false; + "zen.view.use-single-toolbar" = false; + "zen.view.welcome-screen.seen" = true; + "zen.theme.accent-color" = "#b4bbff"; + "extensions.autoDisableScopes" = 0; + "cookiebanners.service.mode" = 2; + }; + isDefault = true; + id = 0; + }; + } + { + name = "special"; + value = { + settings = { + "zen.view.compact.hide-tabbar" = false; + "zen.view.compact.hide-toolbar" = true; + "zen.view.sidebar-expanded" = false; + "zen.view.use-single-toolbar" = false; + "zen.view.welcome-screen.seen" = true; + "zen.theme.accent-color" = "#b4bbff"; + "extensions.autoDisableScopes" = 0; + }; + isDefault = false; + id = 1; + }; + } + ]; + example = [ + { + name = "custom"; + value = { + settings = { + extensions.autoDisableScopes = 0; + }; + extensions.packages = [pkgs.nur.repos.rycee.firefox-addons.darkreader]; + isDefault = true; + id = 0; + }; + } + ]; + type = with lib.types; listOf (attrsOf anything); + description = "Zen profiles"; + }; + }; + config = lib.mkIf (config.mods.browser.zen.enable || config.mods.homePackages.browser == "zen") ( + lib.optionalAttrs (options ? home.packages) { + programs.zen-browser = { + enable = true; + package = + pkgs.wrapFirefox + inputs.zen-browser.packages.${system}.zen-browser-unwrapped + { + pname = "zen-browser"; + extraPolicies = + config.mods.browser.zen.configuration + // { + ExtensionSettings = builtins.foldl' (acc: ext: acc // ext) {} config.mods.browser.zen.extensions; + }; + }; + profiles = builtins.listToAttrs config.mods.browser.zen.profiles; + }; + } + ); +} diff --git a/modules/programs/coding.nix b/modules/programs/coding.nix index 781d9dd..f845a1d 100644 --- a/modules/programs/coding.nix +++ b/modules/programs/coding.nix @@ -1,567 +1,568 @@ -{ - lib, - config, - pkgs, - options, - ... -}: let - font_family = "${config.mods.stylix.fonts.monospace.name}"; -in { - options.mods = { - coding = { - enable = lib.mkOption { - default = true; - example = false; - type = lib.types.bool; - description = '' - Enables coding packages. - ''; - }; - dashvim = lib.mkOption { - default = true; - example = false; - type = lib.types.bool; - description = '' - Enables dashvim package. - ''; - }; - jetbrains = lib.mkOption { - default = false; - example = true; - type = lib.types.bool; - description = '' - Enables jetbrains toolbox. - ''; - }; - vscodium = { - enable = lib.mkOption { - default = false; - example = true; - type = lib.types.bool; - description = '' - Enables vscodium. - ''; - }; - extensions = lib.mkOption { - default = []; - example = []; - type = with lib.types; listOf package; - description = "Extensions to be installed"; - }; - }; - penpot = lib.mkOption { - default = false; - example = true; - type = lib.types.bool; - description = "Enables penpot"; - }; - neovide = { - enable = lib.mkOption { - default = false; - example = true; - type = lib.types.bool; - description = "Enables neovide"; - }; - config = lib.mkOption { - default = { - font = { - size = 12; - normal = { - family = font_family; - style = ""; - }; - bold = { - family = font_family; - style = "ExtraBold"; - }; - italic = { - family = font_family; - style = "Italic"; - }; - bold_italic = { - family = font_family; - style = "Bold Italic"; - }; - }; - }; - example = {}; - type = with lib.types; attrsOf anything; - description = "Config for neovide"; - }; - }; - gh = { - enable = lib.mkOption { - default = true; - example = false; - type = lib.types.bool; - description = "Enables and configures gh"; - }; - config = lib.mkOption { - default = { - version = 1; - git_protocol = "ssh"; - editor = ""; - prompt = "enabled"; - prefer_editor_prompt = "disabled"; - pager = ""; - aliases = { - co = "pr checkout"; - }; - http_unix_socket = ""; - browser = ""; - }; - example = {}; - type = with lib.types; attrsOf anything; - description = "config for gh. Keep in mind, empty values refer to using environment variables"; - }; - hosts = lib.mkOption { - default = { - "github.com" = { - git_protocol = "ssh"; - users = { - ${config.mods.git.username} = ""; - }; - user = "${config.mods.git.username}"; - }; - }; - example = {}; - type = with lib.types; attrsOf anything; - description = "hosts for gh"; - }; - }; - useDefaultPackages = lib.mkOption { - default = true; - example = false; - type = lib.types.bool; - description = "Use default base packages (only additionalPackages are installed if false)"; - }; - additionalPackages = lib.mkOption { - default = []; - example = []; - type = with lib.types; listOf package; - description = "Additional packages to be installed"; - }; - languages = { - haskell = { - enable = lib.mkOption { - default = true; - example = false; - type = lib.types.bool; - description = '' - Enables haskell. - ''; - }; - packages = lib.mkOption { - default = with pkgs; [ - haskellPackages.cabal-install - ghc - haskellPackages.haskell-language-server - ]; - example = []; - type = with lib.types; listOf package; - description = '' - haskell packages - ''; - }; - }; - typst = { - enable = lib.mkOption { - default = true; - example = false; - type = lib.types.bool; - description = '' - Enables typst. - ''; - }; - packages = lib.mkOption { - default = with pkgs; [ - typst - tinymist - ltex-ls - ]; - example = []; - type = with lib.types; listOf package; - description = '' - typst packages - ''; - }; - }; - go = { - enable = lib.mkOption { - default = true; - example = false; - type = lib.types.bool; - description = '' - Enables go. - ''; - }; - packages = lib.mkOption { - default = with pkgs; [ - go - gopls - ]; - example = []; - type = with lib.types; listOf package; - description = '' - Go packages - ''; - }; - }; - rust = { - enable = lib.mkOption { - default = true; - example = false; - type = lib.types.bool; - description = '' - Enables rust. - ''; - }; - packages = lib.mkOption { - default = with pkgs; [rustup]; - example = []; - type = with lib.types; listOf package; - description = '' - Rust packages - ''; - }; - }; - ts-js = { - enable = lib.mkOption { - default = true; - example = false; - type = lib.types.bool; - description = '' - Enables TS/JS. - ''; - }; - packages = lib.mkOption { - default = with pkgs; [ - nodejs_20 - deno - typescript - nodePackages.typescript-language-server - nodePackages.prettier - ]; - example = []; - type = with lib.types; listOf package; - description = '' - TS/JS packages - ''; - }; - }; - zig = { - enable = lib.mkOption { - default = true; - example = false; - type = lib.types.bool; - description = '' - Enables zig. - ''; - }; - packages = lib.mkOption { - default = with pkgs; [ - zig - zls - ]; - example = []; - type = with lib.types; listOf package; - description = '' - zig packages - ''; - }; - }; - java = { - enable = lib.mkOption { - default = true; - example = false; - type = lib.types.bool; - description = '' - Enables java. - ''; - }; - packages = lib.mkOption { - default = with pkgs; [ - gradle - maven - jdt-language-server - temurin-jre-bin - ]; - example = []; - type = with lib.types; listOf package; - description = '' - Java packages - ''; - }; - }; - dotnet = { - enable = lib.mkOption { - default = true; - example = false; - type = lib.types.bool; - description = '' - Enables C#/F#. - ''; - }; - packages = lib.mkOption { - default = with pkgs; [ - #.! - dotnet-sdk - omnisharp-roslyn - csharpier - netcoredbg - fsharp - fsautocomplete - ]; - example = []; - type = with lib.types; listOf package; - description = '' - C#/F# packages - ''; - }; - }; - C-CPP = { - enable = lib.mkOption { - default = true; - example = false; - type = lib.types.bool; - description = '' - Enables C/C++. - ''; - }; - packages = lib.mkOption { - default = with pkgs; [ - bear - gdb - gcc - clang-tools - ]; - example = []; - type = with lib.types; listOf package; - description = '' - C/C++ packages - ''; - }; - }; - python = { - enable = lib.mkOption { - default = true; - example = false; - type = lib.types.bool; - description = '' - Enables python. - ''; - }; - packages = lib.mkOption { - default = with pkgs; [ - python3 - python312Packages.python-lsp-server - python312Packages.python-lsp-ruff - python312Packages.python-lsp-black - ]; - example = []; - type = with lib.types; listOf package; - description = '' - python packages - ''; - }; - }; - configFiles = { - enable = lib.mkOption { - default = true; - example = false; - type = lib.types.bool; - description = '' - Enables Json/toml/yaml etc. - ''; - }; - packages = lib.mkOption { - default = with pkgs; [ - #yaml - yamlfmt - yamllint - yaml-language-server - - #json - jq - ]; - example = []; - type = with lib.types; listOf package; - description = '' - packages for said filetypes - ''; - }; - }; - bash = { - enable = lib.mkOption { - default = true; - example = false; - type = lib.types.bool; - description = '' - Enables bash. - ''; - }; - packages = lib.mkOption { - default = with pkgs; [ - bash-language-server - shfmt - ]; - example = []; - type = with lib.types; listOf package; - description = '' - bash packages - ''; - }; - }; - html-css = { - enable = lib.mkOption { - default = true; - example = false; - type = lib.types.bool; - description = '' - Enables html/css. - ''; - }; - packages = lib.mkOption { - default = with pkgs; [ - tailwindcss - tailwindcss-language-server - # html-tidy - ]; - example = []; - type = with lib.types; listOf package; - description = '' - html/css packages - ''; - }; - }; - sql = { - enable = lib.mkOption { - default = true; - example = false; - type = lib.types.bool; - description = '' - Enables sql. - ''; - }; - packages = lib.mkOption { - default = with pkgs; [ - nodePackages.sql-formatter - sqls - ]; - example = []; - type = with lib.types; listOf package; - description = '' - sql packages - ''; - }; - }; - gleam = { - enable = lib.mkOption { - default = true; - example = false; - type = lib.types.bool; - description = '' - Enables gleam. - ''; - }; - packages = lib.mkOption { - default = with pkgs; [gleam]; - example = []; - type = with lib.types; listOf package; - description = '' - gleam packages - ''; - }; - }; - asm = { - enable = lib.mkOption { - default = true; - example = false; - type = lib.types.bool; - description = '' - Enables assembly. - ''; - }; - packages = lib.mkOption { - default = with pkgs; [asm-lsp]; - example = []; - type = with lib.types; listOf package; - description = '' - assembly packages - ''; - }; - }; - }; - }; - }; - - config = let - basePackages = with pkgs; [ - gitui - meson - ninja - tree-sitter - unzip - pkg-config - sqlite - plantuml - d-spy - tmux - tmate - ]; - in - lib.mkIf config.mods.coding.enable ( - lib.optionalAttrs (options ? home.packages) { - programs.dashvim = lib.mkIf config.mods.coding.dashvim { - enable = true; - colorscheme = config.mods.stylix.colorscheme; - }; - programs.vscode = lib.mkIf config.mods.coding.vscodium.enable { - enable = true; - package = pkgs.vscodium; - profiles.default.extensions = config.mods.coding.vscodium.extensions; - }; - xdg.configFile."neovide/config.toml" = lib.mkIf (config.mods.coding.dashvim || config.mods.coding.neovide.enable) { - source = - (pkgs.formats.toml {}).generate "neovide" - config.mods.coding.neovide.config; - }; - - xdg.configFile."gh/config.yml" = lib.mkIf config.mods.coding.gh.enable { - source = - (pkgs.formats.yaml {}).generate "config" - config.mods.coding.gh.config; - }; - xdg.configFile."gh/hosts.yml" = lib.mkIf config.mods.coding.gh.enable { - source = - (pkgs.formats.yaml {}).generate "hosts" - config.mods.coding.gh.hosts; - }; - - home.packages = with pkgs; - [ - (lib.mkIf (config.mods.coding.dashvim || config.mods.coding.neovide.enable) neovide) - (lib.mkIf config.mods.coding.jetbrains jetbrains-toolbox) - (lib.mkIf config.mods.coding.penpot pkgs.penpot-desktop) - (lib.mkIf config.mods.coding.gh.enable gh) - ] - ++ config.mods.coding.additionalPackages - ++ (lib.lists.optionals config.mods.coding.useDefaultPackages basePackages) - ++ (lib.lists.optionals config.mods.coding.languages.haskell.enable config.mods.coding.languages.haskell.packages) - ++ (lib.lists.optionals config.mods.coding.languages.rust.enable config.mods.coding.languages.rust.packages) - ++ (lib.lists.optionals config.mods.coding.languages.go.enable config.mods.coding.languages.go.packages) - ++ (lib.lists.optionals config.mods.coding.languages.java.enable config.mods.coding.languages.java.packages) - ++ (lib.lists.optionals config.mods.coding.languages.dotnet.enable config.mods.coding.languages.dotnet.packages) - ++ (lib.lists.optionals config.mods.coding.languages.bash.enable config.mods.coding.languages.bash.packages) - ++ (lib.lists.optionals config.mods.coding.languages.C-CPP.enable config.mods.coding.languages.C-CPP.packages) - ++ (lib.lists.optionals config.mods.coding.languages.asm.enable config.mods.coding.languages.asm.packages) - ++ (lib.lists.optionals config.mods.coding.languages.sql.enable config.mods.coding.languages.sql.packages) - ++ (lib.lists.optionals config.mods.coding.languages.html-css.enable config.mods.coding.languages.html-css.packages) - ++ (lib.lists.optionals config.mods.coding.languages.configFiles.enable config.mods.coding.languages.configFiles.packages) - ++ (lib.lists.optionals config.mods.coding.languages.ts-js.enable config.mods.coding.languages.ts-js.packages) - ++ (lib.lists.optionals config.mods.coding.languages.typst.enable config.mods.coding.languages.typst.packages) - ++ (lib.lists.optionals config.mods.coding.languages.zig.enable config.mods.coding.languages.zig.packages) - ++ (lib.lists.optionals config.mods.coding.languages.gleam.enable config.mods.coding.languages.gleam.packages); - } - ); -} +{ + mkDashDefault, + lib, + config, + pkgs, + options, + ... +}: let + font_family = "${config.mods.stylix.fonts.monospace.name}"; +in { + options.mods = { + coding = { + enable = lib.mkOption { + default = true; + example = false; + type = lib.types.bool; + description = '' + Enables coding packages. + ''; + }; + dashvim = lib.mkOption { + default = true; + example = false; + type = lib.types.bool; + description = '' + Enables dashvim package. + ''; + }; + jetbrains = lib.mkOption { + default = false; + example = true; + type = lib.types.bool; + description = '' + Enables jetbrains toolbox. + ''; + }; + vscodium = { + enable = lib.mkOption { + default = false; + example = true; + type = lib.types.bool; + description = '' + Enables vscodium. + ''; + }; + extensions = lib.mkOption { + default = []; + example = []; + type = with lib.types; listOf package; + description = "Extensions to be installed"; + }; + }; + penpot = lib.mkOption { + default = false; + example = true; + type = lib.types.bool; + description = "Enables penpot"; + }; + neovide = { + enable = lib.mkOption { + default = false; + example = true; + type = lib.types.bool; + description = "Enables neovide"; + }; + config = lib.mkOption { + default = { + font = { + size = 12; + normal = { + family = font_family; + style = ""; + }; + bold = { + family = font_family; + style = "ExtraBold"; + }; + italic = { + family = font_family; + style = "Italic"; + }; + bold_italic = { + family = font_family; + style = "Bold Italic"; + }; + }; + }; + example = {}; + type = with lib.types; attrsOf anything; + description = "Config for neovide"; + }; + }; + gh = { + enable = lib.mkOption { + default = true; + example = false; + type = lib.types.bool; + description = "Enables and configures gh"; + }; + config = lib.mkOption { + default = { + version = 1; + git_protocol = "ssh"; + editor = ""; + prompt = "enabled"; + prefer_editor_prompt = "disabled"; + pager = ""; + aliases = { + co = "pr checkout"; + }; + http_unix_socket = ""; + browser = ""; + }; + example = {}; + type = with lib.types; attrsOf anything; + description = "config for gh. Keep in mind, empty values refer to using environment variables"; + }; + hosts = lib.mkOption { + default = { + "github.com" = { + git_protocol = "ssh"; + users = { + ${config.mods.git.username} = ""; + }; + user = "${config.mods.git.username}"; + }; + }; + example = {}; + type = with lib.types; attrsOf anything; + description = "hosts for gh"; + }; + }; + useDefaultPackages = lib.mkOption { + default = true; + example = false; + type = lib.types.bool; + description = "Use default base packages (only additionalPackages are installed if false)"; + }; + additionalPackages = lib.mkOption { + default = []; + example = []; + type = with lib.types; listOf package; + description = "Additional packages to be installed"; + }; + languages = { + haskell = { + enable = lib.mkOption { + default = true; + example = false; + type = lib.types.bool; + description = '' + Enables haskell. + ''; + }; + packages = lib.mkOption { + default = with pkgs; [ + haskellPackages.cabal-install + ghc + haskellPackages.haskell-language-server + ]; + example = []; + type = with lib.types; listOf package; + description = '' + haskell packages + ''; + }; + }; + typst = { + enable = lib.mkOption { + default = true; + example = false; + type = lib.types.bool; + description = '' + Enables typst. + ''; + }; + packages = lib.mkOption { + default = with pkgs; [ + typst + tinymist + ltex-ls + ]; + example = []; + type = with lib.types; listOf package; + description = '' + typst packages + ''; + }; + }; + go = { + enable = lib.mkOption { + default = true; + example = false; + type = lib.types.bool; + description = '' + Enables go. + ''; + }; + packages = lib.mkOption { + default = with pkgs; [ + go + gopls + ]; + example = []; + type = with lib.types; listOf package; + description = '' + Go packages + ''; + }; + }; + rust = { + enable = lib.mkOption { + default = true; + example = false; + type = lib.types.bool; + description = '' + Enables rust. + ''; + }; + packages = lib.mkOption { + default = with pkgs; [rustup]; + example = []; + type = with lib.types; listOf package; + description = '' + Rust packages + ''; + }; + }; + ts-js = { + enable = lib.mkOption { + default = true; + example = false; + type = lib.types.bool; + description = '' + Enables TS/JS. + ''; + }; + packages = lib.mkOption { + default = with pkgs; [ + nodejs_20 + deno + typescript + nodePackages.typescript-language-server + nodePackages.prettier + ]; + example = []; + type = with lib.types; listOf package; + description = '' + TS/JS packages + ''; + }; + }; + zig = { + enable = lib.mkOption { + default = true; + example = false; + type = lib.types.bool; + description = '' + Enables zig. + ''; + }; + packages = lib.mkOption { + default = with pkgs; [ + zig + zls + ]; + example = []; + type = with lib.types; listOf package; + description = '' + zig packages + ''; + }; + }; + java = { + enable = lib.mkOption { + default = true; + example = false; + type = lib.types.bool; + description = '' + Enables java. + ''; + }; + packages = lib.mkOption { + default = with pkgs; [ + gradle + maven + jdt-language-server + temurin-jre-bin + ]; + example = []; + type = with lib.types; listOf package; + description = '' + Java packages + ''; + }; + }; + dotnet = { + enable = lib.mkOption { + default = true; + example = false; + type = lib.types.bool; + description = '' + Enables C#/F#. + ''; + }; + packages = lib.mkOption { + default = with pkgs; [ + #.! + dotnet-sdk + omnisharp-roslyn + csharpier + netcoredbg + fsharp + fsautocomplete + ]; + example = []; + type = with lib.types; listOf package; + description = '' + C#/F# packages + ''; + }; + }; + C-CPP = { + enable = lib.mkOption { + default = true; + example = false; + type = lib.types.bool; + description = '' + Enables C/C++. + ''; + }; + packages = lib.mkOption { + default = with pkgs; [ + bear + gdb + gcc + clang-tools + ]; + example = []; + type = with lib.types; listOf package; + description = '' + C/C++ packages + ''; + }; + }; + python = { + enable = lib.mkOption { + default = true; + example = false; + type = lib.types.bool; + description = '' + Enables python. + ''; + }; + packages = lib.mkOption { + default = with pkgs; [ + python3 + python312Packages.python-lsp-server + python312Packages.python-lsp-ruff + python312Packages.python-lsp-black + ]; + example = []; + type = with lib.types; listOf package; + description = '' + python packages + ''; + }; + }; + configFiles = { + enable = lib.mkOption { + default = true; + example = false; + type = lib.types.bool; + description = '' + Enables Json/toml/yaml etc. + ''; + }; + packages = lib.mkOption { + default = with pkgs; [ + #yaml + yamlfmt + yamllint + yaml-language-server + + #json + jq + ]; + example = []; + type = with lib.types; listOf package; + description = '' + packages for said filetypes + ''; + }; + }; + bash = { + enable = lib.mkOption { + default = true; + example = false; + type = lib.types.bool; + description = '' + Enables bash. + ''; + }; + packages = lib.mkOption { + default = with pkgs; [ + bash-language-server + shfmt + ]; + example = []; + type = with lib.types; listOf package; + description = '' + bash packages + ''; + }; + }; + html-css = { + enable = lib.mkOption { + default = true; + example = false; + type = lib.types.bool; + description = '' + Enables html/css. + ''; + }; + packages = lib.mkOption { + default = with pkgs; [ + tailwindcss + tailwindcss-language-server + # html-tidy + ]; + example = []; + type = with lib.types; listOf package; + description = '' + html/css packages + ''; + }; + }; + sql = { + enable = lib.mkOption { + default = true; + example = false; + type = lib.types.bool; + description = '' + Enables sql. + ''; + }; + packages = lib.mkOption { + default = with pkgs; [ + nodePackages.sql-formatter + sqls + ]; + example = []; + type = with lib.types; listOf package; + description = '' + sql packages + ''; + }; + }; + gleam = { + enable = lib.mkOption { + default = true; + example = false; + type = lib.types.bool; + description = '' + Enables gleam. + ''; + }; + packages = lib.mkOption { + default = with pkgs; [gleam]; + example = []; + type = with lib.types; listOf package; + description = '' + gleam packages + ''; + }; + }; + asm = { + enable = lib.mkOption { + default = true; + example = false; + type = lib.types.bool; + description = '' + Enables assembly. + ''; + }; + packages = lib.mkOption { + default = with pkgs; [asm-lsp]; + example = []; + type = with lib.types; listOf package; + description = '' + assembly packages + ''; + }; + }; + }; + }; + }; + + config = let + basePackages = with pkgs; [ + gitui + meson + ninja + tree-sitter + unzip + pkg-config + sqlite + plantuml + d-spy + tmux + tmate + ]; + in + lib.mkIf config.mods.coding.enable ( + lib.optionalAttrs (options ? home.packages) { + programs.dashvim = lib.mkIf config.mods.coding.dashvim { + enable = true; + colorscheme = config.mods.stylix.colorscheme; + }; + programs.vscode = lib.mkIf config.mods.coding.vscodium.enable { + enable = true; + package = mkDashDefault pkgs.vscodium; + profiles.default.extensions = config.mods.coding.vscodium.extensions; + }; + xdg.configFile."neovide/config.toml" = lib.mkIf (config.mods.coding.dashvim || config.mods.coding.neovide.enable) { + source = + (pkgs.formats.toml {}).generate "neovide" + config.mods.coding.neovide.config; + }; + + xdg.configFile."gh/config.yml" = lib.mkIf config.mods.coding.gh.enable { + source = + (pkgs.formats.yaml {}).generate "config" + config.mods.coding.gh.config; + }; + xdg.configFile."gh/hosts.yml" = lib.mkIf config.mods.coding.gh.enable { + source = + (pkgs.formats.yaml {}).generate "hosts" + config.mods.coding.gh.hosts; + }; + + home.packages = with pkgs; + [ + (lib.mkIf (config.mods.coding.dashvim || config.mods.coding.neovide.enable) neovide) + (lib.mkIf config.mods.coding.jetbrains jetbrains-toolbox) + (lib.mkIf config.mods.coding.penpot pkgs.penpot-desktop) + (lib.mkIf config.mods.coding.gh.enable gh) + ] + ++ config.mods.coding.additionalPackages + ++ (lib.lists.optionals config.mods.coding.useDefaultPackages basePackages) + ++ (lib.lists.optionals config.mods.coding.languages.haskell.enable config.mods.coding.languages.haskell.packages) + ++ (lib.lists.optionals config.mods.coding.languages.rust.enable config.mods.coding.languages.rust.packages) + ++ (lib.lists.optionals config.mods.coding.languages.go.enable config.mods.coding.languages.go.packages) + ++ (lib.lists.optionals config.mods.coding.languages.java.enable config.mods.coding.languages.java.packages) + ++ (lib.lists.optionals config.mods.coding.languages.dotnet.enable config.mods.coding.languages.dotnet.packages) + ++ (lib.lists.optionals config.mods.coding.languages.bash.enable config.mods.coding.languages.bash.packages) + ++ (lib.lists.optionals config.mods.coding.languages.C-CPP.enable config.mods.coding.languages.C-CPP.packages) + ++ (lib.lists.optionals config.mods.coding.languages.asm.enable config.mods.coding.languages.asm.packages) + ++ (lib.lists.optionals config.mods.coding.languages.sql.enable config.mods.coding.languages.sql.packages) + ++ (lib.lists.optionals config.mods.coding.languages.html-css.enable config.mods.coding.languages.html-css.packages) + ++ (lib.lists.optionals config.mods.coding.languages.configFiles.enable config.mods.coding.languages.configFiles.packages) + ++ (lib.lists.optionals config.mods.coding.languages.ts-js.enable config.mods.coding.languages.ts-js.packages) + ++ (lib.lists.optionals config.mods.coding.languages.typst.enable config.mods.coding.languages.typst.packages) + ++ (lib.lists.optionals config.mods.coding.languages.zig.enable config.mods.coding.languages.zig.packages) + ++ (lib.lists.optionals config.mods.coding.languages.gleam.enable config.mods.coding.languages.gleam.packages); + } + ); +} diff --git a/modules/programs/containers.nix b/modules/programs/containers.nix index aacf6f4..e65eb06 100644 --- a/modules/programs/containers.nix +++ b/modules/programs/containers.nix @@ -1,4 +1,5 @@ { + mkDashDefault, lib, config, options, @@ -63,8 +64,8 @@ containers.enable = true; podman = { enable = true; - dockerCompat = true; - defaultNetwork.settings.dns_enabled = true; + dockerCompat = mkDashDefault true; + defaultNetwork.settings.dns_enabled = mkDashDefault true; }; } else if (config.mods.containers.variant == "docker") diff --git a/modules/programs/default.nix b/modules/programs/default.nix index fdfb163..5ad3e09 100644 --- a/modules/programs/default.nix +++ b/modules/programs/default.nix @@ -1,50 +1,52 @@ -{ - imports = [ - ./acpid.nix - ./basePackages.nix - ./bluetooth.nix - ./browser - ./coding.nix - ./containers.nix - ./drives.nix - ./fancontrol.nix - ./fastfetch.nix - ./fish.nix - ./flatpak.nix - ./gaming.nix - ./gdm.nix - ./git.nix - ./gnome.nix - ./gnomeServices.nix - ./gpu.nix - ./greetd.nix - ./homePackages.nix - ./hyprland - ./kde.nix - ./kdeConnect.nix - ./keepassxc.nix - ./kitty.nix - ./media.nix - ./mime.nix - ./ncspot.nix - ./nextcloud.nix - ./onedrive.nix - ./oxi - ./piper.nix - ./plymouth.nix - ./printing.nix - ./scripts.nix - ./sddm.nix - ./sops.nix - ./starship.nix - ./streamcontroller.nix - ./stylix.nix - ./supersonic.nix - ./sway.nix - ./teams.nix - ./virtmanager.nix - ./xkb.nix - ./xone.nix - ./yazi - ]; -} +{ + imports = [ + ./acpid.nix + ./anyrun.nix + ./basePackages.nix + ./bluetooth.nix + ./browser + ./coding.nix + ./containers.nix + ./drives.nix + ./fancontrol.nix + ./fastfetch.nix + ./fish.nix + ./flatpak.nix + ./gaming.nix + ./gdm.nix + ./git.nix + ./gnome.nix + ./gnomeServices.nix + ./gpu.nix + ./greetd.nix + ./homePackages.nix + ./hypr + ./ironbar.nix + ./kde.nix + ./kdeConnect.nix + ./keepassxc.nix + ./kitty.nix + ./media.nix + ./mime.nix + ./ncspot.nix + ./nextcloud.nix + ./onedrive.nix + ./oxi + ./piper.nix + ./plymouth.nix + ./printing.nix + ./scripts.nix + ./sddm.nix + ./sops.nix + ./starship.nix + ./streamcontroller.nix + ./stylix.nix + ./supersonic.nix + ./sway.nix + ./teams.nix + ./virtmanager.nix + ./xkb.nix + ./xone.nix + ./yazi + ]; +} diff --git a/modules/programs/fancontrol.nix b/modules/programs/fancontrol.nix index f7a2e3a..87be9af 100644 --- a/modules/programs/fancontrol.nix +++ b/modules/programs/fancontrol.nix @@ -1,36 +1,36 @@ -{ - lib, - config, - options, - ... -}: { - options.mods.fancontrol = { - enable = lib.mkOption { - default = false; - example = true; - type = lib.types.bool; - description = "Enables fancontrol-gui with needed drivers"; - }; - forceId = lib.mkOption { - default = null; - example = "force_id=0x8628"; - type = with lib.types; nullOr str; - description = "Modprobe options for the it87 driver. Information at: https://wiki.archlinux.org/title/Lm_sensors#Gigabyte_B250/Z370/B450M/B560M/B660M/Z690/B550_motherboards"; - }; - }; - config = lib.mkIf config.mods.fancontrol.enable ( - lib.optionalAttrs (options ? home.packages) { - programs.fancontrol-gui.enable = true; - } - // (lib.optionalAttrs (options ? boot.kernelModules) { - boot = { - kernelParams = ["acpi_enforce_resources=lax"]; - extraModulePackages = with config.boot.kernelPackages; [liquidtux it87]; - kernelModules = ["v4l2loopback" "it87"]; - extraModprobeConfig = lib.mkIf (config.mods.fancontrol.forceId != null) '' - options it87 ${config.mods.fancontrol.forceId} - ''; - }; - }) - ); -} +{ + lib, + config, + options, + ... +}: { + options.mods.fancontrol = { + enable = lib.mkOption { + default = false; + example = true; + type = lib.types.bool; + description = "Enables fancontrol-gui with needed drivers"; + }; + forceId = lib.mkOption { + default = null; + example = "force_id=0x8628"; + type = with lib.types; nullOr str; + description = "Modprobe options for the it87 driver. Information at: https://wiki.archlinux.org/title/Lm_sensors#Gigabyte_B250/Z370/B450M/B560M/B660M/Z690/B550_motherboards"; + }; + }; + config = lib.mkIf config.mods.fancontrol.enable ( + lib.optionalAttrs (options ? home.packages) { + programs.fancontrol-gui.enable = true; + } + // (lib.optionalAttrs (options ? boot.kernelModules) { + boot = { + kernelParams = ["acpi_enforce_resources=lax"]; + extraModulePackages = with config.boot.kernelPackages; [liquidtux it87]; + kernelModules = ["v4l2loopback" "it87"]; + extraModprobeConfig = lib.mkIf (config.mods.fancontrol.forceId != null) '' + options it87 ${config.mods.fancontrol.forceId} + ''; + }; + }) + ); +} diff --git a/modules/programs/fastfetch.nix b/modules/programs/fastfetch.nix index 9652bf3..71b6218 100644 --- a/modules/programs/fastfetch.nix +++ b/modules/programs/fastfetch.nix @@ -1,66 +1,73 @@ { + mkDashDefault, pkgs, lib, options, config, ... }: { - options.mods = { - dashfetch = lib.mkOption { + options.mods.dashfetch = { + enable = lib.mkOption { default = true; example = false; type = lib.types.bool; description = "A custom configuration for fastfetch"; }; + modules = lib.mkOption { + default = [ + "title" + "separator" + { + type = "os"; + key = "OS"; + format = "DashNix ({name} {version})"; + } + "host" + "kernel" + "uptime" + "packages" + "shell" + "display" + "de" + "wm" + "wmtheme" + "theme" + "icons" + "font" + "cursor" + "terminal" + "terminalfont" + "cpu" + "gpu" + "memory" + "swap" + "disk" + "localip" + "battery" + "poweradapter" + "locale" + "break" + "colors" + ]; + example = []; + type = with lib.types; listOf anything; + description = "modules for fastfetch"; + }; }; config = lib.optionalAttrs (options ? home.packages) { - xdg.configFile."fastfetch/config.jsonc" = lib.mkIf (config.mods.dashfetch) { + xdg.configFile."fastfetch/config.jsonc" = lib.mkIf (config.mods.dashfetch.enable) { source = (pkgs.formats.json {}).generate "config.jsonc" { "$schema" = "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json"; logo = { - type = "kitty"; - source = ../../assets/logo2.png; - width = 35; - padding = { - top = 1; + type = mkDashDefault "kitty"; + source = mkDashDefault ../../assets/logo2.png; + width = mkDashDefault 35; + padding = mkDashDefault { + top = mkDashDefault 1; }; }; - modules = [ - "title" - "separator" - { - type = "os"; - key = "OS"; - format = "DashNix ({name} {version})"; - } - "host" - "kernel" - "uptime" - "packages" - "shell" - "display" - "de" - "wm" - "wmtheme" - "theme" - "icons" - "font" - "cursor" - "terminal" - "terminalfont" - "cpu" - "gpu" - "memory" - "swap" - "disk" - "localip" - "battery" - "poweradapter" - "locale" - "break" - "colors" - ]; + modules = config.mods.dashfetch.modules; }; }; }; diff --git a/modules/programs/gaming.nix b/modules/programs/gaming.nix index 2e235bc..17157ae 100644 --- a/modules/programs/gaming.nix +++ b/modules/programs/gaming.nix @@ -1,4 +1,5 @@ { + mkDashDefault, lib, config, options, @@ -76,27 +77,27 @@ boot.kernelPackages = lib.mkForce pkgs.linuxPackages_cachyos; programs = { - steam.enable = config.mods.gaming.steam; + steam.enable = mkDashDefault config.mods.gaming.steam; gamemode.enable = true; gamemode = { - enableRenice = true; + enableRenice = mkDashDefault true; settings = { general = { - desiredgov = "performance"; + desiredgov = mkDashDefault "performance"; }; cpu = { - pin_cores = config.mods.gaming.pinCores; - park_cores = config.mods.gaming.parkCores; + pin_cores = mkDashDefault config.mods.gaming.pinCores; + park_cores = mkDashDefault config.mods.gaming.parkCores; }; gpu = lib.mkIf config.mods.gaming.gpuOptimization { - apply_gpu_optimisations = "accept-responsibility"; - gpu_device = config.mods.gaming.gpuDevice; - amd_performance_level = "high"; - nv_powermizer_mode = 1; + apply_gpu_optimisations = mkDashDefault "accept-responsibility"; + gpu_device = mkDashDefault config.mods.gaming.gpuDevice; + amd_performance_level = mkDashDefault "high"; + nv_powermizer_mode = mkDashDefault 1; }; custom = { - start = "notify-send -a 'Gamemode' 'Optimizations activated'"; - end = "notify-send -a 'Gamemode' 'Optimizations deactivated'"; + start = mkDashDefault "notify-send -a 'Gamemode' 'Optimizations activated'"; + end = mkDashDefault "notify-send -a 'Gamemode' 'Optimizations deactivated'"; }; }; }; diff --git a/modules/programs/gpu.nix b/modules/programs/gpu.nix index 9bc2a4a..5cd26bf 100644 --- a/modules/programs/gpu.nix +++ b/modules/programs/gpu.nix @@ -67,16 +67,16 @@ environment.variables = if (config.mods.gpu.amdgpu.enable && config.mods.gpu.vapi.rocm.enable) then { - RUSTICL_ENABLE = "radeonsi"; + RUSTICL_ENABLE = mkDashDefault "radeonsi"; } else {}; hardware = { nvidia = lib.mkIf config.mods.gpu.nvidia.enable { - modesetting.enable = true; - open = true; - nvidiaSettings = true; - package = config.boot.kernelPackages.nvidiaPackages.beta; + modesetting.enable = mkDashDefault true; + open = mkDashDefault true; + nvidiaSettings = mkDashDefault true; + package = mkDashDefault config.boot.kernelPackages.nvidiaPackages.beta; }; graphics = let amdPackages = [ diff --git a/modules/programs/greetd.nix b/modules/programs/greetd.nix index 01c13a3..064f61b 100644 --- a/modules/programs/greetd.nix +++ b/modules/programs/greetd.nix @@ -1,4 +1,5 @@ { + mkDashDefault, config, lib, inputs, @@ -17,7 +18,7 @@ ''; }; monitor = lib.mkOption { - default = "${config.conf.defaultMonitor}"; + default = "${config.mods.hypr.hyprland.defaultMonitor}"; example = "eDP-1"; type = lib.types.str; description = '' @@ -26,7 +27,7 @@ ''; }; scale = lib.mkOption { - default = "${config.conf.defaultMonitorScale}"; + default = "${config.mods.hypr.hyprland.defaultMonitorScale}"; example = "1.5"; type = lib.types.str; description = '' @@ -45,7 +46,7 @@ description = "The compositor/greeter command to run"; }; resolution = lib.mkOption { - default = "${config.conf.defaultMonitorMode}"; + default = "${config.mods.hypr.hyprland.defaultMonitorMode}"; example = "3440x1440@180"; type = lib.types.str; description = '' @@ -86,16 +87,16 @@ lib.mkIf config.mods.greetd.enable ( lib.optionalAttrs (options ? environment) { # greetd display manager - programs.hyprland.enable = true; + programs.hyprland.enable = mkDashDefault true; services = { displayManager.sessionPackages = config.mods.greetd.environments; greetd = { enable = true; settings = { - terminal.vt = 1; + terminal.vt = mkDashDefault 1; default_session = { - command = config.mods.greetd.greeterCommand; - user = username; + command = mkDashDefault config.mods.greetd.greeterCommand; + user = mkDashDefault username; }; }; }; @@ -129,9 +130,9 @@ ''; # unlock GPG keyring on login - security.pam.services.greetd.enableGnomeKeyring = true; - security.pam.services.greetd.sshAgentAuth = true; - security.pam.sshAgentAuth.enable = true; + security.pam.services.greetd.enableGnomeKeyring = mkDashDefault true; + security.pam.services.greetd.sshAgentAuth = mkDashDefault true; + security.pam.sshAgentAuth.enable = mkDashDefault true; } // lib.optionalAttrs (options ? home) { xdg.configFile."regreet/regreet.toml".source = diff --git a/modules/programs/hyprland/default.nix b/modules/programs/hypr/default.nix similarity index 69% rename from modules/programs/hyprland/default.nix rename to modules/programs/hypr/default.nix index a181f64..68b88ea 100644 --- a/modules/programs/hyprland/default.nix +++ b/modules/programs/hypr/default.nix @@ -1,8 +1,6 @@ { imports = [ ./hyprland.nix - ./anyrun.nix - ./ironbar.nix ./hyprlock.nix ./hyprpaper.nix ]; diff --git a/modules/programs/hyprland/hyprland.nix b/modules/programs/hypr/hyprland.nix similarity index 76% rename from modules/programs/hyprland/hyprland.nix rename to modules/programs/hypr/hyprland.nix index 5c1fe9a..676b567 100644 --- a/modules/programs/hyprland/hyprland.nix +++ b/modules/programs/hypr/hyprland.nix @@ -1,410 +1,442 @@ -{ - mkDashDefault, - config, - lib, - options, - pkgs, - inputs, - ... -}: let - browserName = - if (builtins.isString config.mods.homePackages.browser) - then config.mods.homePackages.browser - else if config.mods.homePackages.browser ? meta && config.mods.homePackages.browser.meta ? mainProgram - then config.mods.homePackages.browser.meta.mainProgram - else config.mods.homePackages.browser.pname; -in { - options.mods.hyprland = { - enable = lib.mkOption { - default = true; - example = false; - type = lib.types.bool; - description = '' - Enable Hyprland - ''; - }; - monitor = lib.mkOption { - default = [ - # main monitor - "${config.conf.defaultMonitor},${config.conf.defaultMonitorMode},0x0,${config.conf.defaultMonitorScale}" - # all others - ]; - example = ["DP-1,3440x1440@180,2560x0,1,vrr,0"]; - type = with lib.types; listOf str; - description = '' - The monitor configuration for hyprland. - ''; - }; - workspace = lib.mkOption { - default = []; - example = ["2,monitor:DP-1, default:true"]; - type = with lib.types; listOf str; - description = '' - The workspace configuration for hyprland. - ''; - }; - noAtomic = lib.mkOption { - default = false; - example = true; - type = lib.types.bool; - description = '' - Use tearing - ''; - }; - extraAutostart = lib.mkOption { - default = []; - example = ["your application"]; - type = lib.types.listOf lib.types.str; - description = '' - Extra exec_once. - ''; - }; - useDefaultConfig = lib.mkOption { - default = true; - example = false; - type = lib.types.bool; - description = '' - Use preconfigured Hyprland config. - ''; - }; - customConfig = lib.mkOption { - default = {}; - example = {}; - type = with lib.types; attrsOf anything; - description = '' - Custom Hyprland configuration. - Will be merged with default configuration if enabled. - ''; - }; - plugins = lib.mkOption { - default = []; - example = []; - type = with lib.types; listOf package; - description = '' - Plugins to be added to Hyprland. - ''; - }; - pluginConfig = lib.mkOption { - default = {}; - example = {}; - type = with lib.types; attrsOf anything; - description = '' - Plugin configuration to be added to Hyprland. - ''; - }; - hyprspaceEnable = lib.mkOption { - default = false; - type = lib.types.bool; - example = true; - description = '' - Enables Hyprspace plugin for hyprland. - Please note, plugins tend to break VERY often. - ''; - }; - }; - - config = lib.mkIf config.mods.hyprland.enable ( - lib.optionalAttrs (options ? wayland.windowManager.hyprland) { - # install Hyprland related packages - home.packages = with pkgs; [ - xorg.xprop - grim - slurp - satty - xdg-desktop-portal-gtk - # xdg-desktop-portal-hyprland - copyq - wl-clipboard - hyprcursor - hyprpicker - ]; - - wayland.windowManager.hyprland = { - enable = true; - settings = - if config.mods.hyprland.useDefaultConfig - then - lib.mkMerge - [ - { - "$mod" = "SUPER"; - - bindm = [ - "$mod, mouse:272, movewindow" - "$mod, mouse:273, resizeactive" - ]; - - bind = [ - # screenshots - ''$mod SUPER,S,exec,grim -g "$(slurp)" - | wl-copy'' - ''$mod SUPERSHIFT,S,exec,grim -g "$(slurp)" - | satty -f -'' - ''$mod SUPERSHIFTALT,S,exec,grim -c -g "2560,0 3440x1440" - | wl-copy'' - - # regular programs - "$mod SUPER,F,exec,${browserName}" - (lib.mkIf ( - browserName == "firefox" || browserName == "zen" - ) "$mod SUPERSHIFT,F,exec,${browserName} -p special") - "$mod SUPER,T,exec,kitty -1" - "$mod SUPER,E,exec,nautilus -w" - "$mod SUPER,N,exec,neovide" - (lib.mkIf (config.mods.hyprland.anyrun.enable) "$mod SUPER,R,exec,anyrun") - (lib.mkIf (config.mods.oxi.oxirun.enable) "$mod SUPER,R,exec,oxirun") - (lib.mkIf (config.mods.oxi.oxidash.enable) "$mod SUPER,M,exec,oxidash") - (lib.mkIf (config.mods.oxi.oxicalc.enable) "$mod SUPER,G,exec,oxicalc") - (lib.mkIf (config.mods.oxi.oxishut.enable) "$mod SUPER,D,exec,oxishut") - (lib.mkIf (config.mods.oxi.oxipaste.enable) "$mod SUPER,A,exec,oxipaste-iced") - (lib.mkIf (config.mods.oxi.hyprdock.enable) "$mod SUPERSHIFT,P,exec,hyprdock --gui") - "$mod SUPERSHIFT,L,exec, playerctl -a pause & hyprlock & systemctl suspend" - "$mod SUPERSHIFT,K,exec, playerctl -a pause & hyprlock & systemctl hibernate" - - # media keys - (lib.mkIf config.mods.scripts.audioControl ",XF86AudioMute,exec, audioControl mute") - (lib.mkIf config.mods.scripts.audioControl ",XF86AudioLowerVolume,exec, audioControl sink -5%") - (lib.mkIf config.mods.scripts.audioControl ",XF86AudioRaiseVolume,exec, audioControl sink +5%") - ",XF86AudioPlay,exec, playerctl play-pause" - ",XF86AudioNext,exec, playerctl next" - ",XF86AudioPrev,exec, playerctl previous" - (lib.mkIf config.mods.scripts.changeBrightness ",XF86MonBrightnessDown,exec, changeBrightness brightness 10%-") - (lib.mkIf config.mods.scripts.changeBrightness ",XF86MonBrightnessUp,exec, changeBrightness brightness +10%") - - # hyprland keybinds - # misc - "$mod SUPER,V,togglefloating," - "$mod SUPER,B,fullscreen," - "$mod SUPER,C,togglesplit" - "$mod SUPER,Q,killactive," - "$mod SUPERSHIFTALT,M,exit," - "$mod SUPERSHIFT,W,togglespecialworkspace" - - # move - "$mod SUPER,left,movewindow,l" - "$mod SUPER,right,movewindow,r" - "$mod SUPER,up,movewindow,u" - "$mod SUPER,down,movewindow,d" - - # workspaces - "$mod SUPER,1,workspace,1" - "$mod SUPER,2,workspace,2" - "$mod SUPER,3,workspace,3" - "$mod SUPER,4,workspace,4" - "$mod SUPER,5,workspace,5" - "$mod SUPER,6,workspace,6" - "$mod SUPER,7,workspace,7" - "$mod SUPER,8,workspace,8" - "$mod SUPER,9,workspace,9" - "$mod SUPER,0,workspace,10" - - # move to workspace - "$mod SUPERSHIFT,1,movetoworkspace,1" - "$mod SUPERSHIFT,2,movetoworkspace,2" - "$mod SUPERSHIFT,3,movetoworkspace,3" - "$mod SUPERSHIFT,4,movetoworkspace,4" - "$mod SUPERSHIFT,5,movetoworkspace,5" - "$mod SUPERSHIFT,6,movetoworkspace,6" - "$mod SUPERSHIFT,7,movetoworkspace,7" - "$mod SUPERSHIFT,8,movetoworkspace,8" - "$mod SUPERSHIFT,9,movetoworkspace,9" - "$mod SUPERSHIFT,0,movetoworkspace,10" - - # move to workspace silent - "$mod SUPERSHIFTALT,1,movetoworkspacesilent,1" - "$mod SUPERSHIFTALT,2,movetoworkspacesilent,2" - "$mod SUPERSHIFTALT,3,movetoworkspacesilent,3" - "$mod SUPERSHIFTALT,4,movetoworkspacesilent,4" - "$mod SUPERSHIFTALT,5,movetoworkspacesilent,5" - "$mod SUPERSHIFTALT,6,movetoworkspacesilent,6" - "$mod SUPERSHIFTALT,7,movetoworkspacesilent,7" - "$mod SUPERSHIFTALT,8,movetoworkspacesilent,8" - "$mod SUPERSHIFTALT,9,movetoworkspacesilent,9" - "$mod SUPERSHIFTALT,0,movetoworkspacesilent,10" - - # preselection - "$mod SUPERALT,j,layoutmsg,preselect l" - "$mod SUPERALT,k,layoutmsg,preselect d" - "$mod SUPERALT,l,layoutmsg,preselect u" - "$mod SUPERALT,semicolon,layoutmsg,preselect r" - "$mod SUPERALT,h,layoutmsg,preselect n" - ]; - - binde = [ - # hyprland keybinds - # focus - "$mod SUPER,J,movefocus,l" - "$mod SUPER,semicolon,movefocus,r" - "$mod SUPER,L,movefocus,u" - "$mod SUPER,K,movefocus,d" - - # resize - "$mod SUPER,U,resizeactive,-20 0" - "$mod SUPER,P,resizeactive,20 0" - "$mod SUPER,O,resizeactive,0 -20" - "$mod SUPER,I,resizeactive,0 20" - ]; - - general = { - gaps_out = "3,5,5,5"; - border_size = 3; - "col.active_border" = lib.mkOverride 51 "0xFFFF0000 0xFF00FF00 0xFF0000FF 45deg"; - # "col.inactive_border" = "0x66333333"; - allow_tearing = lib.mkIf config.mods.hyprland.noAtomic true; - }; - - decoration = { - rounding = 4; - }; - - render = { - direct_scanout = mkDashDefault config.mods.gaming.enable; - }; - - animations = { - bezier = "penguin,0.05,0.9,0.1,1.0"; - animation = [ - "windowsMove,1,4,default" - "windows,1,7,default,popin 70%" - "windowsOut,1,7,default,popin 70%" - "border,1,10,default" - "fade,1,7,default" - "workspaces,1,6,default" - "layers,1,3,default,popin" - ]; - }; - - dwindle = { - preserve_split = true; - pseudotile = 0; - permanent_direction_override = false; - }; - - input = { - kb_layout = "${config.mods.xkb.layout}"; - kb_variant = "${config.mods.xkb.variant}"; - repeat_delay = 200; - force_no_accel = true; - touchpad = { - natural_scroll = true; - tap-to-click = true; - tap-and-drag = true; - }; - }; - - misc = { - animate_manual_resizes = 1; - enable_swallow = true; - disable_splash_rendering = true; - disable_hyprland_logo = true; - swallow_regex = "^(.*)(kitty)(.*)$"; - initial_workspace_tracking = 1; - # just doesn't work - enable_anr_dialog = false; - }; - - cursor = { - enable_hyprcursor = true; - no_hardware_cursors = mkDashDefault ( - if config.mods.gpu.nvidia.enable - then 2 - else 0 - ); - # done with nix, this would break the current setup otherwise - sync_gsettings_theme = false; - }; - - gestures = { - workspace_swipe = true; - }; - - monitor = config.mods.hyprland.monitor; - workspace = config.mods.hyprland.workspace; - - env = [ - "GTK_CSD,0" - ''TERM,"kitty /bin/fish"'' - "XDG_CURRENT_DESKTOP=Hyprland" - "XDG_SESSION_TYPE=wayland" - "XDG_SESSION_DESKTOP=Hyprland" - "HYPRCURSOR_THEME,${config.mods.stylix.cursor.name}" - "HYPRCURSOR_SIZE,${toString config.mods.stylix.cursor.size}" - "XCURSOR_THEME,${config.mods.stylix.cursor.name}" - "XCURSOR_SIZE,${toString config.mods.stylix.cursor.size}" - "QT_QPA_PLATFORM,wayland" - "QT_QPA_PLATFORMTHEME,qt5ct" - "QT_WAYLAND_FORCE_DPI,96" - "QT_AUTO_SCREEN_SCALE_FACTOR,0" - "QT_WAYLAND_DISABLE_WINDOWDECORATION,1" - "QT_SCALE_FACTOR,1" - ''EDITOR,"neovide --novsync --nofork"'' - (lib.mkIf config.mods.hyprland.noAtomic "WLR_DRM_NO_ATOMIC,1") - "GTK_USE_PORTAL, 1" - - (lib.mkIf config.mods.gpu.nvidia.enable "LIBVA_DRIVER_NAME,nvidia") - (lib.mkIf config.mods.gpu.nvidia.enable "XDG_SESSION_TYPE,wayland") - (lib.mkIf config.mods.gpu.nvidia.enable "GBM_BACKEND,nvidia-drm") - (lib.mkIf config.mods.gpu.nvidia.enable "__GLX_VENDOR_LIBRARY_NAME,nvidia") - ]; - - layerrule = [ - # layer rules - # mainly to disable animations within slurp and grim - "noanim, selection" - ]; - - windowrule = [ - # window rules - "float,class:^(.*)(OxiCalc)(.*)$" - "float,class:^(.*)(winecfg.exe)(.*)$" - "float,class:^(.*)(copyq)(.*)$" - "center,class:^(.*)(swappy)(.*)$" - "float,title:^(.*)(reset)(.*)$" - "workspace 10 silent,class:^(.*)(steam)(.*)$" - "workspace 9 silent,class:^(.*)(dota)(.*)$" - "workspace 9 silent,class:^(.*)(battlebits)(.*)$" - "workspace 9 silent,class:^(.*)(aoe)(.*)$" - "suppressevent fullscreen maximize,class:^(.*)(neovide)(.*)$" - "immediate,class:^(.*)(Pal)$" - "immediate,class:^(.*)(dota2)$" - "immediate,class:^(.*)(needforspeedheat.exe)$" - ]; - - exec-once = - [ - # environment - "systemctl --user import-environment" - "dbus-update-activation-environment --systemd --all" - "hyprctl setcursor Bibata-Modern-Classic 24" - - # other programs - "hyprpaper" - "ironbar" - "${browserName}" - "oxipaste_daemon" - "oxinoti" - ] - ++ config.mods.hyprland.extraAutostart; - - plugin = - lib.mkMerge - [ - { - hyprspace = lib.mkIf config.mods.hyprland.hyprspaceEnable { - bind = [ - "SUPER, W, overview:toggle, toggle" - ]; - }; - } - config.mods.hyprland.pluginConfig - ]; - } - config.mods.hyprland.customConfig - ] - else lib.mkForce config.mods.hyprland.customConfig; - plugins = - [ - (lib.mkIf config.mods.hyprland.hyprspaceEnable inputs.Hyprspace.packages.${pkgs.system}.Hyprspace) - ] - ++ config.mods.hyprland.plugins; - }; - } - ); -} +{ + mkDashDefault, + config, + lib, + options, + pkgs, + inputs, + ... +}: let + browserName = + if (builtins.isString config.mods.homePackages.browser) + then config.mods.homePackages.browser + else if config.mods.homePackages.browser ? meta && config.mods.homePackages.browser.meta ? mainProgram + then config.mods.homePackages.browser.meta.mainProgram + else config.mods.homePackages.browser.pname; +in { + options.mods.hypr.hyprland = { + enable = lib.mkOption { + default = true; + example = false; + type = lib.types.bool; + description = '' + Enable Hyprland + ''; + }; + defaultMonitor = lib.mkOption { + default = ""; + example = "eDP-1"; + type = lib.types.str; + description = '' + main monitor + ''; + }; + defaultMonitorMode = lib.mkOption { + default = ""; + example = "3440x1440@180"; + type = lib.types.str; + description = '' + main monitor mode: width x height @ refreshrate + ''; + }; + defaultMonitorScale = lib.mkOption { + default = "1"; + example = "1.5"; + type = lib.types.str; + description = '' + main monitor scaling + ''; + }; + monitor = lib.mkOption { + default = [ + # main monitor + "${config.mods.hypr.hyprland.defaultMonitor},${config.mods.hypr.hyprland.defaultMonitorMode},0x0,${config.mods.hypr.hyprland.defaultMonitorScale}" + # all others + ]; + example = ["DP-1,3440x1440@180,2560x0,1,vrr,0"]; + type = with lib.types; listOf str; + description = '' + The monitor configuration for hyprland. + ''; + }; + workspace = lib.mkOption { + default = []; + example = ["2,monitor:DP-1, default:true"]; + type = with lib.types; listOf str; + description = '' + The workspace configuration for hyprland. + ''; + }; + noAtomic = lib.mkOption { + default = false; + example = true; + type = lib.types.bool; + description = '' + Use tearing + ''; + }; + extraAutostart = lib.mkOption { + default = []; + example = ["your application"]; + type = lib.types.listOf lib.types.str; + description = '' + Extra exec_once. + ''; + }; + useIronbar = lib.mkOption { + default = true; + example = false; + type = lib.types.bool; + description = '' + Whether to use ironbar in hyprland. + ''; + }; + useDefaultConfig = lib.mkOption { + default = true; + example = false; + type = lib.types.bool; + description = '' + Use preconfigured Hyprland config. + ''; + }; + customConfig = lib.mkOption { + default = {}; + example = {}; + type = with lib.types; attrsOf anything; + description = '' + Custom Hyprland configuration. + Will be merged with default configuration if enabled. + ''; + }; + plugins = lib.mkOption { + default = []; + example = []; + type = with lib.types; listOf package; + description = '' + Plugins to be added to Hyprland. + ''; + }; + pluginConfig = lib.mkOption { + default = {}; + example = {}; + type = with lib.types; attrsOf anything; + description = '' + Plugin configuration to be added to Hyprland. + ''; + }; + hyprspaceEnable = lib.mkOption { + default = false; + type = lib.types.bool; + example = true; + description = '' + Enables Hyprspace plugin for hyprland. + Please note, plugins tend to break VERY often. + ''; + }; + }; + + config = lib.mkIf config.mods.hypr.hyprland.enable ( + lib.optionalAttrs (options ? wayland.windowManager.hyprland) { + # install Hyprland related packages + home.packages = with pkgs; [ + xorg.xprop + grim + slurp + satty + xdg-desktop-portal-gtk + # xdg-desktop-portal-hyprland + copyq + wl-clipboard + hyprcursor + hyprpicker + ]; + + wayland.windowManager.hyprland = { + enable = true; + settings = + if config.mods.hypr.hyprland.useDefaultConfig + then + lib.mkMerge + [ + { + "$mod" = mkDashDefault "SUPER"; + + bindm = [ + "$mod, mouse:272, movewindow" + "$mod, mouse:273, resizeactive" + ]; + + bind = [ + # screenshots + ''$mod SUPER,S,exec,grim -g "$(slurp)" - | wl-copy'' + ''$mod SUPERSHIFT,S,exec,grim -g "$(slurp)" - | satty -f -'' + ''$mod SUPERSHIFTALT,S,exec,grim -c -g "2560,0 3440x1440" - | wl-copy'' + + # regular programs + "$mod SUPER,F,exec,${browserName}" + (lib.mkIf ( + browserName == "firefox" || browserName == "zen" + ) "$mod SUPERSHIFT,F,exec,${browserName} -p special") + "$mod SUPER,T,exec,kitty -1" + "$mod SUPER,E,exec,nautilus -w" + "$mod SUPER,N,exec,neovide" + (lib.mkIf (config.mods.anyrun.enable) "$mod SUPER,R,exec,anyrun") + (lib.mkIf (config.mods.oxi.oxirun.enable) "$mod SUPER,R,exec,oxirun") + (lib.mkIf (config.mods.oxi.oxidash.enable) "$mod SUPER,M,exec,oxidash") + (lib.mkIf (config.mods.oxi.oxicalc.enable) "$mod SUPER,G,exec,oxicalc") + (lib.mkIf (config.mods.oxi.oxishut.enable) "$mod SUPER,D,exec,oxishut") + (lib.mkIf (config.mods.oxi.oxipaste.enable) "$mod SUPER,A,exec,oxipaste-iced") + (lib.mkIf (config.mods.oxi.hyprdock.enable) "$mod SUPERSHIFT,P,exec,hyprdock --gui") + (lib.mkIf (config.mods.hypr.hyprlock.enable) "$mod SUPERSHIFT,L,exec, playerctl -a pause & hyprlock & systemctl suspend") + (lib.mkIf (config.mods.hypr.hyprlock.enable) "$mod SUPERSHIFT,K,exec, playerctl -a pause & hyprlock & systemctl hibernate") + + # media keys + (lib.mkIf config.mods.scripts.audioControl ",XF86AudioMute,exec, audioControl mute") + (lib.mkIf config.mods.scripts.audioControl ",XF86AudioLowerVolume,exec, audioControl sink -5%") + (lib.mkIf config.mods.scripts.audioControl ",XF86AudioRaiseVolume,exec, audioControl sink +5%") + ",XF86AudioPlay,exec, playerctl play-pause" + ",XF86AudioNext,exec, playerctl next" + ",XF86AudioPrev,exec, playerctl previous" + (lib.mkIf config.mods.scripts.changeBrightness ",XF86MonBrightnessDown,exec, changeBrightness brightness 10%-") + (lib.mkIf config.mods.scripts.changeBrightness ",XF86MonBrightnessUp,exec, changeBrightness brightness +10%") + + # hyprland keybinds + # misc + "$mod SUPER,V,togglefloating," + "$mod SUPER,B,fullscreen," + "$mod SUPER,C,togglesplit" + "$mod SUPER,Q,killactive," + "$mod SUPERSHIFTALT,M,exit," + "$mod SUPERSHIFT,W,togglespecialworkspace" + + # move + "$mod SUPER,left,movewindow,l" + "$mod SUPER,right,movewindow,r" + "$mod SUPER,up,movewindow,u" + "$mod SUPER,down,movewindow,d" + + # workspaces + "$mod SUPER,1,workspace,1" + "$mod SUPER,2,workspace,2" + "$mod SUPER,3,workspace,3" + "$mod SUPER,4,workspace,4" + "$mod SUPER,5,workspace,5" + "$mod SUPER,6,workspace,6" + "$mod SUPER,7,workspace,7" + "$mod SUPER,8,workspace,8" + "$mod SUPER,9,workspace,9" + "$mod SUPER,0,workspace,10" + + # move to workspace + "$mod SUPERSHIFT,1,movetoworkspace,1" + "$mod SUPERSHIFT,2,movetoworkspace,2" + "$mod SUPERSHIFT,3,movetoworkspace,3" + "$mod SUPERSHIFT,4,movetoworkspace,4" + "$mod SUPERSHIFT,5,movetoworkspace,5" + "$mod SUPERSHIFT,6,movetoworkspace,6" + "$mod SUPERSHIFT,7,movetoworkspace,7" + "$mod SUPERSHIFT,8,movetoworkspace,8" + "$mod SUPERSHIFT,9,movetoworkspace,9" + "$mod SUPERSHIFT,0,movetoworkspace,10" + + # move to workspace silent + "$mod SUPERSHIFTALT,1,movetoworkspacesilent,1" + "$mod SUPERSHIFTALT,2,movetoworkspacesilent,2" + "$mod SUPERSHIFTALT,3,movetoworkspacesilent,3" + "$mod SUPERSHIFTALT,4,movetoworkspacesilent,4" + "$mod SUPERSHIFTALT,5,movetoworkspacesilent,5" + "$mod SUPERSHIFTALT,6,movetoworkspacesilent,6" + "$mod SUPERSHIFTALT,7,movetoworkspacesilent,7" + "$mod SUPERSHIFTALT,8,movetoworkspacesilent,8" + "$mod SUPERSHIFTALT,9,movetoworkspacesilent,9" + "$mod SUPERSHIFTALT,0,movetoworkspacesilent,10" + + # preselection + "$mod SUPERALT,j,layoutmsg,preselect l" + "$mod SUPERALT,k,layoutmsg,preselect d" + "$mod SUPERALT,l,layoutmsg,preselect u" + "$mod SUPERALT,semicolon,layoutmsg,preselect r" + "$mod SUPERALT,h,layoutmsg,preselect n" + ]; + + binde = [ + # hyprland keybinds + # focus + "$mod SUPER,J,movefocus,l" + "$mod SUPER,semicolon,movefocus,r" + "$mod SUPER,L,movefocus,u" + "$mod SUPER,K,movefocus,d" + + # resize + "$mod SUPER,U,resizeactive,-20 0" + "$mod SUPER,P,resizeactive,20 0" + "$mod SUPER,O,resizeactive,0 -20" + "$mod SUPER,I,resizeactive,0 20" + ]; + + general = { + gaps_out = mkDashDefault "3,5,5,5"; + border_size = mkDashDefault 3; + "col.active_border" = lib.mkOverride 51 "0xFFFF0000 0xFF00FF00 0xFF0000FF 45deg"; + # "col.inactive_border" = "0x66333333"; + allow_tearing = lib.mkIf config.mods.hypr.hyprland.noAtomic true; + }; + + decoration = { + rounding = mkDashDefault 4; + }; + + render = { + direct_scanout = mkDashDefault config.mods.gaming.enable; + }; + + animations = { + bezier = mkDashDefault "penguin,0.05,0.9,0.1,1.0"; + animation = [ + "windowsMove,1,4,default" + "windows,1,7,default,popin 70%" + "windowsOut,1,7,default,popin 70%" + "border,1,10,default" + "fade,1,7,default" + "workspaces,1,6,default" + "layers,1,3,default,popin" + ]; + }; + + dwindle = { + preserve_split = mkDashDefault true; + pseudotile = mkDashDefault 0; + permanent_direction_override = mkDashDefault false; + }; + + input = { + kb_layout = mkDashDefault "${config.mods.xkb.layout}"; + kb_variant = mkDashDefault "${config.mods.xkb.variant}"; + repeat_delay = mkDashDefault 200; + force_no_accel = mkDashDefault true; + touchpad = { + natural_scroll = mkDashDefault true; + tap-to-click = mkDashDefault true; + tap-and-drag = mkDashDefault true; + }; + }; + + misc = { + animate_manual_resizes = mkDashDefault 1; + enable_swallow = mkDashDefault true; + disable_splash_rendering = mkDashDefault true; + disable_hyprland_logo = mkDashDefault true; + swallow_regex = mkDashDefault "^(.*)(kitty)(.*)$"; + initial_workspace_tracking = mkDashDefault 1; + # just doesn't work + enable_anr_dialog = false; + }; + + cursor = { + enable_hyprcursor = mkDashDefault true; + no_hardware_cursors = mkDashDefault ( + if config.mods.gpu.nvidia.enable + then 2 + else 0 + ); + # done with nix, this would break the current setup otherwise + sync_gsettings_theme = mkDashDefault false; + }; + + gestures = { + workspace_swipe = mkDashDefault true; + }; + + monitor = mkDashDefault config.mods.hypr.hyprland.monitor; + workspace = mkDashDefault config.mods.hypr.hyprland.workspace; + + env = [ + "GTK_CSD,0" + ''TERM,"kitty /bin/fish"'' + "XDG_CURRENT_DESKTOP=Hyprland" + "XDG_SESSION_TYPE=wayland" + "XDG_SESSION_DESKTOP=Hyprland" + "HYPRCURSOR_THEME,${config.mods.stylix.cursor.name}" + "HYPRCURSOR_SIZE,${toString config.mods.stylix.cursor.size}" + "XCURSOR_THEME,${config.mods.stylix.cursor.name}" + "XCURSOR_SIZE,${toString config.mods.stylix.cursor.size}" + "QT_QPA_PLATFORM,wayland" + "QT_QPA_PLATFORMTHEME,qt5ct" + "QT_WAYLAND_FORCE_DPI,96" + "QT_AUTO_SCREEN_SCALE_FACTOR,0" + "QT_WAYLAND_DISABLE_WINDOWDECORATION,1" + "QT_SCALE_FACTOR,1" + ''EDITOR,"neovide --novsync --nofork"'' + (lib.mkIf config.mods.hypr.hyprland.noAtomic "WLR_DRM_NO_ATOMIC,1") + "GTK_USE_PORTAL, 1" + + (lib.mkIf config.mods.gpu.nvidia.enable "LIBVA_DRIVER_NAME,nvidia") + (lib.mkIf config.mods.gpu.nvidia.enable "XDG_SESSION_TYPE,wayland") + (lib.mkIf config.mods.gpu.nvidia.enable "GBM_BACKEND,nvidia-drm") + (lib.mkIf config.mods.gpu.nvidia.enable "__GLX_VENDOR_LIBRARY_NAME,nvidia") + ]; + + layerrule = [ + # layer rules + # mainly to disable animations within slurp and grim + "noanim, selection" + ]; + + windowrule = [ + # window rules + "float,class:^(.*)(OxiCalc)(.*)$" + "float,class:^(.*)(winecfg.exe)(.*)$" + "float,class:^(.*)(copyq)(.*)$" + "center,class:^(.*)(swappy)(.*)$" + "float,title:^(.*)(reset)(.*)$" + "workspace 10 silent,class:^(.*)(steam)(.*)$" + "workspace 9 silent,class:^(.*)(dota)(.*)$" + "workspace 9 silent,class:^(.*)(battlebits)(.*)$" + "workspace 9 silent,class:^(.*)(aoe)(.*)$" + "suppressevent fullscreen maximize,class:^(.*)(neovide)(.*)$" + "immediate,class:^(.*)(Pal)$" + "immediate,class:^(.*)(dota2)$" + "immediate,class:^(.*)(needforspeedheat.exe)$" + ]; + + exec-once = + [ + # environment + "systemctl --user import-environment" + "dbus-update-activation-environment --systemd --all" + "hyprctl setcursor Bibata-Modern-Classic 24" + + # other programs + "${browserName}" + (lib.mkIf config.mods.hypr.hyprpaper.enable "hyprpaper") + (lib.mkIf config.mods.hypr.hyprland.useIronbar "ironbar") + (lib.mkIf config.mods.oxi.oxipaste.enable "oxipaste_daemon") + (lib.mkIf config.mods.oxi.oxinoti.enable "oxinoti") + ] + ++ config.mods.hypr.hyprland.extraAutostart; + + plugin = + lib.mkMerge + [ + { + hyprspace = lib.mkIf config.mods.hypr.hyprland.hyprspaceEnable { + bind = [ + "SUPER, W, overview:toggle, toggle" + ]; + }; + } + config.mods.hypr.hyprland.pluginConfig + ]; + } + config.mods.hypr.hyprland.customConfig + ] + else lib.mkForce config.mods.hypr.hyprland.customConfig; + plugins = + [ + (lib.mkIf config.mods.hypr.hyprland.hyprspaceEnable inputs.Hyprspace.packages.${pkgs.system}.Hyprspace) + ] + ++ config.mods.hypr.hyprland.plugins; + }; + } + ); +} diff --git a/modules/programs/hypr/hyprlock.nix b/modules/programs/hypr/hyprlock.nix new file mode 100644 index 0000000..30ea707 --- /dev/null +++ b/modules/programs/hypr/hyprlock.nix @@ -0,0 +1,61 @@ +{ + config, + lib, + options, + pkgs, + ... +}: { + options.mods.hypr.hyprlock = { + enable = lib.mkOption { + default = true; + example = false; + type = lib.types.bool; + description = "Enables Hyprlock"; + }; + config = lib.mkOption { + default = { + background = [ + { + monitor = ""; + path = ""; + color = "rgba(26, 27, 38, 1.0)"; + } + ]; + + input-field = [ + { + monitor = "${config.mods.hypr.hyprland.defaultMonitor}"; + placeholder_text = "password or something"; + } + ]; + + label = [ + { + monitor = "${config.mods.hypr.hyprland.defaultMonitor}"; + text = "$TIME"; + font_size = 50; + position = "0, 200"; + valign = "center"; + halign = "center"; + } + ]; + }; + example = {}; + type = with lib.types; attrsOf anything; + description = "config"; + }; + }; + + config = lib.mkIf config.mods.hypr.hyprlock.enable ( + lib.optionalAttrs (options ? xdg.configFile) { + stylix.targets.hyprlock = { + enable = false; + }; + home.packages = with pkgs; [hyprlock]; + programs.hyprlock = lib.mkIf config.mods.hypr.hyprlock.enable { + enable = true; + settings = config.mods.hypr.hyprlock.config; + }; + } + ); +} diff --git a/modules/programs/hypr/hyprpaper.nix b/modules/programs/hypr/hyprpaper.nix new file mode 100644 index 0000000..b392b54 --- /dev/null +++ b/modules/programs/hypr/hyprpaper.nix @@ -0,0 +1,36 @@ +{ + config, + lib, + options, + pkgs, + ... +}: { + options.mods.hypr.hyprpaper = { + enable = lib.mkOption { + default = true; + example = false; + type = lib.types.bool; + description = "Enables Hyprpaper"; + }; + config = lib.mkOption { + default = ""; + example = '' + preload = path/to/wallpaper + wallpaper = YOURMONITOR,path/to/wallpaper + ''; + type = lib.types.lines; + description = '' + Hyprpaper config + ''; + }; + }; + + config = lib.mkIf config.mods.hypr.hyprpaper.enable ( + lib.optionalAttrs (options ? xdg.configFile) { + home.packages = with pkgs; [hyprpaper]; + xdg.configFile."hypr/hyprpaper.conf" = lib.mkIf config.mods.hypr.hyprpaper.enable { + text = config.mods.hypr.hyprpaper.config; + }; + } + ); +} diff --git a/modules/programs/hyprland/anyrun.nix b/modules/programs/hyprland/anyrun.nix deleted file mode 100644 index 6a3a24e..0000000 --- a/modules/programs/hyprland/anyrun.nix +++ /dev/null @@ -1,144 +0,0 @@ -{ - lib, - config, - pkgs, - options, - inputs, - ... -}: { - options.mods = { - hyprland = { - anyrun = { - enable = lib.mkOption { - default = false; - example = true; - type = lib.types.bool; - description = "Enables anyrun"; - }; - useDefaultConfig = lib.mkOption { - default = true; - example = false; - type = lib.types.bool; - description = '' - Use preconfigured anyrun config. - ''; - }; - customConfig = lib.mkOption { - default = {}; - example = {}; - type = with lib.types; attrsOf anything; - description = '' - Custom anyrun configuration. - Will be merged with default configuration if enabled. - ''; - }; - useDefaultCss = lib.mkOption { - default = true; - example = false; - type = lib.types.bool; - description = '' - Use preconfigured anyrun css. - ''; - }; - customCss = lib.mkOption { - default = ''''; - example = '' - #window { - border-radius: none; - } - ''; - type = lib.types.lines; - description = '' - Custom anyrun css. - Will be merged with default css if enabled. - ''; - }; - }; - }; - }; - - config = lib.mkIf config.mods.hyprland.anyrun.enable ( - lib.optionalAttrs (options ? home.packages) { - programs.anyrun = lib.mkForce { - enable = true; - config = - if config.mods.hyprland.anyrun.useDefaultConfig - then - { - plugins = [ - inputs.anyrun.packages.${pkgs.system}.applications - inputs.anyrun.packages.${pkgs.system}.rink - inputs.anyrun.packages.${pkgs.system}.translate - inputs.anyrun.packages.${pkgs.system}.websearch - ]; - hideIcons = false; - width = { - fraction = 0.3; - }; - y = { - fraction = 0.5; - }; - layer = "overlay"; - hidePluginInfo = true; - closeOnClick = true; - } - // config.mods.hyprland.anyrun.customConfig - else config.mods.hyprland.anyrun.customConfig; - - extraCss = - if config.mods.hyprland.anyrun.useDefaultCss - then - '' - #window { - border-radius: 10px; - background-color: transparent; - } - - box#main { - border-radius: 10px; - } - - list#main { - border-radius: 10px; - margin: 0px 10px 10px 10px; - } - - list#plugin { - border-radius: 10px; - } - - list#match { - border-radius: 10px; - } - - entry#entry { - border: 0; - border-radius: 10px; - margin: 10px 10px 0px 10px; - } - - label#match-desc { - font-size: 12px; - border-radius: 10px; - } - - label#match-title { - font-size: 12px; - border-radius: 10px; - } - - label#plugin { - font-size: 16px; - border-radius: 10px; - } - - * { - border-radius: 10px; - } - '' - + config.mods.hyprland.anyrun.customCss - else config.mods.hyprland.anyrun.customCss; - }; - } - ); -} diff --git a/modules/programs/hyprland/hyprlock.nix b/modules/programs/hyprland/hyprlock.nix deleted file mode 100644 index 0a807ea..0000000 --- a/modules/programs/hyprland/hyprlock.nix +++ /dev/null @@ -1,58 +0,0 @@ -{ - config, - lib, - options, - pkgs, - ... -}: { - options.mods = { - hyprland.hyprlock = { - enable = lib.mkOption { - default = true; - example = false; - type = lib.types.bool; - description = "Enables Hyprlock"; - }; - }; - }; - - config = lib.mkIf config.mods.hyprland.hyprlock.enable ( - lib.optionalAttrs (options ? xdg.configFile) { - stylix.targets.hyprlock = { - enable = false; - }; - home.packages = with pkgs; [hyprlock]; - programs.hyprlock = lib.mkIf config.mods.hyprland.hyprlock.enable { - enable = true; - settings = { - background = [ - { - monitor = ""; - path = ""; - color = "rgba(26, 27, 38, 1.0)"; - } - ]; - - input-field = [ - { - monitor = "${config.conf.defaultMonitor}"; - - placeholder_text = "password or something"; - } - ]; - - label = [ - { - monitor = "${config.conf.defaultMonitor}"; - text = "$TIME"; - font_size = 50; - position = "0, 200"; - valign = "center"; - halign = "center"; - } - ]; - }; - }; - } - ); -} diff --git a/modules/programs/hyprland/hyprpaper.nix b/modules/programs/hyprland/hyprpaper.nix deleted file mode 100644 index 31c4d05..0000000 --- a/modules/programs/hyprland/hyprpaper.nix +++ /dev/null @@ -1,38 +0,0 @@ -{ - config, - lib, - options, - pkgs, - ... -}: { - options.mods = { - hyprland.hyprpaper = { - enable = lib.mkOption { - default = true; - example = false; - type = lib.types.bool; - description = "Enables Hyprpaper"; - }; - config = lib.mkOption { - default = ""; - example = '' - preload = path/to/wallpaper - wallpaper = YOURMONITOR,path/to/wallpaper - ''; - type = lib.types.lines; - description = '' - Hyprpaper config - ''; - }; - }; - }; - - config = lib.mkIf config.mods.hyprland.hyprpaper.enable ( - lib.optionalAttrs (options ? xdg.configFile) { - home.packages = with pkgs; [hyprpaper]; - xdg.configFile."hypr/hyprpaper.conf" = lib.mkIf config.mods.hyprland.hyprpaper.enable { - text = config.mods.hyprland.hyprpaper.config; - }; - } - ); -} diff --git a/modules/programs/hyprland/ironbar.nix b/modules/programs/ironbar.nix similarity index 50% rename from modules/programs/hyprland/ironbar.nix rename to modules/programs/ironbar.nix index 8e60c8b..ca8255b 100644 --- a/modules/programs/hyprland/ironbar.nix +++ b/modules/programs/ironbar.nix @@ -9,12 +9,127 @@ username = config.conf.username; base16 = pkgs.callPackage inputs.base16.lib {}; scheme = base16.mkSchemeAttrs config.stylix.base16Scheme; + ironbarDefaultConfig = { + end = [ + { + type = "sys_info"; + format = [" {memory_percent}"]; + interval.memory = 30; + class = "memory-usage"; + } + { + type = "custom"; + bar = [ + { + type = "button"; + class = "popup-button"; + label = ""; + on_click = "popup:toggle"; + } + ]; + class = "popup-button-box"; + popup = [ + { + type = "box"; + orientation = "vertical"; + class = "audio-box"; + widgets = [ + { + type = "box"; + orientation = "horizontal"; + widgets = [ + { + type = "button"; + class = "audio-button"; + label = ""; + on_click = lib.mkIf config.mods.scripts.audioControl "!audioControl bluetooth"; + } + { + type = "button"; + class = "audio-button"; + label = "󰋋"; + on_click = lib.mkIf config.mods.scripts.audioControl "!audioControl internal"; + } + ]; + class = "audio-button-box"; + } + { + type = "label"; + label = "Output"; + } + { + type = "slider"; + class = "audio-slider"; + step = 1.0; + length = 200; + value = "pactl get-sink-volume @DEFAULT_SINK@ | awk -F'/' '{ print $2 }' | tr -d ' %'"; + on_change = "!pactl set-sink-volume @DEFAULT_SINK@ $0%"; + } + { + type = "label"; + label = "Input"; + } + { + type = "slider"; + class = "audio-slider"; + step = 1.0; + length = 200; + value = "pactl get-source-volume @DEFAULT_SOURCE@ | awk -F'/' '{ print $2 }' | tr -d ' %'"; + on_change = "!pactl set-source-volume @DEFAULT_SOURCE@ $0%"; + } + ]; + } + ]; + } + { + type = "custom"; + bar = [ + { + type = "button"; + class = "popup-button"; + label = ""; + on_click = "!oxidash --css /home/${username}/gits/oxidash/style.css"; + } + ]; + class = "popup-button-box"; + } + { + type = "clock"; + format = "%I:%M"; + format_popup = "%I:%M:%S"; + locale = "en_US"; + } + {type = "tray";} + ]; + position = "top"; + height = 10; + anchor_to_edges = true; + start = [ + { + type = "workspaces"; + all_monitors = true; + } + ]; + center = [ + { + type = "focused"; + show_icon = true; + show_title = true; + icon_size = 20; + truncate = "end"; + } + ]; + }; + monitorConfig = + if config.mods.hypr.hyprland.enable + then {monitors.${config.mods.hypr.hyprland.defaultMonitor} = ironbarDefaultConfig;} + else ironbarDefaultConfig; in { options.mods = { - hyprland.ironbar = { + ironbar = { enable = lib.mkOption { - default = true; - example = false; + default = false; + example = true; type = lib.types.bool; description = "Enables ironbar"; }; @@ -26,19 +141,6 @@ in { Use preconfigured ironbar config. ''; }; - modules = lib.mkOption { - default = []; - example = [ - { - type = "upower"; - class = "memory-usage"; - } - ]; - type = with lib.types; listOf attrs; - description = '' - Adds modules to ironbar. See https://github.com/JakeStanger/ironbar/wiki/ for more information. - ''; - }; customConfig = lib.mkOption { default = {}; example = {}; @@ -71,12 +173,12 @@ in { }; }; }; - config = lib.mkIf config.mods.hyprland.ironbar.enable ( + config = lib.mkIf (config.mods.ironbar.enable || config.mods.hypr.hyprland.useIronbar) ( lib.optionalAttrs (options ? programs.ironbar) { programs.ironbar = { enable = true; style = - if config.mods.hyprland.ironbar.useDefaultCss + if config.mods.ironbar.useDefaultCss then /* css @@ -212,131 +314,20 @@ in { background-color: #${scheme.base02}; } '' - + config.mods.hyprland.ironbar.customCss - else config.mods.hyprland.ironbar.customCss; + + config.mods.ironbar.customCss + else config.mods.ironbar.customCss; features = [ #"another_feature" ]; - config = { - monitors."${config.conf.defaultMonitor}" = - if config.mods.hyprland.ironbar.useDefaultConfig - then - { - end = - config.mods.hyprland.ironbar.modules - ++ [ - { - type = "sys_info"; - format = [" {memory_percent}"]; - interval.memory = 30; - class = "memory-usage"; - } - { - type = "custom"; - bar = [ - { - type = "button"; - class = "popup-button"; - label = ""; - on_click = "popup:toggle"; - } - ]; - class = "popup-button-box"; - popup = [ - { - type = "box"; - orientation = "vertical"; - class = "audio-box"; - widgets = [ - { - type = "box"; - orientation = "horizontal"; - widgets = [ - { - type = "button"; - class = "audio-button"; - label = ""; - on_click = lib.mkIf config.mods.scripts.audioControl "!audioControl bluetooth"; - } - { - type = "button"; - class = "audio-button"; - label = "󰋋"; - on_click = lib.mkIf config.mods.scripts.audioControl "!audioControl internal"; - } - ]; - class = "audio-button-box"; - } - { - type = "label"; - label = "Output"; - } - { - type = "slider"; - class = "audio-slider"; - step = 1.0; - length = 200; - value = "pactl get-sink-volume @DEFAULT_SINK@ | awk -F'/' '{ print $2 }' | tr -d ' %'"; - on_change = "!pactl set-sink-volume @DEFAULT_SINK@ $0%"; - } - { - type = "label"; - label = "Input"; - } - { - type = "slider"; - class = "audio-slider"; - step = 1.0; - length = 200; - value = "pactl get-source-volume @DEFAULT_SOURCE@ | awk -F'/' '{ print $2 }' | tr -d ' %'"; - on_change = "!pactl set-source-volume @DEFAULT_SOURCE@ $0%"; - } - ]; - } - ]; - } - { - type = "custom"; - bar = [ - { - type = "button"; - class = "popup-button"; - label = ""; - on_click = "!oxidash --css /home/${username}/gits/oxidash/style.css"; - } - ]; - class = "popup-button-box"; - } - { - type = "clock"; - format = "%I:%M"; - format_popup = "%I:%M:%S"; - locale = "en_US"; - } - {type = "tray";} - ]; - position = "top"; - height = 10; - anchor_to_edges = true; - start = [ - { - type = "workspaces"; - all_monitors = true; - } - ]; - center = [ - { - type = "focused"; - show_icon = true; - show_title = true; - icon_size = 20; - truncate = "end"; - } - ]; - } - // config.mods.hyprland.ironbar.customConfig - else config.mods.hyprland.ironbar.customConfig; - }; + config = + if config.mods.ironbar.useDefaultConfig + then + lib.mkMerge + [ + monitorConfig + config.mods.ironbar.customConfig + ] + else config.mods.ironbar.customConfig; }; } ); diff --git a/modules/programs/keepassxc.nix b/modules/programs/keepassxc.nix index 93c9142..d8c0c6a 100644 --- a/modules/programs/keepassxc.nix +++ b/modules/programs/keepassxc.nix @@ -12,54 +12,63 @@ type = lib.types.bool; description = "Enables the piper program and its daemon"; }; - use_cache_config = lib.mkOption { + useConfig = lib.mkOption { default = true; example = false; type = lib.types.bool; - description = "Whether to overwrite the cache config of keepassxc. Note, this means that changes can't be applied via the program anymore!"; + description = "Whether to overwrite the config of keepassxc. Note, this means that changes can't be applied via the program anymore!"; }; - cache_config = lib.mkOption { + config = lib.mkOption { default = '' [General] - LastDatabases=/home/${config.conf.username}/pws/Passwords.kdbx - LastActiveDatabase=/home/${config.conf.username}/pws/Passwords.kdbx - LastOpenedDatabases=/home/${config.conf.username}/pws/Passwords.kdbx - LastKeyFiles=@Variant(\0\0\0\x1c\0\0\0\x1\0\0\0>\0/\0h\0o\0m\0\x65\0/\0\x64\0\x61\0s\0h\0i\0\x65\0/\0p\0w\0s\0/\0P\0\x61\0s\0s\0w\0o\0r\0\x64\0s\0.\0k\0\x64\0\x62\0x\0\0\0\n\0\0\0>\0/\0h\0o\0m\0\x65\0/\0\x64\0\x61\0s\0h\0i\0\x65\0/\0p\0w\0s\0/\0l\0o\0g\0i\0n\0_\0k\0\x65\0y\0.\0k\0\x65\0y\0x) + ConfigVersion=2 + + [Browser] + Enabled=true + + [GUI] + ApplicationTheme=classic + HidePasswords=true + MinimizeOnClose=true + MinimizeToTray=true + ShowTrayIcon=true + TrayIconAppearance=monochrome-light + + [PasswordGenerator] + Length=30 + + [Security] + EnableCopyOnDoubleClick=true ''; example = ""; type = lib.types.lines; description = "Cache config to be used."; }; + useCacheConfig = lib.mkOption { + default = false; + example = true; + type = lib.types.bool; + description = "Whether to overwrite the cache config of keepassxc. Note, this means that changes can't be applied via the program anymore!"; + }; + cacheConfig = lib.mkOption { + default = ''''; + example = '' + [General] + LastDatabases=/path/to/database + ''; + type = lib.types.lines; + description = "Cache config to be used."; + }; }; config = lib.mkIf config.mods.keepassxc.enable ( lib.optionalAttrs (options ? home.file) { home.packages = [pkgs.keepassxc]; - xdg.configFile."keepassxc/keepassxc.ini" = { - text = '' - [General] - ConfigVersion=2 - - [Browser] - Enabled=true - - [GUI] - ApplicationTheme=classic - HidePasswords=true - MinimizeOnClose=true - MinimizeToTray=true - ShowTrayIcon=true - TrayIconAppearance=monochrome-light - - [PasswordGenerator] - Length=30 - - [Security] - EnableCopyOnDoubleClick=true - ''; + xdg.configFile."keepassxc/keepassxc.ini" = lib.mkIf config.mods.keepassxc.useConfig { + text = config.mods.keepassxc.config; }; - home.file.".cache/keepassxc/keepassxc.ini" = lib.mkIf config.mods.keepassxc.use_cache_config { - text = config.mods.keepassxc.cache_config; + home.file.".cache/keepassxc/keepassxc.ini" = lib.mkIf config.mods.keepassxc.useCacheConfig { + text = config.mods.keepassxc.cacheConfig; }; } ); diff --git a/modules/programs/kitty.nix b/modules/programs/kitty.nix index eb41e44..ab2ae5a 100644 --- a/modules/programs/kitty.nix +++ b/modules/programs/kitty.nix @@ -41,6 +41,12 @@ in { type = lib.types.bool; description = "Enables kitty"; }; + useDefaultConfig = lib.mkOption { + default = true; + example = false; + type = lib.types.bool; + description = "Enable default config for kitty"; + }; additionalConfig = lib.mkOption { default = {}; example = { @@ -48,7 +54,7 @@ in { enable_audio_bell = "yes"; }; type = with lib.types; attrsOf anything; - description = "Additional kitty configuration"; + description = "Additional kitty configuration. Will be the only configuration if useDefaultConfig is disabled."; }; }; config = lib.mkIf config.mods.kitty.enable ( @@ -59,80 +65,64 @@ in { programs.kitty = { enable = true; settings = - { - enable_audio_bell = "no"; - window_alert_on_bell = "no"; - cursor_blink_interval = "0"; - window_padding_width = "1"; - shell_integration = "yes"; - sync_with_monitor = "no"; - background_opacity = "0.8"; + if config.mods.kitty.useDefaultConfig + then + { + enable_audio_bell = "no"; + window_alert_on_bell = "no"; + cursor_blink_interval = "0"; + window_padding_width = "1"; + shell_integration = "yes"; + sync_with_monitor = "no"; + background_opacity = "0.8"; - font_family = "${config.mods.stylix.fonts.monospace.name}"; - bold_font = "${config.mods.stylix.fonts.monospace.name} Extra Bold"; - italic_font = "${config.mods.stylix.fonts.monospace.name} Extra Italic"; - bold_italic_font = "${config.mods.stylix.fonts.monospace.name} Extra Bold Italic"; + font_family = "${config.mods.stylix.fonts.monospace.name}"; + bold_font = "${config.mods.stylix.fonts.monospace.name} Extra Bold"; + italic_font = "${config.mods.stylix.fonts.monospace.name} Extra Italic"; + bold_italic_font = "${config.mods.stylix.fonts.monospace.name} Extra Bold Italic"; - background = base; - foreground = "#" + scheme.base05; - selection_foreground = "#" + scheme.base05; - selection_background = base; - url_color = "#" + scheme.base04; - cursor = "#" + scheme.base05; - active_border_color = "#" + scheme.base03; - inactive_border_color = "#" + scheme.base01; - active_tab_background = base; - active_tab_foreground = "#" + scheme.base05; - inactive_tab_background = "#" + scheme.base01; - inactive_tab_foreground = "#" + scheme.base04; - tab_bar_background = "#" + scheme.base01; + background = base; + foreground = "#" + scheme.base05; + selection_foreground = "#" + scheme.base05; + selection_background = base; + url_color = "#" + scheme.base04; + cursor = "#" + scheme.base05; + active_border_color = "#" + scheme.base03; + inactive_border_color = "#" + scheme.base01; + active_tab_background = base; + active_tab_foreground = "#" + scheme.base05; + inactive_tab_background = "#" + scheme.base01; + inactive_tab_foreground = "#" + scheme.base04; + tab_bar_background = "#" + scheme.base01; - mark1_foreground = "#" + scheme.base00; - mark1_background = "#" + scheme.base07; - mark2_foreground = "#" + scheme.base00; - mark2_background = "#" + scheme.base0E; - mark3_foreground = "#" + scheme.base00; - mark3_background = "#" + scheme.base08; + mark1_foreground = "#" + scheme.base00; + mark1_background = "#" + scheme.base07; + mark2_foreground = "#" + scheme.base00; + mark2_background = "#" + scheme.base0E; + mark3_foreground = "#" + scheme.base00; + mark3_background = "#" + scheme.base08; - color0 = "#" + scheme.base03; - color1 = "#" + scheme.base08; - color2 = "#" + scheme.base0B; - color3 = "#" + scheme.base0A; - color4 = "#" + scheme.base0D; - color5 = "#" + scheme.base06; - color6 = "#" + scheme.base0C; - color7 = "#" + scheme.base07; + color0 = "#" + scheme.base03; + color1 = "#" + scheme.base08; + color2 = "#" + scheme.base0B; + color3 = "#" + scheme.base0A; + color4 = "#" + scheme.base0D; + color5 = "#" + scheme.base06; + color6 = "#" + scheme.base0C; + color7 = "#" + scheme.base07; - color8 = "#" + scheme.base04; - color9 = "#" + scheme.base08; - color10 = "#" + scheme.base0B; - color11 = "#" + scheme.base0A; - color12 = "#" + scheme.base0D; - color13 = "#" + scheme.base06; - color14 = "#" + scheme.base0C; - color15 = "#" + scheme.base0B; - - # color0 = base; - # color1 = "#" + scheme.base08; - # color2 = "#" + scheme.base0B; - # color3 = "#" + scheme.base0A; - # color4 = "#" + scheme.base0D; - # color5 = "#" + scheme.base0E; - # color6 = "#" + scheme.base0C; - # color7 = "#" + scheme.base05; - # - # color8 = "#" + scheme.base03; - # color9 = "#" + scheme.base08; - # color10 = "#" + scheme.base0B; - # color11 = "#" + scheme.base0A; - # color12 = "#" + scheme.base0D; - # color13 = "#" + scheme.base0E; - # color14 = "#" + scheme.base0C; - # color15 = "#" + scheme.base07; - - shell = lib.mkIf config.mods.fish.enable "fish"; - } - // config.mods.kitty.additionalConfig; + color8 = "#" + scheme.base04; + color9 = "#" + scheme.base08; + color10 = "#" + scheme.base0B; + color11 = "#" + scheme.base0A; + color12 = "#" + scheme.base0D; + color13 = "#" + scheme.base06; + color14 = "#" + scheme.base0C; + color15 = "#" + scheme.base0B; + shell = lib.mkIf config.mods.fish.enable "fish"; + } + // config.mods.kitty.additionalConfig + else config.mods.kitty.additionalConfig; }; } ); diff --git a/modules/programs/mime.nix b/modules/programs/mime.nix index 1f193d2..03d04d8 100644 --- a/modules/programs/mime.nix +++ b/modules/programs/mime.nix @@ -1,6 +1,7 @@ # Copyright (c) 2020-2021 Mihai Fufezan # credits to fufexan https://github.com/fufexan/dotfiles/blob/main/home/terminal/programs/xdg.nix { + mkDashDefault, config, lib, options, @@ -148,11 +149,11 @@ in { }; userDirs = { - enable = true; - createDirectories = true; + enable = mkDashDefault true; + createDirectories = mkDashDefault true; extraConfig = { - XDG_SCREENSHOTS_DIR = "${config.xdg.userDirs.pictures}/Screenshots"; - pws = "${config.home.homeDirectory}/pws"; + XDG_SCREENSHOTS_DIR = mkDashDefault "${config.xdg.userDirs.pictures}/Screenshots"; + pws = mkDashDefault "${config.home.homeDirectory}/pws"; }; }; }; diff --git a/modules/programs/ncspot.nix b/modules/programs/ncspot.nix index 8e9064d..b998942 100644 --- a/modules/programs/ncspot.nix +++ b/modules/programs/ncspot.nix @@ -12,11 +12,8 @@ type = lib.types.bool; description = "Enables ncspot with a config"; }; - }; - config = lib.mkIf config.mods.ncspot.enable ( - lib.optionalAttrs (options ? home.packages) { - home.packages = with pkgs; [ncspot]; - xdg.configFile."ncspot/config.toml".source = (pkgs.formats.toml {}).generate "ncspot" { + config = lib.mkOption { + default = { notify = true; shuffle = true; cover_max_scale = 2; @@ -52,6 +49,16 @@ body = "%title"; }; }; + example = {}; + type = with lib.types; attrsOf anything; + description = "config"; + }; + }; + config = lib.mkIf config.mods.ncspot.enable ( + lib.optionalAttrs (options ? home.packages) { + home.packages = with pkgs; [ncspot]; + xdg.configFile."ncspot/config.toml".source = + lib.mkIf config.mods.ncspot.useConfig (pkgs.formats.toml {}).generate "ncspot" config.mods.ncspot.config; } ); } diff --git a/modules/programs/starship.nix b/modules/programs/starship.nix index 25fc53b..de86504 100644 --- a/modules/programs/starship.nix +++ b/modules/programs/starship.nix @@ -1,4 +1,5 @@ { + mkDashDefault, lib, config, options, @@ -45,7 +46,7 @@ code_format = "[](bg:prev_bg fg:#5256c3)[ $symbol ($version)](bg:#5256c3)"; in { enable = true; - interactiveOnly = true; + interactiveOnly = mkDashDefault true; presets = lib.mkIf config.mods.starship.useDefaultPrompt ["pastel-powerline"]; settings = lib.mkIf config.mods.starship.useDefaultPrompt { diff --git a/modules/programs/stylix.nix b/modules/programs/stylix.nix index 515f45c..657f078 100644 --- a/modules/programs/stylix.nix +++ b/modules/programs/stylix.nix @@ -1,4 +1,5 @@ { + mkDashDefault, lib, config, options, @@ -88,11 +89,11 @@ (lib.optionalAttrs (options ? stylix) { stylix = { enable = true; - image = ../../base/black.jpg; - polarity = "dark"; + image = mkDashDefault ../../base/black.jpg; + polarity = mkDashDefault "dark"; targets = { - nixvim.enable = false; - fish.enable = false; + nixvim.enable = mkDashDefault false; + fish.enable = mkDashDefault false; }; fonts = config.mods.stylix.fonts; cursor = config.mods.stylix.cursor; diff --git a/modules/programs/virtmanager.nix b/modules/programs/virtmanager.nix index 84c7c0a..bf81b93 100644 --- a/modules/programs/virtmanager.nix +++ b/modules/programs/virtmanager.nix @@ -1,4 +1,5 @@ { + mkDashDefault, lib, config, options, @@ -41,15 +42,15 @@ in { libvirtd = { enable = true; qemu = { - package = pkgs.qemu_kvm; - swtpm.enable = true; - ovmf.enable = true; + package = mkDashDefault pkgs.qemu_kvm; + swtpm.enable = mkDashDefault true; + ovmf.enable = mkDashDefault true; ovmf.packages = [pkgs.OVMFFull.fd]; }; }; - spiceUSBRedirection.enable = true; + spiceUSBRedirection.enable = mkDashDefault true; }; - services.spice-vdagentd.enable = true; + services.spice-vdagentd.enable = mkDashDefault true; users.users.${config.conf.username}.extraGroups = [ "libvirtd" diff --git a/patches/darkreader.nix b/patches/darkreader.nix index a1c462a..ef2c19f 100644 --- a/patches/darkreader.nix +++ b/patches/darkreader.nix @@ -1,23 +1,25 @@ # credits to Voronind for darkreader config https://github.com/voronind-com/nix/blob/main/home/program/firefox/default.nix { lib, - stable, + dashNixAdditionalProps, ... -}: -stable.buildNpmPackage rec { - version = "4.9.99"; - pname = "dark-reader"; - npmDepsHash = "sha256-m41HkwgbeRRmxJALQFJl/grYjjIqFOc47ltaesob1FA="; - env.ESBUILD_BINARY_PATH = lib.getExe stable.esbuild; - patches = [./darkeader.patch]; - src = stable.fetchFromGitHub { - hash = "sha256-K375/4qOyE1Tp/T5V5uCGcNd1IVVbT1Pjdnq/8oRHj0="; - owner = "darkreader"; - repo = "darkreader"; - rev = "v${version}"; - }; - installPhase = '' - mkdir -p $out - cp build/release/darkreader-firefox.xpi $out/latest.xpi - ''; -} +}: let + stable = dashNixAdditionalProps.pkgsDarkreader; +in + stable.buildNpmPackage rec { + version = "4.9.99"; + pname = "dark-reader"; + npmDepsHash = "sha256-m41HkwgbeRRmxJALQFJl/grYjjIqFOc47ltaesob1FA="; + env.ESBUILD_BINARY_PATH = lib.getExe stable.esbuild; + patches = [./darkeader.patch]; + src = stable.fetchFromGitHub { + hash = "sha256-K375/4qOyE1Tp/T5V5uCGcNd1IVVbT1Pjdnq/8oRHj0="; + owner = "darkreader"; + repo = "darkreader"; + rev = "v${version}"; + }; + installPhase = '' + mkdir -p $out + cp build/release/darkreader-firefox.xpi $out/latest.xpi + ''; + } From 1ab37deac7203f3ddbcb269bafbb8e68fbac521e Mon Sep 17 00:00:00 2001 From: DashieTM Date: Sun, 11 May 2025 21:45:12 +0200 Subject: [PATCH 046/118] hyprland: remove old wlr atomic env --- modules/programs/hypr/hyprland.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/modules/programs/hypr/hyprland.nix b/modules/programs/hypr/hyprland.nix index 676b567..161e1cf 100644 --- a/modules/programs/hypr/hyprland.nix +++ b/modules/programs/hypr/hyprland.nix @@ -367,7 +367,6 @@ in { "QT_WAYLAND_DISABLE_WINDOWDECORATION,1" "QT_SCALE_FACTOR,1" ''EDITOR,"neovide --novsync --nofork"'' - (lib.mkIf config.mods.hypr.hyprland.noAtomic "WLR_DRM_NO_ATOMIC,1") "GTK_USE_PORTAL, 1" (lib.mkIf config.mods.gpu.nvidia.enable "LIBVA_DRIVER_NAME,nvidia") From 518b78bf96febca847b6a16759706b678e8f9d11 Mon Sep 17 00:00:00 2001 From: DashieTM Date: Sun, 11 May 2025 21:56:23 +0200 Subject: [PATCH 047/118] gamescope: init --- modules/programs/gaming.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/programs/gaming.nix b/modules/programs/gaming.nix index 17157ae..46706eb 100644 --- a/modules/programs/gaming.nix +++ b/modules/programs/gaming.nix @@ -15,6 +15,7 @@ }; tools = lib.mkOption { default = with pkgs; [ + gamescope gamemode steam lutris From b79ba87fcb8af18bc0b6375bee1986c2d7c4bafa Mon Sep 17 00:00:00 2001 From: DashieTM Date: Tue, 13 May 2025 19:30:36 +0200 Subject: [PATCH 048/118] Ironbar fix --- modules/programs/hypr/hyprland.nix | 8 ++++++++ modules/programs/ironbar.nix | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/modules/programs/hypr/hyprland.nix b/modules/programs/hypr/hyprland.nix index 161e1cf..5ddc1a5 100644 --- a/modules/programs/hypr/hyprland.nix +++ b/modules/programs/hypr/hyprland.nix @@ -91,6 +91,14 @@ in { Whether to use ironbar in hyprland. ''; }; + ironbarSingleMonitor = lib.mkOption { + default = true; + example = false; + type = lib.types.bool; + description = '' + Whether to use ironbar on a single monitor. + ''; + }; useDefaultConfig = lib.mkOption { default = true; example = false; diff --git a/modules/programs/ironbar.nix b/modules/programs/ironbar.nix index ca8255b..ba15edd 100644 --- a/modules/programs/ironbar.nix +++ b/modules/programs/ironbar.nix @@ -121,7 +121,7 @@ ]; }; monitorConfig = - if config.mods.hypr.hyprland.enable + if config.mods.hypr.hyprland.ironbarSingleMonitor then {monitors.${config.mods.hypr.hyprland.defaultMonitor} = ironbarDefaultConfig;} else ironbarDefaultConfig; in { From 1650deb7f218f4437d3707cde7c99170ad8d2185 Mon Sep 17 00:00:00 2001 From: DashieTM Date: Wed, 14 May 2025 22:27:57 +0200 Subject: [PATCH 049/118] ltex: remove --- modules/programs/coding.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/modules/programs/coding.nix b/modules/programs/coding.nix index f845a1d..b6a71ae 100644 --- a/modules/programs/coding.nix +++ b/modules/programs/coding.nix @@ -178,7 +178,6 @@ in { default = with pkgs; [ typst tinymist - ltex-ls ]; example = []; type = with lib.types; listOf package; From 5f81642dc114b715280a5dbf681b0e43f5683c55 Mon Sep 17 00:00:00 2001 From: DashieTM Date: Fri, 16 May 2025 19:28:42 +0200 Subject: [PATCH 050/118] hyprland: Fix gamemode service --- modules/programs/hypr/hyprland.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/programs/hypr/hyprland.nix b/modules/programs/hypr/hyprland.nix index 5ddc1a5..334a9ad 100644 --- a/modules/programs/hypr/hyprland.nix +++ b/modules/programs/hypr/hyprland.nix @@ -412,6 +412,8 @@ in { "systemctl --user import-environment" "dbus-update-activation-environment --systemd --all" "hyprctl setcursor Bibata-Modern-Classic 24" + # ensures the systemd service knows what "hyprctl" is :) + (lib.mkIf config.mods.gaming.gamemode "systemctl try-restart gamemoded.service --user") # other programs "${browserName}" From 1cbe5d7e2ac2760372e457e0822c1cc0aab701bb Mon Sep 17 00:00:00 2001 From: DashieTM Date: Fri, 16 May 2025 21:31:30 +0200 Subject: [PATCH 051/118] Use unstable for teams --- modules/programs/teams.nix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/modules/programs/teams.nix b/modules/programs/teams.nix index 28e45f6..a909ee5 100644 --- a/modules/programs/teams.nix +++ b/modules/programs/teams.nix @@ -3,7 +3,6 @@ config, options, pkgs, - alternativePkgs, ... }: let callPackage = lib.callPackageWith pkgs; @@ -24,7 +23,7 @@ in { }; config = lib.mkIf config.mods.teams.enable ( lib.optionalAttrs (options ? home.packages) { - home.packages = [(callPackage ../../override/teams.nix {chromium = alternativePkgs.chromium;})]; + home.packages = [(callPackage ../../override/teams.nix {chromium = pkgs.chromium;})]; } // (lib.optionalAttrs (options ? boot.kernelModules) { boot = { From 78afacde791d9f29f826d93a2ce05c09db04c9e3 Mon Sep 17 00:00:00 2001 From: DashieTM Date: Fri, 16 May 2025 21:52:32 +0200 Subject: [PATCH 052/118] superfreq: init --- flake.nix | 5 ++++- lib/default.nix | 1 + modules/programs/default.nix | 1 + modules/programs/hypr/hyprland.nix | 1 + modules/programs/oxi/default.nix | 14 +++++++++++++- modules/programs/superfreq.nix | 28 ++++++++++++++++++++++++++++ 6 files changed, 48 insertions(+), 2 deletions(-) create mode 100644 modules/programs/superfreq.nix diff --git a/flake.nix b/flake.nix index 893527f..6f639c7 100644 --- a/flake.nix +++ b/flake.nix @@ -49,10 +49,13 @@ oxidash.url = "github:Xetibo/OxiDash"; oxipaste.url = "github:Xetibo/OxiPaste"; oxirun.url = "github:Xetibo/OxiRun"; - hyprdock.url = "github:Xetibo/hyprdock"; + # For now until merged into Xetibo + hyprdock.url = "github:DashieTM/hyprdock"; reset.url = "github:Xetibo/ReSet"; reset-plugins.url = "github:Xetibo/ReSet-Plugins"; + superfreq.url = "github:NotAShelf/superfreq"; + # absolute insanity chaoticNyx.url = "github:chaotic-cx/nyx/nyxpkgs-unstable"; diff --git a/lib/default.nix b/lib/default.nix index 40a924a..1f7d151 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -49,6 +49,7 @@ inputs.home-manager.nixosModules.home-manager inputs.stylix.nixosModules.stylix inputs.disko.nixosModules.disko + inputs.superfreq.nixosModules.default ../base ../home ../modules diff --git a/modules/programs/default.nix b/modules/programs/default.nix index 5ad3e09..ebc1ff4 100644 --- a/modules/programs/default.nix +++ b/modules/programs/default.nix @@ -41,6 +41,7 @@ ./starship.nix ./streamcontroller.nix ./stylix.nix + ./superfreq.nix ./supersonic.nix ./sway.nix ./teams.nix diff --git a/modules/programs/hypr/hyprland.nix b/modules/programs/hypr/hyprland.nix index 334a9ad..1e1725d 100644 --- a/modules/programs/hypr/hyprland.nix +++ b/modules/programs/hypr/hyprland.nix @@ -417,6 +417,7 @@ in { # other programs "${browserName}" + (lib.mkIf config.mods.oxi.hyprdock.enable "hyprdock --server") (lib.mkIf config.mods.hypr.hyprpaper.enable "hyprpaper") (lib.mkIf config.mods.hypr.hyprland.useIronbar "ironbar") (lib.mkIf config.mods.oxi.oxipaste.enable "oxipaste_daemon") diff --git a/modules/programs/oxi/default.nix b/modules/programs/oxi/default.nix index 9c3ac57..99de567 100644 --- a/modules/programs/oxi/default.nix +++ b/modules/programs/oxi/default.nix @@ -34,6 +34,12 @@ type = lib.types.bool; description = "Enables hyprdock"; }; + settings = lib.mkOption { + default = {}; + example = {}; + type = with lib.types; attrsOf anything; + description = "settings for hyprdock"; + }; }; oxicalc = { enable = lib.mkOption { @@ -47,7 +53,10 @@ config = lib.mkIf config.mods.oxi.enable ( lib.optionalAttrs (options ? home.packages) { programs = { - hyprdock.enable = lib.mkIf config.mods.oxi.hyprdock.enable true; + hyprdock = { + enable = config.mods.oxi.hyprdock.enable; + settings = config.mods.oxi.hyprdock.settings; + }; oxicalc.enable = lib.mkIf config.mods.oxi.oxicalc.enable true; ReSet = lib.mkIf config.mods.oxi.ReSet.enable { enable = true; @@ -65,5 +74,8 @@ }; }; } + // lib.optionalAttrs (options ? services.logind) { + services.logind.lidSwitchExternalPower = "ignore"; + } ); } diff --git a/modules/programs/superfreq.nix b/modules/programs/superfreq.nix new file mode 100644 index 0000000..f031e2f --- /dev/null +++ b/modules/programs/superfreq.nix @@ -0,0 +1,28 @@ +{ + lib, + options, + config, + ... +}: { + options.mods.superfreq = { + enable = lib.mkOption { + default = false; + example = true; + type = lib.types.bool; + description = ''Enables superfreq''; + }; + settings = lib.mkOption { + default = {}; + example = {}; + type = with lib.types; attrsOf anything; + description = ''Superfreq config''; + }; + }; + + config = lib.optionalAttrs (options ? services.superfreq) { + services.superfreq = { + enable = config.mods.superfreq.enable; + settings = config.mods.superfreq.settings; + }; + }; +} From c2127e00474d9e934b67fcc3316f804e7a6eae32 Mon Sep 17 00:00:00 2001 From: DashieTM Date: Mon, 19 May 2025 20:41:37 +0200 Subject: [PATCH 053/118] fastfetch: fix config --- modules/programs/fastfetch.nix | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/modules/programs/fastfetch.nix b/modules/programs/fastfetch.nix index 71b6218..52366e7 100644 --- a/modules/programs/fastfetch.nix +++ b/modules/programs/fastfetch.nix @@ -57,18 +57,20 @@ config = lib.optionalAttrs (options ? home.packages) { xdg.configFile."fastfetch/config.jsonc" = lib.mkIf (config.mods.dashfetch.enable) { - source = (pkgs.formats.json {}).generate "config.jsonc" { - "$schema" = "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json"; - logo = { - type = mkDashDefault "kitty"; - source = mkDashDefault ../../assets/logo2.png; - width = mkDashDefault 35; - padding = mkDashDefault { - top = mkDashDefault 1; + source = + (pkgs.formats.json {}).generate "config.jsonc" + { + "$schema" = "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json"; + logo = { + type = "kitty"; + source = ../../assets/logo2.png; + width = 35; + padding = { + top = 1; + }; }; + modules = config.mods.dashfetch.modules; }; - modules = config.mods.dashfetch.modules; - }; }; }; } From 37a5bfee0f254efdd49f14ee094c4f14733bf8fc Mon Sep 17 00:00:00 2001 From: DashieTM Date: Mon, 19 May 2025 20:47:46 +0200 Subject: [PATCH 054/118] inputs: prefer nixpkgs packages --- modules/programs/anyrun.nix | 1 + modules/programs/greetd.nix | 2 +- modules/programs/hypr/hyprland.nix | 1 + modules/programs/ironbar.nix | 2 ++ 4 files changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/programs/anyrun.nix b/modules/programs/anyrun.nix index 46f4d5c..b1b7922 100644 --- a/modules/programs/anyrun.nix +++ b/modules/programs/anyrun.nix @@ -57,6 +57,7 @@ config = lib.mkIf config.mods.anyrun.enable ( lib.optionalAttrs (options ? home.packages) { programs.anyrun = lib.mkForce { + package = pkgs.anyrun; enable = true; config = if config.mods.anyrun.useDefaultConfig diff --git a/modules/programs/greetd.nix b/modules/programs/greetd.nix index 064f61b..2d1727c 100644 --- a/modules/programs/greetd.nix +++ b/modules/programs/greetd.nix @@ -37,7 +37,7 @@ }; greeterCommand = lib.mkOption { default = "${ - lib.getExe inputs.hyprland.packages.${config.conf.system}.hyprland + lib.getExe pkgs.hyprland } --config /etc/greetd/hyprgreet.conf"; example = "${ lib.getExe pkgs.cage diff --git a/modules/programs/hypr/hyprland.nix b/modules/programs/hypr/hyprland.nix index 1e1725d..5a9e0e5 100644 --- a/modules/programs/hypr/hyprland.nix +++ b/modules/programs/hypr/hyprland.nix @@ -160,6 +160,7 @@ in { ]; wayland.windowManager.hyprland = { + package = mkDashDefault pkgs.hyprland; enable = true; settings = if config.mods.hypr.hyprland.useDefaultConfig diff --git a/modules/programs/ironbar.nix b/modules/programs/ironbar.nix index ba15edd..300e1a2 100644 --- a/modules/programs/ironbar.nix +++ b/modules/programs/ironbar.nix @@ -1,4 +1,5 @@ { + mkDashDefault, lib, config, pkgs, @@ -176,6 +177,7 @@ in { config = lib.mkIf (config.mods.ironbar.enable || config.mods.hypr.hyprland.useIronbar) ( lib.optionalAttrs (options ? programs.ironbar) { programs.ironbar = { + package = mkDashDefault pkgs.ironbar; enable = true; style = if config.mods.ironbar.useDefaultCss From b5fe0e39fccf2aef1ad22ee3c7366f89a1971f3d Mon Sep 17 00:00:00 2001 From: DashieTM Date: Wed, 21 May 2025 20:53:45 +0200 Subject: [PATCH 055/118] chore: Uncomment fixed packages --- modules/conf.nix | 5 +---- modules/programs/gaming.nix | 3 +-- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/modules/conf.nix b/modules/conf.nix index 472e002..0e3a166 100644 --- a/modules/conf.nix +++ b/modules/conf.nix @@ -75,10 +75,7 @@ }; additionalBootKernalParams = lib.mkOption { - default = [ - # TODO test if needed - #"video=${config.conf.defaultMonitor}:${config.conf.defaultMonitorMode}" - ]; + default = []; example = []; type = with lib.types; listOf str; description = '' diff --git a/modules/programs/gaming.nix b/modules/programs/gaming.nix index 46706eb..1bb8d96 100644 --- a/modules/programs/gaming.nix +++ b/modules/programs/gaming.nix @@ -21,8 +21,7 @@ lutris wineWowPackages.stable adwsteamgtk - # TODO broken - #heroic + heroic mangohud ]; example = []; From f7ee4c0d5c5457b431b802973ee1ab0cea299a2c Mon Sep 17 00:00:00 2001 From: DashieTM Date: Sat, 24 May 2025 15:42:14 +0200 Subject: [PATCH 056/118] darkreader: split into own option --- lib/foxextensions.nix | 81 ++++++++++++++------------ modules/programs/browser/firefox.nix | 14 ++++- modules/programs/browser/librewolf.nix | 14 ++++- modules/programs/browser/zen.nix | 14 ++++- 4 files changed, 82 insertions(+), 41 deletions(-) diff --git a/lib/foxextensions.nix b/lib/foxextensions.nix index 48603de..24669f5 100644 --- a/lib/foxextensions.nix +++ b/lib/foxextensions.nix @@ -1,7 +1,5 @@ { lib, - dashNixAdditionalProps, - pkgs, name, ... }: let @@ -12,42 +10,49 @@ }; }; in { - options.mods.browser.${name}.extensions = lib.mkOption { - default = [ - (mkExtension "uBlock0@raymondhill.net" "https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi") - (mkExtension "{a6c4a591-f1b2-4f03-b3ff-767e5bedf4e7}" "https://addons.mozilla.org/firefox/downloads/latest/user-agent-string-switcher/latest.xpi") - (mkExtension "{d7742d87-e61d-4b78-b8a1-b469842139fa}" "https://addons.mozilla.org/firefox/downloads/latest/vimium-ff/latest.xpi") - (mkExtension "firefox@ghostery.com" "https://addons.mozilla.org/firefox/downloads/latest/ghostery/latest.xpi") - (mkExtension "CanvasBlocker@kkapsner.de" "https://addons.mozilla.org/firefox/downloads/latest/canvasblocker/latest.xpi") - (mkExtension "jid1-KKzOGWgsW3Ao4Q@jetpack" "https://addons.mozilla.org/firefox/downloads/latest/i-dont-care-about-cookies/latest.xpi") - (mkExtension "keepassxc-browser@keepassxc.org" "https://addons.mozilla.org/firefox/downloads/latest/keepassxc-browser/latest.xpi") - (mkExtension "@react-devtools" "https://addons.mozilla.org/firefox/downloads/latest/react-devtools/latest.xpi") - (mkExtension "extension@redux.devtools" "https://addons.mozilla.org/firefox/downloads/latest/reduxdevtools/latest.xpi") - (mkExtension "private-relay@firefox.com" "https://addons.mozilla.org/firefox/downloads/latest/private-relay/latest.xpi") - (mkExtension "addon@darkreader.org" "file://${pkgs.callPackage ../patches/darkreader.nix {inherit lib dashNixAdditionalProps;}}/latest.xpi") - ]; - example = [ - { - "78272b6fa58f4a1abaac99321d503a20@proton.me" = { - install_url = "https://addons.mozilla.org/en-US/firefox/downloads/latest/proton-pass/latest.xpi"; - installation_mode = "normal_installed"; + options.mods.browser.${name} = { + darkreader = lib.mkOption { + default = true; + example = false; + type = lib.types.bool; + description = "Whether to enable darkreader"; + }; + extensions = lib.mkOption { + default = [ + (mkExtension "uBlock0@raymondhill.net" "https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi") + (mkExtension "{a6c4a591-f1b2-4f03-b3ff-767e5bedf4e7}" "https://addons.mozilla.org/firefox/downloads/latest/user-agent-string-switcher/latest.xpi") + (mkExtension "{d7742d87-e61d-4b78-b8a1-b469842139fa}" "https://addons.mozilla.org/firefox/downloads/latest/vimium-ff/latest.xpi") + (mkExtension "firefox@ghostery.com" "https://addons.mozilla.org/firefox/downloads/latest/ghostery/latest.xpi") + (mkExtension "CanvasBlocker@kkapsner.de" "https://addons.mozilla.org/firefox/downloads/latest/canvasblocker/latest.xpi") + (mkExtension "jid1-KKzOGWgsW3Ao4Q@jetpack" "https://addons.mozilla.org/firefox/downloads/latest/i-dont-care-about-cookies/latest.xpi") + (mkExtension "keepassxc-browser@keepassxc.org" "https://addons.mozilla.org/firefox/downloads/latest/keepassxc-browser/latest.xpi") + (mkExtension "@react-devtools" "https://addons.mozilla.org/firefox/downloads/latest/react-devtools/latest.xpi") + (mkExtension "extension@redux.devtools" "https://addons.mozilla.org/firefox/downloads/latest/reduxdevtools/latest.xpi") + (mkExtension "private-relay@firefox.com" "https://addons.mozilla.org/firefox/downloads/latest/private-relay/latest.xpi") + ]; + example = [ + { + "78272b6fa58f4a1abaac99321d503a20@proton.me" = { + install_url = "https://addons.mozilla.org/en-US/firefox/downloads/latest/proton-pass/latest.xpi"; + installation_mode = "normal_installed"; + }; + } + ]; + type = with lib.types; listOf anything; + description = '' + List of extensions via attrsets: + ```nix + # id + # figure out the id via: + # nix run github:tupakkatapa/mozid -- 'https://addons.mozilla.org/en/firefox/addon/ublock-origin' + "uBlock0@raymondhill.net" = { + # install url + install_url = "https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi"; + # method https://mozilla.github.io/policy-templates/#extensionsettings + installation_mode = "force_installed"; }; - } - ]; - type = with lib.types; listOf anything; - description = '' - List of extensions via attrsets: - ```nix - # id - # figure out the id via: - # nix run github:tupakkatapa/mozid -- 'https://addons.mozilla.org/en/firefox/addon/ublock-origin' - "uBlock0@raymondhill.net" = { - # install url - install_url = "https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi"; - # method https://mozilla.github.io/policy-templates/#extensionsettings - installation_mode = "force_installed"; - }; - ``` - ''; + ``` + ''; + }; }; } diff --git a/modules/programs/browser/firefox.nix b/modules/programs/browser/firefox.nix index 5a0abac..6493b79 100644 --- a/modules/programs/browser/firefox.nix +++ b/modules/programs/browser/firefox.nix @@ -103,7 +103,19 @@ in { extraPolicies = config.mods.browser.firefox.configuration // { - ExtensionSettings = builtins.foldl' (acc: ext: acc // ext) {} config.mods.browser.firefox.extensions; + ExtensionSettings = builtins.foldl' (acc: ext: acc // ext) {} (config.mods.browser.firefox.extensions + ++ ( + if (config.mods.browser.firefox.darkreader) + then [ + { + "addon@darkreader.org" = { + install_url = "file://${pkgs.callPackage ../../../patches/darkreader.nix {inherit lib dashNixAdditionalProps;}}/latest.xpi"; + installation_mode = "normal_installed"; + }; + } + ] + else [] + )); }; }; profiles = builtins.listToAttrs config.mods.browser.firefox.profiles; diff --git a/modules/programs/browser/librewolf.nix b/modules/programs/browser/librewolf.nix index 79f67af..a290fe2 100644 --- a/modules/programs/browser/librewolf.nix +++ b/modules/programs/browser/librewolf.nix @@ -97,7 +97,19 @@ in { extraPolicies = config.mods.browser.librewolf.configuration // { - ExtensionSettings = builtins.foldl' (acc: ext: acc // ext) {} config.mods.browser.librewolf.extensions; + ExtensionSettings = builtins.foldl' (acc: ext: acc // ext) {} (config.mods.browser.librewolf.extensions + ++ ( + if (config.mods.browser.firefox.darkreader) + then [ + { + "addon@darkreader.org" = { + install_url = "file://${pkgs.callPackage ../../../patches/darkreader.nix {inherit lib dashNixAdditionalProps;}}/latest.xpi"; + installation_mode = "normal_installed"; + }; + } + ] + else [] + )); }; }; profiles = builtins.listToAttrs config.mods.browser.librewolf.profiles; diff --git a/modules/programs/browser/zen.nix b/modules/programs/browser/zen.nix index 571edf3..5049079 100644 --- a/modules/programs/browser/zen.nix +++ b/modules/programs/browser/zen.nix @@ -130,7 +130,19 @@ in { extraPolicies = config.mods.browser.zen.configuration // { - ExtensionSettings = builtins.foldl' (acc: ext: acc // ext) {} config.mods.browser.zen.extensions; + ExtensionSettings = builtins.foldl' (acc: ext: acc // ext) {} (config.mods.browser.zen.extensions + ++ ( + if (config.mods.browser.firefox.darkreader) + then [ + { + "addon@darkreader.org" = { + install_url = "file://${pkgs.callPackage ../../../patches/darkreader.nix {inherit lib dashNixAdditionalProps;}}/latest.xpi"; + installation_mode = "normal_installed"; + }; + } + ] + else [] + )); }; }; profiles = builtins.listToAttrs config.mods.browser.zen.profiles; From 88c305d4f21aecc8ec439c3c88c05ddcfe59cc47 Mon Sep 17 00:00:00 2001 From: DashieTM Date: Mon, 26 May 2025 10:06:03 +0200 Subject: [PATCH 057/118] Add pnpm --- modules/programs/coding.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/programs/coding.nix b/modules/programs/coding.nix index b6a71ae..7bcf931 100644 --- a/modules/programs/coding.nix +++ b/modules/programs/coding.nix @@ -241,6 +241,7 @@ in { typescript nodePackages.typescript-language-server nodePackages.prettier + pnpm ]; example = []; type = with lib.types; listOf package; From c62cc3a2bd80ebeb9e55cb6198f9a4283687f12a Mon Sep 17 00:00:00 2001 From: DashieTM Date: Thu, 29 May 2025 19:48:10 +0200 Subject: [PATCH 058/118] oxipaste: update command --- modules/programs/hypr/hyprland.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/programs/hypr/hyprland.nix b/modules/programs/hypr/hyprland.nix index 5a9e0e5..bf5b1f9 100644 --- a/modules/programs/hypr/hyprland.nix +++ b/modules/programs/hypr/hyprland.nix @@ -194,7 +194,7 @@ in { (lib.mkIf (config.mods.oxi.oxidash.enable) "$mod SUPER,M,exec,oxidash") (lib.mkIf (config.mods.oxi.oxicalc.enable) "$mod SUPER,G,exec,oxicalc") (lib.mkIf (config.mods.oxi.oxishut.enable) "$mod SUPER,D,exec,oxishut") - (lib.mkIf (config.mods.oxi.oxipaste.enable) "$mod SUPER,A,exec,oxipaste-iced") + (lib.mkIf (config.mods.oxi.oxipaste.enable) "$mod SUPER,A,exec,oxipaste") (lib.mkIf (config.mods.oxi.hyprdock.enable) "$mod SUPERSHIFT,P,exec,hyprdock --gui") (lib.mkIf (config.mods.hypr.hyprlock.enable) "$mod SUPERSHIFT,L,exec, playerctl -a pause & hyprlock & systemctl suspend") (lib.mkIf (config.mods.hypr.hyprlock.enable) "$mod SUPERSHIFT,K,exec, playerctl -a pause & hyprlock & systemctl hibernate") From 92d5e800a2825f334917e76556e906605b2c1d4c Mon Sep 17 00:00:00 2001 From: DashieTM Date: Thu, 29 May 2025 21:04:23 +0200 Subject: [PATCH 059/118] chaoticNyx: move to module --- lib/default.nix | 3 +++ lib/importPkgs.nix | 2 +- modules/programs/gaming.nix | 1 + modules/programs/xone.nix | 2 +- 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/default.nix b/lib/default.nix index 1f7d151..2f3a471 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -50,9 +50,11 @@ inputs.stylix.nixosModules.stylix inputs.disko.nixosModules.disko inputs.superfreq.nixosModules.default + inputs.sops-nix.nixosModules.sops ../base ../home ../modules + inputs.chaoticNyx.nixosModules.default ]; home = [ inputs.anyrun.homeManagerModules.default @@ -69,6 +71,7 @@ inputs.sops-nix.homeManagerModules.sops inputs.dashvim.homeManagerModules.dashvim inputs.fancontrol.homeManagerModules.default + inputs.chaoticNyx.homeManagerModules.default ../modules ]; }, diff --git a/lib/importPkgs.nix b/lib/importPkgs.nix index 5ce6aad..77e1299 100644 --- a/lib/importPkgs.nix +++ b/lib/importPkgs.nix @@ -12,6 +12,6 @@ import pkgs { }; overlays = [ inputs.nur.overlays.default - inputs.chaoticNyx.overlays.default + inputs.chaoticNyx.overlays.cache-friendly ]; } diff --git a/modules/programs/gaming.nix b/modules/programs/gaming.nix index 1bb8d96..bf99b16 100644 --- a/modules/programs/gaming.nix +++ b/modules/programs/gaming.nix @@ -75,6 +75,7 @@ lib.optionalAttrs (options ? environment.systemPackages) { environment.systemPackages = config.mods.gaming.tools; boot.kernelPackages = lib.mkForce pkgs.linuxPackages_cachyos; + services.scx.enable = true; programs = { steam.enable = mkDashDefault config.mods.gaming.steam; diff --git a/modules/programs/xone.nix b/modules/programs/xone.nix index 36d92f0..84ecd48 100644 --- a/modules/programs/xone.nix +++ b/modules/programs/xone.nix @@ -15,5 +15,5 @@ }; }; - config = lib.optionalAttrs (options ? hardware) {hardware.xone.enable = true;}; + config = lib.optionalAttrs (options ? hardware) {hardware.xone.enable = config.mods.xone.enable;}; } From c31afcac981abe9200f09cac1e07fd91355397fd Mon Sep 17 00:00:00 2001 From: DashieTM Date: Mon, 9 Jun 2025 13:29:45 +0200 Subject: [PATCH 060/118] configure xdg-desktop-portal --- flake.nix | 5 --- modules/programs/hypr/hyprland.nix | 49 ++++++++++++++++++------------ 2 files changed, 29 insertions(+), 25 deletions(-) diff --git a/flake.nix b/flake.nix index 6f639c7..f074440 100644 --- a/flake.nix +++ b/flake.nix @@ -21,11 +21,6 @@ sops-nix.url = "github:Mic92/sops-nix"; - Hyprspace = { - url = "github:KZDKM/Hyprspace"; - inputs.hyprland.follows = "hyprland"; - }; - hyprland.url = "git+https://github.com/hyprwm/Hyprland?submodules=1"; ironbar = { diff --git a/modules/programs/hypr/hyprland.nix b/modules/programs/hypr/hyprland.nix index bf5b1f9..986ef8a 100644 --- a/modules/programs/hypr/hyprland.nix +++ b/modules/programs/hypr/hyprland.nix @@ -4,7 +4,6 @@ lib, options, pkgs, - inputs, ... }: let browserName = @@ -141,6 +140,15 @@ in { Please note, plugins tend to break VERY often. ''; }; + filePickerPortal = lib.mkOption { + default = "gnome"; + example = "kde"; + type = with lib.types; (enum ["gnome" "kde" "gtk" "disable"]); + description = '' + The file picker portal to use with Hyprland. + Disable removes the config, allowing you to set it yourself. + ''; + }; }; config = lib.mkIf config.mods.hypr.hyprland.enable ( @@ -152,16 +160,30 @@ in { slurp satty xdg-desktop-portal-gtk - # xdg-desktop-portal-hyprland copyq wl-clipboard hyprcursor hyprpicker + (lib.mkIf (config.mods.hypr.hyprland.filePickerPortal == "kde") xdg-desktop-portal-kde) + (lib.mkIf (config.mods.hypr.hyprland.filePickerPortal == "gnome") xdg-desktop-portal-gnome) ]; + xdg.configFile."xdg-desktop-portal/portals.conf" = lib.mkIf (config.mods.hypr.hyprland.filePickerPortal != "none") { + text = '' + [preferred] + default = hyprland;gtk + org.freedesktop.impl.portal.FileChooser = ${config.mods.hypr.hyprland.filePickerPortal} + ''; + }; + wayland.windowManager.hyprland = { - package = mkDashDefault pkgs.hyprland; enable = true; + package = mkDashDefault pkgs.hyprland; + plugins = + [ + (lib.mkIf config.mods.hypr.hyprland.hyprspaceEnable pkgs.hyprlandPlugins.hyprspace) + ] + ++ config.mods.hypr.hyprland.plugins; settings = if config.mods.hypr.hyprland.useDefaultConfig then @@ -281,6 +303,9 @@ in { "$mod SUPER,P,resizeactive,20 0" "$mod SUPER,O,resizeactive,0 -20" "$mod SUPER,I,resizeactive,0 20" + + (lib.mkIf config.mods.hypr.hyprland.hyprspaceEnable + "SUPER, W, overview:toggle") ]; general = { @@ -426,27 +451,11 @@ in { ] ++ config.mods.hypr.hyprland.extraAutostart; - plugin = - lib.mkMerge - [ - { - hyprspace = lib.mkIf config.mods.hypr.hyprland.hyprspaceEnable { - bind = [ - "SUPER, W, overview:toggle, toggle" - ]; - }; - } - config.mods.hypr.hyprland.pluginConfig - ]; + plugin = config.mods.hypr.hyprland.pluginConfig; } config.mods.hypr.hyprland.customConfig ] else lib.mkForce config.mods.hypr.hyprland.customConfig; - plugins = - [ - (lib.mkIf config.mods.hypr.hyprland.hyprspaceEnable inputs.Hyprspace.packages.${pkgs.system}.Hyprspace) - ] - ++ config.mods.hypr.hyprland.plugins; }; } ); From 01ed785bf0669ef0442f1ec2a22be87f2366b66c Mon Sep 17 00:00:00 2001 From: DashieTM Date: Mon, 9 Jun 2025 20:20:02 +0200 Subject: [PATCH 061/118] Remove direct installations of pnpm and yarn --- modules/programs/coding.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/modules/programs/coding.nix b/modules/programs/coding.nix index 7bcf931..b6a71ae 100644 --- a/modules/programs/coding.nix +++ b/modules/programs/coding.nix @@ -241,7 +241,6 @@ in { typescript nodePackages.typescript-language-server nodePackages.prettier - pnpm ]; example = []; type = with lib.types; listOf package; From 755638fe48177f067fb4edc682f4da2b418e014e Mon Sep 17 00:00:00 2001 From: DashieTM Date: Mon, 16 Jun 2025 23:27:50 +0200 Subject: [PATCH 062/118] feat(wallpaper): Use themed nix wallpaper by default --- assets/rainbow.svg | 141 ++++++++++++++++++++++++++++++++++++ modules/programs/stylix.nix | 36 +++++++-- 2 files changed, 169 insertions(+), 8 deletions(-) create mode 100644 assets/rainbow.svg diff --git a/assets/rainbow.svg b/assets/rainbow.svg new file mode 100644 index 0000000..9f59c7c --- /dev/null +++ b/assets/rainbow.svg @@ -0,0 +1,141 @@ + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + diff --git a/modules/programs/stylix.nix b/modules/programs/stylix.nix index 657f078..a95b488 100644 --- a/modules/programs/stylix.nix +++ b/modules/programs/stylix.nix @@ -4,9 +4,28 @@ config, options, unstable, + inputs, pkgs, ... -}: { +}: let + svg = ../../assets/rainbow.svg; + sd = lib.getExe pkgs.sd; + base16 = pkgs.callPackage inputs.base16.lib {}; + mkWallpaper = schemeStr: let + scheme = base16.mkSchemeAttrs schemeStr; + in + pkgs.runCommand "rainbow.png" {} '' + cat ${svg} \ + | ${sd} '#f9e2af' '#${scheme.base0A}' \ + | ${sd} '#fab387' '#${scheme.base09}' \ + | ${sd} '#f38ba8' '#${scheme.base08}' \ + | ${sd} '#89b4fa' '#${scheme.base0D}' \ + | ${sd} '#cba6f7' '#${scheme.base0E}' \ + | ${sd} '#a6e3a1' '#${scheme.base0B}' \ + | ${sd} '#1e1e2e' '#${scheme.base00}' \ + | ${lib.getExe pkgs.imagemagick} svg:- png:$out + ''; +in { options.mods.stylix = { colorscheme = lib.mkOption { default = "catppuccin-mocha"; @@ -85,11 +104,16 @@ description = "font config"; }; }; - config = + config = let + scheme = + if builtins.isAttrs config.mods.stylix.colorscheme + then config.mods.stylix.colorscheme + else "${pkgs.base16-schemes}/share/themes/${config.mods.stylix.colorscheme}.yaml"; + in (lib.optionalAttrs (options ? stylix) { stylix = { enable = true; - image = mkDashDefault ../../base/black.jpg; + image = mkDashDefault (mkWallpaper scheme); polarity = mkDashDefault "dark"; targets = { nixvim.enable = mkDashDefault false; @@ -97,11 +121,7 @@ }; fonts = config.mods.stylix.fonts; cursor = config.mods.stylix.cursor; - base16Scheme = ( - if builtins.isAttrs config.mods.stylix.colorscheme - then config.mods.stylix.colorscheme - else "${pkgs.base16-schemes}/share/themes/${config.mods.stylix.colorscheme}.yaml" - ); + base16Scheme = scheme; }; }) // lib.optionalAttrs (options ? environment.systemPackages) { From 2316836b55e503a1cc7ea2b3cb011ce6da056600 Mon Sep 17 00:00:00 2001 From: DashieTM Date: Mon, 16 Jun 2025 23:35:34 +0200 Subject: [PATCH 063/118] chore(gaming): Disable custom scheduler due to freezes --- modules/programs/gaming.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/programs/gaming.nix b/modules/programs/gaming.nix index bf99b16..2c6617a 100644 --- a/modules/programs/gaming.nix +++ b/modules/programs/gaming.nix @@ -75,7 +75,8 @@ lib.optionalAttrs (options ? environment.systemPackages) { environment.systemPackages = config.mods.gaming.tools; boot.kernelPackages = lib.mkForce pkgs.linuxPackages_cachyos; - services.scx.enable = true; + # TODO Re-enable when fixed + #services.scx.enable = true; programs = { steam.enable = mkDashDefault config.mods.gaming.steam; From 5c34749874ebaefe804e5af11be1115259b4a617 Mon Sep 17 00:00:00 2001 From: DashieTM Date: Mon, 16 Jun 2025 23:47:32 +0200 Subject: [PATCH 064/118] chore(hyprland): Remove remaining userspecific defaults --- modules/programs/hypr/hyprland.nix | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/modules/programs/hypr/hyprland.nix b/modules/programs/hypr/hyprland.nix index 986ef8a..c6f3c8d 100644 --- a/modules/programs/hypr/hyprland.nix +++ b/modules/programs/hypr/hyprland.nix @@ -201,7 +201,6 @@ in { # screenshots ''$mod SUPER,S,exec,grim -g "$(slurp)" - | wl-copy'' ''$mod SUPERSHIFT,S,exec,grim -g "$(slurp)" - | satty -f -'' - ''$mod SUPERSHIFTALT,S,exec,grim -c -g "2560,0 3440x1440" - | wl-copy'' # regular programs "$mod SUPER,F,exec,${browserName}" @@ -312,7 +311,6 @@ in { gaps_out = mkDashDefault "3,5,5,5"; border_size = mkDashDefault 3; "col.active_border" = lib.mkOverride 51 "0xFFFF0000 0xFF00FF00 0xFF0000FF 45deg"; - # "col.inactive_border" = "0x66333333"; allow_tearing = lib.mkIf config.mods.hypr.hyprland.noAtomic true; }; @@ -401,7 +399,6 @@ in { "QT_WAYLAND_DISABLE_WINDOWDECORATION,1" "QT_SCALE_FACTOR,1" ''EDITOR,"neovide --novsync --nofork"'' - "GTK_USE_PORTAL, 1" (lib.mkIf config.mods.gpu.nvidia.enable "LIBVA_DRIVER_NAME,nvidia") (lib.mkIf config.mods.gpu.nvidia.enable "XDG_SESSION_TYPE,wayland") @@ -421,15 +418,10 @@ in { "float,class:^(.*)(winecfg.exe)(.*)$" "float,class:^(.*)(copyq)(.*)$" "center,class:^(.*)(swappy)(.*)$" - "float,title:^(.*)(reset)(.*)$" "workspace 10 silent,class:^(.*)(steam)(.*)$" - "workspace 9 silent,class:^(.*)(dota)(.*)$" - "workspace 9 silent,class:^(.*)(battlebits)(.*)$" - "workspace 9 silent,class:^(.*)(aoe)(.*)$" + + # Otherwise neovide will ignore tiling "suppressevent fullscreen maximize,class:^(.*)(neovide)(.*)$" - "immediate,class:^(.*)(Pal)$" - "immediate,class:^(.*)(dota2)$" - "immediate,class:^(.*)(needforspeedheat.exe)$" ]; exec-once = @@ -437,7 +429,7 @@ in { # environment "systemctl --user import-environment" "dbus-update-activation-environment --systemd --all" - "hyprctl setcursor Bibata-Modern-Classic 24" + "hyprctl setcursor ${config.mods.stylix.cursor.name} ${toString config.mods.stylix.cursor.size}" # ensures the systemd service knows what "hyprctl" is :) (lib.mkIf config.mods.gaming.gamemode "systemctl try-restart gamemoded.service --user") From 114ad5b56931d5d200f263b516b6758745d83fcc Mon Sep 17 00:00:00 2001 From: DashieTM Date: Tue, 17 Jun 2025 23:50:59 +0200 Subject: [PATCH 065/118] bugfix(hyprdock): Use Xetibo version --- flake.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index f074440..38a651e 100644 --- a/flake.nix +++ b/flake.nix @@ -45,7 +45,7 @@ oxipaste.url = "github:Xetibo/OxiPaste"; oxirun.url = "github:Xetibo/OxiRun"; # For now until merged into Xetibo - hyprdock.url = "github:DashieTM/hyprdock"; + hyprdock.url = "github:Xetibo/hyprdock"; reset.url = "github:Xetibo/ReSet"; reset-plugins.url = "github:Xetibo/ReSet-Plugins"; From d3787c546e049ac7261192cab4771575ad623ff0 Mon Sep 17 00:00:00 2001 From: DashieTM Date: Fri, 20 Jun 2025 03:31:06 +0200 Subject: [PATCH 066/118] feat(ironbar): Update config --- modules/programs/ironbar.nix | 431 +++++++++++++++++++++++------------ 1 file changed, 289 insertions(+), 142 deletions(-) diff --git a/modules/programs/ironbar.nix b/modules/programs/ironbar.nix index 300e1a2..98942a9 100644 --- a/modules/programs/ironbar.nix +++ b/modules/programs/ironbar.nix @@ -13,94 +13,150 @@ ironbarDefaultConfig = { end = [ { - type = "sys_info"; - format = [" {memory_percent}"]; - interval.memory = 30; - class = "memory-usage"; + class = "music"; + type = "music"; + format = ""; + truncate = { + mode = "end"; + max_length = 0; + }; + icons = { + play = ""; + pause = ""; + }; + truncate_popup_title = { + mode = "end"; + max_length = 15; + }; + truncate_popup_album = { + mode = "end"; + max_length = 15; + }; + truncate_popup_artist = { + mode = "end"; + max_length = 15; + }; } { - type = "custom"; bar = [ { - type = "button"; class = "popup-button"; label = ""; on_click = "popup:toggle"; + type = "button"; } ]; class = "popup-button-box"; popup = [ { - type = "box"; - orientation = "vertical"; class = "audio-box"; + orientation = "vertical"; + type = "box"; widgets = [ { - type = "box"; + class = "audio-button-box"; orientation = "horizontal"; + type = "box"; widgets = [ { - type = "button"; class = "audio-button"; label = ""; - on_click = lib.mkIf config.mods.scripts.audioControl "!audioControl bluetooth"; + on_click = "!audioControl bluetooth"; + type = "button"; } { - type = "button"; class = "audio-button"; label = "󰋋"; - on_click = lib.mkIf config.mods.scripts.audioControl "!audioControl internal"; + on_click = "!audioControl internal"; + type = "button"; } ]; - class = "audio-button-box"; } { - type = "label"; + class = "audio-label"; label = "Output"; - } - { - type = "slider"; - class = "audio-slider"; - step = 1.0; - length = 200; - value = "pactl get-sink-volume @DEFAULT_SINK@ | awk -F'/' '{ print $2 }' | tr -d ' %'"; - on_change = "!pactl set-sink-volume @DEFAULT_SINK@ $0%"; - } - { type = "label"; - label = "Input"; } { - type = "slider"; class = "audio-slider"; - step = 1.0; length = 200; - value = "pactl get-source-volume @DEFAULT_SOURCE@ | awk -F'/' '{ print $2 }' | tr -d ' %'"; + on_change = "!pactl set-sink-volume @DEFAULT_SINK@ $0%"; + step = 1.0; + type = "slider"; + value = "pactl get-sink-volume @DEFAULT_SINK@ | awk -F'/' '{ print $2 }' | tr -d ' %'"; + label = "{{pactl get-sink-volume @DEFAULT_SINK@ | awk -F'/' '{ print $2 }'}}"; + } + { + class = "audio-label"; + label = "Input"; + type = "label"; + } + { + class = "audio-slider"; + length = 200; on_change = "!pactl set-source-volume @DEFAULT_SOURCE@ $0%"; + step = 1.0; + type = "slider"; + value = "pactl get-source-volume @DEFAULT_SOURCE@ | awk -F'/' '{ print $2 }' | tr -d ' %'"; + } + ]; + } + ]; + type = "custom"; + } + { + bar = [ + { + class = "popup-button"; + label = ""; + on_click = "!oxidash --css /home/dashie/gits/oxidash/style.css"; + type = "button"; + } + ]; + class = "popup-button-box"; + type = "custom"; + } + { + bar = [ + { + class = "popup-button"; + label = ""; + on_click = "popup:toggle"; + type = "button"; + } + ]; + type = "custom"; + class = "popup-button-box"; + popup = [ + { + class = "system-box"; + type = "box"; + widgets = [ + { + class = "memory-usage"; + format = [ + " {cpu_percent}%" + " {memory_used} / {memory_total} GB ({memory_percent}%)" + " {swap_used} / {swap_total} GB ({swap_free} | {swap_percent}%)" + "󰥔 {uptime}" + ]; + direction = "vertical"; + interval = { + memory = 30; + cpu = 5; + temps = 5; + disks = 5; + network = 5; + }; + type = "sys_info"; } ]; } ]; } { - type = "custom"; - bar = [ - { - type = "button"; - class = "popup-button"; - label = ""; - on_click = "!oxidash --css /home/${username}/gits/oxidash/style.css"; - } - ]; - class = "popup-button-box"; + type = "tray"; } - { - type = "clock"; - format = "%I:%M"; - format_popup = "%I:%M:%S"; - locale = "en_US"; - } - {type = "tray";} ]; position = "top"; height = 10; @@ -113,11 +169,10 @@ ]; center = [ { - type = "focused"; - show_icon = true; - show_title = true; - icon_size = 20; - truncate = "end"; + format = "%I:%M"; + format_popup = "%a %d:%m/%I:%M %p"; + locale = "en_US"; + type = "clock"; } ]; }; @@ -188,132 +243,224 @@ in { '' @import url("/home/${username}/.config/gtk-3.0/gtk.css"); + @define-color primary #${scheme.base0D}; + @define-color muted-text #${scheme.base05}; + @define-color background #${scheme.base00}; + @define-color secondary-background #${scheme.base02}; + + * slider { + background-color: @muted-text; + } + * { - color: #${scheme.base0D}; - padding: 0px; - margin: 0px; + transition: + background-color 0.15s ease-in-out, + color 0.15s ease-in-out, + border-color 0.15s ease-in-out; } .background { background-color: rgba(0, 0, 0, 0); - } - - .workspaces { - margin: 2px 0px 0px 5px; - border-radius: 10px; - background-color: #${scheme.base00}; - padding: 2px 5px 2px 5px; - } - - .workspaces .item { - margin: 0px 3px 0px 3px; - font-size: 13px; - border-radius: 100%; - padding: 0px 2px 0px 3px; - background-color: rgba(0, 0, 0, 0); - } - - .workspaces .item:hover { - background-color: #${scheme.base02}; - } - - .workspaces .item.focused { - background-color: #${scheme.base02}; - } - - .audio-box { - padding: 2em; - background-color: #${scheme.base00}; - border-radius: 5px; - } - - .audio-slider { - padding: 5px; - margin: 5px; - } - - .audio-button { - padding: 5px 10px 5px 10px; - margin: 0px 1em 20px 1em; - border-radius: 100%; - font-size: 17px; - } - - .audio-button-box { - padding: 0px 2.5em 0px 2.5em; + padding: 0px; + margin: 0px; } .focused { - padding: 0px 5px 0px 5px; - background-color: #${scheme.base00}; + padding: 0px 5px; + background-color: @background; font-size: 17px; border-radius: 10px; } #bar #end { - margin: 0px 5px 0px 0px; - padding: 0px 5px 0px 5px; - background-color: #${scheme.base00}; + margin: 0px 5px; + padding: 0px 5px; + background-color: @background; border-radius: 10px; } .popup-button { - padding: 0px 5px 0px 3px; - margin: 0em 3px; + padding: 0px 5px 0px 2px; border-radius: 100%; font-size: 13px; - background-color: #${scheme.base00}; + background-color: @background; } .popup-button-box { - padding: 2px 0px 2px 0px; - } - - .clock { - padding: 0px 5px 0px 5px; - font-size: 17px; - background-color: #${scheme.base00}; - } - - .clock:hover { - background-color: #${scheme.base02}; + padding: 2px 0px; + margin-right: 4px; } .custom button { - background-color: #${scheme.base00}; + background-color: @background; + color: @primary; } .custom button:hover { - background-color: #${scheme.base02}; + background-color: @secondary-background; + } + + /* audio */ + .audio-box * { + color: @primary; + } + + .audio-box { + padding: 2em; + background-color: @background; + border-radius: 5px; + border: 1px solid @primary; + } + + .audio-slider { + padding: 5px; + margin: 5px 5px 15px; + } + + .audio-label { + font-size: 19px; + } + + .audio-button { + padding: 10px 10px 10px 8px; + min-height: 35px; + min-width: 35px; + margin: 0px 1em; + border-radius: 50%; + font-size: 25px; + } + + .audio-button-box { + padding: 0px 2.5em 0px 2.5em; + margin: 0em 0em 1.5em; + } + + /* clock */ + .clock { + padding: 0px 5px; + font-size: 20px; + border-radius: 5px; + background-color: @background; + color: @primary; + } + + .clock:hover { + background-color: @secondary-background; + } + + .popup-clock { + font-size: 2.5em; + background-color: @background; + border: 1px solid @primary; + padding: 0.5em; + border-radius: 8px; + color: @primary; + } + + .popup-clock .calendar-clock { + margin: 0.25em 0em 0.75em; + color: @primary; + } + + .popup-clock .calendar { + font-size: 24px; + color: @primary; + } + + .popup-clock .calendar:selected { + background-color: @secondary-background; + } + + /* workspaces */ + .workspaces { + margin: 0px 0px 0px 5px; + border-radius: 10px; + background-color: @background; + padding: 2px 5px; + } + + .workspaces .item { + margin: 0px 3px; + font-size: 13px; + border-radius: 100%; + padding: 0px 3px 0px 3px; + background-color: rgba(0, 0, 0, 0); + color: @primary; + } + + .workspaces .item:hover { + background-color: @secondary-background; + color: @primary; + } + + .workspaces .item.focused { + background-color: @primary; + color: @background; + } + + /* music */ + .music { + font-size: 13px; + padding: 0px 4px 0px 3px; + margin: 2px 0px 2px 0px; + background-color: @background; + color: @primary; + } + + .music:hover { + background-color: @secondary-background; + border-radius: 100%; + } + + .music .contents .icon { + margin: 0px 0px 0px 5px; + } + + .popup-music { + background-color: @background; + color: @primary; + border-radius: 8px; + border: 1px solid @primary; + padding: 16px; + font-size: 20px; + } + + .popup-music .controls .btn-prev { + color: @primary; + margin-right: 16px; + } + + .popup-music .controls .btn-next { + color: @primary; + margin-right: 16px; + } + + .popup-music .controls .btn-play { + color: @primary; + margin-right: 16px; + } + + .popup-music .controls .btn-pause { + color: @primary; + margin-right: 16px; + } + + /* system */ + .system-box { + padding: 16px; + color: @primary; + border: 1px solid @primary; + background-color: @background; + border-radius: 8px; } .memory-usage { font-size: 15px; - margin: 0px 5px 0px 0px; + color: @primary; } .memory-usage:hover { - background-color: #${scheme.base02}; - } - - .popup-clock { - background-color: #${scheme.base00}; - border-radius: 5px; - padding: 2px 8px 10px 8px; - } - - .popup-clock .calendar-clock { - font-size: 2.5em; - padding-bottom: 0.1em; - } - - .popup-clock .calendar { - border-radius: 5px; - font-size: 1.05em; - } - - .popup-clock .calendar:selected { - background-color: #${scheme.base02}; + background-color: @secondary-background; } '' + config.mods.ironbar.customCss From faa8379e250350969ba28f3bfd14c61c738f7e4e Mon Sep 17 00:00:00 2001 From: DashieTM Date: Fri, 20 Jun 2025 23:59:16 +0200 Subject: [PATCH 067/118] feat(oxiced): New stylix to oxiced adapter --- home/themes/oxiced.nix | 53 +++++++++++++++++++++++++++++++++++++ modules/programs/stylix.nix | 12 ++++----- 2 files changed, 59 insertions(+), 6 deletions(-) diff --git a/home/themes/oxiced.nix b/home/themes/oxiced.nix index 562ddd8..5ab624f 100644 --- a/home/themes/oxiced.nix +++ b/home/themes/oxiced.nix @@ -8,9 +8,62 @@ # hence ensure it is by using base16 mkSchemeAttrs base16 = pkgs.callPackage inputs.base16.lib {}; scheme = base16.mkSchemeAttrs config.stylix.base16Scheme; + valueOrDefault = value: fallback: + if (scheme ? oxiced && scheme.oxiced ? ${value}) + then scheme.oxiced.value + else fallback; in { xdg.configFile."oxiced/theme.toml" = { source = (pkgs.formats.toml {}).generate "oxiced" { + base = valueOrDefault "base" scheme.base00; + mantle = valueOrDefault "mantle" scheme.base01; + primary_bg = valueOrDefault "primary_bg" scheme.base02; + secondary_bg = valueOrDefault "secondary_bg" scheme.base03; + tertiary_bg = valueOrDefault "tertiary_bg" scheme.base04; + text = valueOrDefault "text" scheme.base05; + + primary = valueOrDefault "primary" scheme.base0D; + primary_contrast = valueOrDefault "primary_contrast" "FFFFFF"; + secondary = valueOrDefault "primary" scheme.base07; + secondary_contrast = valueOrDefault "secondary_contrast" "FFFFFF"; + + good = valueOrDefault "good" scheme.base0B; + good_contrast = valueOrDefault "good_contrast" "000000"; + bad = valueOrDefault "bad" scheme.base08; + bad_contrast = valueOrDefault "bad_contrast" "FFFFFF"; + warning = valueOrDefault "warning" scheme.base0A; + warning_contrast = valueOrDefault "warning_contrast" "000000"; + info = valueOrDefault "info" scheme.base0C; + info_contrast = valueOrDefault "info_contrast" "FFFFFF"; + + rose = valueOrDefault "rose" scheme.base06; + lavender = valueOrDefault "lavender" scheme.base07; + blue = valueOrDefault "blue" scheme.base0D; + mauve = valueOrDefault "mauve" scheme.base0E; + flamingo = valueOrDefault "flamingo" scheme.base0F; + + border_color_weak = valueOrDefault "border_color_weak" scheme.base05; + border_color_strong = valueOrDefault "border_color_strong" scheme.base0D; + + tint_amount = valueOrDefault "tint_amound" 0.10; + shade_amount = valueOrDefault "shade_amount" 0.05; + + border_radius = valueOrDefault "border_radius" 10; + + padding_xs = valueOrDefault "padding_xs" 4.0; + padding_sm = valueOrDefault "padding_sm" 8.0; + padding_md = valueOrDefault "padding_md" 12.0; + padding_lg = valueOrDefault "padding_lg" 16.0; + padding_xl = valueOrDefault "padding_xl" 24.0; + padding_xxl = valueOrDefault "padding_xxl" 32.0; + + font_sm = valueOrDefault "font_sm" 10.0; + font_md = valueOrDefault "font_md" 14.0; + font_lg = valueOrDefault "font_lg" 18.0; + font_xl = valueOrDefault "font_xl" 24.0; + font_xxl = valueOrDefault "font_xxl" 32.0; + + # legacy compatibility name = scheme.scheme; base00 = scheme.base00; base01 = scheme.base01; diff --git a/modules/programs/stylix.nix b/modules/programs/stylix.nix index a95b488..6dc71af 100644 --- a/modules/programs/stylix.nix +++ b/modules/programs/stylix.nix @@ -32,8 +32,6 @@ in { example = { # custom tokyo night base00 = "1A1B26"; - # base01 = "16161E"; - # base01 = "15161e"; base01 = "191a25"; base02 = "2F3549"; base03 = "444B6A"; @@ -46,10 +44,6 @@ in { base0A = "0DB9D7"; base0B = "9ECE6A"; base0C = "B4F9F8"; - # base0D = "2AC3DE"; - # base0D = "A9B1D6"; - # base0D = "62A0EA"; - # base0D = "779EF1"; base0D = "366fea"; base0E = "BB9AF7"; base0F = "F7768E"; @@ -65,6 +59,12 @@ in { Can be an attribute set with base00 to base0F, a string that leads to a yaml file in base16-schemes path, or a path to a custom yaml file. + + Also supports the oxiced theme in an oxiced attrset. + oxiced = { + # and more + primary = "#yourcolor"; + }; ''; }; cursor = lib.mkOption { From 5447e31d11ea57e4b0040e82b69591611557a084 Mon Sep 17 00:00:00 2001 From: DashieTM Date: Sat, 21 Jun 2025 01:37:19 +0200 Subject: [PATCH 068/118] chore(rocm): disable icd due to broken package --- modules/programs/gpu.nix | 3 ++- modules/programs/stylix.nix | 4 ---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/modules/programs/gpu.nix b/modules/programs/gpu.nix index 5cd26bf..8fd8959 100644 --- a/modules/programs/gpu.nix +++ b/modules/programs/gpu.nix @@ -91,7 +91,8 @@ (lib.mkIf (config.mods.gpu.intelgpu.enable || config.mods.gpu.amdgpu.enable) pkgs.mesa) ]; rocmPackages = [ - pkgs.rocmPackages.clr.icd + # TODO broken + #pkgs.rocmPackages.clr.icd pkgs.mesa pkgs.mesa.opencl pkgs.vulkan-loader diff --git a/modules/programs/stylix.nix b/modules/programs/stylix.nix index 6dc71af..124cc64 100644 --- a/modules/programs/stylix.nix +++ b/modules/programs/stylix.nix @@ -61,10 +61,6 @@ in { or a path to a custom yaml file. Also supports the oxiced theme in an oxiced attrset. - oxiced = { - # and more - primary = "#yourcolor"; - }; ''; }; cursor = lib.mkOption { From db7e1c050bc50ad72a6af84bb74a52215fb2a5d0 Mon Sep 17 00:00:00 2001 From: DashieTM Date: Sat, 21 Jun 2025 13:29:51 +0200 Subject: [PATCH 069/118] feat(hyprland): Use better animations --- modules/programs/hypr/hyprland.nix | 10 +++++----- modules/programs/ironbar.nix | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/programs/hypr/hyprland.nix b/modules/programs/hypr/hyprland.nix index c6f3c8d..2a7d35e 100644 --- a/modules/programs/hypr/hyprland.nix +++ b/modules/programs/hypr/hyprland.nix @@ -323,15 +323,15 @@ in { }; animations = { - bezier = mkDashDefault "penguin,0.05,0.9,0.1,1.0"; + bezier = mkDashDefault "overshot, 0.05, 0.9, 0.1, 1.2"; animation = [ "windowsMove,1,4,default" - "windows,1,7,default,popin 70%" + "windows,1,3,overshot,slide bottom" "windowsOut,1,7,default,popin 70%" - "border,1,10,default" + "border,1,4,default" "fade,1,7,default" - "workspaces,1,6,default" - "layers,1,3,default,popin" + "workspaces,1,4,default" + "layers,1,2,default,slide" ]; }; diff --git a/modules/programs/ironbar.nix b/modules/programs/ironbar.nix index 98942a9..30427f6 100644 --- a/modules/programs/ironbar.nix +++ b/modules/programs/ironbar.nix @@ -109,7 +109,7 @@ { class = "popup-button"; label = ""; - on_click = "!oxidash --css /home/dashie/gits/oxidash/style.css"; + on_click = "!oxidash"; type = "button"; } ]; From d286a7eac9fa02c72d2b4084188523c8c7fc62f7 Mon Sep 17 00:00:00 2001 From: DashieTM Date: Sun, 22 Jun 2025 16:10:49 +0200 Subject: [PATCH 070/118] feat(ironbar): Add optional battery module --- flake.nix | 2 +- modules/programs/hypr/hyprland.nix | 2 +- modules/programs/ironbar.nix | 54 +++++++++++++++++++++++++++--- 3 files changed, 51 insertions(+), 7 deletions(-) diff --git a/flake.nix b/flake.nix index 38a651e..b709627 100644 --- a/flake.nix +++ b/flake.nix @@ -3,7 +3,7 @@ inputs = { unstable.url = "github:NixOs/nixpkgs/nixos-unstable"; - stable.url = "github:NixOs/nixpkgs/nixos-24.11"; + stable.url = "github:NixOs/nixpkgs/nixos-25.05"; nixos-wsl.url = "github:nix-community/NixOS-WSL/main"; nur.url = "github:nix-community/NUR"; lanzaboote = { diff --git a/modules/programs/hypr/hyprland.nix b/modules/programs/hypr/hyprland.nix index 2a7d35e..65beb78 100644 --- a/modules/programs/hypr/hyprland.nix +++ b/modules/programs/hypr/hyprland.nix @@ -141,7 +141,7 @@ in { ''; }; filePickerPortal = lib.mkOption { - default = "gnome"; + default = "gtk"; example = "kde"; type = with lib.types; (enum ["gnome" "kde" "gtk" "disable"]); description = '' diff --git a/modules/programs/ironbar.nix b/modules/programs/ironbar.nix index 30427f6..ed3fa08 100644 --- a/modules/programs/ironbar.nix +++ b/modules/programs/ironbar.nix @@ -10,8 +10,14 @@ username = config.conf.username; base16 = pkgs.callPackage inputs.base16.lib {}; scheme = base16.mkSchemeAttrs config.stylix.base16Scheme; - ironbarDefaultConfig = { + ironbarDefaultConfig = useBatteryModule: { end = [ + (lib.mkIf useBatteryModule + { + type = "upower"; + class = "battery"; + icon_size = 0; + }) { class = "music"; type = "music"; @@ -176,10 +182,10 @@ } ]; }; - monitorConfig = + monitorConfig = useBatteryModule: if config.mods.hypr.hyprland.ironbarSingleMonitor - then {monitors.${config.mods.hypr.hyprland.defaultMonitor} = ironbarDefaultConfig;} - else ironbarDefaultConfig; + then {monitors.${config.mods.hypr.hyprland.defaultMonitor} = ironbarDefaultConfig useBatteryModule;} + else ironbarDefaultConfig useBatteryModule; in { options.mods = { ironbar = { @@ -197,6 +203,12 @@ in { Use preconfigured ironbar config. ''; }; + useBatteryModule = lib.mkOption { + default = false; + example = true; + type = lib.types.bool; + description = "Whether to use the preconfigured battery module."; + }; customConfig = lib.mkOption { default = {}; example = {}; @@ -398,6 +410,38 @@ in { color: @background; } + /* upower */ + .upower { + font-size: 13px; + padding: 0px 4px 0px 0px; + margin: 2px 0px 2px 0px; + background-color: @background; + color: @primary; + } + + .upower .icon { + opacity: 0.0; + } + + .upower .label { + margin: 2px 0px 0px -8px; + color: @primary; + } + + .upower:hover { + background-color: @secondary-background; + border-radius: 5px; + } + + .popup-upower { + background-color: @background; + color: @primary; + border-radius: 8px; + border: 1px solid @primary; + padding: 16px; + font-size: 20px; + } + /* music */ .music { font-size: 13px; @@ -473,7 +517,7 @@ in { then lib.mkMerge [ - monitorConfig + (monitorConfig config.mods.ironbar.useBatteryModule) config.mods.ironbar.customConfig ] else config.mods.ironbar.customConfig; From 383d454a12aa58f9b3949d39ee758e4382abdba0 Mon Sep 17 00:00:00 2001 From: DashieTM Date: Sun, 22 Jun 2025 23:25:16 +0200 Subject: [PATCH 071/118] feat(oxinoti/oxidash): Adopt styling to theme --- modules/programs/oxi/oxidash.nix | 41 +++++++++++++++++++------------- modules/programs/oxi/oxinoti.nix | 40 ++++++++++++++++++++++--------- 2 files changed, 54 insertions(+), 27 deletions(-) diff --git a/modules/programs/oxi/oxidash.nix b/modules/programs/oxi/oxidash.nix index 476eb60..9ea519e 100644 --- a/modules/programs/oxi/oxidash.nix +++ b/modules/programs/oxi/oxidash.nix @@ -2,8 +2,15 @@ lib, config, options, + pkgs, + inputs, ... -}: { +}: let + # at time of using this here, stylix might not be evaluated yet + # hence ensure it is by using base16 mkSchemeAttrs + base16 = pkgs.callPackage inputs.base16.lib {}; + scheme = base16.mkSchemeAttrs config.stylix.base16Scheme; +in { options.mods.oxi.oxidash = { enable = lib.mkOption { default = true; @@ -17,52 +24,54 @@ programs.oxidash.enable = true; xdg.configFile."oxidash/style.css" = { text = '' + @define-color bg #${scheme.base00}; + @define-color primary #${scheme.base0D}; + #MainWindow { border-radius: 10px; + background-color: transparent; } #MainBox { border-radius: 10px; + border: 1px solid @primary; + background-color: @bg; } #MainButtonBox { padding: 10px; margin: 5px 0px 5px 0px; border-radius: 5px; - border: solid 2px #327cd5; + border: solid 1px @primary; } - #DoNotDisturbButton { - } + #DoNotDisturbButton {} - #ExitButton { - } + #ExitButton {} - #ClearNotificationsButton { - } + #ClearNotificationsButton {} - #NotificationsWindow { - } + #NotificationsWindow {} .debugimage { - border: solid 3px blue; + border: solid 3px @primary; } .Notification { padding: 10px; margin: 5px 0px 5px 0px; - border: solid 2px #327cd5; + border: solid 1px @primary; border-radius: 5px; } .CloseNotificationButton { margin: 0px 5px 0px 10px; } - .PictureButtonBox { + + .PictureButtonBox {} + + .BaseBox {} } - .BaseBox { - } - } ''; }; } diff --git a/modules/programs/oxi/oxinoti.nix b/modules/programs/oxi/oxinoti.nix index b3ecafc..d265af3 100644 --- a/modules/programs/oxi/oxinoti.nix +++ b/modules/programs/oxi/oxinoti.nix @@ -2,8 +2,15 @@ lib, config, options, + pkgs, + inputs, ... -}: { +}: let + # at time of using this here, stylix might not be evaluated yet + # hence ensure it is by using base16 mkSchemeAttrs + base16 = pkgs.callPackage inputs.base16.lib {}; + scheme = base16.mkSchemeAttrs config.stylix.base16Scheme; +in { options.mods.oxi.oxinoti = { enable = lib.mkOption { default = true; @@ -19,7 +26,13 @@ text = # css '' - @import url("/home/${config.conf.username}/.config/gtk-3.0/gtk.css"); + @import url("/home/dashie/.config/gtk-3.0/gtk.css"); + + @define-color bg #${scheme.base00}; + @define-color bghover #${scheme.base02}; + @define-color primary #${scheme.base0D}; + @define-color red #${scheme.base08}; + @define-color green #${scheme.base0B}; #MainWindow { background-color: transparent; @@ -34,31 +47,37 @@ } .NotificationBox { - background-color: #353747; + background-color: @bg; border-radius: 5px; border: solid 1px; margin: 0px; - padding: 5px; + } + + .NotificationBox button { + background-color: @bg; + } + + .NotificationBox button:hover { + background-color: @bghover; } .NotificationLow { - border-color: green; + border-color: @green; } .NotificationNormal { - border-color: purple; + border-color: @primary; } .NotificationUrgent { - border-color: red; + border-color: @red; } .miscbox { margin: 0px 10px 0px 0px; } - .bodybox { - } + .bodybox {} .imagebox { margin: 0px 0px 0px 10px; @@ -84,8 +103,7 @@ font-size: 2rem; } - .image { - } + .image {} .bold { font-weight: bold; From 68b8251e006302faa004859affb601692bb5bec2 Mon Sep 17 00:00:00 2001 From: DashieTM Date: Sat, 19 Jul 2025 23:42:16 +0200 Subject: [PATCH 072/118] packages(gaming): Add protonplus --- modules/programs/gaming.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/programs/gaming.nix b/modules/programs/gaming.nix index 2c6617a..12451d9 100644 --- a/modules/programs/gaming.nix +++ b/modules/programs/gaming.nix @@ -15,6 +15,7 @@ }; tools = lib.mkOption { default = with pkgs; [ + protonplus gamescope gamemode steam From e73a2f0946fe7b2f6fe287e7227a1445b5434cd1 Mon Sep 17 00:00:00 2001 From: DashieTM Date: Sat, 26 Jul 2025 14:13:29 +0200 Subject: [PATCH 073/118] chore(packages): Add nexusmods app --- modules/programs/gaming.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/programs/gaming.nix b/modules/programs/gaming.nix index 12451d9..8f3adc0 100644 --- a/modules/programs/gaming.nix +++ b/modules/programs/gaming.nix @@ -24,6 +24,7 @@ adwsteamgtk heroic mangohud + nexusmods-app ]; example = []; type = with lib.types; listOf package; From 63aff9e90bee766884e3f4fd2b482c82307c238a Mon Sep 17 00:00:00 2001 From: DashieTM Date: Sat, 26 Jul 2025 14:32:17 +0200 Subject: [PATCH 074/118] chore(packages): Add steamtinkerlaunch --- modules/programs/gaming.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/programs/gaming.nix b/modules/programs/gaming.nix index 8f3adc0..135f859 100644 --- a/modules/programs/gaming.nix +++ b/modules/programs/gaming.nix @@ -25,6 +25,7 @@ heroic mangohud nexusmods-app + steamtinkerlaunch ]; example = []; type = with lib.types; listOf package; From cc3fbdc57c2f7710d4e06b826c29a48e8c8e20be Mon Sep 17 00:00:00 2001 From: DashieTM Date: Sat, 26 Jul 2025 14:54:24 +0200 Subject: [PATCH 075/118] chore(packages): Add winetricks --- modules/programs/gaming.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/programs/gaming.nix b/modules/programs/gaming.nix index 135f859..0b2e228 100644 --- a/modules/programs/gaming.nix +++ b/modules/programs/gaming.nix @@ -26,6 +26,7 @@ mangohud nexusmods-app steamtinkerlaunch + winetricks ]; example = []; type = with lib.types; listOf package; From ba2eab4c1716bed38a269b749f75b8b3a3dbcab2 Mon Sep 17 00:00:00 2001 From: DashieTM Date: Fri, 22 Aug 2025 18:58:31 +0200 Subject: [PATCH 076/118] chore(packages): Update deprecations --- modules/programs/browser/zen.nix | 1 + modules/programs/homePackages.nix | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/programs/browser/zen.nix b/modules/programs/browser/zen.nix index 5049079..e26c9a9 100644 --- a/modules/programs/browser/zen.nix +++ b/modules/programs/browser/zen.nix @@ -147,6 +147,7 @@ in { }; profiles = builtins.listToAttrs config.mods.browser.zen.profiles; }; + stylix.targets.zen-browser.profileNames = lib.map (profile: profile.name) config.mods.browser.zen.profiles; } ); } diff --git a/modules/programs/homePackages.nix b/modules/programs/homePackages.nix index b1303b2..eabd176 100644 --- a/modules/programs/homePackages.nix +++ b/modules/programs/homePackages.nix @@ -119,7 +119,7 @@ flake-checker gnome-keyring gnutar - greetd.regreet + regreet killall kitty libnotify From 29b5237c28a4fbfcb649f3a6519e266ac085cbec Mon Sep 17 00:00:00 2001 From: DashieTM Date: Fri, 22 Aug 2025 19:06:27 +0200 Subject: [PATCH 077/118] chore(packages): Remove omnisharp --- modules/programs/coding.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/modules/programs/coding.nix b/modules/programs/coding.nix index b6a71ae..88ad5ba 100644 --- a/modules/programs/coding.nix +++ b/modules/programs/coding.nix @@ -306,7 +306,6 @@ in { default = with pkgs; [ #.! dotnet-sdk - omnisharp-roslyn csharpier netcoredbg fsharp From fb2507afe7d6884a6c0dd44edb26f83dca44bd21 Mon Sep 17 00:00:00 2001 From: DashieTM Date: Sat, 23 Aug 2025 16:42:12 +0200 Subject: [PATCH 078/118] feature(xdg): Include file picker configuration --- home/default.nix | 15 ++++++++++-- modules/programs/gnomeServices.nix | 1 + modules/programs/hypr/hyprland.nix | 22 +++-------------- modules/programs/media.nix | 38 ++++++++++++++++++++++++++++++ 4 files changed, 55 insertions(+), 21 deletions(-) diff --git a/home/default.nix b/home/default.nix index 8b6d079..ee4f804 100644 --- a/home/default.nix +++ b/home/default.nix @@ -18,10 +18,21 @@ ... }: { xdg = { - portal.config.common.default = mkDashDefault "*"; + portal.config.common = { + default = mkDashDefault "hyprland;gtk"; + "org.freedesktop.impl.portal.FileChooser" = lib.mkIf (config.mods.media.filePickerPortal != "Default") "shana"; + }; portal = { enable = mkDashDefault true; - extraPortals = [pkgs.xdg-desktop-portal-gtk]; + extraPortals = with pkgs; [ + xdg-desktop-portal-gtk # prob needed either way + (lib.mkIf (config.mods.media.filePickerPortal != "Default") xdg-desktop-portal-shana) + (lib.mkIf (config.mods.media.filePickerPortal == "Kde") kdePackages.xdg-desktop-portal-kde) + # Gnome uses their file manager, kinda cool tbh + (lib.mkIf (config.mods.media.filePickerPortal == "Gnome" && !config.mods.nautilus.enable) nautilus) + (lib.mkIf (config.mods.media.filePickerPortal == "Lxqt") xdg-desktop-portal-lxqt) + (lib.mkIf (config.mods.media.filePickerPortal == "Term") xdg-desktop-portal-termfilechooser) + ]; }; }; home-manager = { diff --git a/modules/programs/gnomeServices.nix b/modules/programs/gnomeServices.nix index 01ab872..29bdea8 100644 --- a/modules/programs/gnomeServices.nix +++ b/modules/programs/gnomeServices.nix @@ -71,6 +71,7 @@ nautilus sushi nautilus-python + nautilus-open-any-terminal ]; in lib.mkIf config.mods.nautilus.enable packages; diff --git a/modules/programs/hypr/hyprland.nix b/modules/programs/hypr/hyprland.nix index 65beb78..d46f83e 100644 --- a/modules/programs/hypr/hyprland.nix +++ b/modules/programs/hypr/hyprland.nix @@ -140,15 +140,6 @@ in { Please note, plugins tend to break VERY often. ''; }; - filePickerPortal = lib.mkOption { - default = "gtk"; - example = "kde"; - type = with lib.types; (enum ["gnome" "kde" "gtk" "disable"]); - description = '' - The file picker portal to use with Hyprland. - Disable removes the config, allowing you to set it yourself. - ''; - }; }; config = lib.mkIf config.mods.hypr.hyprland.enable ( @@ -160,22 +151,15 @@ in { slurp satty xdg-desktop-portal-gtk + xdg-desktop-portal-gnome + kdePackages.xdg-desktop-portal-kde + xdg-desktop-portal-shana copyq wl-clipboard hyprcursor hyprpicker - (lib.mkIf (config.mods.hypr.hyprland.filePickerPortal == "kde") xdg-desktop-portal-kde) - (lib.mkIf (config.mods.hypr.hyprland.filePickerPortal == "gnome") xdg-desktop-portal-gnome) ]; - xdg.configFile."xdg-desktop-portal/portals.conf" = lib.mkIf (config.mods.hypr.hyprland.filePickerPortal != "none") { - text = '' - [preferred] - default = hyprland;gtk - org.freedesktop.impl.portal.FileChooser = ${config.mods.hypr.hyprland.filePickerPortal} - ''; - }; - wayland.windowManager.hyprland = { enable = true; package = mkDashDefault pkgs.hyprland; diff --git a/modules/programs/media.nix b/modules/programs/media.nix index 207fa9c..f05500d 100644 --- a/modules/programs/media.nix +++ b/modules/programs/media.nix @@ -36,8 +36,46 @@ special services configuration to be added which require an services.something notation. ''; }; + filePickerPortal = lib.mkOption { + default = "Term"; + example = "Gnome"; + type = with lib.types; oneOf [(enum ["Gnome" "Kde" "Lxqt" "Gtk" "Term" "Default"]) string]; + description = '' + The file picker portal to use (set with shana). + Default removes the config, allowing you to set it yourself. + ''; + }; + termFileChooserConfig = lib.mkOption { + default = { + cmd = "${pkgs.xdg-desktop-portal-termfilechooser}/share/xdg-desktop-portal-termfilechooser/yazi-wrapper.sh"; + default_dir = "$HOME"; + }; + example = {}; + type = with lib.types; attrsOf anything; + description = '' + Termfilechooser config + ''; + }; }; config = lib.optionalAttrs (options ? home.packages) { + xdg.configFile."xdg-desktop-portal-termfilechooser/config" = lib.mkIf (config.mods.media.filePickerPortal != "Term") { + source = (pkgs.formats.ini {}).generate "termchooser" { + filechooser = config.mods.media.termFileChooserConfig; + }; + }; + xdg.configFile."xdg-desktop-portal-shana/config.toml" = lib.mkIf (config.mods.media.filePickerPortal != "Default") { + source = let + name = + if (config.mods.media.filePickerPortal == "Term") + then "org.freedesktop.impl.portal.desktop.termfilechooser" + else config.mods.media.filePickerPortal; + in + (pkgs.formats.toml {}).generate "shana" { + open_file = name; + save_file = name; + save_files = name; + }; + }; home.packages = if config.mods.media.useBasePackages then From 28d08a5c8ab2bbbe5574e85b46db97703cb20708 Mon Sep 17 00:00:00 2001 From: DashieTM Date: Sat, 23 Aug 2025 17:15:10 +0200 Subject: [PATCH 079/118] feature(yazi): Add yazi plugins --- modules/programs/browser/zen.nix | 2 ++ modules/programs/hypr/hyprland.nix | 19 ++++++++++--------- modules/programs/yazi/default.nix | 11 +++++++++++ modules/programs/yazi/yazi.nix | 18 +++++++++++------- 4 files changed, 34 insertions(+), 16 deletions(-) diff --git a/modules/programs/browser/zen.nix b/modules/programs/browser/zen.nix index e26c9a9..0e2b48a 100644 --- a/modules/programs/browser/zen.nix +++ b/modules/programs/browser/zen.nix @@ -79,6 +79,7 @@ in { "zen.theme.accent-color" = "#b4bbff"; "extensions.autoDisableScopes" = 0; "cookiebanners.service.mode" = 2; + "widget.use-xdg-desktop-portal.file-picker" = 1; }; isDefault = true; id = 0; @@ -95,6 +96,7 @@ in { "zen.view.welcome-screen.seen" = true; "zen.theme.accent-color" = "#b4bbff"; "extensions.autoDisableScopes" = 0; + "widget.use-xdg-desktop-portal.file-picker" = 1; }; isDefault = false; id = 1; diff --git a/modules/programs/hypr/hyprland.nix b/modules/programs/hypr/hyprland.nix index d46f83e..d7e5b4f 100644 --- a/modules/programs/hypr/hyprland.nix +++ b/modules/programs/hypr/hyprland.nix @@ -193,16 +193,17 @@ in { ) "$mod SUPERSHIFT,F,exec,${browserName} -p special") "$mod SUPER,T,exec,kitty -1" "$mod SUPER,E,exec,nautilus -w" + (lib.mkIf config.mods.yazi.enable "$mod SUPER,Y,exec, EDITOR='neovide --no-fork' kitty yazi") "$mod SUPER,N,exec,neovide" - (lib.mkIf (config.mods.anyrun.enable) "$mod SUPER,R,exec,anyrun") - (lib.mkIf (config.mods.oxi.oxirun.enable) "$mod SUPER,R,exec,oxirun") - (lib.mkIf (config.mods.oxi.oxidash.enable) "$mod SUPER,M,exec,oxidash") - (lib.mkIf (config.mods.oxi.oxicalc.enable) "$mod SUPER,G,exec,oxicalc") - (lib.mkIf (config.mods.oxi.oxishut.enable) "$mod SUPER,D,exec,oxishut") - (lib.mkIf (config.mods.oxi.oxipaste.enable) "$mod SUPER,A,exec,oxipaste") - (lib.mkIf (config.mods.oxi.hyprdock.enable) "$mod SUPERSHIFT,P,exec,hyprdock --gui") - (lib.mkIf (config.mods.hypr.hyprlock.enable) "$mod SUPERSHIFT,L,exec, playerctl -a pause & hyprlock & systemctl suspend") - (lib.mkIf (config.mods.hypr.hyprlock.enable) "$mod SUPERSHIFT,K,exec, playerctl -a pause & hyprlock & systemctl hibernate") + (lib.mkIf config.mods.anyrun.enable "$mod SUPER,R,exec,anyrun") + (lib.mkIf config.mods.oxi.oxirun.enable "$mod SUPER,R,exec,oxirun") + (lib.mkIf config.mods.oxi.oxidash.enable "$mod SUPER,M,exec,oxidash") + (lib.mkIf config.mods.oxi.oxicalc.enable "$mod SUPER,G,exec,oxicalc") + (lib.mkIf config.mods.oxi.oxishut.enable "$mod SUPER,D,exec,oxishut") + (lib.mkIf config.mods.oxi.oxipaste.enable "$mod SUPER,A,exec,oxipaste") + (lib.mkIf config.mods.oxi.hyprdock.enable "$mod SUPERSHIFT,P,exec,hyprdock --gui") + (lib.mkIf config.mods.hypr.hyprlock.enable "$mod SUPERSHIFT,L,exec, playerctl -a pause & hyprlock & systemctl suspend") + (lib.mkIf config.mods.hypr.hyprlock.enable "$mod SUPERSHIFT,K,exec, playerctl -a pause & hyprlock & systemctl hibernate") # media keys (lib.mkIf config.mods.scripts.audioControl ",XF86AudioMute,exec, audioControl mute") diff --git a/modules/programs/yazi/default.nix b/modules/programs/yazi/default.nix index 4e7fb59..9caed87 100644 --- a/modules/programs/yazi/default.nix +++ b/modules/programs/yazi/default.nix @@ -1,4 +1,5 @@ { + pkgs, lib, config, options, @@ -35,16 +36,26 @@ type = with lib.types; attrsOf anything; description = "Additional keymap for yazi"; }; + plugins = lib.mkOption { + default = { + inherit (pkgs.yaziPlugins) piper diff gitui; + }; + example = {}; + type = with lib.types; attrsOf anything; + description = "Additional keymap for yazi"; + }; }; config = let conf = import ./yazi.nix; in lib.optionalAttrs (options ? home.packages) ( lib.mkIf config.mods.yazi.enable { + home.packages = [pkgs.glow]; programs.yazi = { enable = conf.enable; settings = conf.settings // config.mods.yazi.additionalKeymap; keymap = conf.keymap // config.mods.yazi.additionalConfig; + plugins = config.mods.yazi.plugins; }; } ); diff --git a/modules/programs/yazi/yazi.nix b/modules/programs/yazi/yazi.nix index 233ab22..bed1c03 100644 --- a/modules/programs/yazi/yazi.nix +++ b/modules/programs/yazi/yazi.nix @@ -85,19 +85,23 @@ }; plugin = { prepend_previewers = [ + { + name = "*.tar"; + run = ''piper --format=url -- tar tf "$1"''; + } { name = "*.md"; - run = "glow"; + run = ''piper -- CLICOLOR_FORCE=1 glow -w=$w -s=dark "$1"''; } { mime = "text/csv"; - run = "miller"; + run = ''piper -- bat -p --color=always "$1"''; } ]; }; }; keymap = { - manager.keymap = [ + mgr.keymap = [ { on = [""]; run = "escape"; @@ -368,13 +372,13 @@ desc = "Cancel the ongoing search"; } { - on = ["z"]; - run = "jump zoxide"; + on = ["Z"]; + run = "plugin zoxide"; desc = "Jump to a directory using zoxide"; } { - on = ["Z"]; - run = "jump fzf"; + on = ["z"]; + run = "plugin fzf"; desc = "Jump to a directory or reveal a file using fzf"; } From a047d5c9e1944235dd939e5b52f0620291cc25a7 Mon Sep 17 00:00:00 2001 From: DashieTM Date: Sat, 23 Aug 2025 19:43:15 +0200 Subject: [PATCH 080/118] feature(firefox-addons): Add angular devtools --- lib/foxextensions.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/foxextensions.nix b/lib/foxextensions.nix index 24669f5..d2360ad 100644 --- a/lib/foxextensions.nix +++ b/lib/foxextensions.nix @@ -28,6 +28,7 @@ in { (mkExtension "keepassxc-browser@keepassxc.org" "https://addons.mozilla.org/firefox/downloads/latest/keepassxc-browser/latest.xpi") (mkExtension "@react-devtools" "https://addons.mozilla.org/firefox/downloads/latest/react-devtools/latest.xpi") (mkExtension "extension@redux.devtools" "https://addons.mozilla.org/firefox/downloads/latest/reduxdevtools/latest.xpi") + (mkExtension "{20a9bb38-ed7c-4faf-9aaf-7c5d241fd747}" "https://addons.mozilla.org/firefox/downloads/file/4524699/angular_devtools-1.0.37.xpi") (mkExtension "private-relay@firefox.com" "https://addons.mozilla.org/firefox/downloads/latest/private-relay/latest.xpi") ]; example = [ From aabc48511cc5a17ea23d0c5ccd9c14320597adea Mon Sep 17 00:00:00 2001 From: DashieTM Date: Sat, 30 Aug 2025 12:52:18 +0200 Subject: [PATCH 081/118] chore(coding): Configure dotnet --- home/themes/qt.nix | 2 +- modules/programs/basePackages.nix | 1 - modules/programs/coding.nix | 6 +++++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/home/themes/qt.nix b/home/themes/qt.nix index 042c0f6..5a13186 100644 --- a/home/themes/qt.nix +++ b/home/themes/qt.nix @@ -45,7 +45,7 @@ in { }; qt = { enable = true; - style.package = pkgs.libsForQt5.breeze-qt5; + style.package = pkgs.kdePackages.breeze; style.name = lib.mkForce "breeze-dark"; }; diff --git a/modules/programs/basePackages.nix b/modules/programs/basePackages.nix index 4a2d157..8e3f166 100644 --- a/modules/programs/basePackages.nix +++ b/modules/programs/basePackages.nix @@ -65,7 +65,6 @@ icon-library kdePackages.breeze-icons kdePackages.breeze - libsForQt5.breeze-qt5 kdePackages.qtstyleplugin-kvantum libsForQt5.qtstyleplugin-kvantum libadwaita diff --git a/modules/programs/coding.nix b/modules/programs/coding.nix index 88ad5ba..3e0dcb8 100644 --- a/modules/programs/coding.nix +++ b/modules/programs/coding.nix @@ -305,7 +305,11 @@ in { packages = lib.mkOption { default = with pkgs; [ #.! - dotnet-sdk + (with dotnetCorePackages; + combinePackages [ + sdk_8_0 + sdk_9_0 + ]) csharpier netcoredbg fsharp From aefd89f89d9f163707cc1b8f675560121b8b14e5 Mon Sep 17 00:00:00 2001 From: DashieTM Date: Fri, 5 Sep 2025 09:10:16 +0200 Subject: [PATCH 082/118] fix(changeBrigthness): Remove superfluous param --- modules/programs/hypr/hyprland.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/programs/hypr/hyprland.nix b/modules/programs/hypr/hyprland.nix index d7e5b4f..cc79adf 100644 --- a/modules/programs/hypr/hyprland.nix +++ b/modules/programs/hypr/hyprland.nix @@ -212,8 +212,8 @@ in { ",XF86AudioPlay,exec, playerctl play-pause" ",XF86AudioNext,exec, playerctl next" ",XF86AudioPrev,exec, playerctl previous" - (lib.mkIf config.mods.scripts.changeBrightness ",XF86MonBrightnessDown,exec, changeBrightness brightness 10%-") - (lib.mkIf config.mods.scripts.changeBrightness ",XF86MonBrightnessUp,exec, changeBrightness brightness +10%") + (lib.mkIf config.mods.scripts.changeBrightness ",XF86MonBrightnessDown,exec, changeBrightness 10%-") + (lib.mkIf config.mods.scripts.changeBrightness ",XF86MonBrightnessUp,exec, changeBrightness +10%") # hyprland keybinds # misc From 68d16b82122d19e027151a5bb1fec484a830e826 Mon Sep 17 00:00:00 2001 From: DashieTM Date: Sat, 6 Sep 2025 16:18:00 +0200 Subject: [PATCH 083/118] chore(linter/formatter): Apply linter and formatter --- .github/workflows/pr.yaml | 33 +++ docs/default.nix | 4 +- example/flake.nix | 2 +- flake.nix | 14 +- home/sync.nix | 68 +++--- home/themes/firefoxTheme.nix | 12 +- home/themes/oxiced.nix | 20 +- home/themes/qt.nix | 140 +++++++------ iso/configuration.nix | 2 +- lib/default.nix | 3 +- modules/programs/browser/firefox.nix | 2 +- modules/programs/browser/librewolf.nix | 2 +- modules/programs/browser/zen.nix | 2 +- modules/programs/coding.nix | 32 +-- modules/programs/containers.nix | 68 +++--- modules/programs/drives.nix | 278 ++++++++++++------------- modules/programs/fancontrol.nix | 3 +- modules/programs/fastfetch.nix | 2 +- modules/programs/git.nix | 20 +- modules/programs/greetd.nix | 10 +- modules/programs/scripts.nix | 180 ++++++++-------- modules/programs/teams.nix | 2 +- modules/programs/xkb.nix | 16 +- modules/programs/yazi/default.nix | 2 +- 24 files changed, 469 insertions(+), 448 deletions(-) create mode 100644 .github/workflows/pr.yaml diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml new file mode 100644 index 0000000..7037e7f --- /dev/null +++ b/.github/workflows/pr.yaml @@ -0,0 +1,33 @@ +# inspired by https://github.com/danth/stylix/blob/master/.github/workflows/docs.yml +name: Rust-build +on: + push: + branches: ["main"] + pull_request: + branches: ["main"] +jobs: + build: + name: Build + permissions: + contents: read + runs-on: ubuntu-latest + steps: + - name: Install Nix + uses: DeterminateSystems/nix-installer-action@main + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + extra-conf: | + extra-experimental-features = nix-command flakes + - name: Set up cache + uses: DeterminateSystems/magic-nix-cache-action@main + - name: action + uses: cachix/install-nix-action@v25 + with: + nix_path: nixpkgs=channel:nixos-unstable + - name: cache + uses: cachix/cachix-action@v16 + with: + name: dashnix + authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' + - name: Linter check + run: nix -L build github:${{ github.repository }}/${{ github.sha }} --no-write-lock-file diff --git a/docs/default.nix b/docs/default.nix index 8b3c289..1fd8a1e 100644 --- a/docs/default.nix +++ b/docs/default.nix @@ -20,8 +20,8 @@ pathToAttrs = path: lib.attrsets.mapAttrsToList ( name: meta: { - name = name; - meta = meta; + inherit name; + inherit meta; } ) (builtins.readDir path); diff --git a/example/flake.nix b/example/flake.nix index 640ee54..0d1e083 100644 --- a/example/flake.nix +++ b/example/flake.nix @@ -13,7 +13,7 @@ }; }; - outputs = {...} @ inputs: { + outputs = inputs: { nixosConfigurations = inputs.dashNix.dashNixLib.buildSystems {root = ./.;}; }; diff --git a/flake.nix b/flake.nix index b709627..e423801 100644 --- a/flake.nix +++ b/flake.nix @@ -30,9 +30,6 @@ zen-browser.url = "github:youwen5/zen-browser-flake"; - # TODO move to upstream repository after merged nix flake pr - fancontrol.url = "git+https://github.com/DashieTM/fancontrol-gui?ref=nix-flake"; - stylix.url = "github:danth/stylix"; base16.url = "github:SenchoPens/base16.nix"; disko.url = "github:nix-community/disko/latest"; @@ -44,6 +41,7 @@ oxidash.url = "github:Xetibo/OxiDash"; oxipaste.url = "github:Xetibo/OxiPaste"; oxirun.url = "github:Xetibo/OxiRun"; + dashvim.url = "github:Xetibo/DashVim"; # For now until merged into Xetibo hyprdock.url = "github:Xetibo/hyprdock"; reset.url = "github:Xetibo/ReSet"; @@ -53,10 +51,6 @@ # absolute insanity chaoticNyx.url = "github:chaotic-cx/nyx/nyxpkgs-unstable"; - - dashvim = { - url = "github:Xetibo/DashVim"; - }; }; outputs = {self, ...} @ inputs: let @@ -109,9 +103,11 @@ inherit inputs; pkgs = unstable; system = currentSystem; - lib = inputs.unstable.lib; - buildSystems = dashNixLib.buildSystems; + inherit (inputs.unstable) lib; + inherit (dashNixLib) buildSystems; }; + lint = unstable.statix; + format = unstable.alejandra; dashNixInputs = inputs; stablePkgs = stable; unstablePkgs = unstable; diff --git a/home/sync.nix b/home/sync.nix index 06b6a02..38dceea 100644 --- a/home/sync.nix +++ b/home/sync.nix @@ -15,44 +15,40 @@ in lib.mkIf config.mods.nextcloud.enable { systemd.user = { - services = ( - builtins.listToAttrs ( - map (opts: { - name = "${opts.name}"; - value = { - Unit = { - Description = "Auto sync Nextcloud"; - After = "network-online.target"; - }; - Service = { - Type = "simple"; - ExecStart = "${pkgs.bash}/bin/bash -c '${pkgs.nextcloud-client}/bin/nextcloudcmd -h --path ${opts.remote} ${opts.local} https://${username}:$(bat ${password})@${url}'"; - TimeoutStopSec = "180"; - KillMode = "process"; - KillSignal = "SIGINT"; - }; - Install.WantedBy = ["multi-user.target"]; + services = builtins.listToAttrs ( + map (opts: { + name = "${opts.name}"; + value = { + Unit = { + Description = "Auto sync Nextcloud"; + After = "network-online.target"; }; - }) - synclist - ) + Service = { + Type = "simple"; + ExecStart = "${pkgs.bash}/bin/bash -c '${pkgs.nextcloud-client}/bin/nextcloudcmd -h --path ${opts.remote} ${opts.local} https://${username}:$(bat ${password})@${url}'"; + TimeoutStopSec = "180"; + KillMode = "process"; + KillSignal = "SIGINT"; + }; + Install.WantedBy = ["multi-user.target"]; + }; + }) + synclist ); - timers = ( - builtins.listToAttrs ( - map (opts: { - name = "${opts.name}"; - value = { - Unit.Description = "Automatic sync files with Nextcloud when booted up after 1 minute then rerun every 60 minutes"; - Timer.OnBootSec = "1min"; - Timer.OnUnitActiveSec = "60min"; - Install.WantedBy = [ - "multi-user.target" - "timers.target" - ]; - }; - }) - synclist - ) + timers = builtins.listToAttrs ( + map (opts: { + name = "${opts.name}"; + value = { + Unit.Description = "Automatic sync files with Nextcloud when booted up after 1 minute then rerun every 60 minutes"; + Timer.OnBootSec = "1min"; + Timer.OnUnitActiveSec = "60min"; + Install.WantedBy = [ + "multi-user.target" + "timers.target" + ]; + }; + }) + synclist ); startServices = true; }; diff --git a/home/themes/firefoxTheme.nix b/home/themes/firefoxTheme.nix index c73f07c..0de46f6 100644 --- a/home/themes/firefoxTheme.nix +++ b/home/themes/firefoxTheme.nix @@ -319,11 +319,9 @@ else {} ); moduleFn = lib.lists.foldr (attr1: attr2: attr1 // attr2) {}; - mkFirefoxTheme = ( - profiles: - profiles - |> profileNamesFn - |> chromesFn - |> moduleFn - ); + mkFirefoxTheme = profiles: + profiles + |> profileNamesFn + |> chromesFn + |> moduleFn; in {home.file = mkFirefoxTheme profiles;} diff --git a/home/themes/oxiced.nix b/home/themes/oxiced.nix index 5ab624f..8a9e7dc 100644 --- a/home/themes/oxiced.nix +++ b/home/themes/oxiced.nix @@ -65,16 +65,16 @@ in { # legacy compatibility name = scheme.scheme; - base00 = scheme.base00; - base01 = scheme.base01; - base02 = scheme.base02; - base03 = scheme.base03; - base04 = scheme.base04; - base05 = scheme.base05; - base06 = scheme.base06; - base07 = scheme.base07; - base08 = scheme.base08; - base09 = scheme.base09; + inherit (scheme) base00; + inherit (scheme) base01; + inherit (scheme) base02; + inherit (scheme) base03; + inherit (scheme) base04; + inherit (scheme) base05; + inherit (scheme) base06; + inherit (scheme) base07; + inherit (scheme) base08; + inherit (scheme) base09; base0a = scheme.base0A; base0b = scheme.base0B; base0c = scheme.base0C; diff --git a/home/themes/qt.nix b/home/themes/qt.nix index 5a13186..21dc324 100644 --- a/home/themes/qt.nix +++ b/home/themes/qt.nix @@ -31,15 +31,6 @@ } ''; in { - xdg.configFile."qt5ct/colors/tokyonight.conf" = { - text = "${color}"; - }; - xdg.configFile."qt6ct/colors/tokyonight.conf" = { - text = "${color}"; - }; - xdg.configFile."qt5ct/qss/tab.qss" = { - text = "${qss}"; - }; stylix.targets.qt = { enable = false; }; @@ -49,74 +40,85 @@ in { style.name = lib.mkForce "breeze-dark"; }; - xdg.configFile."qt5ct/qt5ct.conf" = { - text = '' + xdg.configFile = { + "qt5ct/colors/tokyonight.conf" = { + text = "${color}"; + }; + "qt6ct/colors/tokyonight.conf" = { + text = "${color}"; + }; + "qt5ct/qss/tab.qss" = { + text = "${qss}"; + }; + "qt5ct/qt5ct.conf" = { + text = '' - [Appearance] - color_scheme_path=/home/${username}/.config/qt5ct/colors/tokyonight.conf - custom_palette=true - icon_theme=MoreWaita - standard_dialogs=xdgdesktopportal - style=Breeze + [Appearance] + color_scheme_path=/home/${username}/.config/qt5ct/colors/tokyonight.conf + custom_palette=true + icon_theme=MoreWaita + standard_dialogs=xdgdesktopportal + style=Breeze - [Fonts] - fixed="Noto Sans,12,-1,5,50,0,0,0,0,0" - general="Noto Sans,12,-1,5,50,0,0,0,0,0" + [Fonts] + fixed="Noto Sans,12,-1,5,50,0,0,0,0,0" + general="Noto Sans,12,-1,5,50,0,0,0,0,0" - [Interface] - activate_item_on_single_click=2 - buttonbox_layout=3 - cursor_flash_time=1000 - dialog_buttons_have_icons=0 - double_click_interval=400 - gui_effects=General, AnimateMenu, AnimateCombo, AnimateTooltip, AnimateToolBox - keyboard_scheme=4 - menus_have_icons=true - show_shortcuts_in_context_menus=true - stylesheets=/home/${username}/.config/qt5ct/qss/tab.qss, /nix/store/5713p1pv913a6fsn8j7z6ndikcwikbcd-qt5ct-1.8/share/qt5ct/qss/fusion-fixes.qss, /nix/store/5713p1pv913a6fsn8j7z6ndikcwikbcd-qt5ct-1.8/share/qt5ct/qss/scrollbar-simple.qss, /nix/store/5713p1pv913a6fsn8j7z6ndikcwikbcd-qt5ct-1.8/share/qt5ct/qss/sliders-simple.qss, /nix/store/5713p1pv913a6fsn8j7z6ndikcwikbcd-qt5ct-1.8/share/qt5ct/qss/tooltip-simple.qss, /nix/store/5713p1pv913a6fsn8j7z6ndikcwikbcd-qt5ct-1.8/share/qt5ct/qss/traynotification-simple.qss - toolbutton_style=4 - underline_shortcut=0 - wheel_scroll_lines=3 + [Interface] + activate_item_on_single_click=2 + buttonbox_layout=3 + cursor_flash_time=1000 + dialog_buttons_have_icons=0 + double_click_interval=400 + gui_effects=General, AnimateMenu, AnimateCombo, AnimateTooltip, AnimateToolBox + keyboard_scheme=4 + menus_have_icons=true + show_shortcuts_in_context_menus=true + stylesheets=/home/${username}/.config/qt5ct/qss/tab.qss, /nix/store/5713p1pv913a6fsn8j7z6ndikcwikbcd-qt5ct-1.8/share/qt5ct/qss/fusion-fixes.qss, /nix/store/5713p1pv913a6fsn8j7z6ndikcwikbcd-qt5ct-1.8/share/qt5ct/qss/scrollbar-simple.qss, /nix/store/5713p1pv913a6fsn8j7z6ndikcwikbcd-qt5ct-1.8/share/qt5ct/qss/sliders-simple.qss, /nix/store/5713p1pv913a6fsn8j7z6ndikcwikbcd-qt5ct-1.8/share/qt5ct/qss/tooltip-simple.qss, /nix/store/5713p1pv913a6fsn8j7z6ndikcwikbcd-qt5ct-1.8/share/qt5ct/qss/traynotification-simple.qss + toolbutton_style=4 + underline_shortcut=0 + wheel_scroll_lines=3 - [SettingsWindow] - geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\n\0\0\0\0\0\0\0\rK\0\0\x5q\0\0\n\0\0\0\0\0\0\0\r[\0\0\x5\x7f\0\0\0\0\x2\0\0\0\rp\0\0\n\0\0\0\0\0\0\0\rK\0\0\x5q) + [SettingsWindow] + geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\n\0\0\0\0\0\0\0\rK\0\0\x5q\0\0\n\0\0\0\0\0\0\0\r[\0\0\x5\x7f\0\0\0\0\x2\0\0\0\rp\0\0\n\0\0\0\0\0\0\0\rK\0\0\x5q) - [Troubleshooting] - force_raster_widgets=1 - ignored_applications=@Invalid() - ''; - }; - xdg.configFile."qt6ct/qt6ct.conf" = { - text = '' + [Troubleshooting] + force_raster_widgets=1 + ignored_applications=@Invalid() + ''; + }; + "qt6ct/qt6ct.conf" = { + text = '' - [Appearance] - color_scheme_path=/home/${username}/.config/qt6ct/colors/tokyonight.conf - custom_palette=true - standard_dialogs=xdgdesktopportal - style=Breeze + [Appearance] + color_scheme_path=/home/${username}/.config/qt6ct/colors/tokyonight.conf + custom_palette=true + standard_dialogs=xdgdesktopportal + style=Breeze - [Fonts] - fixed="DejaVu LGC Sans,12,-1,5,400,0,0,0,0,0,0,0,0,0,0,1" - general="DejaVu LGC Sans,12,-1,5,400,0,0,0,0,0,0,0,0,0,0,1" + [Fonts] + fixed="DejaVu LGC Sans,12,-1,5,400,0,0,0,0,0,0,0,0,0,0,1" + general="DejaVu LGC Sans,12,-1,5,400,0,0,0,0,0,0,0,0,0,0,1" - [Interface] - activate_item_on_single_click=2 - buttonbox_layout=3 - cursor_flash_time=1000 - dialog_buttons_have_icons=0 - double_click_interval=400 - gui_effects=General, AnimateMenu, AnimateCombo, AnimateTooltip, AnimateToolBox - keyboard_scheme=4 - menus_have_icons=true - show_shortcuts_in_context_menus=true - stylesheets=@Invalid() - toolbutton_style=4 - underline_shortcut=1 - wheel_scroll_lines=3 + [Interface] + activate_item_on_single_click=2 + buttonbox_layout=3 + cursor_flash_time=1000 + dialog_buttons_have_icons=0 + double_click_interval=400 + gui_effects=General, AnimateMenu, AnimateCombo, AnimateTooltip, AnimateToolBox + keyboard_scheme=4 + menus_have_icons=true + show_shortcuts_in_context_menus=true + stylesheets=@Invalid() + toolbutton_style=4 + underline_shortcut=1 + wheel_scroll_lines=3 - [Troubleshooting] - force_raster_widgets=1 - ignored_applications=@Invalid() - ''; + [Troubleshooting] + force_raster_widgets=1 + ignored_applications=@Invalid() + ''; + }; }; } diff --git a/iso/configuration.nix b/iso/configuration.nix index 5745fe7..8bfcc1e 100644 --- a/iso/configuration.nix +++ b/iso/configuration.nix @@ -10,7 +10,7 @@ in { imports = ["${modulesPath}/installer/cd-dvd/installation-cd-minimal.nix"]; nixpkgs.hostPlatform = { - system = system; + inherit system; }; environment.systemPackages = with pkgs; [ diff --git a/lib/default.nix b/lib/default.nix index 2f3a471..30d34ec 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -70,7 +70,6 @@ inputs.reset.homeManagerModules.default inputs.sops-nix.homeManagerModules.sops inputs.dashvim.homeManagerModules.dashvim - inputs.fancontrol.homeManagerModules.default inputs.chaoticNyx.homeManagerModules.default ../modules ]; @@ -82,7 +81,7 @@ builtins.listToAttrs ( map (name: { - name = name; + inherit name; value = let mod = root + /hosts/${name}/configuration.nix; additionalNixosConfig = root + /hosts/${name}/hardware.nix; diff --git a/modules/programs/browser/firefox.nix b/modules/programs/browser/firefox.nix index 6493b79..d93ac58 100644 --- a/modules/programs/browser/firefox.nix +++ b/modules/programs/browser/firefox.nix @@ -105,7 +105,7 @@ in { // { ExtensionSettings = builtins.foldl' (acc: ext: acc // ext) {} (config.mods.browser.firefox.extensions ++ ( - if (config.mods.browser.firefox.darkreader) + if config.mods.browser.firefox.darkreader then [ { "addon@darkreader.org" = { diff --git a/modules/programs/browser/librewolf.nix b/modules/programs/browser/librewolf.nix index a290fe2..fc74bf3 100644 --- a/modules/programs/browser/librewolf.nix +++ b/modules/programs/browser/librewolf.nix @@ -99,7 +99,7 @@ in { // { ExtensionSettings = builtins.foldl' (acc: ext: acc // ext) {} (config.mods.browser.librewolf.extensions ++ ( - if (config.mods.browser.firefox.darkreader) + if config.mods.browser.firefox.darkreader then [ { "addon@darkreader.org" = { diff --git a/modules/programs/browser/zen.nix b/modules/programs/browser/zen.nix index 0e2b48a..d3a9b0a 100644 --- a/modules/programs/browser/zen.nix +++ b/modules/programs/browser/zen.nix @@ -134,7 +134,7 @@ in { // { ExtensionSettings = builtins.foldl' (acc: ext: acc // ext) {} (config.mods.browser.zen.extensions ++ ( - if (config.mods.browser.firefox.darkreader) + if config.mods.browser.firefox.darkreader then [ { "addon@darkreader.org" = { diff --git a/modules/programs/coding.nix b/modules/programs/coding.nix index 3e0dcb8..7c79fa9 100644 --- a/modules/programs/coding.nix +++ b/modules/programs/coding.nix @@ -517,28 +517,30 @@ in { lib.optionalAttrs (options ? home.packages) { programs.dashvim = lib.mkIf config.mods.coding.dashvim { enable = true; - colorscheme = config.mods.stylix.colorscheme; + inherit (config.mods.stylix) colorscheme; }; programs.vscode = lib.mkIf config.mods.coding.vscodium.enable { enable = true; package = mkDashDefault pkgs.vscodium; profiles.default.extensions = config.mods.coding.vscodium.extensions; }; - xdg.configFile."neovide/config.toml" = lib.mkIf (config.mods.coding.dashvim || config.mods.coding.neovide.enable) { - source = - (pkgs.formats.toml {}).generate "neovide" - config.mods.coding.neovide.config; - }; + xdg.configFile = { + "neovide/config.toml" = lib.mkIf (config.mods.coding.dashvim || config.mods.coding.neovide.enable) { + source = + (pkgs.formats.toml {}).generate "neovide" + config.mods.coding.neovide.config; + }; - xdg.configFile."gh/config.yml" = lib.mkIf config.mods.coding.gh.enable { - source = - (pkgs.formats.yaml {}).generate "config" - config.mods.coding.gh.config; - }; - xdg.configFile."gh/hosts.yml" = lib.mkIf config.mods.coding.gh.enable { - source = - (pkgs.formats.yaml {}).generate "hosts" - config.mods.coding.gh.hosts; + "gh/config.yml" = lib.mkIf config.mods.coding.gh.enable { + source = + (pkgs.formats.yaml {}).generate "config" + config.mods.coding.gh.config; + }; + "gh/hosts.yml" = lib.mkIf config.mods.coding.gh.enable { + source = + (pkgs.formats.yaml {}).generate "hosts" + config.mods.coding.gh.hosts; + }; }; home.packages = with pkgs; diff --git a/modules/programs/containers.nix b/modules/programs/containers.nix index e65eb06..b62ee25 100644 --- a/modules/programs/containers.nix +++ b/modules/programs/containers.nix @@ -43,39 +43,37 @@ description = "Container packages"; }; }; - config = ( - lib.optionalAttrs (options ? environment.systemPackages) { - environment.systemPackages = - (lib.lists.optionals ( - config.mods.containers.variant == "podman" - ) - config.mods.containers.podmanPackages) - ++ (lib.lists.optionals ( - config.mods.containers.variant == "docker" - ) - config.mods.containers.dockerPackages) - ++ (lib.lists.optionals ( - config.mods.containers.variant == "podman" || config.mods.containers.variant == "docker" - ) - config.mods.containers.combinedPackages); - virtualisation = - if (config.mods.containers.variant == "podman") - then { - containers.enable = true; - podman = { - enable = true; - dockerCompat = mkDashDefault true; - defaultNetwork.settings.dns_enabled = mkDashDefault true; - }; - } - else if (config.mods.containers.variant == "docker") - then { - containers.enable = true; - docker = { - enable = true; - }; - } - else {}; - } - ); + config = lib.optionalAttrs (options ? environment.systemPackages) { + environment.systemPackages = + (lib.lists.optionals ( + config.mods.containers.variant == "podman" + ) + config.mods.containers.podmanPackages) + ++ (lib.lists.optionals ( + config.mods.containers.variant == "docker" + ) + config.mods.containers.dockerPackages) + ++ (lib.lists.optionals ( + config.mods.containers.variant == "podman" || config.mods.containers.variant == "docker" + ) + config.mods.containers.combinedPackages); + virtualisation = + if (config.mods.containers.variant == "podman") + then { + containers.enable = true; + podman = { + enable = true; + dockerCompat = mkDashDefault true; + defaultNetwork.settings.dns_enabled = mkDashDefault true; + }; + } + else if (config.mods.containers.variant == "docker") + then { + containers.enable = true; + docker = { + enable = true; + }; + } + else {}; + }; } diff --git a/modules/programs/drives.nix b/modules/programs/drives.nix index c085144..a631802 100644 --- a/modules/programs/drives.nix +++ b/modules/programs/drives.nix @@ -159,25 +159,143 @@ }; }; - config = ( - lib.optionalAttrs (options ? fileSystems) { - boot.initrd.luks.devices = lib.mkIf (config.mods.drives.variant == "manual" && config.mods.drives.useEncryption) ( - builtins.listToAttrs ( - map ( - { - name, - drive, - }: { - cryptstorage.device = lib.mkIf (name != "root") drive?device; - cryptoroot.device = lib.mkIf (name == "root") drive?device; - } - ) - config.mods.drives.extraDrives + config = lib.optionalAttrs (options ? fileSystems) { + boot.initrd.luks.devices = lib.mkIf (config.mods.drives.variant == "manual" && config.mods.drives.useEncryption) ( + builtins.listToAttrs ( + map ( + { + name, + drive, + }: { + cryptstorage.device = lib.mkIf (name != "root") drive?device; + cryptoroot.device = lib.mkIf (name == "root") drive?device; + } ) - ); + config.mods.drives.extraDrives + ) + ); - fileSystems = lib.mkIf (config.mods.drives.variant == "manual" && !config.conf.wsl) ( - builtins.listToAttrs ( + fileSystems = lib.mkIf (config.mods.drives.variant == "manual" && !config.conf.wsl) ( + builtins.listToAttrs ( + map ( + { + name, + drive, + }: { + name = "/" + name; + value = drive; + } + ) + config.mods.drives.extraDrives + ) + // (lib.optionalAttrs config.mods.drives.defaultDrives.enable) { + "/" = { + device = "/dev/disk/by-label/ROOT"; + fsType = config.mods.drives.homeAndRootFsTypes; + options = [ + "noatime" + "nodiratime" + "discard" + ]; + }; + + "/boot" = { + device = "/dev/disk/by-label/BOOT"; + fsType = "vfat"; + options = [ + "rw" + "fmask=0022" + "dmask=0022" + "noatime" + ]; + }; + + "/home" = { + device = "/dev/disk/by-label/HOME"; + fsType = config.mods.drives.homeAndRootFsTypes; + options = [ + "noatime" + "nodiratime" + "discard" + ]; + }; + } + ); + + swapDevices = lib.mkIf (config.mods.drives.useSwap && config.mods.drives.variant == "manual" && !config.conf.wsl) [ + {device = "/dev/disk/by-label/SWAP";} + ]; + + disko.devices = lib.mkIf (config.mods.drives.variant == "disko") { + disk = + { + main = (lib.optionalAttrs config.mods.drives.defaultDrives.enable) { + device = "${config.mods.drives.disko.defaultDiskId}"; + type = "disk"; + content = { + type = "gpt"; + partitions = { + root = { + start = "${ + if config.mods.drives.useSwap + then builtins.toString config.mods.drives.disko.swapAmount + else builtins.toString 1 + }G"; + end = "${builtins.toString config.mods.drives.disko.rootAmount}%"; + content = { + type = "filesystem"; + format = config.mods.drives.homeAndRootFsTypes; + mountpoint = "/"; + mountOptions = [ + "noatime" + "nodiratime" + "discard" + ]; + }; + }; + plainSwap = { + start = "1G"; + end = "33G"; + content = { + type = "swap"; + discardPolicy = "both"; + resumeDevice = true; + }; + }; + boot = { + start = "0G"; + end = "1G"; + content = { + type = "filesystem"; + format = "vfat"; + mountpoint = "/boot"; + mountOptions = [ + "rw" + "fmask=0022" + "dmask=0022" + "noatime" + ]; + }; + }; + home = { + start = "${builtins.toString config.mods.drives.disko.rootAmount}%"; + end = "100%"; + content = { + type = "filesystem"; + format = config.mods.drives.homeAndRootFsTypes; + mountpoint = "/home"; + mountOptions = [ + "noatime" + "nodiratime" + "discard" + ]; + }; + }; + }; + }; + }; + } + // builtins.listToAttrs ( map ( { name, @@ -188,127 +306,7 @@ } ) config.mods.drives.extraDrives - ) - // (lib.optionalAttrs config.mods.drives.defaultDrives.enable) { - "/" = { - device = "/dev/disk/by-label/ROOT"; - fsType = config.mods.drives.homeAndRootFsTypes; - options = [ - "noatime" - "nodiratime" - "discard" - ]; - }; - - "/boot" = { - device = "/dev/disk/by-label/BOOT"; - fsType = "vfat"; - options = [ - "rw" - "fmask=0022" - "dmask=0022" - "noatime" - ]; - }; - - "/home" = { - device = "/dev/disk/by-label/HOME"; - fsType = config.mods.drives.homeAndRootFsTypes; - options = [ - "noatime" - "nodiratime" - "discard" - ]; - }; - } - ); - - swapDevices = lib.mkIf (config.mods.drives.useSwap && config.mods.drives.variant == "manual" && !config.conf.wsl) [ - {device = "/dev/disk/by-label/SWAP";} - ]; - - disko.devices = lib.mkIf (config.mods.drives.variant == "disko") { - disk = - { - main = (lib.optionalAttrs config.mods.drives.defaultDrives.enable) { - device = "${config.mods.drives.disko.defaultDiskId}"; - type = "disk"; - content = { - type = "gpt"; - partitions = { - root = { - start = "${ - if config.mods.drives.useSwap - then builtins.toString config.mods.drives.disko.swapAmount - else builtins.toString 1 - }G"; - end = "${builtins.toString config.mods.drives.disko.rootAmount}%"; - content = { - type = "filesystem"; - format = config.mods.drives.homeAndRootFsTypes; - mountpoint = "/"; - mountOptions = [ - "noatime" - "nodiratime" - "discard" - ]; - }; - }; - plainSwap = { - start = "1G"; - end = "33G"; - content = { - type = "swap"; - discardPolicy = "both"; - resumeDevice = true; - }; - }; - boot = { - start = "0G"; - end = "1G"; - content = { - type = "filesystem"; - format = "vfat"; - mountpoint = "/boot"; - mountOptions = [ - "rw" - "fmask=0022" - "dmask=0022" - "noatime" - ]; - }; - }; - home = { - start = "${builtins.toString config.mods.drives.disko.rootAmount}%"; - end = "100%"; - content = { - type = "filesystem"; - format = config.mods.drives.homeAndRootFsTypes; - mountpoint = "/home"; - mountOptions = [ - "noatime" - "nodiratime" - "discard" - ]; - }; - }; - }; - }; - }; - } - // builtins.listToAttrs ( - map ( - { - name, - drive, - }: { - name = "/" + name; - value = drive; - } - ) - config.mods.drives.extraDrives - ); - }; - } - ); + ); + }; + }; } diff --git a/modules/programs/fancontrol.nix b/modules/programs/fancontrol.nix index 87be9af..8abf24d 100644 --- a/modules/programs/fancontrol.nix +++ b/modules/programs/fancontrol.nix @@ -1,5 +1,6 @@ { lib, + pkgs, config, options, ... @@ -20,7 +21,7 @@ }; config = lib.mkIf config.mods.fancontrol.enable ( lib.optionalAttrs (options ? home.packages) { - programs.fancontrol-gui.enable = true; + home.packages = [pkgs.fancontrol-gui]; } // (lib.optionalAttrs (options ? boot.kernelModules) { boot = { diff --git a/modules/programs/fastfetch.nix b/modules/programs/fastfetch.nix index 52366e7..f73b2cd 100644 --- a/modules/programs/fastfetch.nix +++ b/modules/programs/fastfetch.nix @@ -56,7 +56,7 @@ }; config = lib.optionalAttrs (options ? home.packages) { - xdg.configFile."fastfetch/config.jsonc" = lib.mkIf (config.mods.dashfetch.enable) { + xdg.configFile."fastfetch/config.jsonc" = lib.mkIf config.mods.dashfetch.enable { source = (pkgs.formats.json {}).generate "config.jsonc" { diff --git a/modules/programs/git.nix b/modules/programs/git.nix index ed2719e..bfcb334 100644 --- a/modules/programs/git.nix +++ b/modules/programs/git.nix @@ -47,15 +47,13 @@ description = "ssh configuration (keys for git)"; }; }; - config = ( - lib.optionalAttrs (options ? programs.git && options ? home.file) { - programs.git = { - enable = true; - userName = config.mods.git.username; - userEmail = config.mods.git.email; - extraConfig = config.mods.git.additionalConfig; - }; - home.file.".ssh/config".text = config.mods.git.sshConfig; - } - ); + config = lib.optionalAttrs (options ? programs.git && options ? home.file) { + programs.git = { + enable = true; + userName = config.mods.git.username; + userEmail = config.mods.git.email; + extraConfig = config.mods.git.additionalConfig; + }; + home.file.".ssh/config".text = config.mods.git.sshConfig; + }; } diff --git a/modules/programs/greetd.nix b/modules/programs/greetd.nix index 2d1727c..d632b6f 100644 --- a/modules/programs/greetd.nix +++ b/modules/programs/greetd.nix @@ -130,9 +130,13 @@ ''; # unlock GPG keyring on login - security.pam.services.greetd.enableGnomeKeyring = mkDashDefault true; - security.pam.services.greetd.sshAgentAuth = mkDashDefault true; - security.pam.sshAgentAuth.enable = mkDashDefault true; + security.pam = { + services.greetd = { + enableGnomeKeyring = mkDashDefault true; + sshAgentAuth = mkDashDefault true; + }; + sshAgentAuth.enable = mkDashDefault true; + }; } // lib.optionalAttrs (options ? home) { xdg.configFile."regreet/regreet.toml".source = diff --git a/modules/programs/scripts.nix b/modules/programs/scripts.nix index ce0f4f0..98eb26b 100644 --- a/modules/programs/scripts.nix +++ b/modules/programs/scripts.nix @@ -24,102 +24,100 @@ description = "More scripts to be passed. (check existing ones for types and examples)"; }; }; - config = ( - lib.optionalAttrs (options ? home.packages) { - home.packages = - [ - (lib.mkIf config.mods.scripts.changeBrightness ( - pkgs.writeShellScriptBin "changeBrightness" '' - brightnessctl set "$1" - CURRENT=$(brightnessctl -m -d intel_backlight | awk -F, '{print substr($4, 0, length($4)-1)}') - notify-send -a "changeBrightness" -r 3 -u low -i brightness-high -h int:value:"$CURRENT" "Brightness: ''${CURRENT}%" - '' - )) - (lib.mkIf config.mods.scripts.audioControl ( - pkgs.writeShellScriptBin "audioControl" '' - ncspot() { - NUM=$(pactl list clients short | rg "ncspot" | awk -F 'PipeWire' ' { print $1 } ' | tr -d ' \t\n') - CHANGE=$(pactl list sink-inputs short | rg "$NUM" | awk -F ' ' ' { print $1 }' | tr -d ' \t\n') - pactl set-sink-input-volume "$CHANGE" "$1" - VOLUME=$(pactl list sink-inputs | rg "$NUM" -A7 | rg "Volume:" | awk -F ' ' ' { print $5 }' | tr -d '%') - notify-send -a "ncspot" -r 990 -u low -i audio-volume-high -h int:progress:"$VOLUME" "Spotify Volume: ''${VOLUME}%" - } + config = lib.optionalAttrs (options ? home.packages) { + home.packages = + [ + (lib.mkIf config.mods.scripts.changeBrightness ( + pkgs.writeShellScriptBin "changeBrightness" '' + brightnessctl set "$1" + CURRENT=$(brightnessctl -m -d intel_backlight | awk -F, '{print substr($4, 0, length($4)-1)}') + notify-send -a "changeBrightness" -r 3 -u low -i brightness-high -h int:value:"$CURRENT" "Brightness: ''${CURRENT}%" + '' + )) + (lib.mkIf config.mods.scripts.audioControl ( + pkgs.writeShellScriptBin "audioControl" '' + ncspot() { + NUM=$(pactl list clients short | rg "ncspot" | awk -F 'PipeWire' ' { print $1 } ' | tr -d ' \t\n') + CHANGE=$(pactl list sink-inputs short | rg "$NUM" | awk -F ' ' ' { print $1 }' | tr -d ' \t\n') + pactl set-sink-input-volume "$CHANGE" "$1" + VOLUME=$(pactl list sink-inputs | rg "$NUM" -A7 | rg "Volume:" | awk -F ' ' ' { print $5 }' | tr -d '%') + notify-send -a "ncspot" -r 990 -u low -i audio-volume-high -h int:progress:"$VOLUME" "Spotify Volume: ''${VOLUME}%" + } - firefox() { - STRING=$(pactl list clients short | rg "firefox" | awk -F 'PipeWire' ' { print $1 "," } ' | tr -d ' \t\n') - # NUMS=',' read -r -a array <<< "$STRING" - readarray -td, NUMS <<<"$STRING" - declare -p NUMS - for index in "''${!NUMS[@]}"; do #"''${!array[@]}" - NUM=$(echo "''${NUMS[index]}" | tr -d ' \t\n') - CHANGE=$(pactl list sink-inputs short | rg "$NUM" | awk -F ' ' ' { print $1 }' | tr -d ' \t\n') - pactl set-sink-input-volume "$CHANGE" "$1" - done - VOLUME=$(pactl list sink-inputs | rg "''${NUMS[0]}" -A7 | rg "Volume:" | awk -F ' ' ' { print $5 }' | tr -d '%') - notify-send -a "Firefox" -r 991 -u low -i audio-volume-high -h int:progress:"$VOLUME" "Firefox Volume: ''${VOLUME}%" - } + firefox() { + STRING=$(pactl list clients short | rg "firefox" | awk -F 'PipeWire' ' { print $1 "," } ' | tr -d ' \t\n') + # NUMS=',' read -r -a array <<< "$STRING" + readarray -td, NUMS <<<"$STRING" + declare -p NUMS + for index in "''${!NUMS[@]}"; do #"''${!array[@]}" + NUM=$(echo "''${NUMS[index]}" | tr -d ' \t\n') + CHANGE=$(pactl list sink-inputs short | rg "$NUM" | awk -F ' ' ' { print $1 }' | tr -d ' \t\n') + pactl set-sink-input-volume "$CHANGE" "$1" + done + VOLUME=$(pactl list sink-inputs | rg "''${NUMS[0]}" -A7 | rg "Volume:" | awk -F ' ' ' { print $5 }' | tr -d '%') + notify-send -a "Firefox" -r 991 -u low -i audio-volume-high -h int:progress:"$VOLUME" "Firefox Volume: ''${VOLUME}%" + } - internal() { - SPEAKER=$(pactl list sinks | grep "Name" | grep "alsa" | awk -F ': ' '{ print $2 }') - if [ "$SPEAKER" != "" ]; then - pactl set-default-sink "$SPEAKER" - pactl set-sink-mute "$SPEAKER" false - DEVICE=$(echo "$SPEAKER" | awk -F '.' ' { print $4 } ') - notify-send "changed audio to "$DEVICE" " - else - notify-send "failed, not available!" - fi - } + internal() { + SPEAKER=$(pactl list sinks | grep "Name" | grep "alsa" | awk -F ': ' '{ print $2 }') + if [ "$SPEAKER" != "" ]; then + pactl set-default-sink "$SPEAKER" + pactl set-sink-mute "$SPEAKER" false + DEVICE=$(echo "$SPEAKER" | awk -F '.' ' { print $4 } ') + notify-send "changed audio to "$DEVICE" " + else + notify-send "failed, not available!" + fi + } - set_volume_sink() { - pactl set-sink-volume @DEFAULT_SINK@ "$1" - CURRENT=$(pactl get-sink-volume @DEFAULT_SINK@ | awk -F'/' '{ print $2 }' | tr -d ' %') - notify-send -a "System Volume" -r 1001 -u low -i audio-volume-high -h int:progress:"$CURRENT" "Output Volume: ''${CURRENT}%" - } + set_volume_sink() { + pactl set-sink-volume @DEFAULT_SINK@ "$1" + CURRENT=$(pactl get-sink-volume @DEFAULT_SINK@ | awk -F'/' '{ print $2 }' | tr -d ' %') + notify-send -a "System Volume" -r 1001 -u low -i audio-volume-high -h int:progress:"$CURRENT" "Output Volume: ''${CURRENT}%" + } - set_volume_source() { - pactl set-source-volume @DEFAULT_SOURCE@ "$1" - CURRENT=$(pactl get-source-volume @DEFAULT_SOURCE@ | awk -F'/' '{ print $2 }' | tr -d ' %') - notify-send -a "System Volume" -r 1001 -u low -i audio-volume-high -h int:progress:"$CURRENT" "Input Volume: ''${CURRENT}%" - } + set_volume_source() { + pactl set-source-volume @DEFAULT_SOURCE@ "$1" + CURRENT=$(pactl get-source-volume @DEFAULT_SOURCE@ | awk -F'/' '{ print $2 }' | tr -d ' %') + notify-send -a "System Volume" -r 1001 -u low -i audio-volume-high -h int:progress:"$CURRENT" "Input Volume: ''${CURRENT}%" + } - bluetooth() { - SPEAKER=$(pactl list sinks | grep "Name" | grep "blue" | awk -F ': ' '{ print $2 }') - if [ "$SPEAKER" != "" ]; then - pactl set-default-sink "$SPEAKER" - pactl set-sink-mute "$SPEAKER" false - DEVICE=$(echo "$SPEAKER" | awk -F '.' ' { print $4 } ') - notify-send "changed audio to "$DEVICE" " - else - notify-send "failed, not available!" - fi - } + bluetooth() { + SPEAKER=$(pactl list sinks | grep "Name" | grep "blue" | awk -F ': ' '{ print $2 }') + if [ "$SPEAKER" != "" ]; then + pactl set-default-sink "$SPEAKER" + pactl set-sink-mute "$SPEAKER" false + DEVICE=$(echo "$SPEAKER" | awk -F '.' ' { print $4 } ') + notify-send "changed audio to "$DEVICE" " + else + notify-send "failed, not available!" + fi + } - mute() { - pactl set-sink-mute @DEFAULT_SINK@ toggle - MUTE=$(pactl get-sink-mute @DEFAULT_SINK@) - notify-send -a "Audio" -r 994 -u low -i audio-volume-high "Audio: $MUTE" - } + mute() { + pactl set-sink-mute @DEFAULT_SINK@ toggle + MUTE=$(pactl get-sink-mute @DEFAULT_SINK@) + notify-send -a "Audio" -r 994 -u low -i audio-volume-high "Audio: $MUTE" + } - if [ "$1" == "internal" ]; then - internal - elif [ "$1" == "bluetooth" ]; then - bluetooth - elif [ "$1" == "firefox" ]; then - firefox "$2" - elif [ "$1" == "ncspot" ]; then - ncspot "$2" - elif [ "$1" == "mute" ]; then - mute - elif [ "$1" == "sink" ]; then - set_volume_sink "$2" - elif [ "$1" == "source" ]; then - set_volume_source "$2" - fi - '' - )) - ] - ++ config.mods.scripts.scripts; - } - ); + if [ "$1" == "internal" ]; then + internal + elif [ "$1" == "bluetooth" ]; then + bluetooth + elif [ "$1" == "firefox" ]; then + firefox "$2" + elif [ "$1" == "ncspot" ]; then + ncspot "$2" + elif [ "$1" == "mute" ]; then + mute + elif [ "$1" == "sink" ]; then + set_volume_sink "$2" + elif [ "$1" == "source" ]; then + set_volume_source "$2" + fi + '' + )) + ] + ++ config.mods.scripts.scripts; + }; } diff --git a/modules/programs/teams.nix b/modules/programs/teams.nix index a909ee5..e9d843a 100644 --- a/modules/programs/teams.nix +++ b/modules/programs/teams.nix @@ -23,7 +23,7 @@ in { }; config = lib.mkIf config.mods.teams.enable ( lib.optionalAttrs (options ? home.packages) { - home.packages = [(callPackage ../../override/teams.nix {chromium = pkgs.chromium;})]; + home.packages = [(callPackage ../../override/teams.nix {inherit (pkgs) chromium;})]; } // (lib.optionalAttrs (options ? boot.kernelModules) { boot = { diff --git a/modules/programs/xkb.nix b/modules/programs/xkb.nix index f78e5e2..ebb1bda 100644 --- a/modules/programs/xkb.nix +++ b/modules/programs/xkb.nix @@ -18,13 +18,11 @@ description = "Your variant"; }; }; - config = ( - lib.optionalAttrs (options ? services.xserver) { - # Configure keymap in X11 - services.xserver = { - xkb.layout = "${config.mods.xkb.layout}"; - xkb.variant = "${config.mods.xkb.variant}"; - }; - } - ); + config = lib.optionalAttrs (options ? services.xserver) { + # Configure keymap in X11 + services.xserver = { + xkb.layout = "${config.mods.xkb.layout}"; + xkb.variant = "${config.mods.xkb.variant}"; + }; + }; } diff --git a/modules/programs/yazi/default.nix b/modules/programs/yazi/default.nix index 9caed87..c9bd08b 100644 --- a/modules/programs/yazi/default.nix +++ b/modules/programs/yazi/default.nix @@ -52,7 +52,7 @@ lib.mkIf config.mods.yazi.enable { home.packages = [pkgs.glow]; programs.yazi = { - enable = conf.enable; + inherit (conf) enable; settings = conf.settings // config.mods.yazi.additionalKeymap; keymap = conf.keymap // config.mods.yazi.additionalConfig; plugins = config.mods.yazi.plugins; From 3eef78654a64027ee72c22cc74ee168dc0bc6d31 Mon Sep 17 00:00:00 2001 From: DashieTM Date: Sat, 6 Sep 2025 17:43:11 +0200 Subject: [PATCH 084/118] chore(linter/formatter): Add statix --- flake.nix | 4 ++-- modules/programs/basePackages.nix | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/flake.nix b/flake.nix index e423801..8536734 100644 --- a/flake.nix +++ b/flake.nix @@ -10,7 +10,7 @@ url = "github:nix-community/lanzaboote/v0.4.2"; inputs.nixpkgs.follows = "unstable"; }; - + statix.url = "github:oppiliappan/statix"; # Darkreader requires es20, hence a stable pin pkgsDarkreader.url = "github:NixOs/nixpkgs/nixos-24.11"; @@ -97,7 +97,7 @@ inherit pkgsDarkreader; }; system = currentSystem; - lib = inputs.unstable.lib; + inherit (inputs.unstable) lib; }; docs = import ./docs { inherit inputs; diff --git a/modules/programs/basePackages.nix b/modules/programs/basePackages.nix index 8e3f166..fa10da8 100644 --- a/modules/programs/basePackages.nix +++ b/modules/programs/basePackages.nix @@ -4,6 +4,8 @@ lib, options, pkgs, + inputs, + system, ... }: { options.mods = { @@ -50,6 +52,7 @@ then with pkgs; [ + inputs.statix.packages.${system}.default adwaita-icon-theme dbus dconf From 0fa45657f0562d0592cbbd65ab58e82f43c8b060 Mon Sep 17 00:00:00 2001 From: Dashie Date: Sun, 7 Sep 2025 14:51:52 +0200 Subject: [PATCH 085/118] chore(CI): Run lint and format on PR (#19) --- .github/workflows/pr.yaml | 14 +++++----- flake.nix | 4 +-- iso/configuration.nix | 51 ++++++++++++++++++++++++++----------- modules/programs/greetd.nix | 2 +- 4 files changed, 47 insertions(+), 24 deletions(-) diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index 7037e7f..e92ddfd 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -1,13 +1,11 @@ # inspired by https://github.com/danth/stylix/blob/master/.github/workflows/docs.yml -name: Rust-build +name: PR check on: - push: - branches: ["main"] pull_request: branches: ["main"] jobs: build: - name: Build + name: check permissions: contents: read runs-on: ubuntu-latest @@ -17,7 +15,7 @@ jobs: with: github-token: ${{ secrets.GITHUB_TOKEN }} extra-conf: | - extra-experimental-features = nix-command flakes + extra-experimental-features = nix-command flakes pipe-operators - name: Set up cache uses: DeterminateSystems/magic-nix-cache-action@main - name: action @@ -30,4 +28,8 @@ jobs: name: dashnix authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' - name: Linter check - run: nix -L build github:${{ github.repository }}/${{ github.sha }} --no-write-lock-file + run: nix run --no-write-lock-file github:${{ github.repository }}/${{ github.sha }}#lint -- check + - name: Format check + run: nix run --no-write-lock-file github:${{ github.repository }}/${{ github.sha }}#format -- --check . + - name: Build docs + run: nix -L build github:${{ github.repository }}/${{ github.sha }}#docs --no-write-lock-file diff --git a/flake.nix b/flake.nix index 8536734..523c82b 100644 --- a/flake.nix +++ b/flake.nix @@ -42,7 +42,7 @@ oxipaste.url = "github:Xetibo/OxiPaste"; oxirun.url = "github:Xetibo/OxiRun"; dashvim.url = "github:Xetibo/DashVim"; - # For now until merged into Xetibo + hyprdock.url = "github:Xetibo/hyprdock"; reset.url = "github:Xetibo/ReSet"; reset-plugins.url = "github:Xetibo/ReSet-Plugins"; @@ -106,7 +106,7 @@ inherit (inputs.unstable) lib; inherit (dashNixLib) buildSystems; }; - lint = unstable.statix; + lint = inputs.statix.packages.${currentSystem}.default; format = unstable.alejandra; dashNixInputs = inputs; stablePkgs = stable; diff --git a/iso/configuration.nix b/iso/configuration.nix index 8bfcc1e..703e6d3 100644 --- a/iso/configuration.nix +++ b/iso/configuration.nix @@ -1,58 +1,77 @@ { pkgs, - lib, modulesPath, + lib, self, inputs, ... }: let system = "x86_64-linux"; in { - imports = ["${modulesPath}/installer/cd-dvd/installation-cd-minimal.nix"]; + imports = ["${modulesPath}/installer/cd-dvd/iso-image.nix"]; nixpkgs.hostPlatform = { inherit system; }; environment.systemPackages = with pkgs; [ - neovim + inputs.dashvim.packages.${system}.minimal disko git - vesktop - vscodium firefox kitty gnome-disk-utility inputs.disko.packages.${system}.disko-install ]; + networking = { wireless.enable = false; networkmanager.enable = true; }; + nix.settings.experimental-features = [ "nix-command" "flakes" "pipe-operators" ]; - # gnome is a good default that works with every gpu and doesn't require knowledge about custom keybinds. - services = { - xserver = { + users.users.nixos = { + isNormalUser = true; + password = "nixos"; + extraGroups = ["wheel"]; + }; + + image.baseName = lib.mkForce "Dashnix"; + + programs = { + hyprland = { enable = true; - displayManager = { - gdm.enable = true; - }; - desktopManager = { - gnome.enable = true; - }; + withUWSM = true; + xwayland.enable = false; }; + uwsm.enable = true; + }; + + fonts.packages = [pkgs.adwaita-fonts]; + i18n.defaultLocale = "en_US.UTF-8"; + + services = { displayManager.autoLogin = { enable = true; user = "nixos"; }; + greetd = { + enable = true; + settings = { + terminal.vt = 1; + default_session = { + command = "${lib.getExe pkgs.hyprland}"; + user = "nixos"; + }; + }; + }; }; isoImage = { - isoName = lib.mkForce "DashNix.iso"; makeEfiBootable = true; makeUsbBootable = true; contents = [ @@ -62,4 +81,6 @@ in { } ]; }; + + system.stateVersion = "25.11"; } diff --git a/modules/programs/greetd.nix b/modules/programs/greetd.nix index d632b6f..22954a1 100644 --- a/modules/programs/greetd.nix +++ b/modules/programs/greetd.nix @@ -60,7 +60,7 @@ # no idea if these are written correctly example = [ pkgs.niri - pkgs.river + pkgs.river-classic pkgs.swayfx ]; type = with lib.types; listOf package; From 0bc2c97d692f27d26f8fdc4854776167aff5f1ca Mon Sep 17 00:00:00 2001 From: DashieTM Date: Sun, 7 Sep 2025 16:38:50 +0200 Subject: [PATCH 086/118] chore(CI): Only publish iso --- .github/workflows/release.yaml | 60 ++++++++++++++++++---------------- iso/configuration.nix | 2 +- 2 files changed, 32 insertions(+), 30 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 84bda95..f6675f7 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -1,29 +1,31 @@ -# by https://github.com/danth/stylix/blob/master/.github/workflows/docs.yml -name: Release -on: - release: - types: [created] -jobs: - build: - name: Release - permissions: - contents: read - runs-on: ubuntu-latest - steps: - - name: Install Nix - uses: DeterminateSystems/nix-installer-action@main - with: - github-token: ${{ secrets.GITHUB_TOKEN }} - extra-conf: | - extra-experimental-features = nix-command flakes pipe-operators - - name: Set up cache - uses: DeterminateSystems/magic-nix-cache-action@main - - name: Build ISO - run: nix build github:${{ github.repository }}/${{ github.sha }}#iso --no-write-lock-file - - name: Prepare ISO for upload - run: | - cp -r --dereference --no-preserve=mode,ownership result/ public/ - - name: upload ISO - uses: softprops/action-gh-release@v1 - with: - path: path/ +# by https://github.com/danth/stylix/blob/master/.github/workflows/docs.yml +name: Release +on: + release: + types: [created] +jobs: + build: + name: Release + permissions: + actions: read + contents: read + runs-on: ubuntu-latest + steps: + - name: Install Nix + uses: DeterminateSystems/nix-installer-action@main + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + extra-conf: | + extra-experimental-features = nix-command flakes pipe-operators + - name: Set up cache + uses: DeterminateSystems/magic-nix-cache-action@main + - name: Build ISO + run: nix build github:${{ github.repository }}/${{ github.sha }}#iso --no-write-lock-file + - name: Prepare ISO for upload + run: | + cp -r --dereference --no-preserve=mode,ownership result/iso/DashNix.iso DashNix.iso + - name: upload ISO + uses: softprops/action-gh-release@v1 + with: + files: | + DashNix.iso diff --git a/iso/configuration.nix b/iso/configuration.nix index 703e6d3..9272a65 100644 --- a/iso/configuration.nix +++ b/iso/configuration.nix @@ -40,7 +40,7 @@ in { extraGroups = ["wheel"]; }; - image.baseName = lib.mkForce "Dashnix"; + image.baseName = lib.mkForce "DashNix"; programs = { hyprland = { From 387eb01570f8da0fe36056912cc0e811fee411e1 Mon Sep 17 00:00:00 2001 From: DashieTM Date: Sun, 7 Sep 2025 16:59:18 +0200 Subject: [PATCH 087/118] fix(CI): Add write permission --- .github/workflows/release.yaml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index f6675f7..1984fb1 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -6,9 +6,7 @@ on: jobs: build: name: Release - permissions: - actions: read - contents: read + permissions: write-all runs-on: ubuntu-latest steps: - name: Install Nix From a2adc26e589b7214366cf0674c8660aeac1d937c Mon Sep 17 00:00:00 2001 From: DashieTM Date: Sun, 7 Sep 2025 18:26:18 +0200 Subject: [PATCH 088/118] chore(cache): Add DashVim --- base/common_hardware.nix | 2 ++ example/flake.nix | 2 ++ 2 files changed, 4 insertions(+) diff --git a/base/common_hardware.nix b/base/common_hardware.nix index 5af3cba..56a6dc6 100644 --- a/base/common_hardware.nix +++ b/base/common_hardware.nix @@ -115,6 +115,7 @@ in { "https://oxicalc.cachix.org" "https://hyprdock.cachix.org" "https://reset.cachix.org" + "https://dashvim.cachix.org" ]; trusted-public-keys = [ @@ -128,6 +129,7 @@ in { "hyprdock.cachix.org-1:HaROK3fBvFWIMHZau3Vq1TLwUoJE8yRbGLk0lEGzv3Y=" "reset.cachix.org-1:LfpnUUdG7QM/eOkN7NtA+3+4Ar/UBeYB+3WH+GjP9Xo=" "chaotic-nyx.cachix.org-1:HfnXSw4pj95iI/n17rIDy40agHj12WfF+Gqk6SonIT8=" + "dashvim.cachix.org-1:uLRdxp1WOWHnsZZtu3SwUWZRsvC7SXo0Gyk3tIefuL0=" ]; experimental-features = mkDashDefault "nix-command flakes pipe-operators"; diff --git a/example/flake.nix b/example/flake.nix index 0d1e083..129fc20 100644 --- a/example/flake.nix +++ b/example/flake.nix @@ -32,6 +32,7 @@ "https://hyprdock.cachix.org" "https://reset.cachix.org" "https://chaotic-nyx.cachix.org/" + "https://dashvim.cachix.org" ]; extra-trusted-public-keys = [ @@ -46,6 +47,7 @@ "hyprdock.cachix.org-1:HaROK3fBvFWIMHZau3Vq1TLwUoJE8yRbGLk0lEGzv3Y=" "reset.cachix.org-1:LfpnUUdG7QM/eOkN7NtA+3+4Ar/UBeYB+3WH+GjP9Xo=" "chaotic-nyx.cachix.org-1:HfnXSw4pj95iI/n17rIDy40agHj12WfF+Gqk6SonIT8=" + "dashvim.cachix.org-1:uLRdxp1WOWHnsZZtu3SwUWZRsvC7SXo0Gyk3tIefuL0=" ]; }; } From 55b55f71338a3b5aabb4911b813d0e4bf4b36698 Mon Sep 17 00:00:00 2001 From: DashieTM Date: Sun, 7 Sep 2025 21:34:28 +0200 Subject: [PATCH 089/118] chore(tools): Add nixos-compose and expose default config --- .gitignore | 1 + example/hosts/example/configuration.nix | 6 +++--- flake.nix | 3 +++ modules/programs/coding.nix | 3 +++ 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index a931378..f610716 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ result/* result +flake.lock diff --git a/example/hosts/example/configuration.nix b/example/hosts/example/configuration.nix index 3567918..5d9e612 100644 --- a/example/hosts/example/configuration.nix +++ b/example/hosts/example/configuration.nix @@ -4,13 +4,13 @@ # variables for system conf = { # TODO your username - username = "YOURNAME"; + username = "exampleName"; # TODO only needed when you use intel -> amd is default # cpu = "intel"; # TODO your xkb layout - locale = "something.UTF-8"; + locale = "en_US.UTF-8"; # TODO your timezone - timezone = "CONTINENT/CITY"; + timezone = "Europe/Zurich"; }; # modules diff --git a/flake.nix b/flake.nix index 523c82b..4058fb8 100644 --- a/flake.nix +++ b/flake.nix @@ -51,6 +51,8 @@ # absolute insanity chaoticNyx.url = "github:chaotic-cx/nyx/nyxpkgs-unstable"; + + compose.url = "github:garnix-io/nixos-compose"; }; outputs = {self, ...} @ inputs: let @@ -113,5 +115,6 @@ unstablePkgs = unstable; modules = ./modules; iso = dashNixLib.buildIso.config.system.build.isoImage; + nixosConfigurations = dashNixLib.buildSystems {root = ./example/.;}; }; } diff --git a/modules/programs/coding.nix b/modules/programs/coding.nix index 7c79fa9..5a22205 100644 --- a/modules/programs/coding.nix +++ b/modules/programs/coding.nix @@ -4,6 +4,8 @@ config, pkgs, options, + inputs, + system, ... }: let font_family = "${config.mods.stylix.fonts.monospace.name}"; @@ -511,6 +513,7 @@ in { d-spy tmux tmate + inputs.compose.packages.${system}.default ]; in lib.mkIf config.mods.coding.enable ( From e6d19b909483744a7b6557cad7cf9132348259a9 Mon Sep 17 00:00:00 2001 From: DashieTM Date: Mon, 22 Sep 2025 23:14:19 +0200 Subject: [PATCH 090/118] chore(hyprland): Update gestures --- modules/programs/hypr/hyprland.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/programs/hypr/hyprland.nix b/modules/programs/hypr/hyprland.nix index cc79adf..111e10b 100644 --- a/modules/programs/hypr/hyprland.nix +++ b/modules/programs/hypr/hyprland.nix @@ -360,9 +360,9 @@ in { sync_gsettings_theme = mkDashDefault false; }; - gestures = { - workspace_swipe = mkDashDefault true; - }; + gesture = [ + "3, horizontal, workspace" + ]; monitor = mkDashDefault config.mods.hypr.hyprland.monitor; workspace = mkDashDefault config.mods.hypr.hyprland.workspace; From 8b12e7965062c538249308e99017c3605977c6ed Mon Sep 17 00:00:00 2001 From: DashieTM Date: Tue, 23 Sep 2025 23:46:41 +0200 Subject: [PATCH 091/118] chore(yazi): add wl-clipboard --- modules/programs/yazi/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/programs/yazi/default.nix b/modules/programs/yazi/default.nix index c9bd08b..d890a81 100644 --- a/modules/programs/yazi/default.nix +++ b/modules/programs/yazi/default.nix @@ -38,7 +38,7 @@ }; plugins = lib.mkOption { default = { - inherit (pkgs.yaziPlugins) piper diff gitui; + inherit (pkgs.yaziPlugins) piper diff gitui wl-clipboard; }; example = {}; type = with lib.types; attrsOf anything; @@ -55,7 +55,7 @@ inherit (conf) enable; settings = conf.settings // config.mods.yazi.additionalKeymap; keymap = conf.keymap // config.mods.yazi.additionalConfig; - plugins = config.mods.yazi.plugins; + inherit (config.mods.yazi) plugins; }; } ); From 9be8a82a29781aa999789019559ffb242638d54a Mon Sep 17 00:00:00 2001 From: DashieTM Date: Sun, 28 Sep 2025 11:03:57 +0200 Subject: [PATCH 092/118] chore(gaming): Add scx scheduler by default --- modules/programs/gaming.nix | 3 +-- modules/programs/ironbar.nix | 3 ++- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/programs/gaming.nix b/modules/programs/gaming.nix index 0b2e228..3483171 100644 --- a/modules/programs/gaming.nix +++ b/modules/programs/gaming.nix @@ -79,8 +79,7 @@ lib.optionalAttrs (options ? environment.systemPackages) { environment.systemPackages = config.mods.gaming.tools; boot.kernelPackages = lib.mkForce pkgs.linuxPackages_cachyos; - # TODO Re-enable when fixed - #services.scx.enable = true; + services.scx.enable = true; programs = { steam.enable = mkDashDefault config.mods.gaming.steam; diff --git a/modules/programs/ironbar.nix b/modules/programs/ironbar.nix index ed3fa08..9a4bac4 100644 --- a/modules/programs/ironbar.nix +++ b/modules/programs/ironbar.nix @@ -244,7 +244,8 @@ in { config = lib.mkIf (config.mods.ironbar.enable || config.mods.hypr.hyprland.useIronbar) ( lib.optionalAttrs (options ? programs.ironbar) { programs.ironbar = { - package = mkDashDefault pkgs.ironbar; + # TODO broken + # package = mkDashDefault pkgs.ironbar; enable = true; style = if config.mods.ironbar.useDefaultCss From 1857504bacbe6ce972f33e5e3a318475b210cb05 Mon Sep 17 00:00:00 2001 From: DashieTM Date: Sun, 5 Oct 2025 13:24:30 +0200 Subject: [PATCH 093/118] feature(niri): Init module --- flake.nix | 2 +- home/common.nix | 1 + lib/wm.nix | 449 +++++++++++++++++++++++++++++ modules/programs/default.nix | 2 + modules/programs/fastfetch.nix | 1 - modules/programs/fish.nix | 1 + modules/programs/greetd.nix | 24 +- modules/programs/hypr/hyprland.nix | 393 ++++++++++--------------- modules/programs/hypr/hyprlock.nix | 12 +- modules/programs/ironbar.nix | 27 +- modules/programs/niri.nix | 379 ++++++++++++++++++++++++ modules/programs/oxi/default.nix | 6 +- modules/programs/wm.nix | 403 ++++++++++++++++++++++++++ 13 files changed, 1446 insertions(+), 254 deletions(-) create mode 100644 lib/wm.nix create mode 100644 modules/programs/niri.nix create mode 100644 modules/programs/wm.nix diff --git a/flake.nix b/flake.nix index 4058fb8..665829b 100644 --- a/flake.nix +++ b/flake.nix @@ -10,7 +10,7 @@ url = "github:nix-community/lanzaboote/v0.4.2"; inputs.nixpkgs.follows = "unstable"; }; - statix.url = "github:oppiliappan/statix"; + statix.url = "github:oppiliappan/statix?ref=master"; # Darkreader requires es20, hence a stable pin pkgsDarkreader.url = "github:NixOs/nixpkgs/nixos-24.11"; diff --git a/home/common.nix b/home/common.nix index 1a3ccf3..fe2fa53 100644 --- a/home/common.nix +++ b/home/common.nix @@ -2,6 +2,7 @@ mkDashDefault, config, lib, + pkgs, ... }: let username = config.conf.username; diff --git a/lib/wm.nix b/lib/wm.nix new file mode 100644 index 0000000..1352623 --- /dev/null +++ b/lib/wm.nix @@ -0,0 +1,449 @@ +{lib, ...}: let + browserName = config: + if (builtins.isString config.mods.homePackages.browser) + then config.mods.homePackages.browser + else if config.mods.homePackages.browser ? meta && config.mods.homePackages.browser.meta ? mainProgram + then config.mods.homePackages.browser.meta.mainProgram + else config.mods.homePackages.browser.pname; + mkSimpleBind = modKeys: key: command: args: { + inherit modKeys key command args; + }; + mkRepeatSimpleBind = modKeys: key: command: args: { + inherit modKeys key command args; + meta.hyprland.repeat = true; + }; + mkSimpleCustomBind = modKeys: key: niri: hyprland: args: { + inherit modKeys key args; + command = { + inherit niri hyprland; + }; + }; + mkRepeatCustomBind = modKeys: key: niri: hyprland: args: { + inherit modKeys key args; + command = { + inherit niri hyprland; + }; + meta.hyprland.repeat = true; + }; + mkBindWithDesc = modKeys: key: command: args: desc: + { + meta.niri.desc = desc; + } + // mkSimpleBind modKeys key command args; +in { + defaultWindowRules = { + niri = [ + '' + match app-id=r#"^org\.keepassxc\.KeePassXC$"# + match app-id=r#"^org\.gnome\.World\.Secrets$"# + + block-out-from "screen-capture" + '' + '' + match app-id=r#"^steam$"# + open-on-workspace "0" + '' + '' + geometry-corner-radius 12 + clip-to-geometry true + '' + ]; + hyprland = [ + # window rules + "float,class:^(.*)(OxiCalc)(.*)$" + "float,class:^(.*)(winecfg.exe)(.*)$" + "float,class:^(.*)(copyq)(.*)$" + "center,class:^(.*)(swappy)(.*)$" + "workspace 10 silent,class:^(.*)(steam)(.*)$" + + # Otherwise neovide will ignore tiling + "suppressevent fullscreen maximize,class:^(.*)(neovide)(.*)$" + ]; + }; + + defaultStartup = config: { + all = [ + "systemctl --user import-environment" + "dbus-update-activation-environment --systemd --all" + "hyprctl setcursor ${config.mods.stylix.cursor.name} ${toString config.mods.stylix.cursor.size}" + # ensures the systemd service knows what "hyprctl" is :) + ( + if config.mods.gaming.gamemode + then "systemctl try-restart gamemoded.service --user" + else "" + ) + + # other programs + "${browserName config}" + ( + if config.mods.oxi.hyprdock.enable + then "hyprdock --server" + else "" + ) + ( + if config.mods.hypr.hyprpaper.enable + then "hyprpaper" + else "" + ) + ( + if config.mods.hypr.hyprland.useIronbar + then "ironbar" + else "" + ) + ( + if config.mods.oxi.oxipaste.enable + then "oxipaste_daemon" + else "" + ) + ( + if config.mods.oxi.oxinoti.enable + then "oxinoti" + else "" + ) + ]; + niri = [ + "XDG_CURRENT_DESKTOP=Niri" + "XDG_SESSION_DESKTOP=Niri" + "XDG_SESSION_TYPE=wayland" + ]; + hyprland = [ + "XDG_CURRENT_DESKTOP=Hyprland" + "XDG_SESSION_DESKTOP=Hyprland" + "XDG_SESSION_TYPE=wayland" + ]; + }; + + defaultEnv = config: { + all = { + GTK_CSD = "0"; + TERM = "kitty /bin/fish"; + HYPRCURSOR_THEME = config.mods.stylix.cursor.name; + HYPRCURSOR_SIZE = toString config.mods.stylix.cursor.size; + XCURSOR_THEME = config.mods.stylix.cursor.name; + XCURSOR_SIZE = toString config.mods.stylix.cursor.size; + QT_QPA_PLATFORM = "wayland"; + QT_QPA_PLATFORMTHEME = "qt5ct"; + QT_WAYLAND_FORCE_DPI = "96"; + QT_AUTO_SCREEN_SCALE_FACTOR = "0"; + QT_WAYLAND_DISABLE_WINDOWDECORATION = "1"; + QT_SCALE_FACTOR = "1"; + EDITOR = "neovide --novsync --nofork"; + + LIBVA_DRIVER_NAME = + if config.mods.gpu.nvidia.enable + then "nvidia" + else ""; + GBM_BACKEND = + if config.mods.gpu.nvidia.enable + then "nvidia-drm" + else ""; + __GLX_VENDOR_LIBRARY_NAME = + if config.mods.gpu.nvidia.enable + then "nvidia" + else ""; + }; + niri = {}; + hyprland = {}; + }; + + defaultBinds = config: [ + (mkSimpleBind ["Mod"] "1" "focusWorkspace" ["1"]) + (mkSimpleBind ["Mod"] "2" "focusWorkspace" ["2"]) + (mkSimpleBind ["Mod"] "3" "focusWorkspace" ["3"]) + (mkSimpleBind ["Mod"] "4" "focusWorkspace" ["4"]) + (mkSimpleBind ["Mod"] "5" "focusWorkspace" ["5"]) + (mkSimpleBind ["Mod"] "6" "focusWorkspace" ["6"]) + (mkSimpleBind ["Mod"] "7" "focusWorkspace" ["7"]) + (mkSimpleBind ["Mod"] "8" "focusWorkspace" ["8"]) + (mkSimpleBind ["Mod"] "9" "focusWorkspace" ["9"]) + (mkSimpleBind ["Mod"] "0" "focusWorkspace" ["0"]) + (mkSimpleBind ["Mod" "Shift"] "1" "moveToWorkspace" ["1"]) + (mkSimpleBind ["Mod" "Shift"] "2" "moveToWorkspace" ["2"]) + (mkSimpleBind ["Mod" "Shift"] "3" "moveToWorkspace" ["3"]) + (mkSimpleBind ["Mod" "Shift"] "4" "moveToWorkspace" ["4"]) + (mkSimpleBind ["Mod" "Shift"] "5" "moveToWorkspace" ["5"]) + (mkSimpleBind ["Mod" "Shift"] "6" "moveToWorkspace" ["6"]) + (mkSimpleBind ["Mod" "Shift"] "7" "moveToWorkspace" ["7"]) + (mkSimpleBind ["Mod" "Shift"] "8" "moveToWorkspace" ["8"]) + (mkSimpleBind ["Mod" "Shift"] "9" "moveToWorkspace" ["9"]) + (mkSimpleBind ["Mod" "Shift"] "0" "moveToWorkspace" ["0"]) + (mkSimpleBind ["Mod"] "B" "toggleFullscreen" []) + (mkSimpleBind ["Mod"] "V" "toggleFloating" []) + (mkSimpleBind ["Mod" "Shift"] "M" "quit" []) + (mkSimpleBind ["Mod"] "Left" "moveWindowLeft" []) + (mkSimpleBind ["Mod"] "Down" "moveWindowDown" []) + (mkSimpleBind ["Mod"] "Up" "moveWindowUp" []) + (mkSimpleBind ["Mod"] "Right" "moveWindowRight" []) + + (mkRepeatSimpleBind ["Mod"] "J" "moveFocusLeft" []) + (mkRepeatSimpleBind ["Mod"] "K" "moveFocusDown" []) + (mkRepeatSimpleBind ["Mod"] "L" "moveFocusUp" []) + (mkRepeatSimpleBind ["Mod"] "semicolon" "moveFocusRight" []) + + (mkBindWithDesc ["Mod"] "Q" "killActive" [] "Kill active window") + + (mkBindWithDesc ["Mod"] "N" "spawn" ["neovide"] "Open Neovide") + (mkBindWithDesc ["Mod"] "T" "spawn-sh" ["kitty" "-1"] "Open Kitty") + (mkBindWithDesc ["Mod" "Shift"] "L" "spawn" ["hyprlock"] "Lock screen") + + ( + if config.mods.yazi.enable + then mkBindWithDesc ["Mod"] "E" "spawn-sh" ["EDITOR='neovide --no-fork' kitty yazi"] "Open Yazi" + else {} + ) + ( + if config.mods.anyrun.enable + then mkBindWithDesc ["Mod"] "R" "spawn" ["anyrun"] "Open Anyrun" + else {} + ) + ( + if config.mods.oxi.oxirun.enable + then mkBindWithDesc ["Mod"] "R" "spawn" ["oxirun"] "Open OxiRun" + else {} + ) + ( + if config.mods.oxi.oxidash.enable + then mkBindWithDesc ["Mod"] "M" "spawn" ["oxidash"] "Open OxiDash" + else {} + ) + ( + if config.mods.oxi.oxicalc.enable + then mkBindWithDesc ["Mod"] "G" "spawn" ["oxicalc"] "Open Oxicalc" + else {} + ) + ( + if config.mods.oxi.oxishut.enable + then mkBindWithDesc ["Mod"] "D" "spawn" ["oxishut"] "Open OxiShut" + else {} + ) + ( + if config.mods.oxi.oxipaste.enable + then mkBindWithDesc ["Mod"] "A" "spawn" ["oxipaste"] "Open Oxipaste" + else {} + ) + ( + if config.mods.oxi.hyprdock.enable + then mkBindWithDesc ["Mod" "Shift"] "P" "spawn" ["hyprdock --gui"] "Open Hyprdock" + else {} + ) + ( + if config.mods.hypr.hyprlock.enable + then mkBindWithDesc ["Mod" "Shift" "Alt"] "L" "spawn-sh" ["playerctl -a pause & hyprlock & systemctl suspend"] "Lock and suspend" + else {} + ) + ( + if config.mods.hypr.hyprlock.enable + then mkBindWithDesc ["Mod" "Shift" "Alt"] "K" "spawn-sh" ["playerctl -a pause & hyprlock & systemctl hibernate"] "Lock and hibernate" + else {} + ) + + (mkBindWithDesc ["Mod"] "F" "spawn" ["${browserName config}"] "Open Browser") + ( + if + ( + browserName config == "firefox" || browserName config == "zen" + ) + then mkBindWithDesc ["Mod" "Shift"] "F" "spawn" ["${browserName config} -p special"] "Open Browser Special Profile" + else {} + ) + + (mkBindWithDesc ["Mod"] "S" "spawn-sh" [''grim -g \"$(slurp)\" - | wl-copy''] "Take Screenshot") + (mkBindWithDesc ["Mod" "Shift"] "S" "spawn-sh" [''grim -g \"$(slurp)\" - | satty -f -''] "Take Screenshot and edit") + + ( + if config.mods.scripts.audioControl + then { + key = "XF86AudioMute"; + command = "spawn-sh"; + args = ["audioControl mute"]; + meta.niri = { + allowWhileLocked = true; + desc = "Mute Audio"; + }; + } + else {} + ) + ( + if config.mods.scripts.audioControl + then { + key = "XF86AudioRaiseVolume"; + command = "spawn-sh"; + args = ["audioControl +5%"]; + meta.niri = { + allowWhileLocked = true; + desc = "Raise Audio Volume"; + }; + } + else {} + ) + ( + if config.mods.scripts.audioControl + then { + key = "XF86AudioLowerVolume"; + command = "spawn-sh"; + args = ["audioControl -5%"]; + meta.niri = { + allowWhileLocked = true; + desc = "Lower Audio Volume"; + }; + } + else {} + ) + { + key = "XF86AudioPlay"; + command = "spawn-sh"; + args = ["playerctl play-pause"]; + meta.niri = { + allowWhileLocked = true; + desc = "Play/Pause"; + }; + } + { + key = "XF86AudioNext"; + command = "spawn-sh"; + args = ["playerctl next"]; + meta.niri = { + allowWhileLocked = true; + desc = "Next Song"; + }; + } + { + key = "XF86AudioPrev"; + command = "spawn-sh"; + args = ["playerctl previous"]; + meta.niri = { + allowWhileLocked = true; + desc = "Previous Song"; + }; + } + ( + if config.mods.scripts.changeBrightness + then { + key = "XF86MonBrightnessDown"; + command = "spawn-sh"; + args = ["changeBrightness -10%"]; + meta.niri = { + allowWhileLocked = true; + desc = "Lower Brigthness"; + }; + } + else {} + ) + ( + if config.mods.scripts.changeBrightness + then { + key = "XF86MonBrightnessUp"; + command = "spawn-sh"; + args = ["changeBrightness +10%"]; + meta.niri = { + allowWhileLocked = true; + desc = "Raise Brigthness"; + }; + } + else {} + ) + + # Niri only keybinds + (mkSimpleCustomBind ["Mod"] "BracketLeft" "consume-or-expel-window-left" null []) + (mkSimpleCustomBind ["Mod"] "BracketRight" "consume-or-expel-window-right" null []) + (mkSimpleCustomBind ["Mod"] "Comma" "consume-window-into-column" null []) + (mkSimpleCustomBind ["Mod"] "Period" "expel-window-from-column" null []) + (mkSimpleCustomBind ["Mod"] "Y" "switch-preset-column-width" null []) + (mkSimpleCustomBind ["Mod"] "Tab" "focus-workspace-previous" null []) + (mkSimpleCustomBind ["Mod" "Shift"] "V" "switch-focus-between-floating-and-tiling" null []) + (mkSimpleCustomBind ["Mod" "Shift"] "B" "expand-column-to-available-width" null []) + (mkSimpleCustomBind ["Mod"] "U" "set-column-width" null ["-10%"]) + (mkSimpleCustomBind ["Mod"] "P" "set-column-width" null ["+10%"]) + (mkSimpleCustomBind ["Mod"] "O" "set-column-width" null ["50%"]) + (mkSimpleCustomBind ["Mod" "Shift"] "Minus" "set-window-height" null ["-10%"]) + (mkSimpleCustomBind ["Mod" "Shift"] "Equal" "set-window-height" null ["+10%"]) + (mkSimpleCustomBind ["Mod" "Ctrl"] "1" "move-column-to-workspace" null ["1"]) + (mkSimpleCustomBind ["Mod" "Ctrl"] "2" "move-column-to-workspace" null ["2"]) + (mkSimpleCustomBind ["Mod" "Ctrl"] "3" "move-column-to-workspace" null ["3"]) + (mkSimpleCustomBind ["Mod" "Ctrl"] "4" "move-column-to-workspace" null ["4"]) + (mkSimpleCustomBind ["Mod" "Ctrl"] "5" "move-column-to-workspace" null ["5"]) + (mkSimpleCustomBind ["Mod" "Ctrl"] "6" "move-column-to-workspace" null ["6"]) + (mkSimpleCustomBind ["Mod" "Ctrl"] "7" "move-column-to-workspace" null ["7"]) + (mkSimpleCustomBind ["Mod" "Ctrl"] "8" "move-column-to-workspace" null ["8"]) + (mkSimpleCustomBind ["Mod" "Ctrl"] "9" "move-column-to-workspace" null ["9"]) + (mkSimpleCustomBind ["Mod" "Ctrl"] "0" "move-column-to-workspace" null ["0"]) + (mkSimpleCustomBind ["Mod" "Shift"] "J" "focus-monitor-left" null []) + (mkSimpleCustomBind ["Mod" "Shift"] "semicolon" "focus-monitor-right" null []) + (mkSimpleCustomBind ["Mod" "Ctrl"] "J" "move-column-to-monitor-left" null []) + (mkSimpleCustomBind ["Mod" "Ctrl"] "semicolon" "move-column-to-monitor-right" null []) + (mkSimpleCustomBind ["Mod" "Shift"] "Slash" "show-hotkey-overlay" null []) + { + modKeys = ["Mod"]; + key = "W"; + command.niri = "toggle-overview"; + meta.niri = { + desc = "Overview"; + repeat = false; + }; + } + { + modKeys = ["Mod"]; + key = "Escape"; + command.niri = "toggle-keyboard-shortcuts-inhibit"; + meta.niri = { + allowInhibit = false; + }; + } + { + modKeys = ["Mod"]; + key = "WheelScrollUp"; + command.niri = "focus-workspace-up"; + meta.niri.cooldown = 150; + } + { + modKeys = ["Mod"]; + key = "WheelScrollDown"; + command.niri = "focus-workspace-down"; + meta.niri.cooldown = 150; + } + { + modKeys = ["Mod"]; + key = "WheelScrollRight"; + command.niri = "focus-column-right"; + meta.niri.cooldown = 150; + } + { + modKeys = ["Mod"]; + key = "WheelScrollLeft"; + command.niri = "focus-column-left"; + meta.niri.cooldown = 150; + } + + # Hyprland only keybinds + (mkSimpleCustomBind ["Mod"] "C" null "togglesplit" []) + (mkSimpleCustomBind ["Mod" "SHIFT" "ALT"] "1" null "movetoworkspacesilent" ["1"]) + (mkSimpleCustomBind ["Mod" "SHIFT" "ALT"] "2" null "movetoworkspacesilent" ["2"]) + (mkSimpleCustomBind ["Mod" "SHIFT" "ALT"] "3" null "movetoworkspacesilent" ["3"]) + (mkSimpleCustomBind ["Mod" "SHIFT" "ALT"] "4" null "movetoworkspacesilent" ["4"]) + (mkSimpleCustomBind ["Mod" "SHIFT" "ALT"] "5" null "movetoworkspacesilent" ["5"]) + (mkSimpleCustomBind ["Mod" "SHIFT" "ALT"] "6" null "movetoworkspacesilent" ["6"]) + (mkSimpleCustomBind ["Mod" "SHIFT" "ALT"] "7" null "movetoworkspacesilent" ["7"]) + (mkSimpleCustomBind ["Mod" "SHIFT" "ALT"] "8" null "movetoworkspacesilent" ["8"]) + (mkSimpleCustomBind ["Mod" "SHIFT" "ALT"] "9" null "movetoworkspacesilent" ["9"]) + (mkSimpleCustomBind ["Mod" "SHIFT" "ALT"] "0" null "movetoworkspacesilent" ["0"]) + (mkRepeatCustomBind ["Mod"] "U" null "resizeactive" ["-20" "0"]) + (mkRepeatCustomBind ["Mod"] "P" null "resizeactive" ["20" "0"]) + (mkRepeatCustomBind ["Mod"] "O" null "resizeactive" ["0" "-20"]) + (mkRepeatCustomBind ["Mod"] "I" null "resizeactive" ["0" "20"]) + (mkSimpleCustomBind ["Mod" "ALT"] "J" null "layoutmsg" ["preselect" "l"]) + (mkSimpleCustomBind ["Mod" "ALT"] "K" null "layoutmsg" ["preselect" "d"]) + (mkSimpleCustomBind ["Mod" "ALT"] "L" null "layoutmsg" ["preselect" "u"]) + (mkSimpleCustomBind ["Mod" "ALT"] "semicolon" null "layoutmsg" ["preselect" "r"]) + (mkSimpleCustomBind ["Mod" "ALT"] "H" null "layoutmsg" ["preselect" "n"]) + ( + if config.mods.hypr.hyprland.hyprspaceEnable + then { + modKeys = ["Mod"]; + key = "W"; + command.hyprland = "overview:toggle"; + args = []; + } + else {} + ) + ]; +} diff --git a/modules/programs/default.nix b/modules/programs/default.nix index ebc1ff4..1c0baa5 100644 --- a/modules/programs/default.nix +++ b/modules/programs/default.nix @@ -1,5 +1,6 @@ { imports = [ + ./niri.nix ./acpid.nix ./anyrun.nix ./basePackages.nix @@ -48,6 +49,7 @@ ./virtmanager.nix ./xkb.nix ./xone.nix + ./wm.nix ./yazi ]; } diff --git a/modules/programs/fastfetch.nix b/modules/programs/fastfetch.nix index f73b2cd..9953d84 100644 --- a/modules/programs/fastfetch.nix +++ b/modules/programs/fastfetch.nix @@ -1,5 +1,4 @@ { - mkDashDefault, pkgs, lib, options, diff --git a/modules/programs/fish.nix b/modules/programs/fish.nix index 2f18036..f063f35 100644 --- a/modules/programs/fish.nix +++ b/modules/programs/fish.nix @@ -56,6 +56,7 @@ in { abbr --add ls 'lsd' abbr --add :q 'exit' abbr --add gh 'git push origin' + abbr --add gu 'git push upstream' abbr --add gl 'git pull origin' abbr --add gm 'git commit -m' abbr --add ga "git add -A" diff --git a/modules/programs/greetd.nix b/modules/programs/greetd.nix index 22954a1..2c5f87f 100644 --- a/modules/programs/greetd.nix +++ b/modules/programs/greetd.nix @@ -18,7 +18,10 @@ ''; }; monitor = lib.mkOption { - default = "${config.mods.hypr.hyprland.defaultMonitor}"; + default = + if config.mods.wm.monitors != [] + then (builtins.elemAt config.mods.wm.monitors 0).name + else ""; example = "eDP-1"; type = lib.types.str; description = '' @@ -27,7 +30,10 @@ ''; }; scale = lib.mkOption { - default = "${config.mods.hypr.hyprland.defaultMonitorScale}"; + default = + if config.mods.wm.monitors != [] + then builtins.toString (builtins.elemAt config.mods.wm.monitors 0).scale + else ""; example = "1.5"; type = lib.types.str; description = '' @@ -46,7 +52,14 @@ description = "The compositor/greeter command to run"; }; resolution = lib.mkOption { - default = "${config.mods.hypr.hyprland.defaultMonitorMode}"; + default = + if config.mods.wm.monitors != [] + then let + resX = builtins.toString (builtins.elemAt config.mods.wm.monitors 0).resolutionX; + resY = builtins.toString (builtins.elemAt config.mods.wm.monitors 0).resolutionY; + refresh = builtins.toString (builtins.elemAt config.mods.wm.monitors 0).refreshrate; + in "${resX}x${resY}@${refresh}" + else ""; example = "3440x1440@180"; type = lib.types.str; description = '' @@ -55,7 +68,8 @@ }; environments = lib.mkOption { default = [ - inputs.hyprland.packages.${config.conf.system}.hyprland + (lib.mkIf config.mods.hypr.hyprland.enable inputs.hyprland.packages.${config.conf.system}.hyprland) + (lib.mkIf config.mods.niri.enable pkgs.niri) ]; # no idea if these are written correctly example = [ @@ -82,7 +96,7 @@ }; config = let - username = config.conf.username; + inherit (config.conf) username; in lib.mkIf config.mods.greetd.enable ( lib.optionalAttrs (options ? environment) { diff --git a/modules/programs/hypr/hyprland.nix b/modules/programs/hypr/hyprland.nix index 111e10b..f6ee377 100644 --- a/modules/programs/hypr/hyprland.nix +++ b/modules/programs/hypr/hyprland.nix @@ -6,12 +6,7 @@ pkgs, ... }: let - browserName = - if (builtins.isString config.mods.homePackages.browser) - then config.mods.homePackages.browser - else if config.mods.homePackages.browser ? meta && config.mods.homePackages.browser.meta ? mainProgram - then config.mods.homePackages.browser.meta.mainProgram - else config.mods.homePackages.browser.pname; + defaultWmConf = import ../../../lib/wm.nix {inherit lib;}; in { options.mods.hypr.hyprland = { enable = lib.mkOption { @@ -22,64 +17,12 @@ in { Enable Hyprland ''; }; - defaultMonitor = lib.mkOption { - default = ""; - example = "eDP-1"; - type = lib.types.str; - description = '' - main monitor - ''; - }; - defaultMonitorMode = lib.mkOption { - default = ""; - example = "3440x1440@180"; - type = lib.types.str; - description = '' - main monitor mode: width x height @ refreshrate - ''; - }; - defaultMonitorScale = lib.mkOption { - default = "1"; - example = "1.5"; - type = lib.types.str; - description = '' - main monitor scaling - ''; - }; - monitor = lib.mkOption { - default = [ - # main monitor - "${config.mods.hypr.hyprland.defaultMonitor},${config.mods.hypr.hyprland.defaultMonitorMode},0x0,${config.mods.hypr.hyprland.defaultMonitorScale}" - # all others - ]; - example = ["DP-1,3440x1440@180,2560x0,1,vrr,0"]; - type = with lib.types; listOf str; - description = '' - The monitor configuration for hyprland. - ''; - }; - workspace = lib.mkOption { - default = []; - example = ["2,monitor:DP-1, default:true"]; - type = with lib.types; listOf str; - description = '' - The workspace configuration for hyprland. - ''; - }; noAtomic = lib.mkOption { default = false; example = true; type = lib.types.bool; description = '' - Use tearing - ''; - }; - extraAutostart = lib.mkOption { - default = []; - example = ["your application"]; - type = lib.types.listOf lib.types.str; - description = '' - Extra exec_once. + Use tearing (Warning, can be buggy) ''; }; useIronbar = lib.mkOption { @@ -90,14 +33,6 @@ in { Whether to use ironbar in hyprland. ''; }; - ironbarSingleMonitor = lib.mkOption { - default = true; - example = false; - type = lib.types.bool; - description = '' - Whether to use ironbar on a single monitor. - ''; - }; useDefaultConfig = lib.mkOption { default = true; example = false; @@ -160,7 +95,151 @@ in { hyprpicker ]; - wayland.windowManager.hyprland = { + wayland.windowManager.hyprland = let + mkWorkspace = workspaces: + builtins.map (workspace: let + default = + if workspace.default + then ",default:true" + else ""; + in "${workspace.name},monitor:${workspace.monitor}${default}") + workspaces; + mkTransform = transform: + if transform == "0" + then 0 + else if transform == "90" + then 1 + else if transform == "180" + then 2 + else if transform == "270" + then 3 + else 4; + mkVrr = vrr: + if vrr + then "1" + else "0"; + mkMonitors = monitors: + builtins.map ( + monitor: "${monitor.name},${builtins.toString monitor.resolutionX}x${builtins.toString monitor.resolutionY}@${builtins.toString monitor.refreshrate},${builtins.toString monitor.positionX}x${builtins.toString monitor.positionY},${builtins.toString monitor.scale}, transform,${builtins.toString (mkTransform monitor.transform)}, vrr,${mkVrr monitor.vrr}" + ) + monitors; + + mkMods = bind: let + mods = bind.modKeys or []; + in + builtins.map (mod: + if mod == "Mod" + then (lib.strings.toUpper config.mods.wm.modKey) + " " + else lib.strings.toUpper mod) + mods + |> lib.strings.concatStringsSep ""; + mkArgs = args: + if args != [] + then (lib.strings.concatStringsSep " " args) + else ""; + shouldRepeat = bind: bind ? meta && bind.meta ? hyprland && bind.meta.hyprland ? repeat && bind.meta.hyprland.repeat; + + defaultBinds = cfg: + if cfg.mods.wm.useDefaultBinds + then defaultWmConf.defaultBinds cfg + else []; + + mkEBinds = cfg: let + binds = cfg.mods.wm.binds ++ defaultBinds cfg; + in + binds + |> builtins.filter (bind: bind ? command && shouldRepeat bind && !hasInvalidCustomCommand bind) + |> builtins.map ( + bind: "${mkMods bind},${bind.key},${mkCommand bind}" + ); + mkBinds = cfg: let + binds = cfg.mods.wm.binds ++ defaultBinds cfg; + in + binds + |> builtins.filter (bind: bind ? command && !(shouldRepeat bind) && !hasInvalidCustomCommand bind) + |> builtins.map ( + bind: "${mkMods bind},${bind.key},${mkCommand bind}" + ); + mkCommand = bind: let + args = bind.args or []; + in + if bind.command == "quit" + then "exit" + else if bind.command == "killActive" + then "killactive" + else if bind.command == "moveWindowRight" + then "movewindow,r" + else if bind.command == "moveWindowDown" + then "movewindow,d" + else if bind.command == "moveWindowLeft" + then "movewindow,l" + else if bind.command == "moveWindowUp" + then "movewindow,u" + else if bind.command == "moveFocusUp" + then "movefocus,u" + else if bind.command == "moveFocusRight" + then "movefocus,r" + else if bind.command == "moveFocusDown" + then "movefocus,d" + else if bind.command == "moveFocusLeft" + then "movefocus,l" + else if bind.command == "toggleFloating" + then "togglefloating" + else if bind.command == "toggleFullscreen" + then "fullscreen" + else if bind.command == "focusWorkspace" + then "workspace" + "," + mkArgs args + else if bind.command == "moveToWorkspace" + then "movetoworkspace" + "," + mkArgs args + else if bind.command == "spawn" + then "exec" + "," + mkArgs args + else if bind.command == "spawn-sh" + then "exec" + "," + mkArgs args + else bind.command.hyprland + "," + mkArgs args; + hasInvalidCustomCommand = bind: !(builtins.isString bind.command) && bind.command.hyprland or null == null; + + mkEnv = config: let + defaultEnv = + if config.mods.wm.useDefaultEnv + then defaultWmConf.defaultEnv config + else { + all = {}; + hyprland = {}; + }; + userEnv = + if config.mods.wm.env ? all + then config.mods.wm.env.all // config.mods.wm.env.hyprland + else config.mods.wm.env; + env = userEnv // defaultEnv.all // defaultEnv.hyprland; + in + lib.attrsets.mapAttrsToList ( + name: value: "${name},${value}" + ) + env; + mkAutoStart = config: let + defaultStartup = + if config.mods.wm.useDefaultStartup + then defaultWmConf.defaultStartup config + else { + all = []; + hyprland = []; + }; + userStartup = + if config.mods.wm.startup ? all + then config.mods.wm.startup.all ++ config.mods.wm.startup.hyprland + else config.mods.wm.startup; + autoStart = userStartup ++ defaultStartup.all ++ defaultStartup.hyprland; + in + autoStart; + mkWindowRule = config: let + defaultWindowRules = + if config.mods.wm.useDefaultWindowRules + then defaultWmConf.defaultWindowRules.hyprland + else []; + in + # defaultWindowRules ++ config.mods.wm.windowRules.hyprland; + defaultWindowRules; + in { enable = true; package = mkDashDefault pkgs.hyprland; plugins = @@ -174,124 +253,13 @@ in { lib.mkMerge [ { - "$mod" = mkDashDefault "SUPER"; + "$mod" = mkDashDefault config.mods.wm.modKey; bindm = [ "$mod, mouse:272, movewindow" "$mod, mouse:273, resizeactive" ]; - bind = [ - # screenshots - ''$mod SUPER,S,exec,grim -g "$(slurp)" - | wl-copy'' - ''$mod SUPERSHIFT,S,exec,grim -g "$(slurp)" - | satty -f -'' - - # regular programs - "$mod SUPER,F,exec,${browserName}" - (lib.mkIf ( - browserName == "firefox" || browserName == "zen" - ) "$mod SUPERSHIFT,F,exec,${browserName} -p special") - "$mod SUPER,T,exec,kitty -1" - "$mod SUPER,E,exec,nautilus -w" - (lib.mkIf config.mods.yazi.enable "$mod SUPER,Y,exec, EDITOR='neovide --no-fork' kitty yazi") - "$mod SUPER,N,exec,neovide" - (lib.mkIf config.mods.anyrun.enable "$mod SUPER,R,exec,anyrun") - (lib.mkIf config.mods.oxi.oxirun.enable "$mod SUPER,R,exec,oxirun") - (lib.mkIf config.mods.oxi.oxidash.enable "$mod SUPER,M,exec,oxidash") - (lib.mkIf config.mods.oxi.oxicalc.enable "$mod SUPER,G,exec,oxicalc") - (lib.mkIf config.mods.oxi.oxishut.enable "$mod SUPER,D,exec,oxishut") - (lib.mkIf config.mods.oxi.oxipaste.enable "$mod SUPER,A,exec,oxipaste") - (lib.mkIf config.mods.oxi.hyprdock.enable "$mod SUPERSHIFT,P,exec,hyprdock --gui") - (lib.mkIf config.mods.hypr.hyprlock.enable "$mod SUPERSHIFT,L,exec, playerctl -a pause & hyprlock & systemctl suspend") - (lib.mkIf config.mods.hypr.hyprlock.enable "$mod SUPERSHIFT,K,exec, playerctl -a pause & hyprlock & systemctl hibernate") - - # media keys - (lib.mkIf config.mods.scripts.audioControl ",XF86AudioMute,exec, audioControl mute") - (lib.mkIf config.mods.scripts.audioControl ",XF86AudioLowerVolume,exec, audioControl sink -5%") - (lib.mkIf config.mods.scripts.audioControl ",XF86AudioRaiseVolume,exec, audioControl sink +5%") - ",XF86AudioPlay,exec, playerctl play-pause" - ",XF86AudioNext,exec, playerctl next" - ",XF86AudioPrev,exec, playerctl previous" - (lib.mkIf config.mods.scripts.changeBrightness ",XF86MonBrightnessDown,exec, changeBrightness 10%-") - (lib.mkIf config.mods.scripts.changeBrightness ",XF86MonBrightnessUp,exec, changeBrightness +10%") - - # hyprland keybinds - # misc - "$mod SUPER,V,togglefloating," - "$mod SUPER,B,fullscreen," - "$mod SUPER,C,togglesplit" - "$mod SUPER,Q,killactive," - "$mod SUPERSHIFTALT,M,exit," - "$mod SUPERSHIFT,W,togglespecialworkspace" - - # move - "$mod SUPER,left,movewindow,l" - "$mod SUPER,right,movewindow,r" - "$mod SUPER,up,movewindow,u" - "$mod SUPER,down,movewindow,d" - - # workspaces - "$mod SUPER,1,workspace,1" - "$mod SUPER,2,workspace,2" - "$mod SUPER,3,workspace,3" - "$mod SUPER,4,workspace,4" - "$mod SUPER,5,workspace,5" - "$mod SUPER,6,workspace,6" - "$mod SUPER,7,workspace,7" - "$mod SUPER,8,workspace,8" - "$mod SUPER,9,workspace,9" - "$mod SUPER,0,workspace,10" - - # move to workspace - "$mod SUPERSHIFT,1,movetoworkspace,1" - "$mod SUPERSHIFT,2,movetoworkspace,2" - "$mod SUPERSHIFT,3,movetoworkspace,3" - "$mod SUPERSHIFT,4,movetoworkspace,4" - "$mod SUPERSHIFT,5,movetoworkspace,5" - "$mod SUPERSHIFT,6,movetoworkspace,6" - "$mod SUPERSHIFT,7,movetoworkspace,7" - "$mod SUPERSHIFT,8,movetoworkspace,8" - "$mod SUPERSHIFT,9,movetoworkspace,9" - "$mod SUPERSHIFT,0,movetoworkspace,10" - - # move to workspace silent - "$mod SUPERSHIFTALT,1,movetoworkspacesilent,1" - "$mod SUPERSHIFTALT,2,movetoworkspacesilent,2" - "$mod SUPERSHIFTALT,3,movetoworkspacesilent,3" - "$mod SUPERSHIFTALT,4,movetoworkspacesilent,4" - "$mod SUPERSHIFTALT,5,movetoworkspacesilent,5" - "$mod SUPERSHIFTALT,6,movetoworkspacesilent,6" - "$mod SUPERSHIFTALT,7,movetoworkspacesilent,7" - "$mod SUPERSHIFTALT,8,movetoworkspacesilent,8" - "$mod SUPERSHIFTALT,9,movetoworkspacesilent,9" - "$mod SUPERSHIFTALT,0,movetoworkspacesilent,10" - - # preselection - "$mod SUPERALT,j,layoutmsg,preselect l" - "$mod SUPERALT,k,layoutmsg,preselect d" - "$mod SUPERALT,l,layoutmsg,preselect u" - "$mod SUPERALT,semicolon,layoutmsg,preselect r" - "$mod SUPERALT,h,layoutmsg,preselect n" - ]; - - binde = [ - # hyprland keybinds - # focus - "$mod SUPER,J,movefocus,l" - "$mod SUPER,semicolon,movefocus,r" - "$mod SUPER,L,movefocus,u" - "$mod SUPER,K,movefocus,d" - - # resize - "$mod SUPER,U,resizeactive,-20 0" - "$mod SUPER,P,resizeactive,20 0" - "$mod SUPER,O,resizeactive,0 -20" - "$mod SUPER,I,resizeactive,0 20" - - (lib.mkIf config.mods.hypr.hyprland.hyprspaceEnable - "SUPER, W, overview:toggle") - ]; - general = { gaps_out = mkDashDefault "3,5,5,5"; border_size = mkDashDefault 3; @@ -364,70 +332,19 @@ in { "3, horizontal, workspace" ]; - monitor = mkDashDefault config.mods.hypr.hyprland.monitor; - workspace = mkDashDefault config.mods.hypr.hyprland.workspace; - - env = [ - "GTK_CSD,0" - ''TERM,"kitty /bin/fish"'' - "XDG_CURRENT_DESKTOP=Hyprland" - "XDG_SESSION_TYPE=wayland" - "XDG_SESSION_DESKTOP=Hyprland" - "HYPRCURSOR_THEME,${config.mods.stylix.cursor.name}" - "HYPRCURSOR_SIZE,${toString config.mods.stylix.cursor.size}" - "XCURSOR_THEME,${config.mods.stylix.cursor.name}" - "XCURSOR_SIZE,${toString config.mods.stylix.cursor.size}" - "QT_QPA_PLATFORM,wayland" - "QT_QPA_PLATFORMTHEME,qt5ct" - "QT_WAYLAND_FORCE_DPI,96" - "QT_AUTO_SCREEN_SCALE_FACTOR,0" - "QT_WAYLAND_DISABLE_WINDOWDECORATION,1" - "QT_SCALE_FACTOR,1" - ''EDITOR,"neovide --novsync --nofork"'' - - (lib.mkIf config.mods.gpu.nvidia.enable "LIBVA_DRIVER_NAME,nvidia") - (lib.mkIf config.mods.gpu.nvidia.enable "XDG_SESSION_TYPE,wayland") - (lib.mkIf config.mods.gpu.nvidia.enable "GBM_BACKEND,nvidia-drm") - (lib.mkIf config.mods.gpu.nvidia.enable "__GLX_VENDOR_LIBRARY_NAME,nvidia") - ]; - layerrule = [ # layer rules # mainly to disable animations within slurp and grim "noanim, selection" ]; - windowrule = [ - # window rules - "float,class:^(.*)(OxiCalc)(.*)$" - "float,class:^(.*)(winecfg.exe)(.*)$" - "float,class:^(.*)(copyq)(.*)$" - "center,class:^(.*)(swappy)(.*)$" - "workspace 10 silent,class:^(.*)(steam)(.*)$" - - # Otherwise neovide will ignore tiling - "suppressevent fullscreen maximize,class:^(.*)(neovide)(.*)$" - ]; - - exec-once = - [ - # environment - "systemctl --user import-environment" - "dbus-update-activation-environment --systemd --all" - "hyprctl setcursor ${config.mods.stylix.cursor.name} ${toString config.mods.stylix.cursor.size}" - # ensures the systemd service knows what "hyprctl" is :) - (lib.mkIf config.mods.gaming.gamemode "systemctl try-restart gamemoded.service --user") - - # other programs - "${browserName}" - (lib.mkIf config.mods.oxi.hyprdock.enable "hyprdock --server") - (lib.mkIf config.mods.hypr.hyprpaper.enable "hyprpaper") - (lib.mkIf config.mods.hypr.hyprland.useIronbar "ironbar") - (lib.mkIf config.mods.oxi.oxipaste.enable "oxipaste_daemon") - (lib.mkIf config.mods.oxi.oxinoti.enable "oxinoti") - ] - ++ config.mods.hypr.hyprland.extraAutostart; - + workspace = mkDashDefault (mkWorkspace config.mods.wm.workspaces); + monitor = mkDashDefault (mkMonitors config.mods.wm.monitors); + env = mkDashDefault (mkEnv config); + bind = mkDashDefault (mkBinds config); + binde = mkDashDefault (mkEBinds config); + windowrule = mkDashDefault (mkWindowRule config); + exec-once = mkDashDefault (mkAutoStart config); plugin = config.mods.hypr.hyprland.pluginConfig; } config.mods.hypr.hyprland.customConfig diff --git a/modules/programs/hypr/hyprlock.nix b/modules/programs/hypr/hyprlock.nix index 30ea707..c152b22 100644 --- a/modules/programs/hypr/hyprlock.nix +++ b/modules/programs/hypr/hyprlock.nix @@ -24,14 +24,22 @@ input-field = [ { - monitor = "${config.mods.hypr.hyprland.defaultMonitor}"; + monitor = "${ + if config.mods.wm.monitors != [] + then (builtins.elemAt config.mods.wm.monitors 0).name + else "" + }"; placeholder_text = "password or something"; } ]; label = [ { - monitor = "${config.mods.hypr.hyprland.defaultMonitor}"; + monitor = "${ + if config.mods.wm.monitors != [] + then (builtins.elemAt config.mods.wm.monitors 0).name + else "" + }"; text = "$TIME"; font_size = 50; position = "0, 200"; diff --git a/modules/programs/ironbar.nix b/modules/programs/ironbar.nix index 9a4bac4..5757347 100644 --- a/modules/programs/ironbar.nix +++ b/modules/programs/ironbar.nix @@ -1,5 +1,4 @@ { - mkDashDefault, lib, config, pkgs, @@ -7,7 +6,7 @@ options, ... }: let - username = config.conf.username; + inherit (config.conf) username; base16 = pkgs.callPackage inputs.base16.lib {}; scheme = base16.mkSchemeAttrs config.stylix.base16Scheme; ironbarDefaultConfig = useBatteryModule: { @@ -183,8 +182,15 @@ ]; }; monitorConfig = useBatteryModule: - if config.mods.hypr.hyprland.ironbarSingleMonitor - then {monitors.${config.mods.hypr.hyprland.defaultMonitor} = ironbarDefaultConfig useBatteryModule;} + if config.mods.ironbar.ironbarSingleMonitor + then { + monitors.${ + if config.mods.wm.monitors != [] + then (builtins.elemAt config.mods.wm.monitors 0).name + else "" + } = + ironbarDefaultConfig useBatteryModule; + } else ironbarDefaultConfig useBatteryModule; in { options.mods = { @@ -195,6 +201,14 @@ in { type = lib.types.bool; description = "Enables ironbar"; }; + ironbarSingleMonitor = lib.mkOption { + default = true; + example = false; + type = lib.types.bool; + description = '' + Whether to use ironbar on a single monitor. + ''; + }; useDefaultConfig = lib.mkOption { default = true; example = false; @@ -257,6 +271,7 @@ in { @import url("/home/${username}/.config/gtk-3.0/gtk.css"); @define-color primary #${scheme.base0D}; + @define-color warning #${scheme.base0F}; @define-color muted-text #${scheme.base05}; @define-color background #${scheme.base00}; @define-color secondary-background #${scheme.base02}; @@ -406,6 +421,10 @@ in { color: @primary; } + .workspaces .item:not(.visible) { + color: @warning; + } + .workspaces .item.focused { background-color: @primary; color: @background; diff --git a/modules/programs/niri.nix b/modules/programs/niri.nix new file mode 100644 index 0000000..cf39776 --- /dev/null +++ b/modules/programs/niri.nix @@ -0,0 +1,379 @@ +{ + mkDashDefault, + config, + lib, + options, + pkgs, + ... +}: let + defaultWmConf = import ../../lib/wm.nix {inherit lib;}; +in { + options.mods.niri = { + enable = lib.mkOption { + default = true; + example = false; + type = lib.types.bool; + description = '' + Enable Niri + ''; + }; + useDefaultConfig = lib.mkOption { + default = true; + example = false; + type = lib.types.bool; + description = '' + Use preconfigured Niri config. + ''; + }; + customConfig = lib.mkOption { + default = ''''; + example = ''''; + type = lib.types.lines; + description = '' + Custom Niri configuration. + Will be merged with default configuration if enabled. + ''; + }; + }; + + config = lib.mkIf config.mods.niri.enable ( + lib.optionalAttrs (options ? wayland.windowManager.hyprland) { + # TODO deduplicate and abstract away base window management config + # install Niri related packages + home.packages = with pkgs; [ + xorg.xprop + grim + slurp + satty + xdg-desktop-portal-gtk + xdg-desktop-portal-gnome + kdePackages.xdg-desktop-portal-kde + xdg-desktop-portal-shana + copyq + wl-clipboard + + niri + xwayland-satellite + ]; + + xdg.configFile."niri/config.kdl" = let + mkNiriMod = mods: + builtins.map (mod: + if mod == "Mod" + then config.mods.wm.modKey + "+" + else "${mod}" + "+") + mods + |> lib.strings.concatStringsSep ""; + mkNiriArg = args: + if args != [] + then "\"${(lib.strings.concatStringsSep " " args)}\"" + else ""; + mkNiriCommand = bind: let + args = bind.args or []; + in + if bind.command == "quit" + then "quit;" + else if bind.command == "killActive" + then "close-window;" + else if bind.command == "moveFocusTop" + then "focus-window-up;" + else if bind.command == "focusWorkspace" + then "focus-workspace" + " " + mkNiriArg args + ";" + else if bind.command == "moveWindowRight" + then "move-column-right-or-to-monitor-right;" + else if bind.command == "moveWindowDown" + then "move-window-down;" + else if bind.command == "moveWindowLeft" + then "move-column-left-or-to-monitor-left;" + else if bind.command == "moveWindowUp" + then "move-window-up;" + else if bind.command == "moveFocusUp" + then "focus-window-up;" + else if bind.command == "moveFocusRight" + then "focus-column-or-monitor-right;" + else if bind.command == "moveFocusDown" + then "focus-window-down;" + else if bind.command == "moveFocusLeft" + then "focus-column-or-monitor-left;" + else if bind.command == "toggleFloating" + then "toggle-window-floating;" + else if bind.command == "toggleFullscreen" + then "fullscreen-window;" + else if bind.command == "moveToWorkspace" + then "move-window-to-workspace" + " " + mkNiriArg args + ";" + else if bind.command == "spawn" + then "spawn" + " " + mkNiriArg args + ";" + else if bind.command == "spawn-sh" + then "spawn-sh" + " " + mkNiriArg args + ";" + else if bind.command.niri != null + then bind.command.niri + " " + mkNiriArg args + ";" + else ""; + + mkNiriBinds = cfg: + '' binds { + '' + + ( + ( + builtins.map ( + bind: + /* + kdl + */ + if bind ? key && bind ? command + then '' + ${mkNiriMod (bind.modKeys or [])}${bind.key} ${ + if + bind ? meta + && bind.meta ? niri + then + ( + if + bind.meta.niri ? desc + && bind.meta.niri.desc != "" + then "hotkey-overlay-title=\"" + bind.meta.niri.desc + "\"" + else "" + ) + + " " + + ( + if + bind.meta.niri ? repeat + && bind.meta.niri.repeat + then "repeat=true" + else "repeat=false" + ) + + " " + + ( + if + bind.meta.niri ? allowWhileLocked + && bind.meta.niri.allowWhileLocked + then "allow-when-locked=true" + else "" + ) + + " " + + ( + if + bind.meta.niri ? allowInhibit + && bind.meta.niri.allowInhibit + then "allow-inhibiting=true" + else "allow-inhibiting=false" + ) + else "" + } { ${ + mkNiriCommand bind + } } + '' + else '''' + ) + (( + cfg.mods.wm.binds + ++ ( + if cfg.mods.wm.useDefaultBinds + then defaultWmConf.defaultBinds cfg + else [] + ) + ) + |> builtins.filter (bind: !(hasInvalidCustomCommand bind))) + ) + |> lib.strings.concatLines + ) + + '' + } + ''; + mkVrr = vrr: + if vrr + then "true" + else "false"; + mkNiriMonitors = cfg: + (builtins.map ( + monitor: + # TODO vrr + /* + kdl + */ + '' + output "${monitor.name}" { + variable-refresh-rate on-demand=${mkVrr monitor.vrr} + mode "${builtins.toString monitor.resolutionX}x${builtins.toString monitor.resolutionY}@${builtins.toString monitor.refreshrate}" + scale ${builtins.toString monitor.scale} + transform "${ + if (monitor.transform == "0") + then "normal" + else monitor.transform + }" + position x=${builtins.toString monitor.positionX} y=${builtins.toString monitor.positionY} + } + '' + ) + cfg.mods.wm.monitors) + |> lib.strings.concatLines; + mkNiriWorkspaces = cfg: + (builtins.map ( + workspace: + /* + kdl + */ + '' + workspace "${workspace.name}" { + open-on-output "${workspace.monitor}" + } + '' + ) + cfg.mods.wm.workspaces) + |> lib.strings.concatLines; + mkNiriWindowRules = cfg: ( + ( + builtins.map ( + rule: + /* + kdl + */ + '' + window-rule { + ${rule} + } + '' + ) + ( + cfg.mods.wm.windowRules.niri + ++ ( + if cfg.mods.wm.useDefaultWindowRules + then defaultWmConf.defaultWindowRules.niri + else [] + ) + ) + ) + |> lib.strings.concatLines + ); + hasInvalidCustomCommand = bind: !(bind ? command) || (!(builtins.isString bind.command) && bind.command.niri or null == null); + mkNiriEnv = config: let + defaultEnv = + if config.mods.wm.useDefaultEnv + then defaultWmConf.defaultEnv config + else { + all = {}; + niri = {}; + }; + userEnv = + if config.mods.wm.env ? all + then config.mods.wm.env.all // config.mods.wm.env.niri + else config.mods.wm.env; + env = + userEnv + // defaultEnv.all + // defaultEnv.niri; + in + '' + environment { + '' + + ( + lib.attrsets.mapAttrsToList ( + name: value: "${name} \"${value}\"" + ) + env + |> lib.strings.concatLines + ) + + '' + } + ''; + mkNiriAutoStart = config: let + defaultStartup = + if config.mods.wm.useDefaultStartup + then defaultWmConf.defaultStartup config + else { + all = {}; + niri = {}; + }; + userStartup = + if config.mods.wm.startup ? all + then config.mods.wm.startup.all ++ config.mods.wm.startup.niri + else config.mods.wm.startup; + autoStart = userStartup ++ defaultStartup.all ++ defaultStartup.niri; + in + (builtins.map (value: "spawn-at-startup \"${value}\"") + autoStart) + |> lib.strings.concatLines; + defaultConfig = + /* + kdl + */ + '' + input { + keyboard { + xkb { + layout "enIntUmlaut" + } + repeat-delay 200 + repeat-rate 25 + numlock + } + + touchpad { + tap + natural-scroll + } + + mouse { + accel-speed 0.2 + accel-profile "flat" + } + + focus-follows-mouse max-scroll-amount="25%" + } + + layout { + // Set gaps around windows in logical pixels. + gaps 10 + center-focused-column "never" + always-center-single-column + + preset-column-widths { + proportion 0.33333 + proportion 0.5 + proportion 1.0 + } + + default-column-width { proportion 0.5; } + focus-ring { + width 3 + inactive-color "#505050" + active-gradient from="#ff0000" to="#00ff00" angle=45 + } + + border { + off + } + + // You can enable drop shadows for windows. + shadow { + on + softness 30 + spread 5 + offset x=0 y=5 + color "#0007" + } + } + + // Autostart + + hotkey-overlay { + skip-at-startup + } + + prefer-no-csd + '' + + mkNiriMonitors config + + mkNiriBinds config + + mkNiriWorkspaces config + + mkNiriWindowRules config + + mkNiriEnv config + + mkNiriAutoStart config; + in + mkDashDefault { + text = + if config.mods.niri.useDefaultConfig + then defaultConfig + config.mods.niri.customConfig + else config.mods.niri.customConfig; + }; + } + ); +} diff --git a/modules/programs/oxi/default.nix b/modules/programs/oxi/default.nix index 99de567..942d0d1 100644 --- a/modules/programs/oxi/default.nix +++ b/modules/programs/oxi/default.nix @@ -54,8 +54,8 @@ lib.optionalAttrs (options ? home.packages) { programs = { hyprdock = { - enable = config.mods.oxi.hyprdock.enable; - settings = config.mods.oxi.hyprdock.settings; + inherit (config.mods.oxi.hyprdock) enable; + inherit (config.mods.oxi.hyprdock) settings; }; oxicalc.enable = lib.mkIf config.mods.oxi.oxicalc.enable true; ReSet = lib.mkIf config.mods.oxi.ReSet.enable { @@ -75,7 +75,7 @@ }; } // lib.optionalAttrs (options ? services.logind) { - services.logind.lidSwitchExternalPower = "ignore"; + services.logind.settings.Login.HandleLidSwitchExternalPower = "ignore"; } ); } diff --git a/modules/programs/wm.nix b/modules/programs/wm.nix new file mode 100644 index 0000000..2dd6bba --- /dev/null +++ b/modules/programs/wm.nix @@ -0,0 +1,403 @@ +{lib, ...}: let + wmWorkspace = with lib.types; { + options = { + name = lib.mkOption { + default = ""; + example = "1"; + type = str; + description = "Name of the workspace"; + }; + default = lib.mkOption { + default = false; + example = true; + type = bool; + description = "Whether the workspace is the default workspace. (Currently doesn't do anything on niri)"; + }; + monitor = lib.mkOption { + default = ""; + example = "DP-1"; + type = str; + description = "Name of the monitor to bind the workspace to"; + }; + }; + }; + + wmOptions = with lib.types; { + options = { + name = lib.mkOption { + default = "DP-1"; + example = "DP-1"; + type = str; + description = "Name of the monitor"; + }; + resolutionX = lib.mkOption { + default = 1920; + example = 2560; + type = number; + description = "ResolutionX of the monitor"; + }; + resolutionY = lib.mkOption { + default = 1080; + example = 1440; + type = number; + description = "ResolutionY of the monitor"; + }; + refreshrate = lib.mkOption { + default = 60; + example = 144; + type = number; + description = "Refreshrate of the monitor"; + }; + positionX = lib.mkOption { + default = 0; + example = 1920; + type = number; + description = "PositionX of the monitor"; + }; + positionY = lib.mkOption { + default = 0; + example = 1080; + type = number; + description = "PositionY of the monitor"; + }; + scale = lib.mkOption { + default = 1; + example = 2; + type = number; + description = "Scale of the monitor"; + }; + transform = lib.mkOption { + default = "0"; + example = "90"; + type = enum ["0" "90" "180" "270" "360"]; + description = "Transform of the monitor"; + }; + vrr = lib.mkOption { + default = false; + example = true; + type = bool; + description = "VRR status of the monitor"; + }; + }; + }; + + modKeys = lib.types.enum ["Mod" "Super" "Alt" "Shift" "Ctrl"]; + + customCommand = with lib.types; { + options = { + niri = lib.mkOption { + default = null; + example = "kitty"; + type = either null str; + description = "Command to use in niri"; + }; + hyprland = lib.mkOption { + default = null; + example = "kitty"; + type = either null str; + description = "Command to use in hyprland"; + }; + }; + }; + + envOptions = with lib.types; { + options = { + all = lib.mkOption { + default = {}; + example = {}; + type = attrsOf str; + description = "General Env"; + }; + niri = lib.mkOption { + default = {}; + example = {}; + type = attrsOf str; + description = "Niri Env"; + }; + hyprland = lib.mkOption { + default = {}; + example = {}; + type = attrsOf str; + description = "Hyprland Env"; + }; + }; + }; + + startupOptions = with lib.types; { + options = { + all = lib.mkOption { + default = []; + example = []; + type = listOf str; + description = "General Startup commands"; + }; + niri = lib.mkOption { + default = []; + example = []; + type = listOf str; + description = "Niri Startup commands"; + }; + hyprland = lib.mkOption { + default = []; + example = []; + type = listOf str; + description = "Hyprland Startup commands"; + }; + }; + }; + + windowRuleOptions = with lib.types; { + options = { + niri = lib.mkOption { + default = []; + example = []; + type = listOf lines; + description = "Niri window rules"; + }; + hyprland = lib.mkOption { + default = []; + example = []; + type = listOf str; + description = "Hyprland window rules"; + }; + }; + }; + + bindOptions = with lib.types; { + options = { + modKeys = lib.mkOption { + default = []; + example = ["Mod"]; + type = listOf modKeys; + description = "List of modifier keys"; + }; + key = lib.mkOption { + default = ""; + example = "Q"; + type = str; + description = "Key to bind"; + }; + command = lib.mkOption { + default = ""; + example = "killActive"; + type = either (submodule customCommand) (enum [ + "spawn" + "spawn-sh" + "quit" + "killActive" + "moveFocusUp" + "moveFocusRight" + "moveFocusDown" + "moveFocusLeft" + "moveWindowUp" + "moveWindowRight" + "moveWindowDown" + "moveWindowLeft" + "focusWorkspace" + "moveToWorkspace" + "toggleFloating" + "toggleFullscreen" + ]); + description = "Command to execute"; + }; + args = lib.mkOption { + default = []; + example = []; + type = listOf str; + description = "Additional arguments for the command"; + }; + meta = lib.mkOption { + default = {}; + example = {}; + type = submodule { + options = { + niri = lib.mkOption { + default = {}; + type = submodule { + options = { + desc = lib.mkOption { + default = ""; + type = str; + description = "Description for Hotkey overview"; + }; + repeat = lib.mkOption { + type = bool; + default = true; + description = "Whether to repeat the keybind on hold"; + }; + allowInhibit = lib.mkOption { + type = bool; + default = true; + description = "Whether to allow inhibiting"; + }; + allowWhileLocked = lib.mkOption { + type = bool; + default = false; + description = "Whether to allow while locked"; + }; + cooldown = lib.mkOption { + type = number; + default = 0; + description = "Cooldown on bind"; + }; + }; + }; + description = "Niri meta for keybinds"; + }; + hyprland = lib.mkOption { + default = {}; + type = submodule { + options = { + repeat = lib.mkOption { + type = bool; + default = true; + description = "Whether to repeat the keybind on hold"; + }; + }; + }; + description = "Niri meta for keybinds"; + }; + }; + }; + description = "Custom metadata per bind. Note, only supported environments are taken into account."; + }; + }; + }; +in { + options.mods.wm = { + modKey = lib.mkOption { + default = "Super"; + example = "Alt"; + type = modKeys; + description = "Mod key"; + }; + + env = lib.mkOption { + default = {}; + example = { + all = { + EDITOR = "Neovim"; + }; + niri = { + EDITOR = "Emacs"; + }; + }; + type = with lib.types; either (submodule envOptions) (attrsOf str); + description = "Environment configuration"; + }; + + useDefaultEnv = lib.mkOption { + default = true; + example = false; + type = lib.types.bool; + description = "Whether to use default env variables"; + }; + + startup = lib.mkOption { + default = []; + example = { + all = ["oxinoti"]; + niri = ["someniricommand"]; + hyprland = ["somehyprlandcommand"]; + }; + type = with lib.types; either (submodule startupOptions) (listOf str); + description = "Start commands"; + }; + + useDefaultStartup = lib.mkOption { + default = true; + example = false; + type = lib.types.bool; + description = "Whether to use default autostart commands"; + }; + + useDefaultWindowRules = lib.mkOption { + default = true; + example = false; + type = lib.types.bool; + description = "Whether to use default window rules"; + }; + + windowRules = lib.mkOption { + default = []; + example = { + niri = [ + '' + match app-id=r#"^org\.keepassxc\.KeePassXC$"# + match app-id=r#"^org\.gnome\.World\.Secrets$"# + + block-out-from "screen-capture" + '' + '' + match app-id=r#"^steam$"# + open-on-workspace "0" + '' + ]; + }; + type = lib.types.submodule windowRuleOptions; + description = "Window rules"; + }; + + workspaces = lib.mkOption { + default = []; + example = [ + { + name = "chat"; + monitor = "DP-1"; + } + ]; + type = + lib.types.listOf (lib.types.submodule wmWorkspace); + description = "Workspace configuration"; + }; + + monitors = lib.mkOption { + default = []; + example = [ + { + name = "DP-1"; + resolutionX = 1920; + resolutionY = 1080; + refreshrate = 144; + positionX = 0; + positionY = 0; + scale = 1; + transform = "0"; + vrr = false; + } + ]; + type = + lib.types.listOf (lib.types.submodule wmOptions); + description = "Monitor configuration"; + }; + + useDefaultBinds = lib.mkOption { + default = true; + example = false; + type = lib.types.bool; + description = "Whether to use default keybinds"; + }; + + binds = lib.mkOption { + default = []; + example = [ + { + modKeys = ["Mod"]; + key = "Q"; + command = "killActive"; + args = []; + meta = { + niri = { + desc = "Kill the active window"; + repeat = false; + }; + hyprland = {}; + }; + } + ]; + type = + lib.types.listOf (lib.types.submodule bindOptions); + description = "Bind configuration"; + }; + }; +} From 1f367f80fa54c656636a22e863a53d596163e10d Mon Sep 17 00:00:00 2001 From: DashieTM Date: Sun, 5 Oct 2025 13:37:51 +0200 Subject: [PATCH 094/118] chore(documentation): Add niri --- docs/src/README.md | 35 +++++++++++-------------- example/hosts/example/configuration.nix | 32 +++++++++------------- 2 files changed, 28 insertions(+), 39 deletions(-) diff --git a/docs/src/README.md b/docs/src/README.md index 6233312..cae9646 100644 --- a/docs/src/README.md +++ b/docs/src/README.md @@ -74,26 +74,20 @@ Here is a minimal required configuration.nix (the TODOs mention a required chang # default disk config has root home boot and swap partition, overwrite if you want something different sops.enable = false; nextcloud.enable = false; - hypr.hyprland = { - # TODO monitor configuration for hyprland (hyprland is default) - # should be something like DP-1 - defaultMonitor = "YOURMONITOR"; - # width x height @ refreshrate - defaultMonitorMode = "1920x1080@60"; - # scale for your main monitor - defaultMonitorScale = "1"; - # additional configruation can be done as well - # customConfig = { - # monitor = [ - # # default - # "${config.mods.hypr.hyprland.defaultMonitor},${config.mods.hypr.hyprland.defaultMonitorMode},0x0,${config.mods.hypr.hyprland.defaultMonitorScale}" - # # second example monitor - # "DP-2,3440x1440@180,auto,1" - # # all others - # ",highrr,auto,1" - # ]; - # } - }; + wm.monitors = [ + # Example + # { + # name = "DP-1"; + # resolutionX = 3440; + # resolutionY = 1440; + # refreshrate = 180; + # positionX = 2560; + # positionY = 0; + # scale = 1; + # transform = "0"; + # vrr = false; + # } + ]; gpu.nvidia.enable = true; kdeConnect.enable = true; # login manager: @@ -234,6 +228,7 @@ These modules attempt to combine the home-manager and nixos packages/options to For package lists, please check the individual modules, as the lists can be long. - Hyprland: Installs and configures Hyprland with various additional packages +- Niri: Installs and configures Niri with various additional packages - acpid : Enables the acpid daemon - base packages : A list of system packages to be installed by default - bluetooth : Configures/enables bluetooth and installs tools for bluetooth diff --git a/example/hosts/example/configuration.nix b/example/hosts/example/configuration.nix index 5d9e612..dbe8cd0 100644 --- a/example/hosts/example/configuration.nix +++ b/example/hosts/example/configuration.nix @@ -18,26 +18,20 @@ # default disk config has root home boot and swap partition, overwrite if you want something different sops.enable = false; nextcloud.enable = false; - hypr.hyprland = { - # TODO monitor configuration for hyprland (hyprland is default) - # should be something like DP-1 - defaultMonitor = "YOURMONITOR"; - # width x height @ refreshrate - defaultMonitorMode = "1920x1080@60"; - # scale for your main monitor - defaultMonitorScale = "1"; - # additional configruation can be done as well - # customConfig = { - # monitor = [ - # # default - # "${config.mods.hypr.hyprland.defaultMonitor},${config.mods.hypr.hyprland.defaultMonitorMode},0x0,${config.mods.hypr.hyprland.defaultMonitorScale}" - # # second example monitor - # "DP-2,3440x1440@180,auto,1" - # # all others - # ",highrr,auto,1" - # ]; + wm.monitors = [ + # Example + # { + # name = "DP-1"; + # resolutionX = 3440; + # resolutionY = 1440; + # refreshrate = 180; + # positionX = 2560; + # positionY = 0; + # scale = 1; + # transform = "0"; + # vrr = false; # } - }; + ]; gpu.nvidia.enable = true; kdeConnect.enable = true; # login manager: From 6f90f67384d437f7271c8ecde4b4c73b4f91e314 Mon Sep 17 00:00:00 2001 From: DashieTM Date: Sun, 5 Oct 2025 13:39:04 +0200 Subject: [PATCH 095/118] chore(statix): Apply fixes --- modules/programs/hypr/hyprland.nix | 2 +- modules/programs/niri.nix | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/programs/hypr/hyprland.nix b/modules/programs/hypr/hyprland.nix index f6ee377..906476d 100644 --- a/modules/programs/hypr/hyprland.nix +++ b/modules/programs/hypr/hyprland.nix @@ -161,7 +161,7 @@ in { bind: "${mkMods bind},${bind.key},${mkCommand bind}" ); mkCommand = bind: let - args = bind.args or []; + inherit (bind) args; in if bind.command == "quit" then "exit" diff --git a/modules/programs/niri.nix b/modules/programs/niri.nix index cf39776..a45d419 100644 --- a/modules/programs/niri.nix +++ b/modules/programs/niri.nix @@ -69,7 +69,7 @@ in { then "\"${(lib.strings.concatStringsSep " " args)}\"" else ""; mkNiriCommand = bind: let - args = bind.args or []; + inherit (bind) args; in if bind.command == "quit" then "quit;" From 65e21a7d0006959f8a4dfe5f6446f54dd96020fc Mon Sep 17 00:00:00 2001 From: DashieTM Date: Tue, 7 Oct 2025 12:34:48 +0200 Subject: [PATCH 096/118] chore(wm): Conditionally check for args --- modules/programs/hypr/hyprland.nix | 2 +- modules/programs/niri.nix | 2 +- modules/programs/wm.nix | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/programs/hypr/hyprland.nix b/modules/programs/hypr/hyprland.nix index 906476d..f6ee377 100644 --- a/modules/programs/hypr/hyprland.nix +++ b/modules/programs/hypr/hyprland.nix @@ -161,7 +161,7 @@ in { bind: "${mkMods bind},${bind.key},${mkCommand bind}" ); mkCommand = bind: let - inherit (bind) args; + args = bind.args or []; in if bind.command == "quit" then "exit" diff --git a/modules/programs/niri.nix b/modules/programs/niri.nix index a45d419..cf39776 100644 --- a/modules/programs/niri.nix +++ b/modules/programs/niri.nix @@ -69,7 +69,7 @@ in { then "\"${(lib.strings.concatStringsSep " " args)}\"" else ""; mkNiriCommand = bind: let - inherit (bind) args; + args = bind.args or []; in if bind.command == "quit" then "quit;" diff --git a/modules/programs/wm.nix b/modules/programs/wm.nix index 2dd6bba..0f794d3 100644 --- a/modules/programs/wm.nix +++ b/modules/programs/wm.nix @@ -319,7 +319,7 @@ in { }; windowRules = lib.mkOption { - default = []; + default = {}; example = { niri = [ '' From a49055c1cc1e3183665f69fbeb746c62dddca665 Mon Sep 17 00:00:00 2001 From: DashieTM Date: Tue, 7 Oct 2025 12:49:57 +0200 Subject: [PATCH 097/118] chore(ironbar): Update upower module --- modules/programs/ironbar.nix | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/modules/programs/ironbar.nix b/modules/programs/ironbar.nix index 5757347..b34b32a 100644 --- a/modules/programs/ironbar.nix +++ b/modules/programs/ironbar.nix @@ -13,9 +13,14 @@ end = [ (lib.mkIf useBatteryModule { - type = "upower"; + type = "battery"; class = "battery"; icon_size = 0; + format = "{percentage}%"; + thresholds = { + warning = 20; + critical = 5; + }; }) { class = "music"; @@ -430,8 +435,8 @@ in { color: @background; } - /* upower */ - .upower { + /* battery */ + .battery { font-size: 13px; padding: 0px 4px 0px 0px; margin: 2px 0px 2px 0px; @@ -439,21 +444,21 @@ in { color: @primary; } - .upower .icon { + .battery .icon { opacity: 0.0; } - .upower .label { + .battery .label { margin: 2px 0px 0px -8px; color: @primary; } - .upower:hover { + .battery:hover { background-color: @secondary-background; border-radius: 5px; } - .popup-upower { + .popup-battery { background-color: @background; color: @primary; border-radius: 8px; From db861d807a472ec1b8d575ee622d38e8d0919e3b Mon Sep 17 00:00:00 2001 From: DashieTM Date: Tue, 7 Oct 2025 15:41:50 +0200 Subject: [PATCH 098/118] chore(niri): Add anti flicker for nvidia --- modules/programs/niri.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/modules/programs/niri.nix b/modules/programs/niri.nix index cf39776..a973774 100644 --- a/modules/programs/niri.nix +++ b/modules/programs/niri.nix @@ -353,6 +353,16 @@ in { } } + ${ + if config.mods.gpu.nvidia.enable + then '' + debug { + wait-for-frame-completion-before-queueing + } + '' + else '''' + } + // Autostart hotkey-overlay { From 2c218306b9773244ada6193796cb95fbe6d135fd Mon Sep 17 00:00:00 2001 From: DashieTM Date: Fri, 10 Oct 2025 19:29:14 +0200 Subject: [PATCH 099/118] chore(wm): Fix hyprland keybinds --- base/common_hardware.nix | 2 ++ lib/wm.nix | 6 +++--- modules/programs/hypr/hyprland.nix | 22 +++++++++++----------- modules/programs/niri.nix | 7 +++++-- modules/programs/printing.nix | 4 ++++ modules/programs/virtmanager.nix | 2 -- 6 files changed, 25 insertions(+), 18 deletions(-) diff --git a/base/common_hardware.nix b/base/common_hardware.nix index 56a6dc6..8df238a 100644 --- a/base/common_hardware.nix +++ b/base/common_hardware.nix @@ -164,6 +164,8 @@ in { "vboxusers" "video" "audio" + "scanner" + "lp" ]; packages = with pkgs; [ home-manager diff --git a/lib/wm.nix b/lib/wm.nix index 1352623..3b5819d 100644 --- a/lib/wm.nix +++ b/lib/wm.nix @@ -1,4 +1,4 @@ -{lib, ...}: let +let browserName = config: if (builtins.isString config.mods.homePackages.browser) then config.mods.homePackages.browser @@ -247,8 +247,8 @@ in { else {} ) - (mkBindWithDesc ["Mod"] "S" "spawn-sh" [''grim -g \"$(slurp)\" - | wl-copy''] "Take Screenshot") - (mkBindWithDesc ["Mod" "Shift"] "S" "spawn-sh" [''grim -g \"$(slurp)\" - | satty -f -''] "Take Screenshot and edit") + (mkBindWithDesc ["Mod"] "S" "spawn-sh" [''grim -g "$(slurp)" - | wl-copy''] "Take Screenshot") + (mkBindWithDesc ["Mod" "Shift"] "S" "spawn-sh" [''grim -g "$(slurp)" - | satty -f -''] "Take Screenshot and edit") ( if config.mods.scripts.audioControl diff --git a/modules/programs/hypr/hyprland.nix b/modules/programs/hypr/hyprland.nix index f6ee377..f32bc74 100644 --- a/modules/programs/hypr/hyprland.nix +++ b/modules/programs/hypr/hyprland.nix @@ -6,7 +6,7 @@ pkgs, ... }: let - defaultWmConf = import ../../../lib/wm.nix {inherit lib;}; + defaultWmConf = import ../../../lib/wm.nix; in { options.mods.hypr.hyprland = { enable = lib.mkOption { @@ -137,7 +137,7 @@ in { if args != [] then (lib.strings.concatStringsSep " " args) else ""; - shouldRepeat = bind: bind ? meta && bind.meta ? hyprland && bind.meta.hyprland ? repeat && bind.meta.hyprland.repeat; + shouldRepeat = bind: bind ? meta && bind.meta ? hyprland && bind.meta.hyprland ? repeat && bind.meta.hyprland.repeat == true; defaultBinds = cfg: if cfg.mods.wm.useDefaultBinds @@ -148,7 +148,7 @@ in { binds = cfg.mods.wm.binds ++ defaultBinds cfg; in binds - |> builtins.filter (bind: bind ? command && shouldRepeat bind && !hasInvalidCustomCommand bind) + |> builtins.filter (bind: bind ? command && shouldRepeat bind && !(hasInvalidCustomCommand bind)) |> builtins.map ( bind: "${mkMods bind},${bind.key},${mkCommand bind}" ); @@ -156,7 +156,7 @@ in { binds = cfg.mods.wm.binds ++ defaultBinds cfg; in binds - |> builtins.filter (bind: bind ? command && !(shouldRepeat bind) && !hasInvalidCustomCommand bind) + |> builtins.filter (bind: bind ? command && !(shouldRepeat bind) && !(hasInvalidCustomCommand bind)) |> builtins.map ( bind: "${mkMods bind},${bind.key},${mkCommand bind}" ); @@ -338,13 +338,13 @@ in { "noanim, selection" ]; - workspace = mkDashDefault (mkWorkspace config.mods.wm.workspaces); - monitor = mkDashDefault (mkMonitors config.mods.wm.monitors); - env = mkDashDefault (mkEnv config); - bind = mkDashDefault (mkBinds config); - binde = mkDashDefault (mkEBinds config); - windowrule = mkDashDefault (mkWindowRule config); - exec-once = mkDashDefault (mkAutoStart config); + workspace = mkWorkspace config.mods.wm.workspaces; + monitor = mkMonitors config.mods.wm.monitors; + env = mkEnv config; + bind = mkBinds config; + binde = mkEBinds config; + windowrule = mkWindowRule config; + exec-once = mkAutoStart config; plugin = config.mods.hypr.hyprland.pluginConfig; } config.mods.hypr.hyprland.customConfig diff --git a/modules/programs/niri.nix b/modules/programs/niri.nix index a973774..0531829 100644 --- a/modules/programs/niri.nix +++ b/modules/programs/niri.nix @@ -6,7 +6,7 @@ pkgs, ... }: let - defaultWmConf = import ../../lib/wm.nix {inherit lib;}; + defaultWmConf = import ../../lib/wm.nix; in { options.mods.niri = { enable = lib.mkOption { @@ -66,7 +66,10 @@ in { |> lib.strings.concatStringsSep ""; mkNiriArg = args: if args != [] - then "\"${(lib.strings.concatStringsSep " " args)}\"" + then let + concatCommand = lib.strings.concatStringsSep " " args; + validCommand = builtins.replaceStrings [''"''] [''\"''] concatCommand; + in "\"${validCommand}\"" else ""; mkNiriCommand = bind: let args = bind.args or []; diff --git a/modules/programs/printing.nix b/modules/programs/printing.nix index 848ffef..98bbe4f 100644 --- a/modules/programs/printing.nix +++ b/modules/programs/printing.nix @@ -16,6 +16,10 @@ config = lib.mkIf config.mods.printing.enable ( lib.optionalAttrs (options ? services.printing) { # Enable CUPS to print documents. + environment.systemPackages = with pkgs; [ + simple-scan + ]; + hardware.sane.enable = true; services = { printing = { enable = true; diff --git a/modules/programs/virtmanager.nix b/modules/programs/virtmanager.nix index bf81b93..de38848 100644 --- a/modules/programs/virtmanager.nix +++ b/modules/programs/virtmanager.nix @@ -44,8 +44,6 @@ in { qemu = { package = mkDashDefault pkgs.qemu_kvm; swtpm.enable = mkDashDefault true; - ovmf.enable = mkDashDefault true; - ovmf.packages = [pkgs.OVMFFull.fd]; }; }; spiceUSBRedirection.enable = mkDashDefault true; From af31c8f5f043886e112686f688c38bc4a25eaf85 Mon Sep 17 00:00:00 2001 From: DashieTM Date: Fri, 10 Oct 2025 21:08:59 +0200 Subject: [PATCH 100/118] chore(yazi): Add backspace --- lib/wm.nix | 8 ++++---- modules/programs/yazi/yazi.nix | 5 +++++ 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/lib/wm.nix b/lib/wm.nix index 3b5819d..a4bfd31 100644 --- a/lib/wm.nix +++ b/lib/wm.nix @@ -156,7 +156,7 @@ in { (mkSimpleBind ["Mod"] "7" "focusWorkspace" ["7"]) (mkSimpleBind ["Mod"] "8" "focusWorkspace" ["8"]) (mkSimpleBind ["Mod"] "9" "focusWorkspace" ["9"]) - (mkSimpleBind ["Mod"] "0" "focusWorkspace" ["0"]) + (mkSimpleBind ["Mod"] "0" "focusWorkspace" ["10"]) (mkSimpleBind ["Mod" "Shift"] "1" "moveToWorkspace" ["1"]) (mkSimpleBind ["Mod" "Shift"] "2" "moveToWorkspace" ["2"]) (mkSimpleBind ["Mod" "Shift"] "3" "moveToWorkspace" ["3"]) @@ -166,7 +166,7 @@ in { (mkSimpleBind ["Mod" "Shift"] "7" "moveToWorkspace" ["7"]) (mkSimpleBind ["Mod" "Shift"] "8" "moveToWorkspace" ["8"]) (mkSimpleBind ["Mod" "Shift"] "9" "moveToWorkspace" ["9"]) - (mkSimpleBind ["Mod" "Shift"] "0" "moveToWorkspace" ["0"]) + (mkSimpleBind ["Mod" "Shift"] "0" "moveToWorkspace" ["10"]) (mkSimpleBind ["Mod"] "B" "toggleFullscreen" []) (mkSimpleBind ["Mod"] "V" "toggleFloating" []) (mkSimpleBind ["Mod" "Shift"] "M" "quit" []) @@ -366,7 +366,7 @@ in { (mkSimpleCustomBind ["Mod" "Ctrl"] "7" "move-column-to-workspace" null ["7"]) (mkSimpleCustomBind ["Mod" "Ctrl"] "8" "move-column-to-workspace" null ["8"]) (mkSimpleCustomBind ["Mod" "Ctrl"] "9" "move-column-to-workspace" null ["9"]) - (mkSimpleCustomBind ["Mod" "Ctrl"] "0" "move-column-to-workspace" null ["0"]) + (mkSimpleCustomBind ["Mod" "Ctrl"] "0" "move-column-to-workspace" null ["10"]) (mkSimpleCustomBind ["Mod" "Shift"] "J" "focus-monitor-left" null []) (mkSimpleCustomBind ["Mod" "Shift"] "semicolon" "focus-monitor-right" null []) (mkSimpleCustomBind ["Mod" "Ctrl"] "J" "move-column-to-monitor-left" null []) @@ -425,7 +425,7 @@ in { (mkSimpleCustomBind ["Mod" "SHIFT" "ALT"] "7" null "movetoworkspacesilent" ["7"]) (mkSimpleCustomBind ["Mod" "SHIFT" "ALT"] "8" null "movetoworkspacesilent" ["8"]) (mkSimpleCustomBind ["Mod" "SHIFT" "ALT"] "9" null "movetoworkspacesilent" ["9"]) - (mkSimpleCustomBind ["Mod" "SHIFT" "ALT"] "0" null "movetoworkspacesilent" ["0"]) + (mkSimpleCustomBind ["Mod" "SHIFT" "ALT"] "0" null "movetoworkspacesilent" ["10"]) (mkRepeatCustomBind ["Mod"] "U" null "resizeactive" ["-20" "0"]) (mkRepeatCustomBind ["Mod"] "P" null "resizeactive" ["20" "0"]) (mkRepeatCustomBind ["Mod"] "O" null "resizeactive" ["0" "-20"]) diff --git a/modules/programs/yazi/yazi.nix b/modules/programs/yazi/yazi.nix index bed1c03..e76ac11 100644 --- a/modules/programs/yazi/yazi.nix +++ b/modules/programs/yazi/yazi.nix @@ -102,6 +102,11 @@ }; keymap = { mgr.keymap = [ + { + on = ""; + run = "backspace"; + desc = "Delete the character before the cursor"; + } { on = [""]; run = "escape"; From ec3d1a83399d92a260bbd8f6a42ea238ea7dbbe9 Mon Sep 17 00:00:00 2001 From: DashieTM Date: Fri, 10 Oct 2025 21:08:59 +0200 Subject: [PATCH 101/118] chore(yazi): Add backspace --- modules/programs/yazi/yazi.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/programs/yazi/yazi.nix b/modules/programs/yazi/yazi.nix index e76ac11..0a6aec6 100644 --- a/modules/programs/yazi/yazi.nix +++ b/modules/programs/yazi/yazi.nix @@ -768,6 +768,11 @@ ]; input.keymap = [ + { + on = ""; + run = "backspace"; + desc = "Delete the character before the cursor"; + } { on = [""]; run = "close"; From 96cf0a24c1578fd32cb0f9c84bc3c34b569d209d Mon Sep 17 00:00:00 2001 From: DashieTM Date: Sat, 11 Oct 2025 09:24:32 +0200 Subject: [PATCH 102/118] chore(scx): Allow setting the scheduler --- modules/programs/gaming.nix | 36 ++++++++++++++++++++++++++++++++++-- 1 file changed, 34 insertions(+), 2 deletions(-) diff --git a/modules/programs/gaming.nix b/modules/programs/gaming.nix index 3483171..6189cce 100644 --- a/modules/programs/gaming.nix +++ b/modules/programs/gaming.nix @@ -74,18 +74,50 @@ type = lib.types.int; description = "Your gpu device.(Physical id of lshw)"; }; + scheduler = lib.mkOption { + default = "scx_rustland"; + example = "scx_rusty"; + type = with lib.types; + nullOr (enum [ + "scx_bpfland" + "scx_chaos" + "scx_cosmos" + "scx_central" + "scx_flash" + "scx_flatcg" + "scx_lavd" + "scx_layered" + "scx_mitosis" + "scx_nest" + "scx_p2dq" + "scx_pair" + "scx_prev" + "scx_qmap" + "scx_rlfifo" + "scx_rustland" + "scx_rusty" + "scx_sdt" + "scx_simple" + "scx_tickless" + "scx_userland" + "scx_wd40" + ]); + description = "Scheduler to use, null disables this"; + }; }; config = lib.mkIf config.mods.gaming.enable ( lib.optionalAttrs (options ? environment.systemPackages) { environment.systemPackages = config.mods.gaming.tools; boot.kernelPackages = lib.mkForce pkgs.linuxPackages_cachyos; - services.scx.enable = true; + services.scx = lib.mkIf (config.mods.gaming.scheduler != null) { + enable = true; + inherit (config.mods.gaming) scheduler; + }; programs = { steam.enable = mkDashDefault config.mods.gaming.steam; gamemode.enable = true; gamemode = { - enableRenice = mkDashDefault true; settings = { general = { desiredgov = mkDashDefault "performance"; From b39db82a29e1d69ed12a8f9417f0b7c2ea5fdfd2 Mon Sep 17 00:00:00 2001 From: DashieTM Date: Sat, 1 Nov 2025 23:19:25 +0100 Subject: [PATCH 103/118] feature(config): Allow pkgs config --- docs/src/README.md | 31 ++++++++++++++ flake.nix | 38 +++++------------- lib/default.nix | 67 +++++++++++++++++++++++++------ modules/programs/gpu.nix | 2 +- modules/programs/homePackages.nix | 10 ++--- modules/programs/ironbar.nix | 4 +- modules/programs/media.nix | 2 +- modules/programs/stylix.nix | 2 +- 8 files changed, 104 insertions(+), 52 deletions(-) diff --git a/docs/src/README.md b/docs/src/README.md index cae9646..6ac856e 100644 --- a/docs/src/README.md +++ b/docs/src/README.md @@ -165,6 +165,37 @@ nixosConfigurations = inputs.dashNix.dashNixLib.buildSystems { root = ./.; inherit additionalInputs; }; ``` +## Configuring pkgs + +While DashNix offers a default pkgs config, you may want to permit an unsecure packages or add an overlay to them. +You can configure both stable and unstable pkgs the following way: + +```nix +currentSystem = "x86_64-linux"; +permittedPackages = [ + "some package" +]; +config = { + system = currentSystem; + config = { + allowUnfree = true; + permittedInsecurePackages = permittedPackages; + }; +}; +unstableBundle = { + pkgs = inputs.unstable; + inherit config; +}; +inputs.dashNix.dashNixLib.buildSystems { + root = ./.; + inherit unstableBundle; +} +``` + +With this you could also change your input to something different should you wish to do so. +Note that overriding inputs via the flake still works, +this way however ensures you can also configure the inputs. + ## Stable/Unstable Sometimes you want to differentiate between systems that are stable and unstable, e.g. for servers and desktops/laptops. diff --git a/flake.nix b/flake.nix index 665829b..8033b24 100644 --- a/flake.nix +++ b/flake.nix @@ -59,47 +59,27 @@ currentSystem = "x86_64-linux"; permittedPackages = [ "olm-3.2.16" - # well done dotnet... - # this is just for omnisharp - "dotnet-core-combined" - "dotnet-wrapped-combined" - "dotnet-combined" - "dotnet-sdk-6.0.428" - "dotnet-sdk-wrapped-6.0.428" - "dotnet-sdk-6.0.136" - "dotnet-sdk-wrapped-6.0.136" - "dotnet-sdk-7.0.120" - "dotnet-sdk-wrapped-7.0.120" - "dotnet-sdk-7.0.410" - "dotnet-sdk-wrapped-7.0.410" - "jitsi-meet-1.0.8043" - "nextcloud-27.1.11" ]; - stable = import ./lib/importPkgs.nix { - inherit inputs permittedPackages currentSystem; - pkgs = inputs.stable; - }; - unstable = import ./lib/importPkgs.nix { - inherit inputs permittedPackages currentSystem; - pkgs = inputs.unstable; - }; - pkgsDarkreader = import ./lib/importPkgs.nix { - inherit inputs permittedPackages currentSystem; - pkgs = inputs.pkgsDarkreader; - }; + importPkgsFn = import ./lib/importPkgs.nix; + defaultConfigureFn = pkgs: + importPkgsFn { + inherit inputs currentSystem permittedPackages pkgs; + }; + stable = defaultConfigureFn inputs.stable; + unstable = defaultConfigureFn inputs.unstable; + pkgsDarkreader = defaultConfigureFn inputs.pkgsDarkreader; in rec { dashNixLib = import ./lib { inherit self inputs unstable - stable + permittedPackages ; dashNixAdditionalProps = { inherit pkgsDarkreader; }; system = currentSystem; - inherit (inputs.unstable) lib; }; docs = import ./docs { inherit inputs; diff --git a/lib/default.nix b/lib/default.nix index 30d34ec..0254ba2 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -1,13 +1,35 @@ { inputs, - lib, unstable, self, - stable, system, + permittedPackages, dashNixAdditionalProps ? {}, ... -}: { +}: let + defaultConfig = { + config = { + allowUnfree = true; + permittedInsecurePackages = permittedPackages; + }; + overlays = [ + inputs.nur.overlays.default + inputs.chaoticNyx.overlays.cache-friendly + ]; + inherit system; + }; + mkPkgs = { + pkgs, + config, + }: let + overlays = + if (config ? overlays) + then config.overlays + else []; + comnbinedConfig = config // {overlays = overlays ++ defaultConfig.overlays;}; + in + import pkgs comnbinedConfig; +in { /* * # buildSystems @@ -75,9 +97,27 @@ ]; }, additionalInputs ? {}, + unstableBundle ? {}, + stableBundle ? {}, overridePkgs ? false, ... - }: + }: let + unstableInput = unstableBundle.pkgs or inputs.unstable; + stableInput = stableBundle.pkgs or inputs.stable; + unstableConfig = unstableBundle.config or defaultConfig; + stableConfig = stableBundle.config or defaultConfig; + + unstablePkgs = mkPkgs { + pkgs = unstableInput; + config = unstableConfig; + }; + stablePkgs = mkPkgs { + pkgs = stableInput; + config = stableConfig; + }; + inputlib = unstableInput.lib; + inherit (unstablePkgs) lib; + in builtins.listToAttrs ( map (name: { @@ -94,27 +134,28 @@ additionalHomeConfig system root - stable - unstable additionalInputs dashNixAdditionalProps + lib ; + stable = stablePkgs; + unstable = unstablePkgs; pkgs = lib.mkForce ( if overridePkgs - then stable - else unstable + then stablePkgs + else unstablePkgs ); alternativePkgs = if overridePkgs - then unstable - else stable; + then unstablePkgs + else stablePkgs; hostName = name; homeMods = mods.home; additionalHomeMods = additionalMods.home; mkDashDefault = import ./override.nix {inherit lib;}; }; in - inputs.unstable.lib.nixosSystem { + inputlib.nixosSystem { modules = [ {_module.args = args;} @@ -122,8 +163,8 @@ ] ++ mods.nixos ++ additionalMods.nixos - ++ inputs.unstable.lib.optional (builtins.pathExists additionalNixosConfig) additionalNixosConfig - ++ inputs.unstable.lib.optional (builtins.pathExists mod) mod; + ++ lib.optional (builtins.pathExists additionalNixosConfig) additionalNixosConfig + ++ lib.optional (builtins.pathExists mod) mod; }; }) ( diff --git a/modules/programs/gpu.nix b/modules/programs/gpu.nix index 8fd8959..87305f0 100644 --- a/modules/programs/gpu.nix +++ b/modules/programs/gpu.nix @@ -87,7 +87,7 @@ pkgs.intel-media-driver) (lib.mkIf config.mods.gpu.vapi.enable pkgs.libvdpau-va-gl) (lib.mkIf config.mods.gpu.vapi.enable pkgs.libva) - (lib.mkIf config.mods.gpu.vapi.enable pkgs.vaapiVdpau) + (lib.mkIf config.mods.gpu.vapi.enable pkgs.libva-vdpau-driver) (lib.mkIf (config.mods.gpu.intelgpu.enable || config.mods.gpu.amdgpu.enable) pkgs.mesa) ]; rocmPackages = [ diff --git a/modules/programs/homePackages.nix b/modules/programs/homePackages.nix index eabd176..c987c94 100644 --- a/modules/programs/homePackages.nix +++ b/modules/programs/homePackages.nix @@ -102,11 +102,11 @@ (lib.mkIf config.mods.homePackages.orcaSlicer orca-slicer) (lib.mkIf config.mods.homePackages.vesktop vesktop) (lib.mkIf config.mods.homePackages.nextcloudClient nextcloud-client) - (lib.mkIf (!isNull config.mods.homePackages.matrixClient) config.mods.homePackages.matrixClient) - (lib.mkIf (!isNull config.mods.homePackages.mailClient) config.mods.homePackages.mailClient) + (lib.mkIf (config.mods.homePackages.matrixClient != null) config.mods.homePackages.matrixClient) + (lib.mkIf (config.mods.homePackages.mailClient != null) config.mods.homePackages.mailClient) (lib.mkIf ( # NOTE: This should be package, but nix doesn't have that.... - builtins.isAttrs config.mods.homePackages.browser && !isNull config.mods.homePackages.browser + builtins.isAttrs config.mods.homePackages.browser && config.mods.homePackages.browser != null ) config.mods.homePackages.browser) adw-gtk3 @@ -128,10 +128,10 @@ nh nix-index playerctl - poppler_utils + poppler-utils pulseaudio libsForQt5.qt5ct - qt6ct + qt6Packages.qt6ct fcp ripgrep rm-improved diff --git a/modules/programs/ironbar.nix b/modules/programs/ironbar.nix index b34b32a..b955d51 100644 --- a/modules/programs/ironbar.nix +++ b/modules/programs/ironbar.nix @@ -4,6 +4,7 @@ pkgs, inputs, options, + mkDashDefault, ... }: let inherit (config.conf) username; @@ -263,8 +264,7 @@ in { config = lib.mkIf (config.mods.ironbar.enable || config.mods.hypr.hyprland.useIronbar) ( lib.optionalAttrs (options ? programs.ironbar) { programs.ironbar = { - # TODO broken - # package = mkDashDefault pkgs.ironbar; + package = mkDashDefault pkgs.ironbar; enable = true; style = if config.mods.ironbar.useDefaultCss diff --git a/modules/programs/media.nix b/modules/programs/media.nix index f05500d..6afa15e 100644 --- a/modules/programs/media.nix +++ b/modules/programs/media.nix @@ -94,7 +94,7 @@ zathura evince libreoffice-fresh - onlyoffice-bin + onlyoffice-desktopeditors pdftk pdfpc polylux2pdfpc diff --git a/modules/programs/stylix.nix b/modules/programs/stylix.nix index 124cc64..dd11e8c 100644 --- a/modules/programs/stylix.nix +++ b/modules/programs/stylix.nix @@ -91,7 +91,7 @@ in { }; emoji = { - package = pkgs.noto-fonts-emoji; + package = pkgs.noto-fonts-color-emoji; name = "Noto Color Emoji"; }; }; From bafff7242749556df20c67c3c24953cf11696d34 Mon Sep 17 00:00:00 2001 From: DashieTM Date: Sat, 1 Nov 2025 23:34:33 +0100 Subject: [PATCH 104/118] chore(docs): Update ISO instructions --- docs/src/README.md | 2 +- modules/programs/greetd.nix | 2 +- modules/programs/media.nix | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/src/README.md b/docs/src/README.md index 6ac856e..064cdd4 100644 --- a/docs/src/README.md +++ b/docs/src/README.md @@ -220,7 +220,7 @@ E.g. stable/hosts/yourserver and unstable/hosts/yourdesktop # Installation -You can find a custom ISO on my NextCloud server: [Link](https://cloud.dashie.org/s/z7G3zS9SXeEt2ERD). +You can find a custom ISO in the releases: [Link](https://github.com/Xetibo/DashNix/releases). With this, you will receive the example config in /iso/example alongside the gnome desktop environment, as well as a few tools like gnome-disks, Neovim, Vscodium, a browser etc. diff --git a/modules/programs/greetd.nix b/modules/programs/greetd.nix index 2c5f87f..5c68d7b 100644 --- a/modules/programs/greetd.nix +++ b/modules/programs/greetd.nix @@ -47,7 +47,7 @@ } --config /etc/greetd/hyprgreet.conf"; example = "${ lib.getExe pkgs.cage - } -s -- ${lib.getExe pkgs.greetd.regreet}"; + } -s -- ${lib.getExe pkgs.regreet}"; type = lib.types.str; description = "The compositor/greeter command to run"; }; diff --git a/modules/programs/media.nix b/modules/programs/media.nix index 6afa15e..e701fb1 100644 --- a/modules/programs/media.nix +++ b/modules/programs/media.nix @@ -39,7 +39,7 @@ filePickerPortal = lib.mkOption { default = "Term"; example = "Gnome"; - type = with lib.types; oneOf [(enum ["Gnome" "Kde" "Lxqt" "Gtk" "Term" "Default"]) string]; + type = with lib.types; oneOf [(enum ["Gnome" "Kde" "Lxqt" "Gtk" "Term" "Default"]) str]; description = '' The file picker portal to use (set with shana). Default removes the config, allowing you to set it yourself. From fe090a95bce087fa832207b0cdb927ab758431c6 Mon Sep 17 00:00:00 2001 From: DashieTM Date: Sun, 2 Nov 2025 21:51:56 +0100 Subject: [PATCH 105/118] chore(docs): Add instructions for experimental features on install --- docs/src/README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/src/README.md b/docs/src/README.md index 064cdd4..6128784 100644 --- a/docs/src/README.md +++ b/docs/src/README.md @@ -239,17 +239,17 @@ Then configure as you please and choose a command below depending on your disk i Installation via manual configuration: ```sh -sudo nixos-install --flake # --root +sudo nixos-install --flake # --root --option experimental-features "nix-command flakes pipe-operators" #example -#nixos-install --flake ~/config#globi --root /mnt +#nixos-install --flake ~/config#globi --root /mnt --option experimental-features "nix-command flakes pipe-operators" ``` Installation via disko: ```sh -sudo disko-install --flake # --disk +sudo disko-install --flake # --disk --option experimental-features "nix-command flakes pipe-operators" #example -#disko-install -- --flake ~/config#globi --disk main /dev/nvme0n1 +#disko-install -- --flake ~/config#globi --disk main /dev/nvme0n1 --option experimental-features "nix-command flakes pipe-operators" ``` # Modules From 78a3247fb1b773a4cd542d6737ddfe5ad51f48cd Mon Sep 17 00:00:00 2001 From: DashieTM Date: Fri, 7 Nov 2025 17:19:29 +0100 Subject: [PATCH 106/118] chore(git): Update config --- modules/programs/git.nix | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/modules/programs/git.nix b/modules/programs/git.nix index bfcb334..57c1623 100644 --- a/modules/programs/git.nix +++ b/modules/programs/git.nix @@ -50,9 +50,14 @@ config = lib.optionalAttrs (options ? programs.git && options ? home.file) { programs.git = { enable = true; - userName = config.mods.git.username; - userEmail = config.mods.git.email; - extraConfig = config.mods.git.additionalConfig; + settings = + { + user = { + name = config.mods.git.username; + inherit (config.mods.git) email; + }; + } + // config.mods.git.additionalConfig; }; home.file.".ssh/config".text = config.mods.git.sshConfig; }; From 1aeb5de333bbccd6b9476d4732fc3831b1ca7afc Mon Sep 17 00:00:00 2001 From: DashieTM Date: Fri, 7 Nov 2025 17:53:21 +0100 Subject: [PATCH 107/118] chore(lutris): broken --- modules/programs/gaming.nix | 3 ++- modules/programs/gpu.nix | 3 +-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/programs/gaming.nix b/modules/programs/gaming.nix index 6189cce..93c9414 100644 --- a/modules/programs/gaming.nix +++ b/modules/programs/gaming.nix @@ -19,7 +19,8 @@ gamescope gamemode steam - lutris + # TODO broken + # lutris wineWowPackages.stable adwsteamgtk heroic diff --git a/modules/programs/gpu.nix b/modules/programs/gpu.nix index 87305f0..023b462 100644 --- a/modules/programs/gpu.nix +++ b/modules/programs/gpu.nix @@ -91,8 +91,7 @@ (lib.mkIf (config.mods.gpu.intelgpu.enable || config.mods.gpu.amdgpu.enable) pkgs.mesa) ]; rocmPackages = [ - # TODO broken - #pkgs.rocmPackages.clr.icd + pkgs.rocmPackages.clr.icd pkgs.mesa pkgs.mesa.opencl pkgs.vulkan-loader From 0314b75a023d2cc41ec109fe33158e2fa6ac1d9a Mon Sep 17 00:00:00 2001 From: DashieTM Date: Mon, 10 Nov 2025 10:21:27 +0100 Subject: [PATCH 108/118] bugfix(logind): Ensure stable compatibility --- modules/programs/oxi/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/programs/oxi/default.nix b/modules/programs/oxi/default.nix index 942d0d1..83c4f23 100644 --- a/modules/programs/oxi/default.nix +++ b/modules/programs/oxi/default.nix @@ -74,7 +74,7 @@ }; }; } - // lib.optionalAttrs (options ? services.logind) { + // lib.optionalAttrs (options ? services.logind && options ? services.logind.settings) { services.logind.settings.Login.HandleLidSwitchExternalPower = "ignore"; } ); From ac77341f62c3dbc6bd4ee61c7d09ef6e16184c7e Mon Sep 17 00:00:00 2001 From: DashieTM Date: Mon, 10 Nov 2025 11:27:23 +0100 Subject: [PATCH 109/118] bugfix(stylix): Ensure stable compatibility --- modules/programs/browser/zen.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/programs/browser/zen.nix b/modules/programs/browser/zen.nix index d3a9b0a..db32900 100644 --- a/modules/programs/browser/zen.nix +++ b/modules/programs/browser/zen.nix @@ -121,7 +121,7 @@ in { }; }; config = lib.mkIf (config.mods.browser.zen.enable || config.mods.homePackages.browser == "zen") ( - lib.optionalAttrs (options ? home.packages) { + (lib.optionalAttrs (options ? home.packages) { programs.zen-browser = { enable = true; package = @@ -149,7 +149,9 @@ in { }; profiles = builtins.listToAttrs config.mods.browser.zen.profiles; }; + }) + // (lib.optionalAttrs (options ? stylix.targets.zen-browser) { stylix.targets.zen-browser.profileNames = lib.map (profile: profile.name) config.mods.browser.zen.profiles; - } + }) ); } From 3731bd6366dde867812d31ff519ae4d98f18627a Mon Sep 17 00:00:00 2001 From: DashieTM Date: Mon, 10 Nov 2025 11:36:12 +0100 Subject: [PATCH 110/118] bugfix(regreet): Ensure stable compatibility --- modules/programs/homePackages.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/programs/homePackages.nix b/modules/programs/homePackages.nix index c987c94..ce57135 100644 --- a/modules/programs/homePackages.nix +++ b/modules/programs/homePackages.nix @@ -119,7 +119,11 @@ flake-checker gnome-keyring gnutar - regreet + ( + if (options ? regreet) + then regreet + else greetd.regreet + ) killall kitty libnotify From 39e4d182cec1a0c1133e278cb3594481e893434a Mon Sep 17 00:00:00 2001 From: DashieTM Date: Tue, 11 Nov 2025 15:33:10 +0100 Subject: [PATCH 111/118] bugfix(hyprland): Use proper flake url --- flake.nix | 2 +- modules/programs/greetd.nix | 3 ++- modules/programs/hypr/hyprland.nix | 1 - 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/flake.nix b/flake.nix index 8033b24..be501b2 100644 --- a/flake.nix +++ b/flake.nix @@ -21,7 +21,7 @@ sops-nix.url = "github:Mic92/sops-nix"; - hyprland.url = "git+https://github.com/hyprwm/Hyprland?submodules=1"; + hyprland.url = "github:hyprwm/Hyprland"; ironbar = { url = "github:JakeStanger/ironbar"; diff --git a/modules/programs/greetd.nix b/modules/programs/greetd.nix index 5c68d7b..fb30782 100644 --- a/modules/programs/greetd.nix +++ b/modules/programs/greetd.nix @@ -5,6 +5,7 @@ inputs, pkgs, options, + system, ... }: { options.mods = { @@ -43,7 +44,7 @@ }; greeterCommand = lib.mkOption { default = "${ - lib.getExe pkgs.hyprland + lib.getExe inputs.hyprland.packages.${system}.hyprland } --config /etc/greetd/hyprgreet.conf"; example = "${ lib.getExe pkgs.cage diff --git a/modules/programs/hypr/hyprland.nix b/modules/programs/hypr/hyprland.nix index f32bc74..bd93fa1 100644 --- a/modules/programs/hypr/hyprland.nix +++ b/modules/programs/hypr/hyprland.nix @@ -241,7 +241,6 @@ in { defaultWindowRules; in { enable = true; - package = mkDashDefault pkgs.hyprland; plugins = [ (lib.mkIf config.mods.hypr.hyprland.hyprspaceEnable pkgs.hyprlandPlugins.hyprspace) From 2a245f9851f278b2acda018e9bb6936e3a793a4a Mon Sep 17 00:00:00 2001 From: DashieTM Date: Wed, 3 Dec 2025 21:34:39 +0100 Subject: [PATCH 112/118] chore(basePackages): Remove preload --- modules/programs/basePackages.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/modules/programs/basePackages.nix b/modules/programs/basePackages.nix index fa10da8..1d1b2b9 100644 --- a/modules/programs/basePackages.nix +++ b/modules/programs/basePackages.nix @@ -87,7 +87,6 @@ if config.mods.basePackages.enable then { - preload.enable = mkDashDefault true; upower.enable = mkDashDefault true; dbus = { enable = mkDashDefault true; From f360e5459002956c243a070155dbd4e02c09b6cd Mon Sep 17 00:00:00 2001 From: DashieTM Date: Thu, 18 Dec 2025 14:23:18 +0100 Subject: [PATCH 113/118] chore(fcp): Replace with fuc --- modules/programs/fish.nix | 2 +- modules/programs/homePackages.nix | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/programs/fish.nix b/modules/programs/fish.nix index f063f35..1d8c8c8 100644 --- a/modules/programs/fish.nix +++ b/modules/programs/fish.nix @@ -70,7 +70,7 @@ in { abbr --add cat 'bat' abbr --add find 'fd' abbr --add rm 'rip' - abbr --add cp 'fcp' + abbr --add cp 'cpz' abbr --add cd 'z' abbr --add y 'yazi' diff --git a/modules/programs/homePackages.nix b/modules/programs/homePackages.nix index ce57135..a8cbb11 100644 --- a/modules/programs/homePackages.nix +++ b/modules/programs/homePackages.nix @@ -136,7 +136,7 @@ pulseaudio libsForQt5.qt5ct qt6Packages.qt6ct - fcp + fuc ripgrep rm-improved system-config-printer From decd0f5110e5490735b68357ef1e01dce3ef6786 Mon Sep 17 00:00:00 2001 From: DashieTM Date: Thu, 18 Dec 2025 14:34:58 +0100 Subject: [PATCH 114/118] chore(cachy): Use external flake and drop chaotic-nyx --- base/common_hardware.nix | 5 ----- example/flake.nix | 2 -- flake.nix | 4 +--- lib/default.nix | 4 +--- lib/importPkgs.nix | 2 +- lib/wm.nix | 13 +++++-------- modules/programs/gaming.nix | 8 ++++---- modules/programs/greetd.nix | 1 + modules/programs/homePackages.nix | 6 +----- modules/programs/hypr/hyprland.nix | 3 ++- 10 files changed, 16 insertions(+), 32 deletions(-) diff --git a/base/common_hardware.nix b/base/common_hardware.nix index 8df238a..9f7ccf1 100644 --- a/base/common_hardware.nix +++ b/base/common_hardware.nix @@ -101,10 +101,6 @@ in { builders-use-substitutes = mkDashDefault true; - substituters = [ - "https://chaotic-nyx.cachix.org/" - ]; - trusted-substituters = [ "https://hyprland.cachix.org" "https://anyrun.cachix.org" @@ -128,7 +124,6 @@ in { "oxicalc.cachix.org-1:qF3krFc20tgSmtR/kt6Ku/T5QiG824z79qU5eRCSBTQ=" "hyprdock.cachix.org-1:HaROK3fBvFWIMHZau3Vq1TLwUoJE8yRbGLk0lEGzv3Y=" "reset.cachix.org-1:LfpnUUdG7QM/eOkN7NtA+3+4Ar/UBeYB+3WH+GjP9Xo=" - "chaotic-nyx.cachix.org-1:HfnXSw4pj95iI/n17rIDy40agHj12WfF+Gqk6SonIT8=" "dashvim.cachix.org-1:uLRdxp1WOWHnsZZtu3SwUWZRsvC7SXo0Gyk3tIefuL0=" ]; diff --git a/example/flake.nix b/example/flake.nix index 129fc20..01ec944 100644 --- a/example/flake.nix +++ b/example/flake.nix @@ -31,7 +31,6 @@ "https://oxicalc.cachix.org" "https://hyprdock.cachix.org" "https://reset.cachix.org" - "https://chaotic-nyx.cachix.org/" "https://dashvim.cachix.org" ]; @@ -46,7 +45,6 @@ "oxicalc.cachix.org-1:qF3krFc20tgSmtR/kt6Ku/T5QiG824z79qU5eRCSBTQ=" "hyprdock.cachix.org-1:HaROK3fBvFWIMHZau3Vq1TLwUoJE8yRbGLk0lEGzv3Y=" "reset.cachix.org-1:LfpnUUdG7QM/eOkN7NtA+3+4Ar/UBeYB+3WH+GjP9Xo=" - "chaotic-nyx.cachix.org-1:HfnXSw4pj95iI/n17rIDy40agHj12WfF+Gqk6SonIT8=" "dashvim.cachix.org-1:uLRdxp1WOWHnsZZtu3SwUWZRsvC7SXo0Gyk3tIefuL0=" ]; }; diff --git a/flake.nix b/flake.nix index be501b2..fbac7c1 100644 --- a/flake.nix +++ b/flake.nix @@ -18,6 +18,7 @@ url = "github:nix-community/home-manager"; inputs.nixpkgs.follows = "unstable"; }; + cachy.url = "github:xddxdd/nix-cachyos-kernel?rev=bb7b8aa687464f24dcd452354d9621331d6b0737"; sops-nix.url = "github:Mic92/sops-nix"; @@ -49,9 +50,6 @@ superfreq.url = "github:NotAShelf/superfreq"; - # absolute insanity - chaoticNyx.url = "github:chaotic-cx/nyx/nyxpkgs-unstable"; - compose.url = "github:garnix-io/nixos-compose"; }; diff --git a/lib/default.nix b/lib/default.nix index 0254ba2..265e43f 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -13,8 +13,8 @@ permittedInsecurePackages = permittedPackages; }; overlays = [ + inputs.cachy.overlays.default inputs.nur.overlays.default - inputs.chaoticNyx.overlays.cache-friendly ]; inherit system; }; @@ -76,7 +76,6 @@ in { ../base ../home ../modules - inputs.chaoticNyx.nixosModules.default ]; home = [ inputs.anyrun.homeManagerModules.default @@ -92,7 +91,6 @@ in { inputs.reset.homeManagerModules.default inputs.sops-nix.homeManagerModules.sops inputs.dashvim.homeManagerModules.dashvim - inputs.chaoticNyx.homeManagerModules.default ../modules ]; }, diff --git a/lib/importPkgs.nix b/lib/importPkgs.nix index 77e1299..cfcd413 100644 --- a/lib/importPkgs.nix +++ b/lib/importPkgs.nix @@ -12,6 +12,6 @@ import pkgs { }; overlays = [ inputs.nur.overlays.default - inputs.chaoticNyx.overlays.cache-friendly + inputs.cachy.overlays.default ]; } diff --git a/lib/wm.nix b/lib/wm.nix index a4bfd31..416956a 100644 --- a/lib/wm.nix +++ b/lib/wm.nix @@ -50,14 +50,11 @@ in { ]; hyprland = [ # window rules - "float,class:^(.*)(OxiCalc)(.*)$" - "float,class:^(.*)(winecfg.exe)(.*)$" - "float,class:^(.*)(copyq)(.*)$" - "center,class:^(.*)(swappy)(.*)$" - "workspace 10 silent,class:^(.*)(steam)(.*)$" - - # Otherwise neovide will ignore tiling - "suppressevent fullscreen maximize,class:^(.*)(neovide)(.*)$" + "match:class OxiCalc, float on" + "match:class winecfg.exe, float on" + "match:class copyq, float on" + "match:class swappy, center on" + "match:class steam, workspace 10 silent" ]; }; diff --git a/modules/programs/gaming.nix b/modules/programs/gaming.nix index 93c9414..a96d58c 100644 --- a/modules/programs/gaming.nix +++ b/modules/programs/gaming.nix @@ -34,10 +34,10 @@ description = "Install gaming related packages"; }; kernel = lib.mkOption { - default = true; - example = false; + default = false; + example = true; type = lib.types.bool; - description = "Whether to use the CachyOS kernel"; + description = "Whether to use the CachyOS kernel. WARNING: This is a manual compiled kernel!"; }; steam = lib.mkOption { default = true; @@ -109,7 +109,7 @@ config = lib.mkIf config.mods.gaming.enable ( lib.optionalAttrs (options ? environment.systemPackages) { environment.systemPackages = config.mods.gaming.tools; - boot.kernelPackages = lib.mkForce pkgs.linuxPackages_cachyos; + boot.kernelPackages = lib.mkForce pkgs.cachyosKernels.linuxPackages-cachyos-latest; services.scx = lib.mkIf (config.mods.gaming.scheduler != null) { enable = true; inherit (config.mods.gaming) scheduler; diff --git a/modules/programs/greetd.nix b/modules/programs/greetd.nix index fb30782..e717380 100644 --- a/modules/programs/greetd.nix +++ b/modules/programs/greetd.nix @@ -131,6 +131,7 @@ misc { disable_splash_rendering = false disable_hyprland_logo = true + disable_xdg_env_checks = true } env=STATE_DIR,var/cache/regreet diff --git a/modules/programs/homePackages.nix b/modules/programs/homePackages.nix index a8cbb11..6a995f0 100644 --- a/modules/programs/homePackages.nix +++ b/modules/programs/homePackages.nix @@ -119,11 +119,7 @@ flake-checker gnome-keyring gnutar - ( - if (options ? regreet) - then regreet - else greetd.regreet - ) + regreet killall kitty libnotify diff --git a/modules/programs/hypr/hyprland.nix b/modules/programs/hypr/hyprland.nix index bd93fa1..c8ac9ce 100644 --- a/modules/programs/hypr/hyprland.nix +++ b/modules/programs/hypr/hyprland.nix @@ -310,6 +310,7 @@ in { enable_swallow = mkDashDefault true; disable_splash_rendering = mkDashDefault true; disable_hyprland_logo = mkDashDefault true; + disable_xdg_env_checks = mkDashDefault true; swallow_regex = mkDashDefault "^(.*)(kitty)(.*)$"; initial_workspace_tracking = mkDashDefault 1; # just doesn't work @@ -334,7 +335,7 @@ in { layerrule = [ # layer rules # mainly to disable animations within slurp and grim - "noanim, selection" + "match:namespace selection, no_anim on" ]; workspace = mkWorkspace config.mods.wm.workspaces; From 512d6d2dd4832d835c4feb33e4dc36417acde6de Mon Sep 17 00:00:00 2001 From: DashieTM Date: Fri, 19 Dec 2025 12:58:17 +0100 Subject: [PATCH 115/118] chore(inputs): Modularize modules, inputs and update instructions --- docs/src/README.md | 171 +++++++++++++++++++++--------------- flake.nix | 15 ++++ home/default.nix | 8 +- lib/default.nix | 89 ++++++++++--------- modules/programs/gaming.nix | 6 +- 5 files changed, 168 insertions(+), 121 deletions(-) diff --git a/docs/src/README.md b/docs/src/README.md index 6128784..3658e00 100644 --- a/docs/src/README.md +++ b/docs/src/README.md @@ -23,6 +23,40 @@ dashNix = { You can then configure your systems in your flake outputs with a provided library command: +Please note that overriding inputs will invalidate the cache configuration, this means you will have to add this manually: + +```nix + builders-use-substitutes = true; + + extra-substituters = [ + "https://hyprland.cachix.org" + "https://anyrun.cachix.org" + "https://cache.garnix.io" + "https://oxipaste.cachix.org" + "https://oxinoti.cachix.org" + "https://oxishut.cachix.org" + "https://oxidash.cachix.org" + "https://oxicalc.cachix.org" + "https://hyprdock.cachix.org" + "https://reset.cachix.org" + "https://dashvim.cachix.org" + ]; + + extra-trusted-public-keys = [ + "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=" + "anyrun.cachix.org-1:pqBobmOjI7nKlsUMV25u9QHa9btJK65/C8vnO3p346s=" + "cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g=" + "oxipaste.cachix.org-1:n/oA3N3Z+LJP7eIWOwuoLd9QnPyZXqFjLgkahjsdDGc=" + "oxinoti.cachix.org-1:dvSoJl2Pjo5HMaNngdBbSaixK9BSf2N8gzjP2MdGvfc=" + "oxishut.cachix.org-1:axyAGF3XMh1IyMAW4UMbQCdMNovDH0KH6hqLLRJH8jU=" + "oxidash.cachix.org-1:5K2FNHp7AS8VF7LmQkJAUG/dm6UHCz4ngshBVbjFX30=" + "oxicalc.cachix.org-1:qF3krFc20tgSmtR/kt6Ku/T5QiG824z79qU5eRCSBTQ=" + "hyprdock.cachix.org-1:HaROK3fBvFWIMHZau3Vq1TLwUoJE8yRbGLk0lEGzv3Y=" + "reset.cachix.org-1:LfpnUUdG7QM/eOkN7NtA+3+4Ar/UBeYB+3WH+GjP9Xo=" + "dashvim.cachix.org-1:uLRdxp1WOWHnsZZtu3SwUWZRsvC7SXo0Gyk3tIefuL0=" + ]; +``` + ```nix nixosConfigurations = inputs.dashNix.dashNixLib.buildSystems { root = ./.; }; ``` @@ -96,29 +130,29 @@ Here is a minimal required configuration.nix (the TODOs mention a required chang # sddm = { }; # gdm = { }; drives = { - # default assumes ROOT, BOOT, HOME and SWAP labaled drives exist - # for an example without HOME see below - # defaultDrives.enable = false; - # extraDrives = [ - # { - # name = "boot"; - # drive = { - # device = "/dev/disk/by-label/BOOT"; - # fsType = "vfat"; - # options = [ "rw" "fmask=0022" "dmask=0022" "noatime" ]; - # }; - # } - # { - # name = ""; - # drive = { - # device = "/dev/disk/by-label/ROOT"; - # fsType = "ext4"; - # options = [ "noatime" "nodiratime" "discard" ]; - # }; - # } - # ]; - # You can also use disko to format your disks on installation. - # Please refer to the Documentation about the drives module for an example. + # default assumes ROOT, BOOT, HOME and SWAP labaled drives exist + # for an example without HOME see below + # defaultDrives.enable = false; + # extraDrives = [ + # { + # name = "boot"; + # drive = { + # device = "/dev/disk/by-label/BOOT"; + # fsType = "vfat"; + # options = [ "rw" "fmask=0022" "dmask=0022" "noatime" ]; + # }; + # } + # { + # name = ""; + # drive = { + # device = "/dev/disk/by-label/ROOT"; + # fsType = "ext4"; + # options = [ "noatime" "nodiratime" "discard" ]; + # }; + # } + # ]; + # You can also use disko to format your disks on installation. + # Please refer to the Documentation about the drives module for an example. }; }; } @@ -128,48 +162,14 @@ Here is a minimal required configuration.nix (the TODOs mention a required chang After logging in the first time, your password will be set to "firstlogin", please change this to whatever you like. -## Nixos and Home-manager Modules - -You can add additional modules or remove all of them by overriding parameters to the buildSystems command: - -```nix -nixosConfigurations = - let - additionalMods = { - nixos = [ - # your modules - ]; home = [ - # your modules - ]; - } - # passing this parameter will override the existing modules - mods = { - nixos = []; - home = []; - } - in - inputs.dashNix.dashNixLib.buildSystems { root = ./.; inherit mods additionalMods; }; -``` - -## Additional Inputs - -Just like modules, you can add additional inputs to your configuration. - -```nix -nixosConfigurations = - let - additionalInputs = { - something.url = "yoururl" - } - in - inputs.dashNix.dashNixLib.buildSystems { root = ./.; inherit additionalInputs; }; -``` - ## Configuring pkgs -While DashNix offers a default pkgs config, you may want to permit an unsecure packages or add an overlay to them. +While DashNix offers a default pkgs config, you may want to permit an unsecure packages, +add additional modules/inputs, or add an overlay to them. You can configure both stable and unstable pkgs the following way: +Please note that modules and inputs are merged together to ensure functionality. + ```nix currentSystem = "x86_64-linux"; permittedPackages = [ @@ -181,10 +181,21 @@ config = { allowUnfree = true; permittedInsecurePackages = permittedPackages; }; + inputs = { + # Some inputs + } + mods = { + home = [ + # Some home manager module + ]; + nixos = [ + # Some nixos module + ]; +} }; unstableBundle = { pkgs = inputs.unstable; - inherit config; + inherit config mods; }; inputs.dashNix.dashNixLib.buildSystems { root = ./.; @@ -201,24 +212,26 @@ this way however ensures you can also configure the inputs. Sometimes you want to differentiate between systems that are stable and unstable, e.g. for servers and desktops/laptops. This can be done with the overridePkgs flag for the lib function: +(overridePkgs simply inverts the default bundle that is used for the nix standard library as well as NixOS itself) + ```nix - nixosConfigurations = - inputs.dashNix.dashNixLib.buildSystems { - root = ./stable; - inherit additionalInputs; - overridePkgs = true; - } - // inputs.dashNix.dashNixLib.buildSystems { - root = ./unstable; - inherit additionalInputs; - }; +nixosConfigurations = + inputs.dashNix.dashNixLib.buildSystems { + root = ./stable; + inherit stableBundle; + overridePkgs = true; + } + // inputs.dashNix.dashNixLib.buildSystems { + inherit unstableBundle; + root = ./unstable; + }; ``` You can now place your systems in the respective directories. Keep in mind that the hosts directory will still need to exist in each variant. E.g. stable/hosts/yourserver and unstable/hosts/yourdesktop -# Installation +# Installation via ISO You can find a custom ISO in the releases: [Link](https://github.com/Xetibo/DashNix/releases). With this, you will receive the example config in /iso/example alongside the gnome desktop environment, @@ -252,6 +265,17 @@ sudo disko-install --flake # --disk Date: Fri, 19 Dec 2025 14:12:55 +0100 Subject: [PATCH 116/118] chore(lib): Add experimental standalone home-manager option --- lib/default.nix | 229 ++++++++++++++++++++++++++++++++++-------------- 1 file changed, 162 insertions(+), 67 deletions(-) diff --git a/lib/default.nix b/lib/default.nix index 7d2c8f2..d8a7402 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -29,7 +29,160 @@ comnbinedConfig = config // {overlays = overlays ++ defaultConfig.overlays;}; in import pkgs comnbinedConfig; -in { +in rec { + mkNixos = { + root, + inputLib, + lib, + stablePkgs, + unstablePkgs, + stableMods, + unstableMods, + overridePkgs, + ... + }: + builtins.listToAttrs ( + map + (name: { + inherit name; + value = let + mod = root + /hosts/${name}/configuration.nix; + additionalNixosConfig = root + /hosts/${name}/hardware.nix; + additionalHomeConfig = root + /hosts/${name}/home.nix; + args = { + inherit + self + inputs + mod + additionalHomeConfig + system + root + dashNixAdditionalProps + lib + ; + stable = stablePkgs; + unstable = unstablePkgs; + pkgs = lib.mkForce ( + if overridePkgs + then stablePkgs + else unstablePkgs + ); + alternativePkgs = + if overridePkgs + then unstablePkgs + else stablePkgs; + hostName = name; + homeMods = + if overridePkgs + then unstableMods.home + else stableMods.home; + mkDashDefault = import ./override.nix {inherit lib;}; + }; + nixosMods = + if overridePkgs + then unstableMods.nixos + else stableMods.nixos; + in + inputLib.nixosSystem { + modules = + [ + {_module.args = args;} + mod + ] + ++ nixosMods + ++ lib.optional (builtins.pathExists additionalNixosConfig) additionalNixosConfig + ++ lib.optional (builtins.pathExists mod) mod; + }; + }) + ( + lib.lists.remove "" ( + lib.attrsets.mapAttrsToList (name: fType: + if fType == "directory" + then name + else "") ( + builtins.readDir (root + /hosts) + ) + ) + ) + ); + + mkHome = { + root, + lib, + stablePkgs, + unstablePkgs, + stableMods, + unstableMods, + overridePkgs, + ... + }: + builtins.listToAttrs ( + map + (name: { + inherit name; + value = let + mod = root + /homes/${name}/configuration.nix; + additionalHomeConfig = root + /homes/${name}/home.nix; + args = { + inherit + self + inputs + mod + additionalHomeConfig + system + root + dashNixAdditionalProps + lib + ; + stable = stablePkgs; + unstable = unstablePkgs; + pkgs = lib.mkForce ( + if overridePkgs + then stablePkgs + else unstablePkgs + ); + alternativePkgs = + if overridePkgs + then unstablePkgs + else stablePkgs; + userName = name; + mkDashDefault = import ./override.nix {inherit lib;}; + }; + homeMods = + if overridePkgs + then unstableMods.home + else stableMods.home; + in + inputs.home-manager.lib.homeManagerConfiguration + { + inherit (args) pkgs; + modules = + [ + {_module.args = args;} + mod + ] + ++ homeMods + ++ [ + ../home/common.nix + ../home/themes + ../home/sync.nix + ./foxwrappers.nix + ] + ++ lib.optional (builtins.pathExists mod) mod; + }; + }) + ( + lib.lists.remove "" ( + lib.attrsets.mapAttrsToList (name: fType: + if fType == "directory" + then name + else "") ( + builtins.readDir (root + /homes) + ) + ) + ) + ); + /* * # buildSystems @@ -58,7 +211,7 @@ in { # ); # in - buildSystems = { + buildFunc = func: { root, unstableBundle ? {}, stableBundle ? {}, @@ -118,73 +271,15 @@ in { pkgs = stableInput; config = stableConfig; }; - inputlib = unstableInput.lib; + inputLib = unstableInput.lib; inherit (unstablePkgs) lib; in - builtins.listToAttrs ( - map - (name: { - inherit name; - value = let - mod = root + /hosts/${name}/configuration.nix; - additionalNixosConfig = root + /hosts/${name}/hardware.nix; - additionalHomeConfig = root + /hosts/${name}/home.nix; - args = { - inherit - self - inputs - mod - additionalHomeConfig - system - root - dashNixAdditionalProps - lib - ; - stable = stablePkgs; - unstable = unstablePkgs; - pkgs = lib.mkForce ( - if overridePkgs - then stablePkgs - else unstablePkgs - ); - alternativePkgs = - if overridePkgs - then unstablePkgs - else stablePkgs; - hostName = name; - homeMods = - if overridePkgs - then unstableMods.home - else stableMods.home; - mkDashDefault = import ./override.nix {inherit lib;}; - }; - nixosMods = - if overridePkgs - then unstableMods.nixos - else stableMods.nixos; - in - inputlib.nixosSystem { - modules = - [ - {_module.args = args;} - mod - ] - ++ nixosMods - ++ lib.optional (builtins.pathExists additionalNixosConfig) additionalNixosConfig - ++ lib.optional (builtins.pathExists mod) mod; - }; - }) - ( - lib.lists.remove "" ( - lib.attrsets.mapAttrsToList (name: fType: - if fType == "directory" - then name - else "") ( - builtins.readDir (root + /hosts) - ) - ) - ) - ); + func { + inherit lib inputLib stablePkgs unstablePkgs stableMods unstableMods stableInputs unstableInputs root overridePkgs; + }; + + buildSystems = buildFunc mkNixos; + buildHome = buildFunc mkHome; buildIso = inputs.unstable.lib.nixosSystem { specialArgs = { From afaba29554356ed26a1efb361b8e97b447ed093d Mon Sep 17 00:00:00 2001 From: DashieTM Date: Fri, 19 Dec 2025 15:48:17 +0100 Subject: [PATCH 117/118] feature(clam): init --- home/default.nix | 2 + modules/programs/clam.nix | 60 ++++++++++++++++++++++++++++++ modules/programs/default.nix | 5 ++- modules/programs/greetd.nix | 1 + modules/programs/hypr/hyprland.nix | 1 + 5 files changed, 67 insertions(+), 2 deletions(-) create mode 100644 modules/programs/clam.nix diff --git a/home/default.nix b/home/default.nix index 4fd4d99..afc0ab3 100644 --- a/home/default.nix +++ b/home/default.nix @@ -5,6 +5,7 @@ homeMods, inputs, lib, + additionalHomeConfig, mod, pkgs, root, @@ -58,6 +59,7 @@ ../lib/foxwrappers.nix ] ++ homeMods + ++ lib.optional (builtins.pathExists additionalHomeConfig) additionalHomeConfig ++ lib.optional (builtins.pathExists mod) mod; }; }; diff --git a/modules/programs/clam.nix b/modules/programs/clam.nix new file mode 100644 index 0000000..e212529 --- /dev/null +++ b/modules/programs/clam.nix @@ -0,0 +1,60 @@ +{ + lib, + config, + options, + pkgs, + ... +}: { + options.mods.clam = { + enable = lib.mkOption { + default = true; + example = false; + type = lib.types.bool; + description = "Enables the clamav program and its daemon"; + }; + scanner = { + enable = lib.mkOption { + default = false; + example = true; + type = lib.types.bool; + description = "Enables the clamav scanner"; + }; + interval = lib.mkOption { + type = lib.types.str; + default = "*-*-* 04:00:00"; + description = '' + How often clamdscan is invoked. + By default this runs using 10 cores at most, be sure to run it at a time of low traffic. + ''; + }; + scanDirectories = lib.mkOption { + type = with lib.types; listOf str; + default = [ + "/home" + "/var/lib" + "/tmp" + "/etc" + "/var/tmp" + ]; + description = ''List of directories to scan''; + }; + }; + }; + config = lib.mkIf config.mods.clam.enable ( + lib.optionalAttrs (options ? services.clamav) { + services.clamav = { + daemon.enable = true; + updater.enable = true; + scanner = { + inherit (config.mods.clam.scanner) enable; + inherit (config.mods.clam.scanner) interval; + inherit (config.mods.clam.scanner) scanDirectories; + }; + }; + environment.systemPackages = [ + pkgs.clamav + ]; + } + // lib.optionalAttrs (options ? home.packages) {home.packages = with pkgs; [clamtk];} + ); +} diff --git a/modules/programs/default.nix b/modules/programs/default.nix index 1c0baa5..08a4a2d 100644 --- a/modules/programs/default.nix +++ b/modules/programs/default.nix @@ -1,11 +1,11 @@ { imports = [ - ./niri.nix ./acpid.nix ./anyrun.nix ./basePackages.nix ./bluetooth.nix ./browser + ./clam.nix ./coding.nix ./containers.nix ./drives.nix @@ -31,6 +31,7 @@ ./mime.nix ./ncspot.nix ./nextcloud.nix + ./niri.nix ./onedrive.nix ./oxi ./piper.nix @@ -47,9 +48,9 @@ ./sway.nix ./teams.nix ./virtmanager.nix + ./wm.nix ./xkb.nix ./xone.nix - ./wm.nix ./yazi ]; } diff --git a/modules/programs/greetd.nix b/modules/programs/greetd.nix index e717380..fe3e455 100644 --- a/modules/programs/greetd.nix +++ b/modules/programs/greetd.nix @@ -132,6 +132,7 @@ disable_splash_rendering = false disable_hyprland_logo = true disable_xdg_env_checks = true + disable_scale_notification = true } env=STATE_DIR,var/cache/regreet diff --git a/modules/programs/hypr/hyprland.nix b/modules/programs/hypr/hyprland.nix index c8ac9ce..442b964 100644 --- a/modules/programs/hypr/hyprland.nix +++ b/modules/programs/hypr/hyprland.nix @@ -311,6 +311,7 @@ in { disable_splash_rendering = mkDashDefault true; disable_hyprland_logo = mkDashDefault true; disable_xdg_env_checks = mkDashDefault true; + disable_scale_notification = mkDashDefault true; swallow_regex = mkDashDefault "^(.*)(kitty)(.*)$"; initial_workspace_tracking = mkDashDefault 1; # just doesn't work From 15b48490baa2dfa0b222751c442208a7a984a9c3 Mon Sep 17 00:00:00 2001 From: DashieTM Date: Sat, 20 Dec 2025 14:41:57 +0100 Subject: [PATCH 118/118] chore(images): Swap to eog --- .github/workflows/docs.yaml | 60 ++++++++++------------------------ modules/programs/media.nix | 2 +- modules/programs/mime.nix | 2 +- modules/programs/yazi/yazi.nix | 2 +- 4 files changed, 21 insertions(+), 45 deletions(-) diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index 62524cb..06dc541 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -1,58 +1,34 @@ # by https://github.com/danth/stylix/blob/master/.github/workflows/docs.yml name: Docs - on: push: branches: - main - jobs: build: name: Build - permissions: contents: read - - runs-on: ubuntu-latest - + runs-on: nixos-latest steps: - - name: Install Nix - uses: DeterminateSystems/nix-installer-action@main - with: - github-token: ${{ secrets.GITHUB_TOKEN }} - extra-conf: | - extra-experimental-features = nix-command flakes pipe-operators - - - name: Set up cache - uses: DeterminateSystems/magic-nix-cache-action@main - + - name: Nix Config + run: | + mkdir -p $HOME/.config + mkdir -p $HOME/.config/nix + echo experimental-features = nix-command flakes pipe-operators >> $HOME/.config/nix/nix.conf + echo access-tokens = github.com=${{ secrets.GITHUBTOKEN }} >> $HOME/.config/nix/nix.conf + nix profile install nixpkgs#nodejs - name: Build docs - run: nix -L build github:${{ github.repository }}/${{ github.sha }}#docs --no-write-lock-file - + run: nix -L build git+https://git.dashie.org/${{ forgejo.repository }}.git?rev=${{ forgejo.sha }}#docs --no-write-lock-file - name: Prepare docs for upload run: cp -r --dereference --no-preserve=mode,ownership result/ public/ - - - name: Upload artifact - uses: actions/upload-pages-artifact@v3 + # - name: Upload artifact + # uses: https://data.forgejo.org/forgejo/upload-artifact@v4 + # with: + # path: public/ + - name: Publish Page + uses: https://data.forgejo.org/actions/git-pages@v2 with: - path: public/ - - deploy: - name: Deploy - - needs: build - - permissions: - pages: write - id-token: write - - environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} - - runs-on: ubuntu-latest - - steps: - - name: Deploy docs to GitHub Pages - id: deployment - uses: actions/deploy-pages@v4 + site: https://username.pages.dashie.org/reponame/ + token: ${{ forge.token }} + source: public/ diff --git a/modules/programs/media.nix b/modules/programs/media.nix index e701fb1..c37d62b 100644 --- a/modules/programs/media.nix +++ b/modules/programs/media.nix @@ -87,7 +87,7 @@ # audio control playerctl # images - imv + eog # videos mpv # pdf diff --git a/modules/programs/mime.nix b/modules/programs/mime.nix index 03d04d8..4da7aff 100644 --- a/modules/programs/mime.nix +++ b/modules/programs/mime.nix @@ -85,7 +85,7 @@ in { description = "Applications used for handling browser mime types"; }; imageApplications = lib.mkOption { - default = ["imv"]; + default = ["eog"]; example = []; type = with lib.types; listOf str; description = "Applications used for handling image mime types"; diff --git a/modules/programs/yazi/yazi.nix b/modules/programs/yazi/yazi.nix index 0a6aec6..22e3169 100644 --- a/modules/programs/yazi/yazi.nix +++ b/modules/programs/yazi/yazi.nix @@ -31,7 +31,7 @@ ]; image = [ { - run = ''imv "$@"''; + run = ''eog "$@"''; orphan = true; display_name = "Open"; }