Compare commits
No commits in common. "036f6196731c75aeff147bf20d544e7e42177248" and "7080ae11af2c3d97a2caabd6b989a6294e14ea22" have entirely different histories.
036f619673
...
7080ae11af
104
flake.lock
104
flake.lock
|
@ -53,17 +53,16 @@
|
||||||
"base16-vim": {
|
"base16-vim": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1732806396,
|
"lastModified": 1735953590,
|
||||||
"narHash": "sha256-e0bpPySdJf0F68Ndanwm+KWHgQiZ0s7liLhvJSWDNsA=",
|
"narHash": "sha256-YbQwaApLFJobn/0lbpMKcJ8N5axKlW2QIGkDS5+xoSU=",
|
||||||
"owner": "tinted-theming",
|
"owner": "tinted-theming",
|
||||||
"repo": "base16-vim",
|
"repo": "base16-vim",
|
||||||
"rev": "577fe8125d74ff456cf942c733a85d769afe58b7",
|
"rev": "c2a1232aa2c0ed27dcbf005779bcfe0e0ab5e85d",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "tinted-theming",
|
"owner": "tinted-theming",
|
||||||
"repo": "base16-vim",
|
"repo": "base16-vim",
|
||||||
"rev": "577fe8125d74ff456cf942c733a85d769afe58b7",
|
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -158,11 +157,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1738453229,
|
"lastModified": 1736143030,
|
||||||
"narHash": "sha256-7H9XgNiGLKN1G1CgRh0vUL4AheZSYzPm+zmZ7vxbJdo=",
|
"narHash": "sha256-+hu54pAoLDEZT9pjHlqL9DNzWz0NbUn8NEAHP7PQPzU=",
|
||||||
"owner": "hercules-ci",
|
"owner": "hercules-ci",
|
||||||
"repo": "flake-parts",
|
"repo": "flake-parts",
|
||||||
"rev": "32ea77a06711b758da0ad9bd6a844c5740a87abd",
|
"rev": "b905f6fc23a9051a6e1b741e1438dbfc0634c6de",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -385,11 +384,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1739458725,
|
"lastModified": 1737762889,
|
||||||
"narHash": "sha256-k9AeUzs3phaTgfljRslR4iNTX9svBNhxoIw4QLd/V70=",
|
"narHash": "sha256-5HGG09bh/Yx0JA8wtBMAzt0HMCL1bYZ93x4IqzVExio=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "22b418c13fb0be43f4bc5c185f323a3237028594",
|
"rev": "daf04c5950b676f47a794300657f1d3d14c1a120",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -406,11 +405,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1738878603,
|
"lastModified": 1737762889,
|
||||||
"narHash": "sha256-fmhq8B3MvQLawLbMO+LWLcdC2ftLMmwSk+P29icJ3tE=",
|
"narHash": "sha256-5HGG09bh/Yx0JA8wtBMAzt0HMCL1bYZ93x4IqzVExio=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "433799271274c9f2ab520a49527ebfe2992dcfbd",
|
"rev": "daf04c5950b676f47a794300657f1d3d14c1a120",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -427,11 +426,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1737630279,
|
"lastModified": 1736785676,
|
||||||
"narHash": "sha256-wJQCxyMRc4P26zDrHmZiRD5bbfcJpqPG3e2djdGG3pk=",
|
"narHash": "sha256-TY0jUwR3EW0fnS0X5wXMAVy6h4Z7Y6a3m+Yq++C9AyE=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "0db5c8bfcce78583ebbde0b2abbc95ad93445f7c",
|
"rev": "fc52a210b60f2f52c74eac41a8647c1573d2071d",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -476,11 +475,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1738743987,
|
"lastModified": 1737504076,
|
||||||
"narHash": "sha256-O3bnAfsObto6l2tQOmQlrO6Z2kD6yKwOWfs7pA0CpOc=",
|
"narHash": "sha256-/B4XJnzYU/6K1ZZOBIgsa3K4pqDJrnC2579c44c+4rI=",
|
||||||
"owner": "lnl7",
|
"owner": "lnl7",
|
||||||
"repo": "nix-darwin",
|
"repo": "nix-darwin",
|
||||||
"rev": "ae406c04577ff9a64087018c79b4fdc02468c87c",
|
"rev": "65cc1fa8e36ceff067daf6cfb142331f02f524d3",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -497,11 +496,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1739458916,
|
"lastModified": 1737840943,
|
||||||
"narHash": "sha256-J1tAJ0hAeUaP9T1DDrqA5JCPXEKW/rPnkLgHmu0cUlA=",
|
"narHash": "sha256-64j4mytkcPjd+k8KwDRzti/mc5cOJgY/LeOxbAykoag=",
|
||||||
"owner": "doronbehar",
|
"owner": "doronbehar",
|
||||||
"repo": "nix-matlab",
|
"repo": "nix-matlab",
|
||||||
"rev": "3ca3c00572f7da3018b8955a285b50e44949394f",
|
"rev": "4151ee1768ae1842f3505c0927eefbc977fcf046",
|
||||||
"type": "gitlab"
|
"type": "gitlab"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -512,27 +511,27 @@
|
||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1739419412,
|
"lastModified": 1737746512,
|
||||||
"narHash": "sha256-NCWZQg4DbYVFWg+MOFrxWRaVsLA7yvRWAf6o0xPR1hI=",
|
"narHash": "sha256-nU6AezEX4EuahTO1YopzueAXfjFfmCHylYEFCagduHU=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "2d55b4c1531187926c2a423f6940b3b1301399b5",
|
"rev": "825479c345a7f806485b7f00dbe3abb50641b083",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"ref": "nixpkgs-unstable",
|
"ref": "nixos-unstable",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs_2": {
|
"nixpkgs_2": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1738797219,
|
"lastModified": 1737717945,
|
||||||
"narHash": "sha256-KRwX9Z1XavpgeSDVM/THdFd6uH8rNm/6R+7kIbGa+2s=",
|
"narHash": "sha256-ET91TMkab3PmOZnqiJQYOtSGvSTvGeHoegAv4zcTefM=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "1da52dd49a127ad74486b135898da2cef8c62665",
|
"rev": "ecd26a469ac56357fd333946a99086e992452b6a",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -571,11 +570,11 @@
|
||||||
"treefmt-nix": "treefmt-nix"
|
"treefmt-nix": "treefmt-nix"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1739353096,
|
"lastModified": 1737832569,
|
||||||
"narHash": "sha256-w/T2uYCoq4k6K46GX2CMGWsKfMvcqnxC41LIgnvGifE=",
|
"narHash": "sha256-VkK73VRVgvSQOPw9qx9HzvbulvUM9Ae4nNd3xNP+pkI=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "nixvim",
|
"repo": "nixvim",
|
||||||
"rev": "78b6f8e1e5b37a7789216e17a96ebc117660f0e7",
|
"rev": "d7df58321110d3b0e12a829bbd110db31ccd34b1",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -593,11 +592,11 @@
|
||||||
"treefmt-nix": "treefmt-nix_2"
|
"treefmt-nix": "treefmt-nix_2"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1739464528,
|
"lastModified": 1737897819,
|
||||||
"narHash": "sha256-zSEfwiIsrqMSi6wocIQ0h5y23gbyLABuMyXdDzfzUZI=",
|
"narHash": "sha256-oVr0st3IHSgIPLDCoDtbI/TiLcMqs85KGBfLqFV3xQU=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "NUR",
|
"repo": "NUR",
|
||||||
"rev": "1643a8a0acf93d6e8fd79b01bb2e53d84fae48c8",
|
"rev": "ee6e560d3cbfdbb2d92d1d95c83aaa434ed42dc5",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -616,11 +615,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1738508923,
|
"lastModified": 1737372689,
|
||||||
"narHash": "sha256-4DaDrQDAIxlWhTjH6h/+xfG05jt3qDZrZE/7zDLQaS4=",
|
"narHash": "sha256-nH3zK2ki0fd5o5qvbGHxukE4qnOLJa1uCzoDObG5vrE=",
|
||||||
"owner": "NuschtOS",
|
"owner": "NuschtOS",
|
||||||
"repo": "search",
|
"repo": "search",
|
||||||
"rev": "86e2038290859006e05ca7201425ea5b5de4aecb",
|
"rev": "570cc17bbc25650eb7d69e4fcda8cfd2f1656922",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -656,16 +655,15 @@
|
||||||
"systems": "systems_3",
|
"systems": "systems_3",
|
||||||
"tinted-foot": "tinted-foot",
|
"tinted-foot": "tinted-foot",
|
||||||
"tinted-kitty": "tinted-kitty",
|
"tinted-kitty": "tinted-kitty",
|
||||||
"tinted-schemes": "tinted-schemes",
|
|
||||||
"tinted-tmux": "tinted-tmux",
|
"tinted-tmux": "tinted-tmux",
|
||||||
"tinted-zed": "tinted-zed"
|
"tinted-zed": "tinted-zed"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1739375014,
|
"lastModified": 1737861120,
|
||||||
"narHash": "sha256-0fNbvZ1Dod4rDIfwGnC7CzJ3wRFSF1v5AvNCmNkVgXo=",
|
"narHash": "sha256-V/GWU1BQwbxyZif9RBvwn10S1KX+86uPkkI41KQEcQQ=",
|
||||||
"owner": "danth",
|
"owner": "danth",
|
||||||
"repo": "stylix",
|
"repo": "stylix",
|
||||||
"rev": "e86de61bb8f5f2b6459d0be3e3291ad16db4b777",
|
"rev": "d6951d0b2ffe74e4779a180e9b6a0e17627756e1",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -753,22 +751,6 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"tinted-schemes": {
|
|
||||||
"flake": false,
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1737565458,
|
|
||||||
"narHash": "sha256-y+9cvOA6BLKT0WfebDsyUpUa/YxKow9hTjBp6HpQv68=",
|
|
||||||
"owner": "tinted-theming",
|
|
||||||
"repo": "schemes",
|
|
||||||
"rev": "ae31625ba47aeaa4bf6a98cf11a8d4886f9463d9",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "tinted-theming",
|
|
||||||
"repo": "schemes",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"tinted-tmux": {
|
"tinted-tmux": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
|
@ -809,11 +791,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1738680491,
|
"lastModified": 1737483750,
|
||||||
"narHash": "sha256-8X7tR3kFGkE7WEF5EXVkt4apgaN85oHZdoTGutCFs6I=",
|
"narHash": "sha256-5An1wq5U8sNycOBBg3nsDDgpwBmR9liOpDGlhliA6Xo=",
|
||||||
"owner": "numtide",
|
"owner": "numtide",
|
||||||
"repo": "treefmt-nix",
|
"repo": "treefmt-nix",
|
||||||
"rev": "64dbb922d51a42c0ced6a7668ca008dded61c483",
|
"rev": "f2cc121df15418d028a59c9737d38e3a90fbaf8f",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
11
flake.nix
11
flake.nix
|
@ -2,7 +2,7 @@
|
||||||
description = "NixOS system";
|
description = "NixOS system";
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||||
home-manager = {
|
home-manager = {
|
||||||
url = "github:nix-community/home-manager";
|
url = "github:nix-community/home-manager";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
@ -32,7 +32,7 @@
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
mkConfig =
|
makeConfig =
|
||||||
machineConfig: userConfig:
|
machineConfig: userConfig:
|
||||||
(nixpkgs.lib.nixosSystem {
|
(nixpkgs.lib.nixosSystem {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
|
@ -46,6 +46,11 @@
|
||||||
nixvim.homeManagerModules.nixvim
|
nixvim.homeManagerModules.nixvim
|
||||||
nur.modules.homeManager.default
|
nur.modules.homeManager.default
|
||||||
{
|
{
|
||||||
|
# TODO: Remove insecure package exception
|
||||||
|
nixpkgs.config.permittedInsecurePackages = [
|
||||||
|
"freeimage-unstable-2021-11-01" # For emulation station
|
||||||
|
"electron-31.7.7" # For feishin
|
||||||
|
];
|
||||||
nixpkgs.overlays = [
|
nixpkgs.overlays = [
|
||||||
nix-matlab.overlay
|
nix-matlab.overlay
|
||||||
];
|
];
|
||||||
|
@ -57,7 +62,7 @@
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
"20212060" = mkConfig ./machines/laptop.nix {
|
"20212060" = makeConfig ./machines/laptop.nix {
|
||||||
jan = {
|
jan = {
|
||||||
sudo = true;
|
sudo = true;
|
||||||
configuration = ./users/jan.nix;
|
configuration = ./users/jan.nix;
|
||||||
|
|
|
@ -102,7 +102,7 @@ in
|
||||||
services.udisks2.enable = true;
|
services.udisks2.enable = true;
|
||||||
|
|
||||||
console.packages = [
|
console.packages = [
|
||||||
pkgs.dina-psfu
|
pkgs.dina-psf
|
||||||
];
|
];
|
||||||
console.font = "dina";
|
console.font = "dina";
|
||||||
console.earlySetup = true;
|
console.earlySetup = true;
|
||||||
|
|
|
@ -23,7 +23,6 @@ in
|
||||||
clear_password = true;
|
clear_password = true;
|
||||||
load = true;
|
load = true;
|
||||||
save = true;
|
save = true;
|
||||||
xinitrc = "null";
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -31,8 +31,11 @@ let
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
# Import systemwide configuration
|
# Import home manager
|
||||||
./systemwide.nix
|
# <home-manager/nixos>
|
||||||
|
|
||||||
|
# Import system wide configuration required for user modules
|
||||||
|
../../user-modules/systemwide/default.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
options = {
|
options = {
|
||||||
|
|
|
@ -1,33 +0,0 @@
|
||||||
{
|
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
|
|
||||||
with lib;
|
|
||||||
let
|
|
||||||
moduleFiles = [
|
|
||||||
../../user-modules/desktop/systemwide.nix
|
|
||||||
../../user-modules/development/systemwide.nix
|
|
||||||
../../user-modules/gaming/systemwide.nix
|
|
||||||
../../user-modules/keyring/systemwide.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
moduleConfig = lists.foldr (file: acc: recursiveUpdate acc (import file)) { } moduleFiles;
|
|
||||||
|
|
||||||
moduleNames = attrNames moduleConfig;
|
|
||||||
|
|
||||||
mkModule =
|
|
||||||
name: moduleConfig:
|
|
||||||
{ pkgs, ... }:
|
|
||||||
{
|
|
||||||
config = mkIf (any (user: user.modules.${name}.enable) (attrValues config.home-manager.users)) (
|
|
||||||
if (isAttrs moduleConfig) then moduleConfig else (moduleConfig { inherit config pkgs; })
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
imports = map (name: mkModule name moduleConfig."${name}") moduleNames;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
imports = imports;
|
|
||||||
}
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
let
|
let
|
||||||
overlay = final: prev: {
|
overlay = final: prev: {
|
||||||
dina-psfu = prev.callPackage ./fonts/dina-psfu.nix { };
|
dina-psf = prev.callPackage ./fonts/dina-psf.nix { };
|
||||||
ttf2psf = prev.callPackage ./fonts/ttf2psf.nix { };
|
ttf2psf = prev.callPackage ./fonts/ttf2psf.nix { };
|
||||||
wqy-zenhei = prev.callPackage ./fonts/wqy-zenhei.nix { };
|
wqy-zenhei = prev.callPackage ./fonts/wqy-zenhei.nix { };
|
||||||
wqy-microhei = prev.callPackage ./fonts/wqy-microhei.nix { };
|
wqy-microhei = prev.callPackage ./fonts/wqy-microhei.nix { };
|
||||||
|
|
|
@ -22,7 +22,6 @@
|
||||||
./obsidian/default.nix
|
./obsidian/default.nix
|
||||||
./rofi/default.nix
|
./rofi/default.nix
|
||||||
./rofi/rofi-rbw.nix
|
./rofi/rofi-rbw.nix
|
||||||
./scripts/default.nix
|
|
||||||
./shell/default.nix
|
./shell/default.nix
|
||||||
./shell/bash.nix
|
./shell/bash.nix
|
||||||
./shell/fish.nix
|
./shell/fish.nix
|
||||||
|
|
|
@ -0,0 +1,23 @@
|
||||||
|
{
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
let
|
||||||
|
cfg = config.modules.glpaper;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.modules.glpaper = {
|
||||||
|
enable = mkEnableOption "glpaper";
|
||||||
|
shader = mkOption {
|
||||||
|
type = types.path;
|
||||||
|
default = ./shaders/waves.glsl;
|
||||||
|
description = "Shader to use for the background";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable { home.packages = [ pkgs.glpaper ]; };
|
||||||
|
}
|
|
@ -0,0 +1,169 @@
|
||||||
|
#define zoom 0.900
|
||||||
|
#define tile 0.850
|
||||||
|
#define speed2 0.0
|
||||||
|
|
||||||
|
#ifdef GL_ES
|
||||||
|
precision highp float;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
uniform float time;
|
||||||
|
uniform vec2 resolution;
|
||||||
|
|
||||||
|
#define time3 (time * 0.01)
|
||||||
|
|
||||||
|
#define mouse vec2(sin(time3)/48., cos(time3)/48.)
|
||||||
|
#define iterations 14
|
||||||
|
#define formuparam2 0.79
|
||||||
|
|
||||||
|
#define volsteps 5
|
||||||
|
#define stepsize 0.390
|
||||||
|
|
||||||
|
#define brightness 0.003
|
||||||
|
#define darkmatter 0.400
|
||||||
|
#define distfading 0.560
|
||||||
|
#define saturation 0.800
|
||||||
|
|
||||||
|
#define transverseSpeed zoom*2.0
|
||||||
|
#define cloud 0.11
|
||||||
|
|
||||||
|
float triangle(float x, float a) {
|
||||||
|
float output2 = 2.0 * abs(2.0 * ((x/a) - floor((x/a) + 0.5))) - 1.0;
|
||||||
|
return output2;
|
||||||
|
}
|
||||||
|
|
||||||
|
float field(in vec3 p) {
|
||||||
|
float strength = 7. + .03 * log(1.e-6 + fract(sin(time3) * 4373.11));
|
||||||
|
float accum = 0.;
|
||||||
|
float prev = 0.;
|
||||||
|
float tw = 0.;
|
||||||
|
|
||||||
|
// Replace or uncomment the for-loop as intended in your logic
|
||||||
|
float mag = dot(p, p);
|
||||||
|
p = abs(p) / mag + vec3(-.5, -.8 + 0.1*sin(time3*0.7 + 2.0), -1.1+0.3*cos(time3*0.3));
|
||||||
|
float w = exp(-float(0) / 7.);
|
||||||
|
accum += w * exp(-strength * pow(abs(mag - prev), 2.3));
|
||||||
|
tw += w;
|
||||||
|
prev = mag;
|
||||||
|
|
||||||
|
return max(0., 5. * accum / tw - .7);
|
||||||
|
}
|
||||||
|
|
||||||
|
void main() {
|
||||||
|
|
||||||
|
vec2 uv2 = 2. * gl_FragCoord.xy / vec2(512) - 1.;
|
||||||
|
vec2 uvs = uv2 * vec2(512) / 512.;
|
||||||
|
|
||||||
|
float time2 = time3;
|
||||||
|
float speed = speed2;
|
||||||
|
speed = .01 * cos(time2*0.02 + 3.1415926/4.0);
|
||||||
|
|
||||||
|
float formuparam = formuparam2;
|
||||||
|
|
||||||
|
|
||||||
|
vec2 uv = uvs;
|
||||||
|
|
||||||
|
float a_xz = 0.9;
|
||||||
|
float a_yz = -.6;
|
||||||
|
float a_xy = 0.9 + time3*0.08;
|
||||||
|
|
||||||
|
mat2 rot_xz = mat2(cos(a_xz),sin(a_xz),-sin(a_xz),cos(a_xz));
|
||||||
|
mat2 rot_yz = mat2(cos(a_yz),sin(a_yz),-sin(a_yz),cos(a_yz));
|
||||||
|
mat2 rot_xy = mat2(cos(a_xy),sin(a_xy),-sin(a_xy),cos(a_xy));
|
||||||
|
|
||||||
|
|
||||||
|
float v2 =1.0;
|
||||||
|
vec3 dir=vec3(uv*zoom,1.);
|
||||||
|
vec3 from=vec3(0.0, 0.0,0.0);
|
||||||
|
from.x -= 5.0*(mouse.x-0.5);
|
||||||
|
from.y -= 5.0*(mouse.y-0.5);
|
||||||
|
|
||||||
|
|
||||||
|
vec3 forward = vec3(0.,0.,1.);
|
||||||
|
from.x += transverseSpeed*(1.0)*cos(0.01*time3) + 0.001*time3;
|
||||||
|
from.y += transverseSpeed*(1.0)*sin(0.01*time3) +0.001*time3;
|
||||||
|
from.z += 0.003*time3;
|
||||||
|
|
||||||
|
dir.xy*=rot_xy;
|
||||||
|
forward.xy *= rot_xy;
|
||||||
|
dir.xz*=rot_xz;
|
||||||
|
forward.xz *= rot_xz;
|
||||||
|
dir.yz*= rot_yz;
|
||||||
|
forward.yz *= rot_yz;
|
||||||
|
|
||||||
|
from.xy*=-rot_xy;
|
||||||
|
from.xz*=rot_xz;
|
||||||
|
from.yz*= rot_yz;
|
||||||
|
|
||||||
|
float zooom = (time2-3311.)*speed;
|
||||||
|
from += forward* zooom;
|
||||||
|
float sampleShift = mod( zooom, stepsize );
|
||||||
|
|
||||||
|
float zoffset = -sampleShift;
|
||||||
|
sampleShift /= stepsize;
|
||||||
|
|
||||||
|
|
||||||
|
float s=0.24;
|
||||||
|
float s3 = s + stepsize/2.0;
|
||||||
|
vec3 v=vec3(0.);
|
||||||
|
float t3 = 0.0;
|
||||||
|
|
||||||
|
vec3 backCol2 = vec3(0.);
|
||||||
|
for (int r=0; r<volsteps; r++) {
|
||||||
|
vec3 p2=from+(s+zoffset)*dir;
|
||||||
|
vec3 p3=from+(s3+zoffset)*dir;
|
||||||
|
|
||||||
|
p2 = abs(vec3(tile)-mod(p2,vec3(tile*2.)));
|
||||||
|
p3 = abs(vec3(tile)-mod(p3,vec3(tile*2.)));
|
||||||
|
#ifdef cloud
|
||||||
|
t3 = field(p3);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
float pa,a=pa=0.;
|
||||||
|
for (int i=0; i<iterations; i++) {
|
||||||
|
p2=abs(p2)/dot(p2,p2)-formuparam;
|
||||||
|
|
||||||
|
float D = abs(length(p2)-pa);
|
||||||
|
a += i > 7 ? min( 12., D) : D;
|
||||||
|
pa=length(p2);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
a*=a*a;
|
||||||
|
|
||||||
|
float s1 = s+zoffset;
|
||||||
|
|
||||||
|
float fade = pow(distfading,max(0.,float(r)-sampleShift));
|
||||||
|
|
||||||
|
v+=fade;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if( r == 0 )
|
||||||
|
fade *= (1. - (sampleShift));
|
||||||
|
|
||||||
|
if( r == volsteps-1 )
|
||||||
|
fade *= sampleShift;
|
||||||
|
v+=vec3(s1,s1*s1,s1*s1*s1*s1)*a*brightness*fade;
|
||||||
|
|
||||||
|
backCol2 += mix(.11, 1., v2) * vec3(1.8 * t3 * t3 * t3, 1.4 * t3 * t3, t3) * fade;
|
||||||
|
|
||||||
|
|
||||||
|
s+=stepsize;
|
||||||
|
s3 += stepsize;
|
||||||
|
}
|
||||||
|
|
||||||
|
v=mix(vec3(length(v)),v,saturation);
|
||||||
|
|
||||||
|
vec4 forCol2 = vec4(v*.01,1.);
|
||||||
|
#ifdef cloud
|
||||||
|
backCol2 *= cloud;
|
||||||
|
#endif
|
||||||
|
backCol2.b *= 1.8;
|
||||||
|
backCol2.r *= 0.05;
|
||||||
|
|
||||||
|
backCol2.b = 0.5*mix(backCol2.g, backCol2.b, 0.8);
|
||||||
|
backCol2.g = 0.0;
|
||||||
|
backCol2.bg = mix(backCol2.gb, backCol2.bg, 0.5*(cos(time3*0.01) + 1.0));
|
||||||
|
gl_FragColor = forCol2 + vec4(backCol2, 1.0);
|
||||||
|
}
|
|
@ -0,0 +1,118 @@
|
||||||
|
#ifdef GL_ES
|
||||||
|
precision mediump float;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// glslsandbox uniforms
|
||||||
|
uniform float time;
|
||||||
|
uniform vec2 resolution;
|
||||||
|
|
||||||
|
// shadertoy emulation
|
||||||
|
#define iTime time * 0.01 + 10.0
|
||||||
|
#define iResolution resolution
|
||||||
|
#define fragCoord gl_FragCoord
|
||||||
|
#define fragColor gl_FragColor
|
||||||
|
|
||||||
|
float colormap_red(float x) {
|
||||||
|
if (x < 0.0) {
|
||||||
|
return 54.0 / 255.0;
|
||||||
|
} else if (x < 20049.0 / 82979.0) {
|
||||||
|
return (829.79 * x + 54.51) / 255.0;
|
||||||
|
} else {
|
||||||
|
return 1.0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
float colormap_green(float x) {
|
||||||
|
if (x < 20049.0 / 82979.0) {
|
||||||
|
return 0.0;
|
||||||
|
} else if (x < 327013.0 / 810990.0) {
|
||||||
|
return (8546482679670.0 / 10875673217.0 * x - 2064961390770.0 / 10875673217.0) / 255.0;
|
||||||
|
} else if (x <= 1.0) {
|
||||||
|
return (103806720.0 / 483977.0 * x + 19607415.0 / 483977.0) / 255.0;
|
||||||
|
} else {
|
||||||
|
return 1.0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
float colormap_blue(float x) {
|
||||||
|
if (x < 0.0) {
|
||||||
|
return 54.0 / 255.0;
|
||||||
|
} else if (x < 7249.0 / 82979.0) {
|
||||||
|
return (829.79 * x + 54.51) / 255.0;
|
||||||
|
} else if (x < 20049.0 / 82979.0) {
|
||||||
|
return 127.0 / 255.0;
|
||||||
|
} else if (x < 327013.0 / 810990.0) {
|
||||||
|
return (792.02249341361393720147485376583 * x - 64.364790735602331034989206222672) / 255.0;
|
||||||
|
} else {
|
||||||
|
return 1.0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
vec4 colormap(float x) {
|
||||||
|
return vec4(colormap_red(x), colormap_green(x), colormap_blue(x), 1.0);
|
||||||
|
}
|
||||||
|
|
||||||
|
// https://iquilezles.org/articles/warp
|
||||||
|
/*float noise( in vec2 x )
|
||||||
|
{
|
||||||
|
vec2 p = floor(x);
|
||||||
|
vec2 f = fract(x);
|
||||||
|
f = f*f*(3.0-2.0*f);
|
||||||
|
float a = textureLod(iChannel0,(p+vec2(0.5,0.5))/256.0,0.0).x;
|
||||||
|
float b = textureLod(iChannel0,(p+vec2(1.5,0.5))/256.0,0.0).x;
|
||||||
|
float c = textureLod(iChannel0,(p+vec2(0.5,1.5))/256.0,0.0).x;
|
||||||
|
float d = textureLod(iChannel0,(p+vec2(1.5,1.5))/256.0,0.0).x;
|
||||||
|
return mix(mix( a, b,f.x), mix( c, d,f.x),f.y);
|
||||||
|
}*/
|
||||||
|
|
||||||
|
|
||||||
|
float rand(vec2 n) {
|
||||||
|
return fract(sin(dot(n, vec2(12.9898, 4.1414))) * 43758.5453);
|
||||||
|
}
|
||||||
|
|
||||||
|
float noise(vec2 p){
|
||||||
|
vec2 ip = floor(p);
|
||||||
|
vec2 u = fract(p);
|
||||||
|
u = u*u*(3.0-2.0*u);
|
||||||
|
|
||||||
|
float res = mix(
|
||||||
|
mix(rand(ip),rand(ip+vec2(1.0,0.0)),u.x),
|
||||||
|
mix(rand(ip+vec2(0.0,1.0)),rand(ip+vec2(1.0,1.0)),u.x),u.y);
|
||||||
|
return res*res;
|
||||||
|
}
|
||||||
|
|
||||||
|
const mat2 mtx = mat2( 0.80, 0.60, -0.60, 0.80 );
|
||||||
|
|
||||||
|
float fbm( vec2 p )
|
||||||
|
{
|
||||||
|
float f = 0.0;
|
||||||
|
|
||||||
|
f += 0.500000*noise( p + iTime ); p = mtx*p*2.02;
|
||||||
|
f += 0.031250*noise( p ); p = mtx*p*2.01;
|
||||||
|
f += 0.250000*noise( p ); p = mtx*p*2.03;
|
||||||
|
f += 0.125000*noise( p ); p = mtx*p*2.01;
|
||||||
|
f += 0.062500*noise( p ); p = mtx*p*2.04;
|
||||||
|
f += 0.015625*noise( p + sin(iTime) );
|
||||||
|
|
||||||
|
return f/0.96875;
|
||||||
|
}
|
||||||
|
|
||||||
|
float pattern( in vec2 p )
|
||||||
|
{
|
||||||
|
return fbm( p + fbm( p + fbm( p ) ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
vec2 uv = fragCoord.xy/iResolution.x;
|
||||||
|
float shade = pattern(uv);
|
||||||
|
fragColor = vec4(colormap(shade).rgb, shade);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** SHADERDATA
|
||||||
|
{
|
||||||
|
"title": "Base warp fBM",
|
||||||
|
"description": "Noise but Pink",
|
||||||
|
"model": "person"
|
||||||
|
}
|
||||||
|
*/
|
|
@ -0,0 +1,13 @@
|
||||||
|
#ifdef GL_ES
|
||||||
|
precision mediump float;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// glslsandbox uniforms
|
||||||
|
uniform float time;
|
||||||
|
uniform vec2 resolution;
|
||||||
|
|
||||||
|
// shadertoy emulation
|
||||||
|
#define iTime time
|
||||||
|
#define iResolution resolution
|
||||||
|
#define fragCoord gl_FragCoord
|
||||||
|
#define fragColor gl_FragColor
|
|
@ -0,0 +1,208 @@
|
||||||
|
#ifdef GL_ES
|
||||||
|
precision highp float;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
uniform float time;
|
||||||
|
uniform vec2 resolution;
|
||||||
|
|
||||||
|
#define CHAR_SIZE vec2(6, 7)
|
||||||
|
#define CHAR_SPACING vec2(6, 9)
|
||||||
|
|
||||||
|
vec2 start_pos = vec2(0);
|
||||||
|
vec2 print_pos = vec2(0);
|
||||||
|
vec2 print_pos_pre_move = vec2(0);
|
||||||
|
vec3 text_color = vec3(1);
|
||||||
|
|
||||||
|
/*
|
||||||
|
Top left pixel is the most significant bit.
|
||||||
|
Bottom right pixel is the least significant bit.
|
||||||
|
|
||||||
|
███ |
|
||||||
|
█ █ |
|
||||||
|
█ █ |
|
||||||
|
█ █ |
|
||||||
|
█████ |
|
||||||
|
█ █ |
|
||||||
|
█ █ |
|
||||||
|
|
||||||
|
000000
|
||||||
|
100010
|
||||||
|
100010
|
||||||
|
100010
|
||||||
|
111110
|
||||||
|
100010
|
||||||
|
100010
|
||||||
|
|
||||||
|
011100 (upper 21 bits)
|
||||||
|
100010 -> 011100 100010 100010 100 -> 935188
|
||||||
|
100010
|
||||||
|
100
|
||||||
|
010 (lower 21 bits)
|
||||||
|
111110 -> 010 111110 100010 100010 -> 780450
|
||||||
|
100010
|
||||||
|
100010
|
||||||
|
|
||||||
|
vec2(935188.0,780450.0)
|
||||||
|
*/
|
||||||
|
|
||||||
|
//Text coloring
|
||||||
|
#define HEX(i) text_color = mod(vec3(i / 65536,i / 256,i),vec3(256.0))/255.0;
|
||||||
|
#define RGB(r,g,b) text_color = vec3(r,g,b);
|
||||||
|
|
||||||
|
#define STRWIDTH(c) (c * CHAR_SPACING.x)
|
||||||
|
#define STRHEIGHT(c) (c * CHAR_SPACING.y)
|
||||||
|
#define BEGIN_TEXT(x,y) print_pos = floor(vec2(x,y)); start_pos = floor(vec2(x,y));
|
||||||
|
|
||||||
|
//Automatically generated from the sprite sheet here: http://uzebox.org/wiki/index.php?title=File:Font6x8.png
|
||||||
|
#define _ col+=char(vec2(0.0,0.0),uv);
|
||||||
|
#define _spc col+=char(vec2(0.0,0.0),uv)*text_color;
|
||||||
|
#define _exc col+=char(vec2(276705.0,32776.0),uv)*text_color;
|
||||||
|
#define _quo col+=char(vec2(1797408.0,0.0),uv)*text_color;
|
||||||
|
#define _hsh col+=char(vec2(10738.0,1134484.0),uv)*text_color;
|
||||||
|
#define _dol col+=char(vec2(538883.0,19976.0),uv)*text_color;
|
||||||
|
#define _pct col+=char(vec2(1664033.0,68006.0),uv)*text_color;
|
||||||
|
#define _amp col+=char(vec2(545090.0,174362.0),uv)*text_color;
|
||||||
|
#define _apo col+=char(vec2(798848.0,0.0),uv)*text_color;
|
||||||
|
#define _lbr col+=char(vec2(270466.0,66568.0),uv)*text_color;
|
||||||
|
#define _rbr col+=char(vec2(528449.0,33296.0),uv)*text_color;
|
||||||
|
#define _ast col+=char(vec2(10471.0,1688832.0),uv)*text_color;
|
||||||
|
#define _crs col+=char(vec2(4167.0,1606144.0),uv)*text_color;
|
||||||
|
#define _per col+=char(vec2(0.0,1560.0),uv)*text_color;
|
||||||
|
#define _dsh col+=char(vec2(7.0,1572864.0),uv)*text_color;
|
||||||
|
#define _com col+=char(vec2(0.0,1544.0),uv)*text_color;
|
||||||
|
#define _lsl col+=char(vec2(1057.0,67584.0),uv)*text_color;
|
||||||
|
#define _0 col+=char(vec2(935221.0,731292.0),uv)*text_color;
|
||||||
|
#define _1 col+=char(vec2(274497.0,33308.0),uv)*text_color;
|
||||||
|
#define _2 col+=char(vec2(934929.0,1116222.0),uv)*text_color;
|
||||||
|
#define _3 col+=char(vec2(934931.0,1058972.0),uv)*text_color;
|
||||||
|
#define _4 col+=char(vec2(137380.0,1302788.0),uv)*text_color;
|
||||||
|
#define _5 col+=char(vec2(2048263.0,1058972.0),uv)*text_color;
|
||||||
|
#define _6 col+=char(vec2(401671.0,1190044.0),uv)*text_color;
|
||||||
|
#define _7 col+=char(vec2(2032673.0,66576.0),uv)*text_color;
|
||||||
|
#define _8 col+=char(vec2(935187.0,1190044.0),uv)*text_color;
|
||||||
|
#define _9 col+=char(vec2(935187.0,1581336.0),uv)*text_color;
|
||||||
|
#define _col col+=char(vec2(195.0,1560.0),uv)*text_color;
|
||||||
|
#define _scl col+=char(vec2(195.0,1544.0),uv)*text_color;
|
||||||
|
#define _les col+=char(vec2(135300.0,66052.0),uv)*text_color;
|
||||||
|
#define _equ col+=char(vec2(496.0,3968.0),uv)*text_color;
|
||||||
|
#define _grt col+=char(vec2(528416.0,541200.0),uv)*text_color;
|
||||||
|
#define _que col+=char(vec2(934929.0,1081352.0),uv)*text_color;
|
||||||
|
#define _ats col+=char(vec2(935285.0,714780.0),uv)*text_color;
|
||||||
|
#define _A col+=char(vec2(935188.0,780450.0),uv)*text_color;
|
||||||
|
#define _B col+=char(vec2(1983767.0,1190076.0),uv)*text_color;
|
||||||
|
#define _C col+=char(vec2(935172.0,133276.0),uv)*text_color;
|
||||||
|
#define _D col+=char(vec2(1983764.0,665788.0),uv)*text_color;
|
||||||
|
#define _E col+=char(vec2(2048263.0,1181758.0),uv)*text_color;
|
||||||
|
#define _F col+=char(vec2(2048263.0,1181728.0),uv)*text_color;
|
||||||
|
#define _G col+=char(vec2(935173.0,1714334.0),uv)*text_color;
|
||||||
|
#define _H col+=char(vec2(1131799.0,1714338.0),uv)*text_color;
|
||||||
|
#define _I col+=char(vec2(921665.0,33308.0),uv)*text_color;
|
||||||
|
#define _J col+=char(vec2(66576.0,665756.0),uv)*text_color;
|
||||||
|
#define _K col+=char(vec2(1132870.0,166178.0),uv)*text_color;
|
||||||
|
#define _L col+=char(vec2(1065220.0,133182.0),uv)*text_color;
|
||||||
|
#define _M col+=char(vec2(1142100.0,665762.0),uv)*text_color;
|
||||||
|
#define _N col+=char(vec2(1140052.0,1714338.0),uv)*text_color;
|
||||||
|
#define _O col+=char(vec2(935188.0,665756.0),uv)*text_color;
|
||||||
|
#define _P col+=char(vec2(1983767.0,1181728.0),uv)*text_color;
|
||||||
|
#define _Q col+=char(vec2(935188.0,698650.0),uv)*text_color;
|
||||||
|
#define _R col+=char(vec2(1983767.0,1198242.0),uv)*text_color;
|
||||||
|
#define _S col+=char(vec2(935171.0,1058972.0),uv)*text_color;
|
||||||
|
#define _T col+=char(vec2(2035777.0,33288.0),uv)*text_color;
|
||||||
|
#define _U col+=char(vec2(1131796.0,665756.0),uv)*text_color;
|
||||||
|
#define _V col+=char(vec2(1131796.0,664840.0),uv)*text_color;
|
||||||
|
#define _W col+=char(vec2(1131861.0,699028.0),uv)*text_color;
|
||||||
|
#define _X col+=char(vec2(1131681.0,84130.0),uv)*text_color;
|
||||||
|
#define _Y col+=char(vec2(1131794.0,1081864.0),uv)*text_color;
|
||||||
|
#define _Z col+=char(vec2(1968194.0,133180.0),uv)*text_color;
|
||||||
|
#define _lsb col+=char(vec2(925826.0,66588.0),uv)*text_color;
|
||||||
|
#define _rsl col+=char(vec2(16513.0,16512.0),uv)*text_color;
|
||||||
|
#define _rsb col+=char(vec2(919584.0,1065244.0),uv)*text_color;
|
||||||
|
#define _pow col+=char(vec2(272656.0,0.0),uv)*text_color;
|
||||||
|
#define _usc col+=char(vec2(0.0,62.0),uv)*text_color;
|
||||||
|
#define _a col+=char(vec2(224.0,649374.0),uv)*text_color;
|
||||||
|
#define _b col+=char(vec2(1065444.0,665788.0),uv)*text_color;
|
||||||
|
#define _c col+=char(vec2(228.0,657564.0),uv)*text_color;
|
||||||
|
#define _d col+=char(vec2(66804.0,665758.0),uv)*text_color;
|
||||||
|
#define _e col+=char(vec2(228.0,772124.0),uv)*text_color;
|
||||||
|
#define _f col+=char(vec2(401543.0,1115152.0),uv)*text_color;
|
||||||
|
#define _g col+=char(vec2(244.0,665474.0),uv)*text_color;
|
||||||
|
#define _h col+=char(vec2(1065444.0,665762.0),uv)*text_color;
|
||||||
|
#define _i col+=char(vec2(262209.0,33292.0),uv)*text_color;
|
||||||
|
#define _j col+=char(vec2(131168.0,1066252.0),uv)*text_color;
|
||||||
|
#define _k col+=char(vec2(1065253.0,199204.0),uv)*text_color;
|
||||||
|
#define _l col+=char(vec2(266305.0,33292.0),uv)*text_color;
|
||||||
|
#define _m col+=char(vec2(421.0,698530.0),uv)*text_color;
|
||||||
|
#define _n col+=char(vec2(452.0,1198372.0),uv)*text_color;
|
||||||
|
#define _o col+=char(vec2(228.0,665756.0),uv)*text_color;
|
||||||
|
#define _p col+=char(vec2(484.0,667424.0),uv)*text_color;
|
||||||
|
#define _q col+=char(vec2(244.0,665474.0),uv)*text_color;
|
||||||
|
#define _r col+=char(vec2(354.0,590904.0),uv)*text_color;
|
||||||
|
#define _s col+=char(vec2(228.0,114844.0),uv)*text_color;
|
||||||
|
#define _t col+=char(vec2(8674.0,66824.0),uv)*text_color;
|
||||||
|
#define _u col+=char(vec2(292.0,1198868.0),uv)*text_color;
|
||||||
|
#define _v col+=char(vec2(276.0,664840.0),uv)*text_color;
|
||||||
|
#define _w col+=char(vec2(276.0,700308.0),uv)*text_color;
|
||||||
|
#define _x col+=char(vec2(292.0,1149220.0),uv)*text_color;
|
||||||
|
#define _y col+=char(vec2(292.0,1163824.0),uv)*text_color;
|
||||||
|
#define _z col+=char(vec2(480.0,1148988.0),uv)*text_color;
|
||||||
|
#define _lpa col+=char(vec2(401542.0,66572.0),uv)*text_color;
|
||||||
|
#define _bar col+=char(vec2(266304.0,33288.0),uv)*text_color;
|
||||||
|
#define _rpa col+=char(vec2(788512.0,1589528.0),uv)*text_color;
|
||||||
|
#define _tid col+=char(vec2(675840.0,0.0),uv)*text_color;
|
||||||
|
#define _lar col+=char(vec2(8387.0,1147904.0),uv)*text_color;
|
||||||
|
#define _nl print_pos = start_pos - vec2(0,CHAR_SPACING.y);
|
||||||
|
|
||||||
|
//Extracts bit b from the given number.
|
||||||
|
float extract_bit(float n, float b)
|
||||||
|
{
|
||||||
|
b = clamp(b,-1.0,22.0);
|
||||||
|
return floor(mod(floor(n / pow(2.0,floor(b))),2.0));
|
||||||
|
}
|
||||||
|
|
||||||
|
//Returns the pixel at uv in the given bit-packed sprite.
|
||||||
|
float sprite(vec2 spr, vec2 size, vec2 uv)
|
||||||
|
{
|
||||||
|
uv = floor(uv);
|
||||||
|
float bit = (size.x-uv.x-1.0) + uv.y * size.x;
|
||||||
|
bool bounds = all(greaterThanEqual(uv,vec2(0)))&& all(lessThan(uv,size));
|
||||||
|
return bounds ? extract_bit(spr.x, bit - 21.0) + extract_bit(spr.y, bit) : 0.0;
|
||||||
|
}
|
||||||
|
|
||||||
|
//Prints a character and moves the print position forward by 1 character width.
|
||||||
|
vec3 char(vec2 ch, vec2 uv)
|
||||||
|
{
|
||||||
|
float px = sprite(ch, CHAR_SIZE, uv - print_pos);
|
||||||
|
print_pos.x += CHAR_SPACING.x;
|
||||||
|
print_pos.y += sin(4.*print_pos.x-time*10.);
|
||||||
|
return vec3(px);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
vec3 Text(vec2 uv)
|
||||||
|
{
|
||||||
|
vec3 col = vec3(0.0);
|
||||||
|
|
||||||
|
vec2 center_pos = vec2(resolution.x/2.0 - STRWIDTH(20.0)/2.0,resolution.y/2.0 - STRHEIGHT(1.0)/2.0);
|
||||||
|
|
||||||
|
BEGIN_TEXT(center_pos.x,center_pos.y)
|
||||||
|
HEX(0x00ffFF) _ _ _w _a _t _e _r _ _;
|
||||||
|
BEGIN_TEXT(resolution.x/2.0-STRWIDTH(11.0)/2.0,resolution.y/2.0)
|
||||||
|
print_pos += vec2(cos(time)*96.,sin(time)*96.);
|
||||||
|
|
||||||
|
// RGB(1,0,0) _M RGB(1,.5,0)_o RGB(1,1,0)_v RGB(0,1,0)_i RGB(0,.5,1)_n RGB(0.5,0,1)_g _ RGB(1,0,0)_T RGB(1,.5,0)_e RGB(1,1,0)_x RGB(0,1,0)_t
|
||||||
|
|
||||||
|
return col;
|
||||||
|
}
|
||||||
|
|
||||||
|
void main( void )
|
||||||
|
{
|
||||||
|
vec2 uv = gl_FragCoord.xy;
|
||||||
|
vec2 duv = floor(gl_FragCoord.xy);
|
||||||
|
|
||||||
|
vec3 pixel = Text(duv);
|
||||||
|
|
||||||
|
vec3 col = pixel*0.9+0.1;
|
||||||
|
col *= (1.-distance(mod(uv,vec2(1.0)),vec2(0.65)))*1.2;
|
||||||
|
|
||||||
|
gl_FragColor = vec4(vec3(col), 1.0);
|
||||||
|
}
|
|
@ -0,0 +1,108 @@
|
||||||
|
#ifdef GL_ES
|
||||||
|
precision mediump float;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
uniform float time;
|
||||||
|
uniform vec2 resolution;
|
||||||
|
|
||||||
|
#define iTime time * 0.05 + 50.0
|
||||||
|
#define iResolution resolution
|
||||||
|
#define fragCoord gl_FragCoord
|
||||||
|
#define fragColor gl_FragColor
|
||||||
|
|
||||||
|
float colormap_red(float x) {
|
||||||
|
if (x < 0.0) {
|
||||||
|
return 54.0 / 255.0;
|
||||||
|
} else if (x < 20049.0 / 82979.0) {
|
||||||
|
return (829.79 * x + 54.51) / 255.0;
|
||||||
|
} else {
|
||||||
|
return 1.0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
float colormap_green(float x) {
|
||||||
|
if (x < 20049.0 / 82979.0) {
|
||||||
|
return 0.0;
|
||||||
|
} else if (x < 327013.0 / 810990.0) {
|
||||||
|
return (8546482679670.0 / 10875673217.0 * x - 2064961390770.0 / 10875673217.0) / 255.0;
|
||||||
|
} else if (x <= 1.0) {
|
||||||
|
return (103806720.0 / 483977.0 * x + 19607415.0 / 483977.0) / 255.0;
|
||||||
|
} else {
|
||||||
|
return 1.0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
float colormap_blue(float x) {
|
||||||
|
if (x < 0.0) {
|
||||||
|
return 54.0 / 255.0;
|
||||||
|
} else if (x < 7249.0 / 82979.0) {
|
||||||
|
return (829.79 * x + 54.51) / 255.0;
|
||||||
|
} else if (x < 20049.0 / 82979.0) {
|
||||||
|
return 127.0 / 255.0;
|
||||||
|
} else if (x < 327013.0 / 810990.0) {
|
||||||
|
return (792.02249341361393720147485376583 * x - 64.364790735602331034989206222672) / 255.0;
|
||||||
|
} else {
|
||||||
|
return 1.0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
vec4 colormap(float x) {
|
||||||
|
return vec4(colormap_red(x), colormap_green(x), colormap_blue(x), 1.0);
|
||||||
|
}
|
||||||
|
|
||||||
|
// https://iquilezles.org/articles/warp
|
||||||
|
/*float noise( in vec2 x )
|
||||||
|
{
|
||||||
|
vec2 p = floor(x);
|
||||||
|
vec2 f = fract(x);
|
||||||
|
f = f*f*(3.0-2.0*f);
|
||||||
|
float a = textureLod(iChannel0,(p+vec2(0.5,0.5))/256.0,0.0).x;
|
||||||
|
float b = textureLod(iChannel0,(p+vec2(1.5,0.5))/256.0,0.0).x;
|
||||||
|
float c = textureLod(iChannel0,(p+vec2(0.5,1.5))/256.0,0.0).x;
|
||||||
|
float d = textureLod(iChannel0,(p+vec2(1.5,1.5))/256.0,0.0).x;
|
||||||
|
return mix(mix( a, b,f.x), mix( c, d,f.x),f.y);
|
||||||
|
}*/
|
||||||
|
|
||||||
|
|
||||||
|
float rand(vec2 n) {
|
||||||
|
return fract(sin(dot(n, vec2(12.9898, 4.1414))) * 43758.5453);
|
||||||
|
}
|
||||||
|
|
||||||
|
float noise(vec2 p){
|
||||||
|
vec2 ip = floor(p);
|
||||||
|
vec2 u = fract(p);
|
||||||
|
u = u*u*(3.0-2.0*u);
|
||||||
|
|
||||||
|
float res = mix(
|
||||||
|
mix(rand(ip),rand(ip+vec2(1.0,0.0)),u.x),
|
||||||
|
mix(rand(ip+vec2(0.0,1.0)),rand(ip+vec2(1.0,1.0)),u.x),u.y);
|
||||||
|
return res*res;
|
||||||
|
}
|
||||||
|
|
||||||
|
const mat2 mtx = mat2( 0.80, 0.60, -0.60, 0.80 );
|
||||||
|
|
||||||
|
float fbm( vec2 p )
|
||||||
|
{
|
||||||
|
float f = 0.0;
|
||||||
|
|
||||||
|
f += 0.500000*noise( p + iTime ); p = mtx*p*2.02;
|
||||||
|
f += 0.031250*noise( p ); p = mtx*p*2.01;
|
||||||
|
f += 0.250000*noise( p ); p = mtx*p*2.03;
|
||||||
|
f += 0.125000*noise( p ); p = mtx*p*2.01;
|
||||||
|
f += 0.062500*noise( p ); p = mtx*p*2.04;
|
||||||
|
f += 0.015625*noise( p + sin(iTime) );
|
||||||
|
|
||||||
|
return f/0.96875;
|
||||||
|
}
|
||||||
|
|
||||||
|
float pattern( in vec2 p )
|
||||||
|
{
|
||||||
|
return fbm( p + fbm( p + fbm( p ) ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
vec2 uv = fragCoord.xy/iResolution.x;
|
||||||
|
float shade = pattern(uv);
|
||||||
|
fragColor = vec4(colormap(shade).rgb, shade);
|
||||||
|
}
|
|
@ -1,95 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
|
|
||||||
with lib;
|
|
||||||
let
|
|
||||||
cfg = config.modules.desktop;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
imports = [
|
|
||||||
# Import desktop environment modules
|
|
||||||
./bar/waybar.nix
|
|
||||||
./lock-screen/waylock.nix
|
|
||||||
./window-manager/i3.nix
|
|
||||||
./window-manager/river.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
options.modules.desktop = {
|
|
||||||
wayland = mkEnableOption "wayland";
|
|
||||||
# TODO: Remove, not needed with session/display manager
|
|
||||||
initScript = mkOption {
|
|
||||||
type = types.lines;
|
|
||||||
default = "${pkgs.bash}/bin/bash";
|
|
||||||
description = "Bash script to execute after logging in.";
|
|
||||||
};
|
|
||||||
# TODO: Find a nicer way to do this as this is also executed on startup
|
|
||||||
reloadScript = mkOption {
|
|
||||||
type = types.lines;
|
|
||||||
default = "";
|
|
||||||
description = "Shell script to execute after reload/rebuild.";
|
|
||||||
};
|
|
||||||
decorations = mkOption {
|
|
||||||
type = types.nullOr (
|
|
||||||
types.enum [
|
|
||||||
"csd"
|
|
||||||
"ssd"
|
|
||||||
]
|
|
||||||
);
|
|
||||||
default = null;
|
|
||||||
description = "Window decorations to use.";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
config =
|
|
||||||
lib.recursiveUpdate
|
|
||||||
{
|
|
||||||
# Ensure desktop related systemd services (xdg) have access to session variables.
|
|
||||||
systemd.user.sessionVariables = config.home.sessionVariables;
|
|
||||||
|
|
||||||
home.packages = optionals cfg.wayland (
|
|
||||||
with pkgs;
|
|
||||||
[
|
|
||||||
wl-clipboard
|
|
||||||
wtype
|
|
||||||
grim
|
|
||||||
slurp
|
|
||||||
]
|
|
||||||
);
|
|
||||||
|
|
||||||
home.activation = {
|
|
||||||
customReloadScript = lib.hm.dag.entryAfter [ "writeBoundary" ] (
|
|
||||||
''
|
|
||||||
#!${pkgs.bash}/bin/bash
|
|
||||||
''
|
|
||||||
+ cfg.reloadScript
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
home.file.".initrc" = {
|
|
||||||
enable = true;
|
|
||||||
executable = true;
|
|
||||||
text =
|
|
||||||
''
|
|
||||||
#!${pkgs.bash}/bin/bash
|
|
||||||
|
|
||||||
''
|
|
||||||
+ cfg.initScript;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
(
|
|
||||||
# TODO: Move to dedicated module within desktop or maybe theming?
|
|
||||||
# if cfg.decorations == null then
|
|
||||||
# { }
|
|
||||||
# else
|
|
||||||
# {
|
|
||||||
# csd = { };
|
|
||||||
# ssd = { };
|
|
||||||
# }
|
|
||||||
# ."${cfg.decorations}"
|
|
||||||
{ }
|
|
||||||
);
|
|
||||||
}
|
|
|
@ -1,5 +1,70 @@
|
||||||
{ ... }:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [ ./custom/default.nix ];
|
lib,
|
||||||
|
pkgs,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
let
|
||||||
|
cfg = config.modules.desktop;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
# Import desktop environment modules
|
||||||
|
./background/glpaper/default.nix
|
||||||
|
./bar/waybar.nix
|
||||||
|
./lock-screen/waylock.nix
|
||||||
|
./window-manager/i3.nix
|
||||||
|
./window-manager/river.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
options.modules.desktop = {
|
||||||
|
wayland = mkEnableOption "wayland";
|
||||||
|
initScript = mkOption {
|
||||||
|
type = types.lines;
|
||||||
|
default = "${pkgs.bash}/bin/bash";
|
||||||
|
description = "Bash script to execute after logging in.";
|
||||||
|
};
|
||||||
|
reloadScript = mkOption {
|
||||||
|
type = types.lines;
|
||||||
|
default = "";
|
||||||
|
description = "Shell script to execute after reload/rebuild.";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = {
|
||||||
|
# Ensure desktop related systemd services (xdg) have access to session variables.
|
||||||
|
systemd.user.sessionVariables = config.home.sessionVariables;
|
||||||
|
|
||||||
|
home.packages = optionals cfg.wayland (
|
||||||
|
with pkgs;
|
||||||
|
[
|
||||||
|
wl-clipboard
|
||||||
|
wtype
|
||||||
|
grim
|
||||||
|
slurp
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
home.activation = {
|
||||||
|
customReloadScript = lib.hm.dag.entryAfter [ "writeBoundary" ] (
|
||||||
|
''
|
||||||
|
#!${pkgs.bash}/bin/bash
|
||||||
|
''
|
||||||
|
+ cfg.reloadScript
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
home.file.".initrc" = {
|
||||||
|
enable = true;
|
||||||
|
executable = true;
|
||||||
|
text =
|
||||||
|
''
|
||||||
|
#!${pkgs.bash}/bin/bash
|
||||||
|
|
||||||
|
''
|
||||||
|
+ cfg.initScript;
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,7 +14,7 @@ in
|
||||||
enable = mkEnableOption "waylock";
|
enable = mkEnableOption "waylock";
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = {
|
||||||
home.packages = (with pkgs; [ waylock ]);
|
home.packages = mkIf cfg.enable (with pkgs; [ waylock ]);
|
||||||
};
|
};
|
||||||
}
|
}
|
|
@ -1,22 +0,0 @@
|
||||||
{
|
|
||||||
waylock = {
|
|
||||||
security.pam.services.waylock = { };
|
|
||||||
};
|
|
||||||
river = {
|
|
||||||
programs.river.enable = true;
|
|
||||||
};
|
|
||||||
i3 = {
|
|
||||||
services.xserver = {
|
|
||||||
layout = "us";
|
|
||||||
xkbVariant = "";
|
|
||||||
enable = true;
|
|
||||||
windowManager.i3.enable = true;
|
|
||||||
desktopManager = {
|
|
||||||
xterm.enable = true;
|
|
||||||
xfce = {
|
|
||||||
enable = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -113,8 +113,7 @@ in
|
||||||
spawn = [
|
spawn = [
|
||||||
"\"${layout} ${layoutOptions}\""
|
"\"${layout} ${layoutOptions}\""
|
||||||
"waybar" # TODO: Decouple
|
"waybar" # TODO: Decouple
|
||||||
# TODO: Generic background options
|
"\"glpaper eDP-1 ${toString config.modules.glpaper.shader}\""
|
||||||
# "\"glpaper eDP-1 ${toString config.modules.glpaper.shader}\""
|
|
||||||
"udiskie"
|
"udiskie"
|
||||||
];
|
];
|
||||||
map = (
|
map = (
|
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
let
|
let
|
||||||
cfg = config.modules.cpp;
|
cfg = config.modules.rust;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.modules.cpp = {
|
options.modules.cpp = {
|
||||||
|
@ -18,6 +18,10 @@ in
|
||||||
# Allow unfree
|
# Allow unfree
|
||||||
modules.unfree.allowedPackages = [
|
modules.unfree.allowedPackages = [
|
||||||
"vscode-extension-ms-vscode-cpptools"
|
"vscode-extension-ms-vscode-cpptools"
|
||||||
|
# TODO: Remove, it should not be here
|
||||||
|
# "android-studio-stable"
|
||||||
|
# "android-sdk-cmdline-tools"
|
||||||
|
# "android-sdk-tools"
|
||||||
];
|
];
|
||||||
|
|
||||||
# Gitignore additions
|
# Gitignore additions
|
||||||
|
@ -28,7 +32,6 @@ in
|
||||||
# Development packages
|
# Development packages
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
gnumake
|
gnumake
|
||||||
gcc
|
|
||||||
];
|
];
|
||||||
|
|
||||||
# VSCode configuration
|
# VSCode configuration
|
||||||
|
@ -36,7 +39,6 @@ in
|
||||||
extensions = with pkgs.vscode-extensions; [
|
extensions = with pkgs.vscode-extensions; [
|
||||||
ms-vscode.cpptools
|
ms-vscode.cpptools
|
||||||
ms-vscode.cmake-tools
|
ms-vscode.cmake-tools
|
||||||
ms-vscode.cpptools-extension-pack
|
|
||||||
];
|
];
|
||||||
|
|
||||||
userSettings = {
|
userSettings = {
|
||||||
|
|
|
@ -1,6 +0,0 @@
|
||||||
{
|
|
||||||
docker = {
|
|
||||||
virtualisation.docker.enable = true;
|
|
||||||
machine.sudo-groups = [ "docker" ];
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,6 +1,7 @@
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
|
pkgs,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
|
||||||
|
@ -10,7 +11,5 @@ with lib;
|
||||||
enable = mkEnableOption "steam";
|
enable = mkEnableOption "steam";
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf config.modules.steam.enable {
|
# The rest of the configuration is in a systemwide module
|
||||||
# Steam must be installed systemwide as of time of writing
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,20 +0,0 @@
|
||||||
{
|
|
||||||
steam =
|
|
||||||
{ pkgs, ... }:
|
|
||||||
{
|
|
||||||
modules.unfree.allowedPackages = [
|
|
||||||
"steam"
|
|
||||||
"steam-original"
|
|
||||||
"steam-unwrapped"
|
|
||||||
];
|
|
||||||
|
|
||||||
programs.steam.enable = true;
|
|
||||||
|
|
||||||
# Make steam create desktop entries in a subfolder
|
|
||||||
programs.steam.package = pkgs.steam.override {
|
|
||||||
extraBwrapArgs = [
|
|
||||||
"--bind $HOME/.local/share/applications/Steam $HOME/.local/share/applications"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,7 +0,0 @@
|
||||||
{
|
|
||||||
keyring = {
|
|
||||||
services.gnome.gnome-keyring = {
|
|
||||||
enable = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,21 +0,0 @@
|
||||||
{
|
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
|
|
||||||
with lib;
|
|
||||||
let
|
|
||||||
cfg = config.modules.scripts;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
options.modules.scripts.enable = mkEnableOption "scripts";
|
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
|
||||||
# home.packages = with pkgs; map (path: (writeShellScriptBin "${path}" (readFile path))) scripts;
|
|
||||||
home.packages = with pkgs; [
|
|
||||||
(writeShellScriptBin "mkenv" (readFile ./mkenv.sh))
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,53 +0,0 @@
|
||||||
setupEnv () {
|
|
||||||
echo "Setting up .envrc"
|
|
||||||
if git rev-parse --is-inside-work-tree > /dev/null 2>&1; then
|
|
||||||
insideGit;
|
|
||||||
else
|
|
||||||
outsideGit;
|
|
||||||
fi;
|
|
||||||
}
|
|
||||||
|
|
||||||
insideGit () {
|
|
||||||
echo "Inside of git environment"
|
|
||||||
cd $(git rev-parse --show-toplevel)
|
|
||||||
echo "Setting up inside $PWD"
|
|
||||||
echo "git add -f --intent-to-add flake.nix
|
|
||||||
use flake ." > .envrc
|
|
||||||
|
|
||||||
echo "Enabling environment"
|
|
||||||
direnv allow
|
|
||||||
|
|
||||||
setupFlake
|
|
||||||
}
|
|
||||||
|
|
||||||
outsideGit () {
|
|
||||||
echo "Outside of git environment"
|
|
||||||
echo "use flake . --impure" > .envrc
|
|
||||||
|
|
||||||
echo "Enabling environment"
|
|
||||||
direnv allow
|
|
||||||
|
|
||||||
setupFlake
|
|
||||||
}
|
|
||||||
|
|
||||||
setupFlake () {
|
|
||||||
if [ -e flake.nix ]; then
|
|
||||||
echo "flake.nix already exists."
|
|
||||||
return
|
|
||||||
fi;
|
|
||||||
|
|
||||||
echo "Setting up flake.nix"
|
|
||||||
echo "{
|
|
||||||
inputs.devenv.url = \"git+https://git.bulthuis.dev/Jan/dotfiles\";
|
|
||||||
outputs = { devenv, ... }: devenv.lib.mkShell { };
|
|
||||||
}" > flake.nix
|
|
||||||
}
|
|
||||||
|
|
||||||
echo "Creating dev environment"
|
|
||||||
|
|
||||||
if [ -e .envrc ]; then
|
|
||||||
echo ".envrc already exists."
|
|
||||||
setupFlake
|
|
||||||
else
|
|
||||||
setupEnv
|
|
||||||
fi;
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
{ ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
# Import systemwide configuration files.
|
||||||
|
./docker.nix
|
||||||
|
./i3.nix
|
||||||
|
./keyring.nix
|
||||||
|
./river.nix
|
||||||
|
./steam.nix
|
||||||
|
./waylock.nix
|
||||||
|
];
|
||||||
|
}
|
|
@ -0,0 +1,17 @@
|
||||||
|
{
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
let
|
||||||
|
enabled = any (user: user.modules.docker.enable) (attrValues config.home-manager.users);
|
||||||
|
in
|
||||||
|
{
|
||||||
|
config = mkIf enabled {
|
||||||
|
virtualisation.docker.enable = true;
|
||||||
|
machine.sudo-groups = [ "docker" ];
|
||||||
|
};
|
||||||
|
}
|
|
@ -0,0 +1,30 @@
|
||||||
|
{
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
let
|
||||||
|
enabled = any (user: user.modules.i3.enable) (attrValues config.home-manager.users);
|
||||||
|
in
|
||||||
|
{
|
||||||
|
config = mkIf enabled {
|
||||||
|
modules.tuigreet.enable = mkForce false;
|
||||||
|
services.xserver = {
|
||||||
|
layout = "us";
|
||||||
|
xkbVariant = "";
|
||||||
|
enable = true;
|
||||||
|
windowManager.i3.enable = true;
|
||||||
|
desktopManager = {
|
||||||
|
xterm.enable = true;
|
||||||
|
xfce = {
|
||||||
|
enable = true;
|
||||||
|
# noDesktop = false;
|
||||||
|
# enableXfwm = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -0,0 +1,18 @@
|
||||||
|
{
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
let
|
||||||
|
enabled = any (user: user.modules.keyring.enable) (attrValues config.home-manager.users);
|
||||||
|
in
|
||||||
|
{
|
||||||
|
config = mkIf enabled {
|
||||||
|
services.gnome.gnome-keyring = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -0,0 +1,14 @@
|
||||||
|
{
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
let
|
||||||
|
enabled = any (user: user.modules.river.enable) (attrValues config.home-manager.users);
|
||||||
|
in
|
||||||
|
{
|
||||||
|
config = mkIf enabled { programs.river.enable = true; };
|
||||||
|
}
|
|
@ -0,0 +1,29 @@
|
||||||
|
{
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
let
|
||||||
|
enabled = any (user: user.modules.steam.enable) (attrValues config.home-manager.users);
|
||||||
|
in
|
||||||
|
{
|
||||||
|
config = mkIf enabled {
|
||||||
|
modules.unfree.allowedPackages = [
|
||||||
|
"steam"
|
||||||
|
"steam-original"
|
||||||
|
"steam-unwrapped"
|
||||||
|
];
|
||||||
|
|
||||||
|
programs.steam.enable = true;
|
||||||
|
|
||||||
|
# Make steam create desktop entries in a subfolder
|
||||||
|
programs.steam.package = pkgs.steam.override {
|
||||||
|
extraBwrapArgs = [
|
||||||
|
"--bind $HOME/.local/share/applications/Steam $HOME/.local/share/applications"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -0,0 +1,14 @@
|
||||||
|
{
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
let
|
||||||
|
enabled = any (user: user.modules.waylock.enable) (attrValues config.home-manager.users);
|
||||||
|
in
|
||||||
|
{
|
||||||
|
config = mkIf enabled { security.pam.services.waylock = { }; };
|
||||||
|
}
|
|
@ -119,6 +119,12 @@ in
|
||||||
description = "Base 16 color scheme to use for styling. See stylix documentation for more information.";
|
description = "Base 16 color scheme to use for styling. See stylix documentation for more information.";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
clientSideDecorations = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = false;
|
||||||
|
description = "Whether to enable client side decorations for windows.";
|
||||||
|
};
|
||||||
|
|
||||||
schemeColors = mkOption {
|
schemeColors = mkOption {
|
||||||
type = types.attrsOf types.anything;
|
type = types.attrsOf types.anything;
|
||||||
default = config.lib.stylix.colors;
|
default = config.lib.stylix.colors;
|
||||||
|
@ -273,16 +279,19 @@ in
|
||||||
|
|
||||||
# Configure gtk theme
|
# Configure gtk theme
|
||||||
gtk =
|
gtk =
|
||||||
# disableCSD = ''
|
let
|
||||||
# headerbar.default-decoration {
|
disableCSD = ''
|
||||||
# margin-bottom: 50px;
|
headerbar.default-decoration {
|
||||||
# margin-top: -100px;
|
margin-bottom: 50px;
|
||||||
# }
|
margin-top: -100px;
|
||||||
# window.csd,
|
}
|
||||||
# window.csd decoration {
|
|
||||||
# box-shadow: none;
|
window.csd,
|
||||||
# }
|
window.csd decoration {
|
||||||
# '';
|
box-shadow: none;
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
in
|
||||||
{
|
{
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
|
@ -291,6 +300,8 @@ in
|
||||||
package = pkgs.gnome-themes-extra;
|
package = pkgs.gnome-themes-extra;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
gtk3.extraCss = mkIf (!cfg.clientSideDecorations) disableCSD;
|
||||||
|
gtk4.extraCss = mkIf (!cfg.clientSideDecorations) disableCSD;
|
||||||
};
|
};
|
||||||
|
|
||||||
# TODO: This should just straight up not be here
|
# TODO: This should just straight up not be here
|
||||||
|
|
|
@ -83,16 +83,6 @@ in
|
||||||
# Git settings
|
# Git settings
|
||||||
"git.autofetch" = true;
|
"git.autofetch" = true;
|
||||||
"git.enableSmartCommit" = false;
|
"git.enableSmartCommit" = false;
|
||||||
"git.suggestSmartCommit" = false;
|
|
||||||
|
|
||||||
# Disable update notifications
|
|
||||||
"update.mode" = "none";
|
|
||||||
|
|
||||||
# TODO: Move to direnv module
|
|
||||||
# Ignore direnv folder
|
|
||||||
"files.exclude" = {
|
|
||||||
".direnv" = true;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -41,9 +41,11 @@
|
||||||
theming.enable = true;
|
theming.enable = true;
|
||||||
|
|
||||||
# Window manager
|
# Window manager
|
||||||
|
i3.enable = false;
|
||||||
river.enable = true;
|
river.enable = true;
|
||||||
waylock.enable = true;
|
waylock.enable = true;
|
||||||
waybar.enable = true;
|
waybar.enable = true;
|
||||||
|
glpaper.enable = false;
|
||||||
|
|
||||||
# Desktop environment
|
# Desktop environment
|
||||||
mako.enable = true;
|
mako.enable = true;
|
||||||
|
@ -66,7 +68,7 @@
|
||||||
# Gaming
|
# Gaming
|
||||||
steam.enable = true;
|
steam.enable = true;
|
||||||
modrinth.enable = true;
|
modrinth.enable = true;
|
||||||
es-de.enable = false;
|
es-de.enable = true;
|
||||||
retroarch.enable = true;
|
retroarch.enable = true;
|
||||||
ryujinx.enable = true;
|
ryujinx.enable = true;
|
||||||
|
|
||||||
|
@ -80,13 +82,6 @@
|
||||||
enable = true;
|
enable = true;
|
||||||
user = "Jan-Bulthuis";
|
user = "Jan-Bulthuis";
|
||||||
email = "git@bulthuis.dev";
|
email = "git@bulthuis.dev";
|
||||||
# TODO: Move
|
|
||||||
ignores = [
|
|
||||||
".envrc"
|
|
||||||
".direnv"
|
|
||||||
"flake.nix"
|
|
||||||
"flake.lock"
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
btop.enable = true;
|
btop.enable = true;
|
||||||
fish.enable = true;
|
fish.enable = true;
|
||||||
|
@ -96,7 +91,6 @@
|
||||||
zathura.enable = true;
|
zathura.enable = true;
|
||||||
eduvpn.enable = true;
|
eduvpn.enable = true;
|
||||||
keyring.enable = true;
|
keyring.enable = true;
|
||||||
scripts.enable = true;
|
|
||||||
|
|
||||||
# Development
|
# Development
|
||||||
neovim.enable = true;
|
neovim.enable = true;
|
||||||
|
|
Loading…
Reference in New Issue