Compare commits
26 commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 15b48490ba | |||
| afaba29554 | |||
| 885ceb5c94 | |||
| 512d6d2dd4 | |||
| decd0f5110 | |||
| f360e54590 | |||
| 2a245f9851 | |||
|
|
39e4d182ce | ||
| 3731bd6366 | |||
| ac77341f62 | |||
| 0314b75a02 | |||
| 1aeb5de333 | |||
| 78a3247fb1 | |||
| fe090a95bc | |||
| bafff72427 | |||
| b39db82a29 | |||
| 96cf0a24c1 | |||
| ec3d1a8339 | |||
| af31c8f5f0 | |||
| 2c218306b9 | |||
|
|
db861d807a | ||
|
|
a49055c1cc | ||
|
|
65e21a7d00 | ||
| 6f90f67384 | |||
| 1f367f80fa | |||
| 1857504bac |
31 changed files with 658 additions and 376 deletions
60
.github/workflows/docs.yaml
vendored
60
.github/workflows/docs.yaml
vendored
|
|
@ -1,58 +1,34 @@
|
||||||
# by https://github.com/danth/stylix/blob/master/.github/workflows/docs.yml
|
# by https://github.com/danth/stylix/blob/master/.github/workflows/docs.yml
|
||||||
name: Docs
|
name: Docs
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
name: Build
|
name: Build
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
|
runs-on: nixos-latest
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Install Nix
|
- name: Nix Config
|
||||||
uses: DeterminateSystems/nix-installer-action@main
|
run: |
|
||||||
with:
|
mkdir -p $HOME/.config
|
||||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
mkdir -p $HOME/.config/nix
|
||||||
extra-conf: |
|
echo experimental-features = nix-command flakes pipe-operators >> $HOME/.config/nix/nix.conf
|
||||||
extra-experimental-features = nix-command flakes pipe-operators
|
echo access-tokens = github.com=${{ secrets.GITHUBTOKEN }} >> $HOME/.config/nix/nix.conf
|
||||||
|
nix profile install nixpkgs#nodejs
|
||||||
- name: Set up cache
|
|
||||||
uses: DeterminateSystems/magic-nix-cache-action@main
|
|
||||||
|
|
||||||
- name: Build docs
|
- 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
|
- name: Prepare docs for upload
|
||||||
run: cp -r --dereference --no-preserve=mode,ownership result/ public/
|
run: cp -r --dereference --no-preserve=mode,ownership result/ public/
|
||||||
|
# - name: Upload artifact
|
||||||
- name: Upload artifact
|
# uses: https://data.forgejo.org/forgejo/upload-artifact@v4
|
||||||
uses: actions/upload-pages-artifact@v3
|
# with:
|
||||||
|
# path: public/
|
||||||
|
- name: Publish Page
|
||||||
|
uses: https://data.forgejo.org/actions/git-pages@v2
|
||||||
with:
|
with:
|
||||||
path: public/
|
site: https://username.pages.dashie.org/reponame/
|
||||||
|
token: ${{ forge.token }}
|
||||||
deploy:
|
source: public/
|
||||||
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
|
|
||||||
|
|
|
||||||
|
|
@ -101,10 +101,6 @@ in {
|
||||||
|
|
||||||
builders-use-substitutes = mkDashDefault true;
|
builders-use-substitutes = mkDashDefault true;
|
||||||
|
|
||||||
substituters = [
|
|
||||||
"https://chaotic-nyx.cachix.org/"
|
|
||||||
];
|
|
||||||
|
|
||||||
trusted-substituters = [
|
trusted-substituters = [
|
||||||
"https://hyprland.cachix.org"
|
"https://hyprland.cachix.org"
|
||||||
"https://anyrun.cachix.org"
|
"https://anyrun.cachix.org"
|
||||||
|
|
@ -128,7 +124,6 @@ in {
|
||||||
"oxicalc.cachix.org-1:qF3krFc20tgSmtR/kt6Ku/T5QiG824z79qU5eRCSBTQ="
|
"oxicalc.cachix.org-1:qF3krFc20tgSmtR/kt6Ku/T5QiG824z79qU5eRCSBTQ="
|
||||||
"hyprdock.cachix.org-1:HaROK3fBvFWIMHZau3Vq1TLwUoJE8yRbGLk0lEGzv3Y="
|
"hyprdock.cachix.org-1:HaROK3fBvFWIMHZau3Vq1TLwUoJE8yRbGLk0lEGzv3Y="
|
||||||
"reset.cachix.org-1:LfpnUUdG7QM/eOkN7NtA+3+4Ar/UBeYB+3WH+GjP9Xo="
|
"reset.cachix.org-1:LfpnUUdG7QM/eOkN7NtA+3+4Ar/UBeYB+3WH+GjP9Xo="
|
||||||
"chaotic-nyx.cachix.org-1:HfnXSw4pj95iI/n17rIDy40agHj12WfF+Gqk6SonIT8="
|
|
||||||
"dashvim.cachix.org-1:uLRdxp1WOWHnsZZtu3SwUWZRsvC7SXo0Gyk3tIefuL0="
|
"dashvim.cachix.org-1:uLRdxp1WOWHnsZZtu3SwUWZRsvC7SXo0Gyk3tIefuL0="
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
@ -164,6 +159,8 @@ in {
|
||||||
"vboxusers"
|
"vboxusers"
|
||||||
"video"
|
"video"
|
||||||
"audio"
|
"audio"
|
||||||
|
"scanner"
|
||||||
|
"lp"
|
||||||
];
|
];
|
||||||
packages = with pkgs; [
|
packages = with pkgs; [
|
||||||
home-manager
|
home-manager
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,40 @@ dashNix = {
|
||||||
|
|
||||||
You can then configure your systems in your flake outputs with a provided library command:
|
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
|
```nix
|
||||||
nixosConfigurations = inputs.dashNix.dashNixLib.buildSystems { root = ./.; };
|
nixosConfigurations = inputs.dashNix.dashNixLib.buildSystems { root = ./.; };
|
||||||
```
|
```
|
||||||
|
|
@ -74,26 +108,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
|
# default disk config has root home boot and swap partition, overwrite if you want something different
|
||||||
sops.enable = false;
|
sops.enable = false;
|
||||||
nextcloud.enable = false;
|
nextcloud.enable = false;
|
||||||
hypr.hyprland = {
|
wm.monitors = [
|
||||||
# TODO monitor configuration for hyprland (hyprland is default)
|
# Example
|
||||||
# should be something like DP-1
|
# {
|
||||||
defaultMonitor = "YOURMONITOR";
|
# name = "DP-1";
|
||||||
# width x height @ refreshrate
|
# resolutionX = 3440;
|
||||||
defaultMonitorMode = "1920x1080@60";
|
# resolutionY = 1440;
|
||||||
# scale for your main monitor
|
# refreshrate = 180;
|
||||||
defaultMonitorScale = "1";
|
# positionX = 2560;
|
||||||
# additional configruation can be done as well
|
# positionY = 0;
|
||||||
# customConfig = {
|
# scale = 1;
|
||||||
# monitor = [
|
# transform = "0";
|
||||||
# # default
|
# vrr = false;
|
||||||
# "${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;
|
gpu.nvidia.enable = true;
|
||||||
kdeConnect.enable = true;
|
kdeConnect.enable = true;
|
||||||
# login manager:
|
# login manager:
|
||||||
|
|
@ -134,58 +162,68 @@ 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.
|
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
|
## Configuring pkgs
|
||||||
|
|
||||||
You can add additional modules or remove all of them by overriding parameters to the buildSystems command:
|
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
|
```nix
|
||||||
nixosConfigurations =
|
currentSystem = "x86_64-linux";
|
||||||
let
|
permittedPackages = [
|
||||||
additionalMods = {
|
"some package"
|
||||||
|
];
|
||||||
|
config = {
|
||||||
|
system = currentSystem;
|
||||||
|
config = {
|
||||||
|
allowUnfree = true;
|
||||||
|
permittedInsecurePackages = permittedPackages;
|
||||||
|
};
|
||||||
|
inputs = {
|
||||||
|
# Some inputs
|
||||||
|
}
|
||||||
|
mods = {
|
||||||
|
home = [
|
||||||
|
# Some home manager module
|
||||||
|
];
|
||||||
nixos = [
|
nixos = [
|
||||||
# your modules
|
# Some nixos module
|
||||||
]; home = [
|
|
||||||
# your modules
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
# passing this parameter will override the existing modules
|
};
|
||||||
mods = {
|
unstableBundle = {
|
||||||
nixos = [];
|
pkgs = inputs.unstable;
|
||||||
home = [];
|
inherit config mods;
|
||||||
|
};
|
||||||
|
inputs.dashNix.dashNixLib.buildSystems {
|
||||||
|
root = ./.;
|
||||||
|
inherit unstableBundle;
|
||||||
}
|
}
|
||||||
in
|
|
||||||
inputs.dashNix.dashNixLib.buildSystems { root = ./.; inherit mods additionalMods; };
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## Additional Inputs
|
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,
|
||||||
Just like modules, you can add additional inputs to your configuration.
|
this way however ensures you can also configure the inputs.
|
||||||
|
|
||||||
```nix
|
|
||||||
nixosConfigurations =
|
|
||||||
let
|
|
||||||
additionalInputs = {
|
|
||||||
something.url = "yoururl"
|
|
||||||
}
|
|
||||||
in
|
|
||||||
inputs.dashNix.dashNixLib.buildSystems { root = ./.; inherit additionalInputs; };
|
|
||||||
```
|
|
||||||
|
|
||||||
## Stable/Unstable
|
## Stable/Unstable
|
||||||
|
|
||||||
Sometimes you want to differentiate between systems that are stable and unstable, e.g. for servers and desktops/laptops.
|
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:
|
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
|
```nix
|
||||||
nixosConfigurations =
|
nixosConfigurations =
|
||||||
inputs.dashNix.dashNixLib.buildSystems {
|
inputs.dashNix.dashNixLib.buildSystems {
|
||||||
root = ./stable;
|
root = ./stable;
|
||||||
inherit additionalInputs;
|
inherit stableBundle;
|
||||||
overridePkgs = true;
|
overridePkgs = true;
|
||||||
}
|
}
|
||||||
// inputs.dashNix.dashNixLib.buildSystems {
|
// inputs.dashNix.dashNixLib.buildSystems {
|
||||||
|
inherit unstableBundle;
|
||||||
root = ./unstable;
|
root = ./unstable;
|
||||||
inherit additionalInputs;
|
|
||||||
};
|
};
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
@ -193,9 +231,9 @@ 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
|
E.g. stable/hosts/yourserver and unstable/hosts/yourdesktop
|
||||||
|
|
||||||
# Installation
|
# Installation via ISO
|
||||||
|
|
||||||
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,
|
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.
|
||||||
|
|
||||||
|
|
@ -214,19 +252,30 @@ Then configure as you please and choose a command below depending on your disk i
|
||||||
Installation via manual configuration:
|
Installation via manual configuration:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
sudo nixos-install --flake <flakelocation>#<hostname> --root <mountpoint>
|
sudo nixos-install --flake <flakelocation>#<hostname> --root <mountpoint> --option experimental-features "nix-command flakes pipe-operators"
|
||||||
#example
|
#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:
|
Installation via disko:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
sudo disko-install --flake <flakelocation>#<hostname> --disk <disk-name> <disk-device>
|
sudo disko-install --flake <flakelocation>#<hostname> --disk <disk-name> <disk-device> --option experimental-features "nix-command flakes pipe-operators"
|
||||||
#example
|
#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"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
# Installation via flake
|
||||||
|
|
||||||
|
If you already have nix installed, you can instead just copy the default config onto your system and install DashNix with it.
|
||||||
|
To create the example config for a base to start with, you can just run this flake with the mkFlake command:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
nix run github:Xetibo/DashNix#mkFlake
|
||||||
|
```
|
||||||
|
|
||||||
|
This command will put the default configuration into $HOME/gits/nixos
|
||||||
|
|
||||||
# Modules
|
# Modules
|
||||||
|
|
||||||
This configuration features several modules that can be used as preconfigured "recipies".
|
This configuration features several modules that can be used as preconfigured "recipies".
|
||||||
|
|
@ -234,6 +283,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.
|
For package lists, please check the individual modules, as the lists can be long.
|
||||||
|
|
||||||
- Hyprland: Installs and configures Hyprland with various additional packages
|
- Hyprland: Installs and configures Hyprland with various additional packages
|
||||||
|
- Niri: Installs and configures Niri with various additional packages
|
||||||
- acpid : Enables the acpid daemon
|
- acpid : Enables the acpid daemon
|
||||||
- base packages : A list of system packages to be installed by default
|
- base packages : A list of system packages to be installed by default
|
||||||
- bluetooth : Configures/enables bluetooth and installs tools for bluetooth
|
- bluetooth : Configures/enables bluetooth and installs tools for bluetooth
|
||||||
|
|
@ -276,3 +326,4 @@ For package lists, please check the individual modules, as the lists can be long
|
||||||
- [chermnyx](https://github.com/chermnyx) for providing a base for zen configuration
|
- [chermnyx](https://github.com/chermnyx) for providing a base for zen configuration
|
||||||
- [voronind-com](https://github.com/voronind-com) for providing the darkreader 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))
|
- [Nix-Artwork](https://github.com/NixOS/nixos-artwork/tree/master/logo) for the Nix/NixOS logo (Tim Cuthbertson (@timbertson))
|
||||||
|
- [xddxdd](https://github.com/xddxdd) for the CachyOS-Kernel flake
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,6 @@
|
||||||
"https://oxicalc.cachix.org"
|
"https://oxicalc.cachix.org"
|
||||||
"https://hyprdock.cachix.org"
|
"https://hyprdock.cachix.org"
|
||||||
"https://reset.cachix.org"
|
"https://reset.cachix.org"
|
||||||
"https://chaotic-nyx.cachix.org/"
|
|
||||||
"https://dashvim.cachix.org"
|
"https://dashvim.cachix.org"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
@ -46,7 +45,6 @@
|
||||||
"oxicalc.cachix.org-1:qF3krFc20tgSmtR/kt6Ku/T5QiG824z79qU5eRCSBTQ="
|
"oxicalc.cachix.org-1:qF3krFc20tgSmtR/kt6Ku/T5QiG824z79qU5eRCSBTQ="
|
||||||
"hyprdock.cachix.org-1:HaROK3fBvFWIMHZau3Vq1TLwUoJE8yRbGLk0lEGzv3Y="
|
"hyprdock.cachix.org-1:HaROK3fBvFWIMHZau3Vq1TLwUoJE8yRbGLk0lEGzv3Y="
|
||||||
"reset.cachix.org-1:LfpnUUdG7QM/eOkN7NtA+3+4Ar/UBeYB+3WH+GjP9Xo="
|
"reset.cachix.org-1:LfpnUUdG7QM/eOkN7NtA+3+4Ar/UBeYB+3WH+GjP9Xo="
|
||||||
"chaotic-nyx.cachix.org-1:HfnXSw4pj95iI/n17rIDy40agHj12WfF+Gqk6SonIT8="
|
|
||||||
"dashvim.cachix.org-1:uLRdxp1WOWHnsZZtu3SwUWZRsvC7SXo0Gyk3tIefuL0="
|
"dashvim.cachix.org-1:uLRdxp1WOWHnsZZtu3SwUWZRsvC7SXo0Gyk3tIefuL0="
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -18,26 +18,20 @@
|
||||||
# default disk config has root home boot and swap partition, overwrite if you want something different
|
# default disk config has root home boot and swap partition, overwrite if you want something different
|
||||||
sops.enable = false;
|
sops.enable = false;
|
||||||
nextcloud.enable = false;
|
nextcloud.enable = false;
|
||||||
hypr.hyprland = {
|
wm.monitors = [
|
||||||
# TODO monitor configuration for hyprland (hyprland is default)
|
# Example
|
||||||
# should be something like DP-1
|
# {
|
||||||
defaultMonitor = "YOURMONITOR";
|
# name = "DP-1";
|
||||||
# width x height @ refreshrate
|
# resolutionX = 3440;
|
||||||
defaultMonitorMode = "1920x1080@60";
|
# resolutionY = 1440;
|
||||||
# scale for your main monitor
|
# refreshrate = 180;
|
||||||
defaultMonitorScale = "1";
|
# positionX = 2560;
|
||||||
# additional configruation can be done as well
|
# positionY = 0;
|
||||||
# customConfig = {
|
# scale = 1;
|
||||||
# monitor = [
|
# transform = "0";
|
||||||
# # default
|
# vrr = false;
|
||||||
# "${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;
|
gpu.nvidia.enable = true;
|
||||||
kdeConnect.enable = true;
|
kdeConnect.enable = true;
|
||||||
# login manager:
|
# login manager:
|
||||||
|
|
|
||||||
57
flake.nix
57
flake.nix
|
|
@ -18,10 +18,11 @@
|
||||||
url = "github:nix-community/home-manager";
|
url = "github:nix-community/home-manager";
|
||||||
inputs.nixpkgs.follows = "unstable";
|
inputs.nixpkgs.follows = "unstable";
|
||||||
};
|
};
|
||||||
|
cachy.url = "github:xddxdd/nix-cachyos-kernel?rev=bb7b8aa687464f24dcd452354d9621331d6b0737";
|
||||||
|
|
||||||
sops-nix.url = "github:Mic92/sops-nix";
|
sops-nix.url = "github:Mic92/sops-nix";
|
||||||
|
|
||||||
hyprland.url = "git+https://github.com/hyprwm/Hyprland?submodules=1";
|
hyprland.url = "github:hyprwm/Hyprland";
|
||||||
|
|
||||||
ironbar = {
|
ironbar = {
|
||||||
url = "github:JakeStanger/ironbar";
|
url = "github:JakeStanger/ironbar";
|
||||||
|
|
@ -49,9 +50,6 @@
|
||||||
|
|
||||||
superfreq.url = "github:NotAShelf/superfreq";
|
superfreq.url = "github:NotAShelf/superfreq";
|
||||||
|
|
||||||
# absolute insanity
|
|
||||||
chaoticNyx.url = "github:chaotic-cx/nyx/nyxpkgs-unstable";
|
|
||||||
|
|
||||||
compose.url = "github:garnix-io/nixos-compose";
|
compose.url = "github:garnix-io/nixos-compose";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -59,47 +57,27 @@
|
||||||
currentSystem = "x86_64-linux";
|
currentSystem = "x86_64-linux";
|
||||||
permittedPackages = [
|
permittedPackages = [
|
||||||
"olm-3.2.16"
|
"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 {
|
importPkgsFn = import ./lib/importPkgs.nix;
|
||||||
inherit inputs permittedPackages currentSystem;
|
defaultConfigureFn = pkgs:
|
||||||
pkgs = inputs.stable;
|
importPkgsFn {
|
||||||
};
|
inherit inputs currentSystem permittedPackages pkgs;
|
||||||
unstable = import ./lib/importPkgs.nix {
|
|
||||||
inherit inputs permittedPackages currentSystem;
|
|
||||||
pkgs = inputs.unstable;
|
|
||||||
};
|
|
||||||
pkgsDarkreader = import ./lib/importPkgs.nix {
|
|
||||||
inherit inputs permittedPackages currentSystem;
|
|
||||||
pkgs = inputs.pkgsDarkreader;
|
|
||||||
};
|
};
|
||||||
|
stable = defaultConfigureFn inputs.stable;
|
||||||
|
unstable = defaultConfigureFn inputs.unstable;
|
||||||
|
pkgsDarkreader = defaultConfigureFn inputs.pkgsDarkreader;
|
||||||
in rec {
|
in rec {
|
||||||
dashNixLib = import ./lib {
|
dashNixLib = import ./lib {
|
||||||
inherit
|
inherit
|
||||||
self
|
self
|
||||||
inputs
|
inputs
|
||||||
unstable
|
unstable
|
||||||
stable
|
permittedPackages
|
||||||
;
|
;
|
||||||
dashNixAdditionalProps = {
|
dashNixAdditionalProps = {
|
||||||
inherit pkgsDarkreader;
|
inherit pkgsDarkreader;
|
||||||
};
|
};
|
||||||
system = currentSystem;
|
system = currentSystem;
|
||||||
inherit (inputs.unstable) lib;
|
|
||||||
};
|
};
|
||||||
docs = import ./docs {
|
docs = import ./docs {
|
||||||
inherit inputs;
|
inherit inputs;
|
||||||
|
|
@ -116,5 +94,20 @@
|
||||||
modules = ./modules;
|
modules = ./modules;
|
||||||
iso = dashNixLib.buildIso.config.system.build.isoImage;
|
iso = dashNixLib.buildIso.config.system.build.isoImage;
|
||||||
nixosConfigurations = dashNixLib.buildSystems {root = ./example/.;};
|
nixosConfigurations = dashNixLib.buildSystems {root = ./example/.;};
|
||||||
|
|
||||||
|
mkFlake = stablePkgs.writeShellApplication {
|
||||||
|
name = "Create example config";
|
||||||
|
text =
|
||||||
|
/*
|
||||||
|
bash
|
||||||
|
*/
|
||||||
|
''
|
||||||
|
mkdir -p ~/gits/nixos
|
||||||
|
mkdir -p ~/gits/backup_nixos
|
||||||
|
|
||||||
|
mv ~/gits/nixos/* ~/gits/backup_nixos/
|
||||||
|
cp -r ${./example}/* ~/gits/nixos/
|
||||||
|
'';
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,11 @@
|
||||||
{
|
{
|
||||||
mkDashDefault,
|
mkDashDefault,
|
||||||
additionalHomeConfig,
|
|
||||||
additionalHomeMods,
|
|
||||||
additionalInputs,
|
|
||||||
dashNixAdditionalProps,
|
dashNixAdditionalProps,
|
||||||
config,
|
config,
|
||||||
homeMods,
|
homeMods,
|
||||||
inputs,
|
inputs,
|
||||||
lib,
|
lib,
|
||||||
|
additionalHomeConfig,
|
||||||
mod,
|
mod,
|
||||||
pkgs,
|
pkgs,
|
||||||
root,
|
root,
|
||||||
|
|
@ -42,7 +40,6 @@
|
||||||
inherit
|
inherit
|
||||||
inputs
|
inputs
|
||||||
root
|
root
|
||||||
additionalInputs
|
|
||||||
alternativePkgs
|
alternativePkgs
|
||||||
system
|
system
|
||||||
stable
|
stable
|
||||||
|
|
@ -62,9 +59,8 @@
|
||||||
../lib/foxwrappers.nix
|
../lib/foxwrappers.nix
|
||||||
]
|
]
|
||||||
++ homeMods
|
++ homeMods
|
||||||
++ additionalHomeMods
|
++ lib.optional (builtins.pathExists additionalHomeConfig) additionalHomeConfig
|
||||||
++ lib.optional (builtins.pathExists mod) mod
|
++ lib.optional (builtins.pathExists mod) mod;
|
||||||
++ lib.optional (builtins.pathExists additionalHomeConfig) additionalHomeConfig;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
291
lib/default.nix
291
lib/default.nix
|
|
@ -1,13 +1,188 @@
|
||||||
{
|
{
|
||||||
inputs,
|
inputs,
|
||||||
lib,
|
|
||||||
unstable,
|
unstable,
|
||||||
self,
|
self,
|
||||||
stable,
|
|
||||||
system,
|
system,
|
||||||
|
permittedPackages,
|
||||||
dashNixAdditionalProps ? {},
|
dashNixAdditionalProps ? {},
|
||||||
...
|
...
|
||||||
}: {
|
}: let
|
||||||
|
defaultConfig = {
|
||||||
|
config = {
|
||||||
|
allowUnfree = true;
|
||||||
|
permittedInsecurePackages = permittedPackages;
|
||||||
|
};
|
||||||
|
overlays = [
|
||||||
|
inputs.cachy.overlays.default
|
||||||
|
inputs.nur.overlays.default
|
||||||
|
];
|
||||||
|
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 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
|
# buildSystems
|
||||||
|
|
@ -36,14 +211,14 @@
|
||||||
# );
|
# );
|
||||||
|
|
||||||
# in
|
# in
|
||||||
buildSystems = {
|
buildFunc = func: {
|
||||||
root,
|
root,
|
||||||
additionalMods ? {
|
unstableBundle ? {},
|
||||||
nixos = [];
|
stableBundle ? {},
|
||||||
home = [];
|
overridePkgs ? false,
|
||||||
},
|
...
|
||||||
mods ? {
|
}: let
|
||||||
nixos = [
|
defaultNixosMods = inputs: [
|
||||||
inputs.lanzaboote.nixosModules.lanzaboote
|
inputs.lanzaboote.nixosModules.lanzaboote
|
||||||
inputs.nixos-wsl.nixosModules.default
|
inputs.nixos-wsl.nixosModules.default
|
||||||
inputs.home-manager.nixosModules.home-manager
|
inputs.home-manager.nixosModules.home-manager
|
||||||
|
|
@ -54,9 +229,9 @@
|
||||||
../base
|
../base
|
||||||
../home
|
../home
|
||||||
../modules
|
../modules
|
||||||
inputs.chaoticNyx.nixosModules.default
|
|
||||||
];
|
];
|
||||||
home = [
|
|
||||||
|
defaultHomeMods = inputs: [
|
||||||
inputs.anyrun.homeManagerModules.default
|
inputs.anyrun.homeManagerModules.default
|
||||||
inputs.ironbar.homeManagerModules.default
|
inputs.ironbar.homeManagerModules.default
|
||||||
inputs.oxicalc.homeManagerModules.default
|
inputs.oxicalc.homeManagerModules.default
|
||||||
|
|
@ -70,73 +245,41 @@
|
||||||
inputs.reset.homeManagerModules.default
|
inputs.reset.homeManagerModules.default
|
||||||
inputs.sops-nix.homeManagerModules.sops
|
inputs.sops-nix.homeManagerModules.sops
|
||||||
inputs.dashvim.homeManagerModules.dashvim
|
inputs.dashvim.homeManagerModules.dashvim
|
||||||
inputs.chaoticNyx.homeManagerModules.default
|
|
||||||
../modules
|
../modules
|
||||||
];
|
];
|
||||||
},
|
|
||||||
additionalInputs ? {},
|
unstableInput = unstableBundle.pkgs or inputs.unstable;
|
||||||
overridePkgs ? false,
|
stableInput = stableBundle.pkgs or inputs.stable;
|
||||||
...
|
unstableConfig = unstableBundle.config or defaultConfig;
|
||||||
}:
|
stableConfig = stableBundle.config or defaultConfig;
|
||||||
builtins.listToAttrs (
|
unstableInputs = (unstableBundle.inputs or {}) // inputs;
|
||||||
map
|
stableInputs = (stableBundle.inputs or {}) // inputs;
|
||||||
(name: {
|
unstableMods = {
|
||||||
inherit name;
|
home = (defaultHomeMods unstableInputs) ++ (unstableBundle.mods.home or []);
|
||||||
value = let
|
nixos = (defaultNixosMods unstableInputs) ++ (unstableBundle.mods.nixos or []);
|
||||||
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;};
|
|
||||||
};
|
};
|
||||||
|
stableMods = {
|
||||||
|
home = (defaultHomeMods stableInputs) ++ (stableBundle.mods.home or []);
|
||||||
|
nixos = (defaultNixosMods stableInputs) ++ (stableBundle.mods.nixos or []);
|
||||||
|
};
|
||||||
|
|
||||||
|
unstablePkgs = mkPkgs {
|
||||||
|
pkgs = unstableInput;
|
||||||
|
config = unstableConfig;
|
||||||
|
};
|
||||||
|
stablePkgs = mkPkgs {
|
||||||
|
pkgs = stableInput;
|
||||||
|
config = stableConfig;
|
||||||
|
};
|
||||||
|
inputLib = unstableInput.lib;
|
||||||
|
inherit (unstablePkgs) lib;
|
||||||
in
|
in
|
||||||
inputs.unstable.lib.nixosSystem {
|
func {
|
||||||
modules =
|
inherit lib inputLib stablePkgs unstablePkgs stableMods unstableMods stableInputs unstableInputs root overridePkgs;
|
||||||
[
|
|
||||||
{_module.args = args;}
|
|
||||||
mod
|
|
||||||
]
|
|
||||||
++ mods.nixos
|
|
||||||
++ additionalMods.nixos
|
|
||||||
++ inputs.unstable.lib.optional (builtins.pathExists additionalNixosConfig) additionalNixosConfig
|
|
||||||
++ inputs.unstable.lib.optional (builtins.pathExists mod) mod;
|
|
||||||
};
|
};
|
||||||
})
|
|
||||||
(
|
buildSystems = buildFunc mkNixos;
|
||||||
lib.lists.remove "" (
|
buildHome = buildFunc mkHome;
|
||||||
lib.attrsets.mapAttrsToList (name: fType:
|
|
||||||
if fType == "directory"
|
|
||||||
then name
|
|
||||||
else "") (
|
|
||||||
builtins.readDir (root + /hosts)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
buildIso = inputs.unstable.lib.nixosSystem {
|
buildIso = inputs.unstable.lib.nixosSystem {
|
||||||
specialArgs = {
|
specialArgs = {
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,6 @@ import pkgs {
|
||||||
};
|
};
|
||||||
overlays = [
|
overlays = [
|
||||||
inputs.nur.overlays.default
|
inputs.nur.overlays.default
|
||||||
inputs.chaoticNyx.overlays.cache-friendly
|
inputs.cachy.overlays.default
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
27
lib/wm.nix
27
lib/wm.nix
|
|
@ -1,4 +1,4 @@
|
||||||
{lib, ...}: let
|
let
|
||||||
browserName = config:
|
browserName = config:
|
||||||
if (builtins.isString config.mods.homePackages.browser)
|
if (builtins.isString config.mods.homePackages.browser)
|
||||||
then config.mods.homePackages.browser
|
then config.mods.homePackages.browser
|
||||||
|
|
@ -50,14 +50,11 @@ in {
|
||||||
];
|
];
|
||||||
hyprland = [
|
hyprland = [
|
||||||
# window rules
|
# window rules
|
||||||
"float,class:^(.*)(OxiCalc)(.*)$"
|
"match:class OxiCalc, float on"
|
||||||
"float,class:^(.*)(winecfg.exe)(.*)$"
|
"match:class winecfg.exe, float on"
|
||||||
"float,class:^(.*)(copyq)(.*)$"
|
"match:class copyq, float on"
|
||||||
"center,class:^(.*)(swappy)(.*)$"
|
"match:class swappy, center on"
|
||||||
"workspace 10 silent,class:^(.*)(steam)(.*)$"
|
"match:class steam, workspace 10 silent"
|
||||||
|
|
||||||
# Otherwise neovide will ignore tiling
|
|
||||||
"suppressevent fullscreen maximize,class:^(.*)(neovide)(.*)$"
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -156,7 +153,7 @@ in {
|
||||||
(mkSimpleBind ["Mod"] "7" "focusWorkspace" ["7"])
|
(mkSimpleBind ["Mod"] "7" "focusWorkspace" ["7"])
|
||||||
(mkSimpleBind ["Mod"] "8" "focusWorkspace" ["8"])
|
(mkSimpleBind ["Mod"] "8" "focusWorkspace" ["8"])
|
||||||
(mkSimpleBind ["Mod"] "9" "focusWorkspace" ["9"])
|
(mkSimpleBind ["Mod"] "9" "focusWorkspace" ["9"])
|
||||||
(mkSimpleBind ["Mod"] "0" "focusWorkspace" ["0"])
|
(mkSimpleBind ["Mod"] "0" "focusWorkspace" ["10"])
|
||||||
(mkSimpleBind ["Mod" "Shift"] "1" "moveToWorkspace" ["1"])
|
(mkSimpleBind ["Mod" "Shift"] "1" "moveToWorkspace" ["1"])
|
||||||
(mkSimpleBind ["Mod" "Shift"] "2" "moveToWorkspace" ["2"])
|
(mkSimpleBind ["Mod" "Shift"] "2" "moveToWorkspace" ["2"])
|
||||||
(mkSimpleBind ["Mod" "Shift"] "3" "moveToWorkspace" ["3"])
|
(mkSimpleBind ["Mod" "Shift"] "3" "moveToWorkspace" ["3"])
|
||||||
|
|
@ -166,7 +163,7 @@ in {
|
||||||
(mkSimpleBind ["Mod" "Shift"] "7" "moveToWorkspace" ["7"])
|
(mkSimpleBind ["Mod" "Shift"] "7" "moveToWorkspace" ["7"])
|
||||||
(mkSimpleBind ["Mod" "Shift"] "8" "moveToWorkspace" ["8"])
|
(mkSimpleBind ["Mod" "Shift"] "8" "moveToWorkspace" ["8"])
|
||||||
(mkSimpleBind ["Mod" "Shift"] "9" "moveToWorkspace" ["9"])
|
(mkSimpleBind ["Mod" "Shift"] "9" "moveToWorkspace" ["9"])
|
||||||
(mkSimpleBind ["Mod" "Shift"] "0" "moveToWorkspace" ["0"])
|
(mkSimpleBind ["Mod" "Shift"] "0" "moveToWorkspace" ["10"])
|
||||||
(mkSimpleBind ["Mod"] "B" "toggleFullscreen" [])
|
(mkSimpleBind ["Mod"] "B" "toggleFullscreen" [])
|
||||||
(mkSimpleBind ["Mod"] "V" "toggleFloating" [])
|
(mkSimpleBind ["Mod"] "V" "toggleFloating" [])
|
||||||
(mkSimpleBind ["Mod" "Shift"] "M" "quit" [])
|
(mkSimpleBind ["Mod" "Shift"] "M" "quit" [])
|
||||||
|
|
@ -247,8 +244,8 @@ in {
|
||||||
else {}
|
else {}
|
||||||
)
|
)
|
||||||
|
|
||||||
(mkBindWithDesc ["Mod"] "S" "spawn-sh" [''grim -g \"$(slurp)\" - | wl-copy''] "Take Screenshot")
|
(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" "Shift"] "S" "spawn-sh" [''grim -g "$(slurp)" - | satty -f -''] "Take Screenshot and edit")
|
||||||
|
|
||||||
(
|
(
|
||||||
if config.mods.scripts.audioControl
|
if config.mods.scripts.audioControl
|
||||||
|
|
@ -366,7 +363,7 @@ in {
|
||||||
(mkSimpleCustomBind ["Mod" "Ctrl"] "7" "move-column-to-workspace" null ["7"])
|
(mkSimpleCustomBind ["Mod" "Ctrl"] "7" "move-column-to-workspace" null ["7"])
|
||||||
(mkSimpleCustomBind ["Mod" "Ctrl"] "8" "move-column-to-workspace" null ["8"])
|
(mkSimpleCustomBind ["Mod" "Ctrl"] "8" "move-column-to-workspace" null ["8"])
|
||||||
(mkSimpleCustomBind ["Mod" "Ctrl"] "9" "move-column-to-workspace" null ["9"])
|
(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"] "J" "focus-monitor-left" null [])
|
||||||
(mkSimpleCustomBind ["Mod" "Shift"] "semicolon" "focus-monitor-right" null [])
|
(mkSimpleCustomBind ["Mod" "Shift"] "semicolon" "focus-monitor-right" null [])
|
||||||
(mkSimpleCustomBind ["Mod" "Ctrl"] "J" "move-column-to-monitor-left" null [])
|
(mkSimpleCustomBind ["Mod" "Ctrl"] "J" "move-column-to-monitor-left" null [])
|
||||||
|
|
@ -425,7 +422,7 @@ in {
|
||||||
(mkSimpleCustomBind ["Mod" "SHIFT" "ALT"] "7" null "movetoworkspacesilent" ["7"])
|
(mkSimpleCustomBind ["Mod" "SHIFT" "ALT"] "7" null "movetoworkspacesilent" ["7"])
|
||||||
(mkSimpleCustomBind ["Mod" "SHIFT" "ALT"] "8" null "movetoworkspacesilent" ["8"])
|
(mkSimpleCustomBind ["Mod" "SHIFT" "ALT"] "8" null "movetoworkspacesilent" ["8"])
|
||||||
(mkSimpleCustomBind ["Mod" "SHIFT" "ALT"] "9" null "movetoworkspacesilent" ["9"])
|
(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"] "U" null "resizeactive" ["-20" "0"])
|
||||||
(mkRepeatCustomBind ["Mod"] "P" null "resizeactive" ["20" "0"])
|
(mkRepeatCustomBind ["Mod"] "P" null "resizeactive" ["20" "0"])
|
||||||
(mkRepeatCustomBind ["Mod"] "O" null "resizeactive" ["0" "-20"])
|
(mkRepeatCustomBind ["Mod"] "O" null "resizeactive" ["0" "-20"])
|
||||||
|
|
|
||||||
|
|
@ -87,7 +87,6 @@
|
||||||
if config.mods.basePackages.enable
|
if config.mods.basePackages.enable
|
||||||
then
|
then
|
||||||
{
|
{
|
||||||
preload.enable = mkDashDefault true;
|
|
||||||
upower.enable = mkDashDefault true;
|
upower.enable = mkDashDefault true;
|
||||||
dbus = {
|
dbus = {
|
||||||
enable = mkDashDefault true;
|
enable = mkDashDefault true;
|
||||||
|
|
|
||||||
|
|
@ -121,7 +121,7 @@ in {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
config = lib.mkIf (config.mods.browser.zen.enable || config.mods.homePackages.browser == "zen") (
|
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 = {
|
programs.zen-browser = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package =
|
package =
|
||||||
|
|
@ -149,7 +149,9 @@ in {
|
||||||
};
|
};
|
||||||
profiles = builtins.listToAttrs config.mods.browser.zen.profiles;
|
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;
|
stylix.targets.zen-browser.profileNames = lib.map (profile: profile.name) config.mods.browser.zen.profiles;
|
||||||
}
|
})
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
60
modules/programs/clam.nix
Normal file
60
modules/programs/clam.nix
Normal file
|
|
@ -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];}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
@ -1,11 +1,11 @@
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./niri.nix
|
|
||||||
./acpid.nix
|
./acpid.nix
|
||||||
./anyrun.nix
|
./anyrun.nix
|
||||||
./basePackages.nix
|
./basePackages.nix
|
||||||
./bluetooth.nix
|
./bluetooth.nix
|
||||||
./browser
|
./browser
|
||||||
|
./clam.nix
|
||||||
./coding.nix
|
./coding.nix
|
||||||
./containers.nix
|
./containers.nix
|
||||||
./drives.nix
|
./drives.nix
|
||||||
|
|
@ -31,6 +31,7 @@
|
||||||
./mime.nix
|
./mime.nix
|
||||||
./ncspot.nix
|
./ncspot.nix
|
||||||
./nextcloud.nix
|
./nextcloud.nix
|
||||||
|
./niri.nix
|
||||||
./onedrive.nix
|
./onedrive.nix
|
||||||
./oxi
|
./oxi
|
||||||
./piper.nix
|
./piper.nix
|
||||||
|
|
@ -47,9 +48,9 @@
|
||||||
./sway.nix
|
./sway.nix
|
||||||
./teams.nix
|
./teams.nix
|
||||||
./virtmanager.nix
|
./virtmanager.nix
|
||||||
|
./wm.nix
|
||||||
./xkb.nix
|
./xkb.nix
|
||||||
./xone.nix
|
./xone.nix
|
||||||
./wm.nix
|
|
||||||
./yazi
|
./yazi
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -70,7 +70,7 @@ in {
|
||||||
abbr --add cat 'bat'
|
abbr --add cat 'bat'
|
||||||
abbr --add find 'fd'
|
abbr --add find 'fd'
|
||||||
abbr --add rm 'rip'
|
abbr --add rm 'rip'
|
||||||
abbr --add cp 'fcp'
|
abbr --add cp 'cpz'
|
||||||
abbr --add cd 'z'
|
abbr --add cd 'z'
|
||||||
abbr --add y 'yazi'
|
abbr --add y 'yazi'
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,8 @@
|
||||||
gamescope
|
gamescope
|
||||||
gamemode
|
gamemode
|
||||||
steam
|
steam
|
||||||
lutris
|
# TODO broken
|
||||||
|
# lutris
|
||||||
wineWowPackages.stable
|
wineWowPackages.stable
|
||||||
adwsteamgtk
|
adwsteamgtk
|
||||||
heroic
|
heroic
|
||||||
|
|
@ -33,10 +34,14 @@
|
||||||
description = "Install gaming related packages";
|
description = "Install gaming related packages";
|
||||||
};
|
};
|
||||||
kernel = lib.mkOption {
|
kernel = lib.mkOption {
|
||||||
default = true;
|
default = false;
|
||||||
example = false;
|
example = true;
|
||||||
type = lib.types.bool;
|
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!
|
||||||
|
(Please also ensure you use your own input hash for the source as the compilation can often fail due to temporary broken changes.)
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
steam = lib.mkOption {
|
steam = lib.mkOption {
|
||||||
default = true;
|
default = true;
|
||||||
|
|
@ -74,18 +79,50 @@
|
||||||
type = lib.types.int;
|
type = lib.types.int;
|
||||||
description = "Your gpu device.(Physical id of lshw)";
|
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 (
|
config = lib.mkIf config.mods.gaming.enable (
|
||||||
lib.optionalAttrs (options ? environment.systemPackages) {
|
lib.optionalAttrs (options ? environment.systemPackages) {
|
||||||
environment.systemPackages = config.mods.gaming.tools;
|
environment.systemPackages = config.mods.gaming.tools;
|
||||||
boot.kernelPackages = lib.mkForce pkgs.linuxPackages_cachyos;
|
boot.kernelPackages = lib.mkForce pkgs.cachyosKernels.linuxPackages-cachyos-latest;
|
||||||
services.scx.enable = true;
|
services.scx = lib.mkIf (config.mods.gaming.scheduler != null) {
|
||||||
|
enable = true;
|
||||||
|
inherit (config.mods.gaming) scheduler;
|
||||||
|
};
|
||||||
|
|
||||||
programs = {
|
programs = {
|
||||||
steam.enable = mkDashDefault config.mods.gaming.steam;
|
steam.enable = mkDashDefault config.mods.gaming.steam;
|
||||||
gamemode.enable = true;
|
gamemode.enable = true;
|
||||||
gamemode = {
|
gamemode = {
|
||||||
enableRenice = mkDashDefault true;
|
|
||||||
settings = {
|
settings = {
|
||||||
general = {
|
general = {
|
||||||
desiredgov = mkDashDefault "performance";
|
desiredgov = mkDashDefault "performance";
|
||||||
|
|
|
||||||
|
|
@ -50,9 +50,14 @@
|
||||||
config = lib.optionalAttrs (options ? programs.git && options ? home.file) {
|
config = lib.optionalAttrs (options ? programs.git && options ? home.file) {
|
||||||
programs.git = {
|
programs.git = {
|
||||||
enable = true;
|
enable = true;
|
||||||
userName = config.mods.git.username;
|
settings =
|
||||||
userEmail = config.mods.git.email;
|
{
|
||||||
extraConfig = config.mods.git.additionalConfig;
|
user = {
|
||||||
|
name = config.mods.git.username;
|
||||||
|
inherit (config.mods.git) email;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
// config.mods.git.additionalConfig;
|
||||||
};
|
};
|
||||||
home.file.".ssh/config".text = config.mods.git.sshConfig;
|
home.file.".ssh/config".text = config.mods.git.sshConfig;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -87,12 +87,11 @@
|
||||||
pkgs.intel-media-driver)
|
pkgs.intel-media-driver)
|
||||||
(lib.mkIf config.mods.gpu.vapi.enable pkgs.libvdpau-va-gl)
|
(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.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)
|
(lib.mkIf (config.mods.gpu.intelgpu.enable || config.mods.gpu.amdgpu.enable) pkgs.mesa)
|
||||||
];
|
];
|
||||||
rocmPackages = [
|
rocmPackages = [
|
||||||
# TODO broken
|
pkgs.rocmPackages.clr.icd
|
||||||
#pkgs.rocmPackages.clr.icd
|
|
||||||
pkgs.mesa
|
pkgs.mesa
|
||||||
pkgs.mesa.opencl
|
pkgs.mesa.opencl
|
||||||
pkgs.vulkan-loader
|
pkgs.vulkan-loader
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@
|
||||||
inputs,
|
inputs,
|
||||||
pkgs,
|
pkgs,
|
||||||
options,
|
options,
|
||||||
|
system,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
options.mods = {
|
options.mods = {
|
||||||
|
|
@ -43,11 +44,11 @@
|
||||||
};
|
};
|
||||||
greeterCommand = lib.mkOption {
|
greeterCommand = lib.mkOption {
|
||||||
default = "${
|
default = "${
|
||||||
lib.getExe pkgs.hyprland
|
lib.getExe inputs.hyprland.packages.${system}.hyprland
|
||||||
} --config /etc/greetd/hyprgreet.conf";
|
} --config /etc/greetd/hyprgreet.conf";
|
||||||
example = "${
|
example = "${
|
||||||
lib.getExe pkgs.cage
|
lib.getExe pkgs.cage
|
||||||
} -s -- ${lib.getExe pkgs.greetd.regreet}";
|
} -s -- ${lib.getExe pkgs.regreet}";
|
||||||
type = lib.types.str;
|
type = lib.types.str;
|
||||||
description = "The compositor/greeter command to run";
|
description = "The compositor/greeter command to run";
|
||||||
};
|
};
|
||||||
|
|
@ -130,6 +131,8 @@
|
||||||
misc {
|
misc {
|
||||||
disable_splash_rendering = false
|
disable_splash_rendering = false
|
||||||
disable_hyprland_logo = true
|
disable_hyprland_logo = true
|
||||||
|
disable_xdg_env_checks = true
|
||||||
|
disable_scale_notification = true
|
||||||
}
|
}
|
||||||
|
|
||||||
env=STATE_DIR,var/cache/regreet
|
env=STATE_DIR,var/cache/regreet
|
||||||
|
|
|
||||||
|
|
@ -102,11 +102,11 @@
|
||||||
(lib.mkIf config.mods.homePackages.orcaSlicer orca-slicer)
|
(lib.mkIf config.mods.homePackages.orcaSlicer orca-slicer)
|
||||||
(lib.mkIf config.mods.homePackages.vesktop vesktop)
|
(lib.mkIf config.mods.homePackages.vesktop vesktop)
|
||||||
(lib.mkIf config.mods.homePackages.nextcloudClient nextcloud-client)
|
(lib.mkIf config.mods.homePackages.nextcloudClient nextcloud-client)
|
||||||
(lib.mkIf (!isNull config.mods.homePackages.matrixClient) config.mods.homePackages.matrixClient)
|
(lib.mkIf (config.mods.homePackages.matrixClient != null) config.mods.homePackages.matrixClient)
|
||||||
(lib.mkIf (!isNull config.mods.homePackages.mailClient) config.mods.homePackages.mailClient)
|
(lib.mkIf (config.mods.homePackages.mailClient != null) config.mods.homePackages.mailClient)
|
||||||
(lib.mkIf (
|
(lib.mkIf (
|
||||||
# NOTE: This should be package, but nix doesn't have that....
|
# 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)
|
config.mods.homePackages.browser)
|
||||||
adw-gtk3
|
adw-gtk3
|
||||||
|
|
@ -128,11 +128,11 @@
|
||||||
nh
|
nh
|
||||||
nix-index
|
nix-index
|
||||||
playerctl
|
playerctl
|
||||||
poppler_utils
|
poppler-utils
|
||||||
pulseaudio
|
pulseaudio
|
||||||
libsForQt5.qt5ct
|
libsForQt5.qt5ct
|
||||||
qt6ct
|
qt6Packages.qt6ct
|
||||||
fcp
|
fuc
|
||||||
ripgrep
|
ripgrep
|
||||||
rm-improved
|
rm-improved
|
||||||
system-config-printer
|
system-config-printer
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
defaultWmConf = import ../../../lib/wm.nix {inherit lib;};
|
defaultWmConf = import ../../../lib/wm.nix;
|
||||||
in {
|
in {
|
||||||
options.mods.hypr.hyprland = {
|
options.mods.hypr.hyprland = {
|
||||||
enable = lib.mkOption {
|
enable = lib.mkOption {
|
||||||
|
|
@ -137,7 +137,7 @@ in {
|
||||||
if args != []
|
if args != []
|
||||||
then (lib.strings.concatStringsSep " " args)
|
then (lib.strings.concatStringsSep " " args)
|
||||||
else "";
|
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:
|
defaultBinds = cfg:
|
||||||
if cfg.mods.wm.useDefaultBinds
|
if cfg.mods.wm.useDefaultBinds
|
||||||
|
|
@ -148,7 +148,7 @@ in {
|
||||||
binds = cfg.mods.wm.binds ++ defaultBinds cfg;
|
binds = cfg.mods.wm.binds ++ defaultBinds cfg;
|
||||||
in
|
in
|
||||||
binds
|
binds
|
||||||
|> builtins.filter (bind: bind ? command && shouldRepeat bind && !hasInvalidCustomCommand bind)
|
|> builtins.filter (bind: bind ? command && shouldRepeat bind && !(hasInvalidCustomCommand bind))
|
||||||
|> builtins.map (
|
|> builtins.map (
|
||||||
bind: "${mkMods bind},${bind.key},${mkCommand bind}"
|
bind: "${mkMods bind},${bind.key},${mkCommand bind}"
|
||||||
);
|
);
|
||||||
|
|
@ -156,7 +156,7 @@ in {
|
||||||
binds = cfg.mods.wm.binds ++ defaultBinds cfg;
|
binds = cfg.mods.wm.binds ++ defaultBinds cfg;
|
||||||
in
|
in
|
||||||
binds
|
binds
|
||||||
|> builtins.filter (bind: bind ? command && !(shouldRepeat bind) && !hasInvalidCustomCommand bind)
|
|> builtins.filter (bind: bind ? command && !(shouldRepeat bind) && !(hasInvalidCustomCommand bind))
|
||||||
|> builtins.map (
|
|> builtins.map (
|
||||||
bind: "${mkMods bind},${bind.key},${mkCommand bind}"
|
bind: "${mkMods bind},${bind.key},${mkCommand bind}"
|
||||||
);
|
);
|
||||||
|
|
@ -241,7 +241,6 @@ in {
|
||||||
defaultWindowRules;
|
defaultWindowRules;
|
||||||
in {
|
in {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = mkDashDefault pkgs.hyprland;
|
|
||||||
plugins =
|
plugins =
|
||||||
[
|
[
|
||||||
(lib.mkIf config.mods.hypr.hyprland.hyprspaceEnable pkgs.hyprlandPlugins.hyprspace)
|
(lib.mkIf config.mods.hypr.hyprland.hyprspaceEnable pkgs.hyprlandPlugins.hyprspace)
|
||||||
|
|
@ -311,6 +310,8 @@ in {
|
||||||
enable_swallow = mkDashDefault true;
|
enable_swallow = mkDashDefault true;
|
||||||
disable_splash_rendering = mkDashDefault true;
|
disable_splash_rendering = mkDashDefault true;
|
||||||
disable_hyprland_logo = mkDashDefault true;
|
disable_hyprland_logo = mkDashDefault true;
|
||||||
|
disable_xdg_env_checks = mkDashDefault true;
|
||||||
|
disable_scale_notification = mkDashDefault true;
|
||||||
swallow_regex = mkDashDefault "^(.*)(kitty)(.*)$";
|
swallow_regex = mkDashDefault "^(.*)(kitty)(.*)$";
|
||||||
initial_workspace_tracking = mkDashDefault 1;
|
initial_workspace_tracking = mkDashDefault 1;
|
||||||
# just doesn't work
|
# just doesn't work
|
||||||
|
|
@ -335,16 +336,16 @@ in {
|
||||||
layerrule = [
|
layerrule = [
|
||||||
# layer rules
|
# layer rules
|
||||||
# mainly to disable animations within slurp and grim
|
# mainly to disable animations within slurp and grim
|
||||||
"noanim, selection"
|
"match:namespace selection, no_anim on"
|
||||||
];
|
];
|
||||||
|
|
||||||
workspace = mkDashDefault (mkWorkspace config.mods.wm.workspaces);
|
workspace = mkWorkspace config.mods.wm.workspaces;
|
||||||
monitor = mkDashDefault (mkMonitors config.mods.wm.monitors);
|
monitor = mkMonitors config.mods.wm.monitors;
|
||||||
env = mkDashDefault (mkEnv config);
|
env = mkEnv config;
|
||||||
bind = mkDashDefault (mkBinds config);
|
bind = mkBinds config;
|
||||||
binde = mkDashDefault (mkEBinds config);
|
binde = mkEBinds config;
|
||||||
windowrule = mkDashDefault (mkWindowRule config);
|
windowrule = mkWindowRule config;
|
||||||
exec-once = mkDashDefault (mkAutoStart config);
|
exec-once = mkAutoStart config;
|
||||||
plugin = config.mods.hypr.hyprland.pluginConfig;
|
plugin = config.mods.hypr.hyprland.pluginConfig;
|
||||||
}
|
}
|
||||||
config.mods.hypr.hyprland.customConfig
|
config.mods.hypr.hyprland.customConfig
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@
|
||||||
pkgs,
|
pkgs,
|
||||||
inputs,
|
inputs,
|
||||||
options,
|
options,
|
||||||
|
mkDashDefault,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
inherit (config.conf) username;
|
inherit (config.conf) username;
|
||||||
|
|
@ -13,9 +14,14 @@
|
||||||
end = [
|
end = [
|
||||||
(lib.mkIf useBatteryModule
|
(lib.mkIf useBatteryModule
|
||||||
{
|
{
|
||||||
type = "upower";
|
type = "battery";
|
||||||
class = "battery";
|
class = "battery";
|
||||||
icon_size = 0;
|
icon_size = 0;
|
||||||
|
format = "{percentage}%";
|
||||||
|
thresholds = {
|
||||||
|
warning = 20;
|
||||||
|
critical = 5;
|
||||||
|
};
|
||||||
})
|
})
|
||||||
{
|
{
|
||||||
class = "music";
|
class = "music";
|
||||||
|
|
@ -258,8 +264,7 @@ in {
|
||||||
config = lib.mkIf (config.mods.ironbar.enable || config.mods.hypr.hyprland.useIronbar) (
|
config = lib.mkIf (config.mods.ironbar.enable || config.mods.hypr.hyprland.useIronbar) (
|
||||||
lib.optionalAttrs (options ? programs.ironbar) {
|
lib.optionalAttrs (options ? programs.ironbar) {
|
||||||
programs.ironbar = {
|
programs.ironbar = {
|
||||||
# TODO broken
|
package = mkDashDefault pkgs.ironbar;
|
||||||
# package = mkDashDefault pkgs.ironbar;
|
|
||||||
enable = true;
|
enable = true;
|
||||||
style =
|
style =
|
||||||
if config.mods.ironbar.useDefaultCss
|
if config.mods.ironbar.useDefaultCss
|
||||||
|
|
@ -430,8 +435,8 @@ in {
|
||||||
color: @background;
|
color: @background;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* upower */
|
/* battery */
|
||||||
.upower {
|
.battery {
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
padding: 0px 4px 0px 0px;
|
padding: 0px 4px 0px 0px;
|
||||||
margin: 2px 0px 2px 0px;
|
margin: 2px 0px 2px 0px;
|
||||||
|
|
@ -439,21 +444,21 @@ in {
|
||||||
color: @primary;
|
color: @primary;
|
||||||
}
|
}
|
||||||
|
|
||||||
.upower .icon {
|
.battery .icon {
|
||||||
opacity: 0.0;
|
opacity: 0.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.upower .label {
|
.battery .label {
|
||||||
margin: 2px 0px 0px -8px;
|
margin: 2px 0px 0px -8px;
|
||||||
color: @primary;
|
color: @primary;
|
||||||
}
|
}
|
||||||
|
|
||||||
.upower:hover {
|
.battery:hover {
|
||||||
background-color: @secondary-background;
|
background-color: @secondary-background;
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.popup-upower {
|
.popup-battery {
|
||||||
background-color: @background;
|
background-color: @background;
|
||||||
color: @primary;
|
color: @primary;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,7 @@
|
||||||
filePickerPortal = lib.mkOption {
|
filePickerPortal = lib.mkOption {
|
||||||
default = "Term";
|
default = "Term";
|
||||||
example = "Gnome";
|
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 = ''
|
description = ''
|
||||||
The file picker portal to use (set with shana).
|
The file picker portal to use (set with shana).
|
||||||
Default removes the config, allowing you to set it yourself.
|
Default removes the config, allowing you to set it yourself.
|
||||||
|
|
@ -87,14 +87,14 @@
|
||||||
# audio control
|
# audio control
|
||||||
playerctl
|
playerctl
|
||||||
# images
|
# images
|
||||||
imv
|
eog
|
||||||
# videos
|
# videos
|
||||||
mpv
|
mpv
|
||||||
# pdf
|
# pdf
|
||||||
zathura
|
zathura
|
||||||
evince
|
evince
|
||||||
libreoffice-fresh
|
libreoffice-fresh
|
||||||
onlyoffice-bin
|
onlyoffice-desktopeditors
|
||||||
pdftk
|
pdftk
|
||||||
pdfpc
|
pdfpc
|
||||||
polylux2pdfpc
|
polylux2pdfpc
|
||||||
|
|
|
||||||
|
|
@ -85,7 +85,7 @@ in {
|
||||||
description = "Applications used for handling browser mime types";
|
description = "Applications used for handling browser mime types";
|
||||||
};
|
};
|
||||||
imageApplications = lib.mkOption {
|
imageApplications = lib.mkOption {
|
||||||
default = ["imv"];
|
default = ["eog"];
|
||||||
example = [];
|
example = [];
|
||||||
type = with lib.types; listOf str;
|
type = with lib.types; listOf str;
|
||||||
description = "Applications used for handling image mime types";
|
description = "Applications used for handling image mime types";
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
defaultWmConf = import ../../lib/wm.nix {inherit lib;};
|
defaultWmConf = import ../../lib/wm.nix;
|
||||||
in {
|
in {
|
||||||
options.mods.niri = {
|
options.mods.niri = {
|
||||||
enable = lib.mkOption {
|
enable = lib.mkOption {
|
||||||
|
|
@ -66,7 +66,10 @@ in {
|
||||||
|> lib.strings.concatStringsSep "";
|
|> lib.strings.concatStringsSep "";
|
||||||
mkNiriArg = args:
|
mkNiriArg = args:
|
||||||
if args != []
|
if args != []
|
||||||
then "\"${(lib.strings.concatStringsSep " " args)}\""
|
then let
|
||||||
|
concatCommand = lib.strings.concatStringsSep " " args;
|
||||||
|
validCommand = builtins.replaceStrings [''"''] [''\"''] concatCommand;
|
||||||
|
in "\"${validCommand}\""
|
||||||
else "";
|
else "";
|
||||||
mkNiriCommand = bind: let
|
mkNiriCommand = bind: let
|
||||||
args = bind.args or [];
|
args = bind.args or [];
|
||||||
|
|
@ -353,6 +356,16 @@ in {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
${
|
||||||
|
if config.mods.gpu.nvidia.enable
|
||||||
|
then ''
|
||||||
|
debug {
|
||||||
|
wait-for-frame-completion-before-queueing
|
||||||
|
}
|
||||||
|
''
|
||||||
|
else ''''
|
||||||
|
}
|
||||||
|
|
||||||
// Autostart
|
// Autostart
|
||||||
|
|
||||||
hotkey-overlay {
|
hotkey-overlay {
|
||||||
|
|
|
||||||
|
|
@ -74,7 +74,7 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
// lib.optionalAttrs (options ? services.logind) {
|
// lib.optionalAttrs (options ? services.logind && options ? services.logind.settings) {
|
||||||
services.logind.settings.Login.HandleLidSwitchExternalPower = "ignore";
|
services.logind.settings.Login.HandleLidSwitchExternalPower = "ignore";
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,10 @@
|
||||||
config = lib.mkIf config.mods.printing.enable (
|
config = lib.mkIf config.mods.printing.enable (
|
||||||
lib.optionalAttrs (options ? services.printing) {
|
lib.optionalAttrs (options ? services.printing) {
|
||||||
# Enable CUPS to print documents.
|
# Enable CUPS to print documents.
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
simple-scan
|
||||||
|
];
|
||||||
|
hardware.sane.enable = true;
|
||||||
services = {
|
services = {
|
||||||
printing = {
|
printing = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
||||||
|
|
@ -91,7 +91,7 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
emoji = {
|
emoji = {
|
||||||
package = pkgs.noto-fonts-emoji;
|
package = pkgs.noto-fonts-color-emoji;
|
||||||
name = "Noto Color Emoji";
|
name = "Noto Color Emoji";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -44,8 +44,6 @@ in {
|
||||||
qemu = {
|
qemu = {
|
||||||
package = mkDashDefault pkgs.qemu_kvm;
|
package = mkDashDefault pkgs.qemu_kvm;
|
||||||
swtpm.enable = mkDashDefault true;
|
swtpm.enable = mkDashDefault true;
|
||||||
ovmf.enable = mkDashDefault true;
|
|
||||||
ovmf.packages = [pkgs.OVMFFull.fd];
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
spiceUSBRedirection.enable = mkDashDefault true;
|
spiceUSBRedirection.enable = mkDashDefault true;
|
||||||
|
|
|
||||||
|
|
@ -319,7 +319,7 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
windowRules = lib.mkOption {
|
windowRules = lib.mkOption {
|
||||||
default = [];
|
default = {};
|
||||||
example = {
|
example = {
|
||||||
niri = [
|
niri = [
|
||||||
''
|
''
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@
|
||||||
];
|
];
|
||||||
image = [
|
image = [
|
||||||
{
|
{
|
||||||
run = ''imv "$@"'';
|
run = ''eog "$@"'';
|
||||||
orphan = true;
|
orphan = true;
|
||||||
display_name = "Open";
|
display_name = "Open";
|
||||||
}
|
}
|
||||||
|
|
@ -102,6 +102,11 @@
|
||||||
};
|
};
|
||||||
keymap = {
|
keymap = {
|
||||||
mgr.keymap = [
|
mgr.keymap = [
|
||||||
|
{
|
||||||
|
on = "<Backspace>";
|
||||||
|
run = "backspace";
|
||||||
|
desc = "Delete the character before the cursor";
|
||||||
|
}
|
||||||
{
|
{
|
||||||
on = ["<Esc>"];
|
on = ["<Esc>"];
|
||||||
run = "escape";
|
run = "escape";
|
||||||
|
|
@ -763,6 +768,11 @@
|
||||||
];
|
];
|
||||||
|
|
||||||
input.keymap = [
|
input.keymap = [
|
||||||
|
{
|
||||||
|
on = "<Backspace>";
|
||||||
|
run = "backspace";
|
||||||
|
desc = "Delete the character before the cursor";
|
||||||
|
}
|
||||||
{
|
{
|
||||||
on = ["<C-q>"];
|
on = ["<C-q>"];
|
||||||
run = "close";
|
run = "close";
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue