Compare commits
3 commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 614342b9f7 | |||
| 72afd686c0 | |||
| 912c91d60e |
31 changed files with 376 additions and 658 deletions
60
.github/workflows/docs.yaml
vendored
60
.github/workflows/docs.yaml
vendored
|
|
@ -1,34 +1,58 @@
|
|||
# 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: nixos-latest
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- 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: 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 docs
|
||||
run: nix -L build git+https://git.dashie.org/${{ forgejo.repository }}.git?rev=${{ forgejo.sha }}#docs --no-write-lock-file
|
||||
run: nix -L build github:${{ github.repository }}/${{ github.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: https://data.forgejo.org/forgejo/upload-artifact@v4
|
||||
# with:
|
||||
# path: public/
|
||||
- name: Publish Page
|
||||
uses: https://data.forgejo.org/actions/git-pages@v2
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-pages-artifact@v3
|
||||
with:
|
||||
site: https://username.pages.dashie.org/reponame/
|
||||
token: ${{ forge.token }}
|
||||
source: public/
|
||||
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
|
||||
|
|
|
|||
|
|
@ -101,6 +101,10 @@ in {
|
|||
|
||||
builders-use-substitutes = mkDashDefault true;
|
||||
|
||||
substituters = [
|
||||
"https://chaotic-nyx.cachix.org/"
|
||||
];
|
||||
|
||||
trusted-substituters = [
|
||||
"https://hyprland.cachix.org"
|
||||
"https://anyrun.cachix.org"
|
||||
|
|
@ -124,6 +128,7 @@ 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="
|
||||
];
|
||||
|
||||
|
|
@ -159,8 +164,6 @@ in {
|
|||
"vboxusers"
|
||||
"video"
|
||||
"audio"
|
||||
"scanner"
|
||||
"lp"
|
||||
];
|
||||
packages = with pkgs; [
|
||||
home-manager
|
||||
|
|
|
|||
|
|
@ -23,40 +23,6 @@ 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 = ./.; };
|
||||
```
|
||||
|
|
@ -108,20 +74,26 @@ 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;
|
||||
wm.monitors = [
|
||||
# Example
|
||||
# {
|
||||
# name = "DP-1";
|
||||
# resolutionX = 3440;
|
||||
# resolutionY = 1440;
|
||||
# refreshrate = 180;
|
||||
# positionX = 2560;
|
||||
# positionY = 0;
|
||||
# scale = 1;
|
||||
# transform = "0";
|
||||
# vrr = 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:
|
||||
|
|
@ -130,29 +102,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.
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -162,78 +134,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.
|
||||
|
||||
## Configuring pkgs
|
||||
## Nixos and Home-manager Modules
|
||||
|
||||
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.
|
||||
You can add additional modules or remove all of them by overriding parameters to the buildSystems command:
|
||||
|
||||
```nix
|
||||
currentSystem = "x86_64-linux";
|
||||
permittedPackages = [
|
||||
"some package"
|
||||
];
|
||||
config = {
|
||||
system = currentSystem;
|
||||
config = {
|
||||
allowUnfree = true;
|
||||
permittedInsecurePackages = permittedPackages;
|
||||
};
|
||||
inputs = {
|
||||
# Some inputs
|
||||
}
|
||||
mods = {
|
||||
home = [
|
||||
# Some home manager module
|
||||
];
|
||||
nixos = [
|
||||
# Some nixos module
|
||||
];
|
||||
}
|
||||
};
|
||||
unstableBundle = {
|
||||
pkgs = inputs.unstable;
|
||||
inherit config mods;
|
||||
};
|
||||
inputs.dashNix.dashNixLib.buildSystems {
|
||||
root = ./.;
|
||||
inherit unstableBundle;
|
||||
}
|
||||
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; };
|
||||
```
|
||||
|
||||
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.
|
||||
## 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; };
|
||||
```
|
||||
|
||||
## Stable/Unstable
|
||||
|
||||
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 stableBundle;
|
||||
overridePkgs = true;
|
||||
}
|
||||
// inputs.dashNix.dashNixLib.buildSystems {
|
||||
inherit unstableBundle;
|
||||
root = ./unstable;
|
||||
};
|
||||
nixosConfigurations =
|
||||
inputs.dashNix.dashNixLib.buildSystems {
|
||||
root = ./stable;
|
||||
inherit additionalInputs;
|
||||
overridePkgs = true;
|
||||
}
|
||||
// inputs.dashNix.dashNixLib.buildSystems {
|
||||
root = ./unstable;
|
||||
inherit additionalInputs;
|
||||
};
|
||||
```
|
||||
|
||||
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 via ISO
|
||||
# Installation
|
||||
|
||||
You can find a custom ISO in the releases: [Link](https://github.com/Xetibo/DashNix/releases).
|
||||
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.
|
||||
|
||||
|
|
@ -252,30 +214,19 @@ Then configure as you please and choose a command below depending on your disk i
|
|||
Installation via manual configuration:
|
||||
|
||||
```sh
|
||||
sudo nixos-install --flake <flakelocation>#<hostname> --root <mountpoint> --option experimental-features "nix-command flakes pipe-operators"
|
||||
sudo nixos-install --flake <flakelocation>#<hostname> --root <mountpoint>
|
||||
#example
|
||||
#nixos-install --flake ~/config#globi --root /mnt --option experimental-features "nix-command flakes pipe-operators"
|
||||
#nixos-install --flake ~/config#globi --root /mnt
|
||||
```
|
||||
|
||||
Installation via disko:
|
||||
|
||||
```sh
|
||||
sudo disko-install --flake <flakelocation>#<hostname> --disk <disk-name> <disk-device> --option experimental-features "nix-command flakes pipe-operators"
|
||||
sudo disko-install --flake <flakelocation>#<hostname> --disk <disk-name> <disk-device>
|
||||
#example
|
||||
#disko-install -- --flake ~/config#globi --disk main /dev/nvme0n1 --option experimental-features "nix-command flakes pipe-operators"
|
||||
#disko-install -- --flake ~/config#globi --disk main /dev/nvme0n1
|
||||
```
|
||||
|
||||
# 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
|
||||
|
||||
This configuration features several modules that can be used as preconfigured "recipies".
|
||||
|
|
@ -283,7 +234,6 @@ 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
|
||||
|
|
@ -326,4 +276,3 @@ 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
|
||||
- [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))
|
||||
- [xddxdd](https://github.com/xddxdd) for the CachyOS-Kernel flake
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@
|
|||
"https://oxicalc.cachix.org"
|
||||
"https://hyprdock.cachix.org"
|
||||
"https://reset.cachix.org"
|
||||
"https://chaotic-nyx.cachix.org/"
|
||||
"https://dashvim.cachix.org"
|
||||
];
|
||||
|
||||
|
|
@ -45,6 +46,7 @@
|
|||
"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="
|
||||
];
|
||||
};
|
||||
|
|
|
|||
|
|
@ -18,20 +18,26 @@
|
|||
# default disk config has root home boot and swap partition, overwrite if you want something different
|
||||
sops.enable = false;
|
||||
nextcloud.enable = false;
|
||||
wm.monitors = [
|
||||
# Example
|
||||
# {
|
||||
# name = "DP-1";
|
||||
# resolutionX = 3440;
|
||||
# resolutionY = 1440;
|
||||
# refreshrate = 180;
|
||||
# positionX = 2560;
|
||||
# positionY = 0;
|
||||
# scale = 1;
|
||||
# transform = "0";
|
||||
# vrr = 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:
|
||||
|
|
|
|||
59
flake.nix
59
flake.nix
|
|
@ -18,11 +18,10 @@
|
|||
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";
|
||||
|
||||
hyprland.url = "github:hyprwm/Hyprland";
|
||||
hyprland.url = "git+https://github.com/hyprwm/Hyprland?submodules=1";
|
||||
|
||||
ironbar = {
|
||||
url = "github:JakeStanger/ironbar";
|
||||
|
|
@ -50,6 +49,9 @@
|
|||
|
||||
superfreq.url = "github:NotAShelf/superfreq";
|
||||
|
||||
# absolute insanity
|
||||
chaoticNyx.url = "github:chaotic-cx/nyx/nyxpkgs-unstable";
|
||||
|
||||
compose.url = "github:garnix-io/nixos-compose";
|
||||
};
|
||||
|
||||
|
|
@ -57,27 +59,47 @@
|
|||
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"
|
||||
];
|
||||
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;
|
||||
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
|
||||
permittedPackages
|
||||
stable
|
||||
;
|
||||
dashNixAdditionalProps = {
|
||||
inherit pkgsDarkreader;
|
||||
};
|
||||
system = currentSystem;
|
||||
inherit (inputs.unstable) lib;
|
||||
};
|
||||
docs = import ./docs {
|
||||
inherit inputs;
|
||||
|
|
@ -94,20 +116,5 @@
|
|||
modules = ./modules;
|
||||
iso = dashNixLib.buildIso.config.system.build.isoImage;
|
||||
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,11 +1,13 @@
|
|||
{
|
||||
mkDashDefault,
|
||||
additionalHomeConfig,
|
||||
additionalHomeMods,
|
||||
additionalInputs,
|
||||
dashNixAdditionalProps,
|
||||
config,
|
||||
homeMods,
|
||||
inputs,
|
||||
lib,
|
||||
additionalHomeConfig,
|
||||
mod,
|
||||
pkgs,
|
||||
root,
|
||||
|
|
@ -40,6 +42,7 @@
|
|||
inherit
|
||||
inputs
|
||||
root
|
||||
additionalInputs
|
||||
alternativePkgs
|
||||
system
|
||||
stable
|
||||
|
|
@ -59,8 +62,9 @@
|
|||
../lib/foxwrappers.nix
|
||||
]
|
||||
++ homeMods
|
||||
++ lib.optional (builtins.pathExists additionalHomeConfig) additionalHomeConfig
|
||||
++ lib.optional (builtins.pathExists mod) mod;
|
||||
++ additionalHomeMods
|
||||
++ lib.optional (builtins.pathExists mod) mod
|
||||
++ lib.optional (builtins.pathExists additionalHomeConfig) additionalHomeConfig;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
345
lib/default.nix
345
lib/default.nix
|
|
@ -1,188 +1,13 @@
|
|||
{
|
||||
inputs,
|
||||
lib,
|
||||
unstable,
|
||||
self,
|
||||
stable,
|
||||
system,
|
||||
permittedPackages,
|
||||
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
|
||||
|
|
@ -211,75 +36,107 @@ in rec {
|
|||
# );
|
||||
|
||||
# in
|
||||
buildFunc = func: {
|
||||
buildSystems = {
|
||||
root,
|
||||
unstableBundle ? {},
|
||||
stableBundle ? {},
|
||||
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
|
||||
inputs.superfreq.nixosModules.default
|
||||
inputs.sops-nix.nixosModules.sops
|
||||
../base
|
||||
../home
|
||||
../modules
|
||||
inputs.chaoticNyx.nixosModules.default
|
||||
];
|
||||
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.chaoticNyx.homeManagerModules.default
|
||||
../modules
|
||||
];
|
||||
},
|
||||
additionalInputs ? {},
|
||||
overridePkgs ? false,
|
||||
...
|
||||
}: let
|
||||
defaultNixosMods = inputs: [
|
||||
inputs.lanzaboote.nixosModules.lanzaboote
|
||||
inputs.nixos-wsl.nixosModules.default
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
inputs.stylix.nixosModules.stylix
|
||||
inputs.disko.nixosModules.disko
|
||||
inputs.superfreq.nixosModules.default
|
||||
inputs.sops-nix.nixosModules.sops
|
||||
../base
|
||||
../home
|
||||
../modules
|
||||
];
|
||||
|
||||
defaultHomeMods = inputs: [
|
||||
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
|
||||
../modules
|
||||
];
|
||||
|
||||
unstableInput = unstableBundle.pkgs or inputs.unstable;
|
||||
stableInput = stableBundle.pkgs or inputs.stable;
|
||||
unstableConfig = unstableBundle.config or defaultConfig;
|
||||
stableConfig = stableBundle.config or defaultConfig;
|
||||
unstableInputs = (unstableBundle.inputs or {}) // inputs;
|
||||
stableInputs = (stableBundle.inputs or {}) // inputs;
|
||||
unstableMods = {
|
||||
home = (defaultHomeMods unstableInputs) ++ (unstableBundle.mods.home or []);
|
||||
nixos = (defaultNixosMods unstableInputs) ++ (unstableBundle.mods.nixos or []);
|
||||
};
|
||||
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
|
||||
func {
|
||||
inherit lib inputLib stablePkgs unstablePkgs stableMods unstableMods stableInputs unstableInputs root overridePkgs;
|
||||
};
|
||||
|
||||
buildSystems = buildFunc mkNixos;
|
||||
buildHome = buildFunc mkHome;
|
||||
}:
|
||||
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
|
||||
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 = {
|
||||
|
|
|
|||
|
|
@ -12,6 +12,6 @@ import pkgs {
|
|||
};
|
||||
overlays = [
|
||||
inputs.nur.overlays.default
|
||||
inputs.cachy.overlays.default
|
||||
inputs.chaoticNyx.overlays.cache-friendly
|
||||
];
|
||||
}
|
||||
|
|
|
|||
27
lib/wm.nix
27
lib/wm.nix
|
|
@ -1,4 +1,4 @@
|
|||
let
|
||||
{lib, ...}: let
|
||||
browserName = config:
|
||||
if (builtins.isString config.mods.homePackages.browser)
|
||||
then config.mods.homePackages.browser
|
||||
|
|
@ -50,11 +50,14 @@ in {
|
|||
];
|
||||
hyprland = [
|
||||
# window rules
|
||||
"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"
|
||||
"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)(.*)$"
|
||||
];
|
||||
};
|
||||
|
||||
|
|
@ -153,7 +156,7 @@ in {
|
|||
(mkSimpleBind ["Mod"] "7" "focusWorkspace" ["7"])
|
||||
(mkSimpleBind ["Mod"] "8" "focusWorkspace" ["8"])
|
||||
(mkSimpleBind ["Mod"] "9" "focusWorkspace" ["9"])
|
||||
(mkSimpleBind ["Mod"] "0" "focusWorkspace" ["10"])
|
||||
(mkSimpleBind ["Mod"] "0" "focusWorkspace" ["0"])
|
||||
(mkSimpleBind ["Mod" "Shift"] "1" "moveToWorkspace" ["1"])
|
||||
(mkSimpleBind ["Mod" "Shift"] "2" "moveToWorkspace" ["2"])
|
||||
(mkSimpleBind ["Mod" "Shift"] "3" "moveToWorkspace" ["3"])
|
||||
|
|
@ -163,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" ["10"])
|
||||
(mkSimpleBind ["Mod" "Shift"] "0" "moveToWorkspace" ["0"])
|
||||
(mkSimpleBind ["Mod"] "B" "toggleFullscreen" [])
|
||||
(mkSimpleBind ["Mod"] "V" "toggleFloating" [])
|
||||
(mkSimpleBind ["Mod" "Shift"] "M" "quit" [])
|
||||
|
|
@ -244,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
|
||||
|
|
@ -363,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 ["10"])
|
||||
(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 [])
|
||||
|
|
@ -422,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" ["10"])
|
||||
(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"])
|
||||
|
|
|
|||
|
|
@ -87,6 +87,7 @@
|
|||
if config.mods.basePackages.enable
|
||||
then
|
||||
{
|
||||
preload.enable = mkDashDefault true;
|
||||
upower.enable = mkDashDefault true;
|
||||
dbus = {
|
||||
enable = mkDashDefault true;
|
||||
|
|
|
|||
|
|
@ -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,9 +149,7 @@ 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;
|
||||
})
|
||||
}
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,60 +0,0 @@
|
|||
{
|
||||
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 = [
|
||||
./niri.nix
|
||||
./acpid.nix
|
||||
./anyrun.nix
|
||||
./basePackages.nix
|
||||
./bluetooth.nix
|
||||
./browser
|
||||
./clam.nix
|
||||
./coding.nix
|
||||
./containers.nix
|
||||
./drives.nix
|
||||
|
|
@ -31,7 +31,6 @@
|
|||
./mime.nix
|
||||
./ncspot.nix
|
||||
./nextcloud.nix
|
||||
./niri.nix
|
||||
./onedrive.nix
|
||||
./oxi
|
||||
./piper.nix
|
||||
|
|
@ -48,9 +47,9 @@
|
|||
./sway.nix
|
||||
./teams.nix
|
||||
./virtmanager.nix
|
||||
./wm.nix
|
||||
./xkb.nix
|
||||
./xone.nix
|
||||
./wm.nix
|
||||
./yazi
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ in {
|
|||
abbr --add cat 'bat'
|
||||
abbr --add find 'fd'
|
||||
abbr --add rm 'rip'
|
||||
abbr --add cp 'cpz'
|
||||
abbr --add cp 'fcp'
|
||||
abbr --add cd 'z'
|
||||
abbr --add y 'yazi'
|
||||
|
||||
|
|
|
|||
|
|
@ -19,8 +19,7 @@
|
|||
gamescope
|
||||
gamemode
|
||||
steam
|
||||
# TODO broken
|
||||
# lutris
|
||||
lutris
|
||||
wineWowPackages.stable
|
||||
adwsteamgtk
|
||||
heroic
|
||||
|
|
@ -34,14 +33,10 @@
|
|||
description = "Install gaming related packages";
|
||||
};
|
||||
kernel = lib.mkOption {
|
||||
default = false;
|
||||
example = true;
|
||||
default = true;
|
||||
example = false;
|
||||
type = lib.types.bool;
|
||||
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.)
|
||||
'';
|
||||
description = "Whether to use the CachyOS kernel";
|
||||
};
|
||||
steam = lib.mkOption {
|
||||
default = true;
|
||||
|
|
@ -79,50 +74,18 @@
|
|||
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.cachyosKernels.linuxPackages-cachyos-latest;
|
||||
services.scx = lib.mkIf (config.mods.gaming.scheduler != null) {
|
||||
enable = true;
|
||||
inherit (config.mods.gaming) scheduler;
|
||||
};
|
||||
boot.kernelPackages = lib.mkForce pkgs.linuxPackages_cachyos;
|
||||
services.scx.enable = true;
|
||||
|
||||
programs = {
|
||||
steam.enable = mkDashDefault config.mods.gaming.steam;
|
||||
gamemode.enable = true;
|
||||
gamemode = {
|
||||
enableRenice = mkDashDefault true;
|
||||
settings = {
|
||||
general = {
|
||||
desiredgov = mkDashDefault "performance";
|
||||
|
|
|
|||
|
|
@ -50,14 +50,9 @@
|
|||
config = lib.optionalAttrs (options ? programs.git && options ? home.file) {
|
||||
programs.git = {
|
||||
enable = true;
|
||||
settings =
|
||||
{
|
||||
user = {
|
||||
name = config.mods.git.username;
|
||||
inherit (config.mods.git) email;
|
||||
};
|
||||
}
|
||||
// config.mods.git.additionalConfig;
|
||||
userName = config.mods.git.username;
|
||||
userEmail = config.mods.git.email;
|
||||
extraConfig = config.mods.git.additionalConfig;
|
||||
};
|
||||
home.file.".ssh/config".text = config.mods.git.sshConfig;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -87,11 +87,12 @@
|
|||
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.libva-vdpau-driver)
|
||||
(lib.mkIf config.mods.gpu.vapi.enable pkgs.vaapiVdpau)
|
||||
(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
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@
|
|||
inputs,
|
||||
pkgs,
|
||||
options,
|
||||
system,
|
||||
...
|
||||
}: {
|
||||
options.mods = {
|
||||
|
|
@ -44,11 +43,11 @@
|
|||
};
|
||||
greeterCommand = lib.mkOption {
|
||||
default = "${
|
||||
lib.getExe inputs.hyprland.packages.${system}.hyprland
|
||||
lib.getExe pkgs.hyprland
|
||||
} --config /etc/greetd/hyprgreet.conf";
|
||||
example = "${
|
||||
lib.getExe pkgs.cage
|
||||
} -s -- ${lib.getExe pkgs.regreet}";
|
||||
} -s -- ${lib.getExe pkgs.greetd.regreet}";
|
||||
type = lib.types.str;
|
||||
description = "The compositor/greeter command to run";
|
||||
};
|
||||
|
|
@ -131,8 +130,6 @@
|
|||
misc {
|
||||
disable_splash_rendering = false
|
||||
disable_hyprland_logo = true
|
||||
disable_xdg_env_checks = true
|
||||
disable_scale_notification = true
|
||||
}
|
||||
|
||||
env=STATE_DIR,var/cache/regreet
|
||||
|
|
|
|||
|
|
@ -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 (config.mods.homePackages.matrixClient != null) config.mods.homePackages.matrixClient)
|
||||
(lib.mkIf (config.mods.homePackages.mailClient != null) config.mods.homePackages.mailClient)
|
||||
(lib.mkIf (!isNull config.mods.homePackages.matrixClient) config.mods.homePackages.matrixClient)
|
||||
(lib.mkIf (!isNull config.mods.homePackages.mailClient) config.mods.homePackages.mailClient)
|
||||
(lib.mkIf (
|
||||
# NOTE: This should be package, but nix doesn't have that....
|
||||
builtins.isAttrs config.mods.homePackages.browser && config.mods.homePackages.browser != null
|
||||
builtins.isAttrs config.mods.homePackages.browser && !isNull config.mods.homePackages.browser
|
||||
)
|
||||
config.mods.homePackages.browser)
|
||||
adw-gtk3
|
||||
|
|
@ -128,11 +128,11 @@
|
|||
nh
|
||||
nix-index
|
||||
playerctl
|
||||
poppler-utils
|
||||
poppler_utils
|
||||
pulseaudio
|
||||
libsForQt5.qt5ct
|
||||
qt6Packages.qt6ct
|
||||
fuc
|
||||
qt6ct
|
||||
fcp
|
||||
ripgrep
|
||||
rm-improved
|
||||
system-config-printer
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
pkgs,
|
||||
...
|
||||
}: let
|
||||
defaultWmConf = import ../../../lib/wm.nix;
|
||||
defaultWmConf = import ../../../lib/wm.nix {inherit lib;};
|
||||
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 == true;
|
||||
shouldRepeat = bind: bind ? meta && bind.meta ? hyprland && bind.meta.hyprland ? repeat && bind.meta.hyprland.repeat;
|
||||
|
||||
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}"
|
||||
);
|
||||
|
|
@ -241,6 +241,7 @@ in {
|
|||
defaultWindowRules;
|
||||
in {
|
||||
enable = true;
|
||||
package = mkDashDefault pkgs.hyprland;
|
||||
plugins =
|
||||
[
|
||||
(lib.mkIf config.mods.hypr.hyprland.hyprspaceEnable pkgs.hyprlandPlugins.hyprspace)
|
||||
|
|
@ -310,8 +311,6 @@ in {
|
|||
enable_swallow = mkDashDefault true;
|
||||
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
|
||||
|
|
@ -336,16 +335,16 @@ in {
|
|||
layerrule = [
|
||||
# layer rules
|
||||
# mainly to disable animations within slurp and grim
|
||||
"match:namespace selection, no_anim on"
|
||||
"noanim, selection"
|
||||
];
|
||||
|
||||
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;
|
||||
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
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@
|
|||
pkgs,
|
||||
inputs,
|
||||
options,
|
||||
mkDashDefault,
|
||||
...
|
||||
}: let
|
||||
inherit (config.conf) username;
|
||||
|
|
@ -14,14 +13,9 @@
|
|||
end = [
|
||||
(lib.mkIf useBatteryModule
|
||||
{
|
||||
type = "battery";
|
||||
type = "upower";
|
||||
class = "battery";
|
||||
icon_size = 0;
|
||||
format = "{percentage}%";
|
||||
thresholds = {
|
||||
warning = 20;
|
||||
critical = 5;
|
||||
};
|
||||
})
|
||||
{
|
||||
class = "music";
|
||||
|
|
@ -264,7 +258,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
|
||||
|
|
@ -435,8 +430,8 @@ in {
|
|||
color: @background;
|
||||
}
|
||||
|
||||
/* battery */
|
||||
.battery {
|
||||
/* upower */
|
||||
.upower {
|
||||
font-size: 13px;
|
||||
padding: 0px 4px 0px 0px;
|
||||
margin: 2px 0px 2px 0px;
|
||||
|
|
@ -444,21 +439,21 @@ in {
|
|||
color: @primary;
|
||||
}
|
||||
|
||||
.battery .icon {
|
||||
.upower .icon {
|
||||
opacity: 0.0;
|
||||
}
|
||||
|
||||
.battery .label {
|
||||
.upower .label {
|
||||
margin: 2px 0px 0px -8px;
|
||||
color: @primary;
|
||||
}
|
||||
|
||||
.battery:hover {
|
||||
.upower:hover {
|
||||
background-color: @secondary-background;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.popup-battery {
|
||||
.popup-upower {
|
||||
background-color: @background;
|
||||
color: @primary;
|
||||
border-radius: 8px;
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@
|
|||
filePickerPortal = lib.mkOption {
|
||||
default = "Term";
|
||||
example = "Gnome";
|
||||
type = with lib.types; oneOf [(enum ["Gnome" "Kde" "Lxqt" "Gtk" "Term" "Default"]) str];
|
||||
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.
|
||||
|
|
@ -87,14 +87,14 @@
|
|||
# audio control
|
||||
playerctl
|
||||
# images
|
||||
eog
|
||||
imv
|
||||
# videos
|
||||
mpv
|
||||
# pdf
|
||||
zathura
|
||||
evince
|
||||
libreoffice-fresh
|
||||
onlyoffice-desktopeditors
|
||||
onlyoffice-bin
|
||||
pdftk
|
||||
pdfpc
|
||||
polylux2pdfpc
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ in {
|
|||
description = "Applications used for handling browser mime types";
|
||||
};
|
||||
imageApplications = lib.mkOption {
|
||||
default = ["eog"];
|
||||
default = ["imv"];
|
||||
example = [];
|
||||
type = with lib.types; listOf str;
|
||||
description = "Applications used for handling image mime types";
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
pkgs,
|
||||
...
|
||||
}: let
|
||||
defaultWmConf = import ../../lib/wm.nix;
|
||||
defaultWmConf = import ../../lib/wm.nix {inherit lib;};
|
||||
in {
|
||||
options.mods.niri = {
|
||||
enable = lib.mkOption {
|
||||
|
|
@ -66,10 +66,7 @@ in {
|
|||
|> lib.strings.concatStringsSep "";
|
||||
mkNiriArg = args:
|
||||
if args != []
|
||||
then let
|
||||
concatCommand = lib.strings.concatStringsSep " " args;
|
||||
validCommand = builtins.replaceStrings [''"''] [''\"''] concatCommand;
|
||||
in "\"${validCommand}\""
|
||||
then "\"${(lib.strings.concatStringsSep " " args)}\""
|
||||
else "";
|
||||
mkNiriCommand = bind: let
|
||||
args = bind.args or [];
|
||||
|
|
@ -356,16 +353,6 @@ in {
|
|||
}
|
||||
}
|
||||
|
||||
${
|
||||
if config.mods.gpu.nvidia.enable
|
||||
then ''
|
||||
debug {
|
||||
wait-for-frame-completion-before-queueing
|
||||
}
|
||||
''
|
||||
else ''''
|
||||
}
|
||||
|
||||
// Autostart
|
||||
|
||||
hotkey-overlay {
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@
|
|||
};
|
||||
};
|
||||
}
|
||||
// lib.optionalAttrs (options ? services.logind && options ? services.logind.settings) {
|
||||
// lib.optionalAttrs (options ? services.logind) {
|
||||
services.logind.settings.Login.HandleLidSwitchExternalPower = "ignore";
|
||||
}
|
||||
);
|
||||
|
|
|
|||
|
|
@ -16,10 +16,6 @@
|
|||
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;
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ in {
|
|||
};
|
||||
|
||||
emoji = {
|
||||
package = pkgs.noto-fonts-color-emoji;
|
||||
package = pkgs.noto-fonts-emoji;
|
||||
name = "Noto Color Emoji";
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -44,6 +44,8 @@ in {
|
|||
qemu = {
|
||||
package = mkDashDefault pkgs.qemu_kvm;
|
||||
swtpm.enable = mkDashDefault true;
|
||||
ovmf.enable = mkDashDefault true;
|
||||
ovmf.packages = [pkgs.OVMFFull.fd];
|
||||
};
|
||||
};
|
||||
spiceUSBRedirection.enable = mkDashDefault true;
|
||||
|
|
|
|||
|
|
@ -319,7 +319,7 @@ in {
|
|||
};
|
||||
|
||||
windowRules = lib.mkOption {
|
||||
default = {};
|
||||
default = [];
|
||||
example = {
|
||||
niri = [
|
||||
''
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@
|
|||
];
|
||||
image = [
|
||||
{
|
||||
run = ''eog "$@"'';
|
||||
run = ''imv "$@"'';
|
||||
orphan = true;
|
||||
display_name = "Open";
|
||||
}
|
||||
|
|
@ -102,11 +102,6 @@
|
|||
};
|
||||
keymap = {
|
||||
mgr.keymap = [
|
||||
{
|
||||
on = "<Backspace>";
|
||||
run = "backspace";
|
||||
desc = "Delete the character before the cursor";
|
||||
}
|
||||
{
|
||||
on = ["<Esc>"];
|
||||
run = "escape";
|
||||
|
|
@ -768,11 +763,6 @@
|
|||
];
|
||||
|
||||
input.keymap = [
|
||||
{
|
||||
on = "<Backspace>";
|
||||
run = "backspace";
|
||||
desc = "Delete the character before the cursor";
|
||||
}
|
||||
{
|
||||
on = ["<C-q>"];
|
||||
run = "close";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue