Compare commits
76 commits
b6c18ce5f2
...
b8dcdac94b
Author | SHA1 | Date | |
---|---|---|---|
b8dcdac94b | |||
e9e20c15a6 | |||
412e22c424 | |||
2622119933 | |||
0f913101a9 | |||
cfa298fb63 | |||
0d8ec05ba6 | |||
03e1a832ff | |||
455b197b7f | |||
aca309a9c0 | |||
6a2269f591 | |||
bbcc1433de | |||
ae71a8a779 | |||
4ceb7f7830 | |||
0c6b96bc8e | |||
2c2d5a4103 | |||
38b90fd28e | |||
40addb8f90 | |||
3a415ccce9 | |||
21fdf27b6c | |||
222fc45918 | |||
0cc8d4195f | |||
d29d23c3e8 | |||
240d8b2820 | |||
b2582a051d | |||
e78bda179e | |||
1d7b20d51d | |||
3a621723d1 | |||
d7f51613fd | |||
833a228870 | |||
9afffbeac3 | |||
6697a8400b | |||
b01a3fd472 | |||
3dd119d3d7 | |||
71be5f3545 | |||
bb0da64219 | |||
f8018ab702 | |||
ec4e66c91a | |||
36a8df7aa1 | |||
5933a15cd8 | |||
32e8d70d6f | |||
a53a985158 | |||
5b163a2721 | |||
02c356ec51 | |||
d07194c5cb | |||
91c728799b | |||
929c98faf5 | |||
973993af60 | |||
afc2e8ea66 | |||
f26cc9575d | |||
e7b6fda857 | |||
4b28b21068 | |||
fd8db4c006 | |||
f2f8c204ee | |||
07fcbcb567 | |||
784df6404f | |||
91bdd3e273 | |||
4d739520aa | |||
12885fa92a | |||
0ebc1a3836 | |||
2aa7fa8a47 | |||
91f1a9b552 | |||
64cb83cddb | |||
acb4987357 | |||
193fc258b9 | |||
ff3df36198 | |||
|
09b6e25b2b | ||
f327c0628a | |||
d35639285f | |||
22f42ec745 | |||
66101edde5 | |||
a8ce6936a7 | |||
5b27c6e0dc | |||
8c8d0fbb56 | |||
88e38e36ec | |||
d5b6ec3daf |
33 changed files with 1748 additions and 383 deletions
31
.github/workflows/build-and-cache.yml
vendored
31
.github/workflows/build-and-cache.yml
vendored
|
@ -1,31 +0,0 @@
|
|||
name: build and cache random stuff
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
jobs:
|
||||
build:
|
||||
strategy:
|
||||
matrix:
|
||||
package:
|
||||
- .#attic-client
|
||||
- .#attic-server
|
||||
- .#conduwuit
|
||||
- "github:cything/nixpkgs/9a35d495d2f49eee003b57265228844bb48c933e#nixosTests.garage.with-3node-replication1_x"
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: DeterminateSystems/nix-installer-action@main
|
||||
with:
|
||||
logger: pretty
|
||||
- uses: DeterminateSystems/magic-nix-cache-action@main
|
||||
- uses: cachix/cachix-action@v15
|
||||
with:
|
||||
name: cything
|
||||
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
|
||||
- name: Setup Attic cache
|
||||
uses: ryanccn/attic-action@v0
|
||||
with:
|
||||
endpoint: ${{ vars.ATTIC_ENDPOINT }}
|
||||
cache: ${{ vars.ATTIC_CACHE }}
|
||||
token: ${{ secrets.ATTIC_TOKEN }}
|
||||
- uses: actions/checkout@v4
|
||||
- run: nix build '${{ matrix.package }}'
|
122
.github/workflows/build-machines-and-homes.yml
vendored
Normal file
122
.github/workflows/build-machines-and-homes.yml
vendored
Normal file
|
@ -0,0 +1,122 @@
|
|||
name: build and cache machines and homes
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
pull_request:
|
||||
jobs:
|
||||
build-machines:
|
||||
strategy:
|
||||
matrix:
|
||||
machine:
|
||||
- chunk
|
||||
- ytnix
|
||||
- titan
|
||||
os:
|
||||
- ubuntu-latest
|
||||
runs-on: ${{ matrix.os }}
|
||||
continue-on-error: true
|
||||
steps:
|
||||
- name: Maximize build disk space
|
||||
uses: easimon/maximize-build-space@v10
|
||||
with:
|
||||
overprovision-lvm: true
|
||||
swap-size-mb: 1024
|
||||
remove-dotnet: 'true'
|
||||
remove-android: 'true'
|
||||
remove-haskell: 'true'
|
||||
remove-codeql: 'true'
|
||||
remove-docker-images: 'true'
|
||||
build-mount-path: /nix
|
||||
- uses: nixbuild/nix-quick-install-action@master
|
||||
- name: Sync repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
persist-credentials: false
|
||||
- uses: cachix/cachix-action@v14
|
||||
with:
|
||||
name: cything
|
||||
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
|
||||
useDaemon: false
|
||||
installCommand: nix profile install nixpkgs#cachix
|
||||
- name: Setup Attic cache
|
||||
uses: ryanccn/attic-action@v0
|
||||
with:
|
||||
endpoint: ${{ vars.ATTIC_ENDPOINT }}
|
||||
cache: ${{ vars.ATTIC_CACHE }}
|
||||
token: ${{ secrets.ATTIC_TOKEN }}
|
||||
- name: Restore and cache Nix store
|
||||
uses: nix-community/cache-nix-action@v5.1.0
|
||||
with:
|
||||
# restore and save a cache using this key
|
||||
primary-key: nix-${{ runner.os }}-${{ matrix.machine }}-${{ hashFiles('**/*.nix', 'flake.lock') }}
|
||||
# if there's no cache hit, restore a cache by this prefix
|
||||
restore-prefixes-first-match: nix-${{ runner.os }}-${{ matrix.machine }}-
|
||||
# do purge caches
|
||||
purge: true
|
||||
# purge all versions of the cache
|
||||
purge-prefixes: nix-${{ runner.os }}-
|
||||
# created more than this number of seconds ago relative to the start of the `Post Restore` phase
|
||||
purge-last-accessed: 86400
|
||||
# except the version with the `primary-key`, if it exists
|
||||
purge-primary-key: never
|
||||
# always save the cache
|
||||
save-always: true
|
||||
- run: nix build -L .#nixosConfigurations.${{ matrix.machine }}.config.system.build.toplevel
|
||||
build-homes:
|
||||
strategy:
|
||||
matrix:
|
||||
home:
|
||||
- yt@ytnix
|
||||
- yt@chunk
|
||||
os:
|
||||
- ubuntu-latest
|
||||
# - macos-latest
|
||||
runs-on: ${{ matrix.os }}
|
||||
continue-on-error: true
|
||||
steps:
|
||||
- name: Maximize build disk space
|
||||
uses: easimon/maximize-build-space@v10
|
||||
with:
|
||||
overprovision-lvm: true
|
||||
swap-size-mb: 1024
|
||||
remove-dotnet: 'true'
|
||||
remove-android: 'true'
|
||||
remove-haskell: 'true'
|
||||
remove-codeql: 'true'
|
||||
remove-docker-images: 'true'
|
||||
build-mount-path: /nix
|
||||
- uses: nixbuild/nix-quick-install-action@master
|
||||
- name: Sync repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
persist-credentials: false
|
||||
- uses: cachix/cachix-action@v14
|
||||
with:
|
||||
name: cything
|
||||
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
|
||||
useDaemon: false
|
||||
installCommand: nix profile install nixpkgs#cachix
|
||||
- name: Setup Attic cache
|
||||
uses: ryanccn/attic-action@v0
|
||||
with:
|
||||
endpoint: ${{ vars.ATTIC_ENDPOINT }}
|
||||
cache: ${{ vars.ATTIC_CACHE }}
|
||||
token: ${{ secrets.ATTIC_TOKEN }}
|
||||
- name: Restore and cache Nix store
|
||||
uses: nix-community/cache-nix-action@v5.1.0
|
||||
with:
|
||||
# restore and save a cache using this key
|
||||
primary-key: nix-${{ runner.os }}-${{ matrix.home }}-${{ hashFiles('**/*.nix', 'flake.lock') }}
|
||||
# if there's no cache hit, restore a cache by this prefix
|
||||
restore-prefixes-first-match: nix-${{ runner.os }}-${{ matrix.home }}-
|
||||
# do purge caches
|
||||
purge: true
|
||||
# purge all versions of the cache
|
||||
purge-prefixes: nix-${{ runner.os }}-
|
||||
# created more than this number of seconds ago relative to the start of the `Post Restore` phase
|
||||
purge-last-accessed: 86400
|
||||
# except the version with the `primary-key`, if it exists
|
||||
purge-primary-key: never
|
||||
# always save the cache
|
||||
save-always: true
|
||||
- run: nix build -L .#homeConfigurations."${{ matrix.home }}".activationPackage
|
59
.github/workflows/build-packages.yml
vendored
Normal file
59
.github/workflows/build-packages.yml
vendored
Normal file
|
@ -0,0 +1,59 @@
|
|||
name: build and cache packages
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
package:
|
||||
description: "package to build"
|
||||
required: false
|
||||
type: string
|
||||
jobs:
|
||||
build-packages:
|
||||
strategy:
|
||||
matrix:
|
||||
package:
|
||||
- github:cything/nixpkgs/928e0c6874ab3e759305e93f806a4cf559645677#alvr
|
||||
- github:cything/nixpkgs/8929e1256ceec677dd57fce405cdaca23176399b#lact
|
||||
- ${{ inputs.package }}
|
||||
os:
|
||||
- ubuntu-latest
|
||||
- macos-latest
|
||||
- ubuntu-24.04-arm
|
||||
runs-on: ${{ matrix.os }}
|
||||
continue-on-error: true
|
||||
steps:
|
||||
- name: Install Nix
|
||||
uses: cachix/install-nix-action@v30
|
||||
- name: Sync repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
persist-credentials: false
|
||||
- uses: cachix/cachix-action@v14
|
||||
with:
|
||||
name: cything
|
||||
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
|
||||
useDaemon: false
|
||||
installCommand: nix profile install nixpkgs#cachix
|
||||
- name: Setup Attic cache
|
||||
uses: ryanccn/attic-action@v0
|
||||
with:
|
||||
endpoint: ${{ vars.ATTIC_ENDPOINT }}
|
||||
cache: ${{ vars.ATTIC_CACHE }}
|
||||
token: ${{ secrets.ATTIC_TOKEN }}
|
||||
- name: Restore and cache Nix store
|
||||
uses: nix-community/cache-nix-action@v5.1.0
|
||||
with:
|
||||
# restore and save a cache using this key
|
||||
primary-key: nix-${{ runner.os }}-${{ matrix.package }}-${{ hashFiles('**/*.nix', 'flake.lock') }}
|
||||
# if there's no cache hit, restore a cache by this prefix
|
||||
restore-prefixes-first-match: nix-${{ runner.os }}-${{ matrix.package }}-
|
||||
# do purge caches
|
||||
purge: true
|
||||
# purge all versions of the cache
|
||||
purge-prefixes: nix-${{ runner.os }}-
|
||||
# created more than this number of seconds ago relative to the start of the `Post Restore` phase
|
||||
purge-last-accessed: 86400
|
||||
# except the version with the `primary-key`, if it exists
|
||||
purge-primary-key: never
|
||||
# always save the cache
|
||||
save-always: true
|
||||
- run: nix build -L ${{ matrix.package }}
|
964
flake.lock
generated
964
flake.lock
generated
File diff suppressed because it is too large
Load diff
146
flake.nix
146
flake.nix
|
@ -2,7 +2,7 @@
|
|||
description = "cy's flake";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable-small";
|
||||
sops-nix = {
|
||||
url = "github:Mic92/sops-nix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
@ -20,28 +20,46 @@
|
|||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
lanzaboote = {
|
||||
url = "github:nix-community/lanzaboote/v0.4.1";
|
||||
url = "github:nix-community/lanzaboote/master";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
nixvim = {
|
||||
url = "github:nix-community/nixvim";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
flake-parts.url = "github:hercules-ci/flake-parts";
|
||||
niri = {
|
||||
url = "github:sodiboo/niri-flake";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
rust-overlay = {
|
||||
url = "github:oxalica/rust-overlay";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
conduwuit.url = "github:girlbossceo/conduwuit";
|
||||
|
||||
nixpkgs-btrbk.url = "github:cything/nixpkgs/btrbk"; # unmerged PR
|
||||
nixpkgs-garage.url = "github:cything/nixpkgs/garage-module"; # unmerged PR
|
||||
|
||||
nvim-github-theme = {
|
||||
url = "github:projekt0n/github-nvim-theme";
|
||||
flake = false;
|
||||
};
|
||||
};
|
||||
|
||||
nixConfig = {
|
||||
extra-substituters = [
|
||||
"https://cache.cything.io/central"
|
||||
"https://cache.cything.io/infra-ci"
|
||||
"https://cache.cything.io/attic"
|
||||
"https://niri.cachix.org"
|
||||
"https://nix-community.cachix.org"
|
||||
"https://cache.garnix.io"
|
||||
"https://cything.cachix.org"
|
||||
];
|
||||
extra-trusted-public-keys = [
|
||||
"central:uWhjva6m6dhC2hqNisjn2hXGvdGBs19vPkA1dPEuwFg="
|
||||
"infra-ci:xG5f5tddUBcvToYjlpHD5OY/puYQkKmgKeIQCshNs38="
|
||||
"attic:HL3hVpqXxwcF7Q1R+IvU2i0+YxIjQA2xxKM5EJMXLLs="
|
||||
"niri.cachix.org-1:Wv0OmO7PsuocRKzfDoJ3mulSl7Z6oezYhGhR+3W2964="
|
||||
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||
"cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g="
|
||||
"cything.cachix.org-1:xqW1W5NNL+wrM9wfSELb0MLj/harD2ZyB4HbdaMyvPI="
|
||||
];
|
||||
builders-use-substitutes = true;
|
||||
};
|
||||
|
@ -51,61 +69,68 @@
|
|||
self,
|
||||
nixpkgs,
|
||||
home-manager,
|
||||
treefmt,
|
||||
disko,
|
||||
flake-parts,
|
||||
...
|
||||
}@inputs:
|
||||
let
|
||||
lib = nixpkgs.lib;
|
||||
inherit (self) outputs;
|
||||
|
||||
systems = [ "x86_64-linux" ];
|
||||
forEachSystem = f: lib.genAttrs systems (system: f pkgsFor.${system});
|
||||
overlays = [
|
||||
# (overlayPkgsFromFlake inputs.eza [
|
||||
# ])
|
||||
] ++ import ./overlay;
|
||||
|
||||
pkgsFor = lib.genAttrs systems (
|
||||
system:
|
||||
import nixpkgs {
|
||||
inherit system overlays;
|
||||
flake-parts.lib.mkFlake { inherit inputs; } (
|
||||
{ ... }:
|
||||
{
|
||||
imports = [
|
||||
inputs.treefmt.flakeModule
|
||||
];
|
||||
debug = true;
|
||||
systems = [
|
||||
"x86_64-linux"
|
||||
];
|
||||
perSystem =
|
||||
{
|
||||
system,
|
||||
...
|
||||
}:
|
||||
{
|
||||
# make pkgs available to `perSystem`
|
||||
_module.args.pkgs = import inputs.nixpkgs {
|
||||
inherit system;
|
||||
config = {
|
||||
allowUnfree = true;
|
||||
};
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
treefmtEval = forEachSystem (
|
||||
pkgs:
|
||||
treefmt.lib.evalModule pkgs {
|
||||
treefmt = {
|
||||
projectRootFile = "flake.nix";
|
||||
programs.nixfmt.enable = true;
|
||||
programs.stylua.enable = true;
|
||||
programs.yamlfmt.enable = true;
|
||||
programs.typos.enable = true;
|
||||
programs.shellcheck.enable = true;
|
||||
programs.deadnix.enable = true;
|
||||
|
||||
settings.global.excludes = [ "secrets/*" ];
|
||||
}
|
||||
);
|
||||
settings.global.excludes = [
|
||||
"secrets/*"
|
||||
"**/*.png" # tries to format a png file??
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
flake =
|
||||
let
|
||||
pkgs = import nixpkgs {
|
||||
config.allowUnfree = true;
|
||||
system = "x86_64-linux";
|
||||
overlays = [
|
||||
inputs.niri.overlays.niri
|
||||
inputs.rust-overlay.overlays.default
|
||||
] ++ import ./overlay;
|
||||
};
|
||||
in
|
||||
{
|
||||
formatter = forEachSystem (pkgs: treefmtEval.${pkgs.system}.config.build.wrapper);
|
||||
checks = forEachSystem (pkgs: {
|
||||
formatting = treefmtEval.${pkgs.system}.config.build.check self;
|
||||
});
|
||||
# lets us build overlaid packages with `nix build .#<package>`
|
||||
packages = pkgsFor;
|
||||
|
||||
nixosConfigurations =
|
||||
let
|
||||
pkgs = pkgsFor.x86_64-linux;
|
||||
lib = nixpkgs.lib;
|
||||
in
|
||||
{
|
||||
ytnix = lib.nixosSystem {
|
||||
specialArgs = { inherit inputs outputs; };
|
||||
specialArgs = { inherit inputs; };
|
||||
modules = [
|
||||
{
|
||||
nixpkgs = { inherit pkgs; };
|
||||
|
@ -114,11 +139,11 @@
|
|||
inputs.sops-nix.nixosModules.sops
|
||||
./modules
|
||||
inputs.lanzaboote.nixosModules.lanzaboote
|
||||
inputs.niri.nixosModules.niri
|
||||
];
|
||||
};
|
||||
|
||||
chunk = lib.nixosSystem {
|
||||
specialArgs = { inherit inputs outputs; };
|
||||
specialArgs = { inherit inputs; };
|
||||
modules = [
|
||||
{
|
||||
nixpkgs = { inherit pkgs; };
|
||||
|
@ -134,7 +159,7 @@
|
|||
};
|
||||
|
||||
titan = lib.nixosSystem {
|
||||
specialArgs = { inherit inputs outputs; };
|
||||
specialArgs = { inherit inputs; };
|
||||
modules = [
|
||||
{
|
||||
nixpkgs = { inherit pkgs; };
|
||||
|
@ -146,25 +171,40 @@
|
|||
];
|
||||
};
|
||||
};
|
||||
|
||||
homeConfigurations = {
|
||||
"yt@ytnix" = home-manager.lib.homeManagerConfiguration {
|
||||
pkgs = pkgsFor.x86_64-linux;
|
||||
extraSpecialArgs = { inherit inputs outputs; };
|
||||
homeConfigurations =
|
||||
let
|
||||
lib = home-manager.lib;
|
||||
in
|
||||
{
|
||||
"yt@ytnix" = lib.homeManagerConfiguration {
|
||||
inherit pkgs;
|
||||
extraSpecialArgs = { inherit inputs; };
|
||||
modules = [
|
||||
./home/yt/ytnix.nix
|
||||
inputs.nixvim.homeManagerModules.nixvim
|
||||
inputs.niri.homeModules.config
|
||||
];
|
||||
};
|
||||
|
||||
"yt@chunk" = lib.homeManagerConfiguration {
|
||||
inherit pkgs;
|
||||
extraSpecialArgs = { inherit inputs; };
|
||||
modules = [
|
||||
./home/yt/chunk.nix
|
||||
inputs.nixvim.homeManagerModules.nixvim
|
||||
];
|
||||
};
|
||||
|
||||
"yt@chunk" = home-manager.lib.homeManagerConfiguration {
|
||||
pkgs = pkgsFor.x86_64-linux;
|
||||
extraSpecialArgs = { inherit inputs outputs; };
|
||||
"codespace@codespace" = lib.homeManagerConfiguration {
|
||||
inherit pkgs;
|
||||
extraSpecialArgs = { inherit inputs; };
|
||||
modules = [
|
||||
./home/yt/chunk.nix
|
||||
./home/yt/codespace.nix
|
||||
inputs.nixvim.homeManagerModules.nixvim
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
);
|
||||
}
|
||||
|
|
6
garnix.yaml
Normal file
6
garnix.yaml
Normal file
|
@ -0,0 +1,6 @@
|
|||
builds:
|
||||
include:
|
||||
- 'nixosConfigurations.*'
|
||||
- 'homeConfigurations.*'
|
||||
- '*.aarch64-linux.*'
|
||||
- '*.x86_64-linux.*'
|
|
@ -17,40 +17,32 @@
|
|||
blink = "yes";
|
||||
blink-rate = 500;
|
||||
beam-thickness = 1.5;
|
||||
color = "161821 c6c8d1";
|
||||
};
|
||||
mouse = {
|
||||
hide-when-typing = "yes";
|
||||
};
|
||||
colors = {
|
||||
background = "161821";
|
||||
foreground = "c6c8d1";
|
||||
|
||||
selection-background = "1e2132";
|
||||
selection-foreground = "c6c8d1";
|
||||
|
||||
regular0 = "161821";
|
||||
bright0 = "6b7089";
|
||||
|
||||
background = "161821";
|
||||
regular0 = "1e2132";
|
||||
regular1 = "e27878";
|
||||
bright1 = "e98989";
|
||||
|
||||
regular2 = "b4be82";
|
||||
bright2 = "c0ca8e";
|
||||
|
||||
regular3 = "e2a478";
|
||||
bright3 = "e9b189";
|
||||
|
||||
regular4 = "84a0c6";
|
||||
bright4 = "91acd1";
|
||||
|
||||
regular5 = "a093c7";
|
||||
bright5 = "ada0d3";
|
||||
|
||||
regular6 = "89b8c2";
|
||||
bright6 = "95c4ce";
|
||||
|
||||
regular7 = "c6c8d1";
|
||||
bright0 = "6b7089";
|
||||
bright1 = "e98989";
|
||||
bright2 = "c0ca8e";
|
||||
bright3 = "e9b189";
|
||||
bright4 = "91acd1";
|
||||
bright5 = "ada0d3";
|
||||
bright6 = "95c4ce";
|
||||
bright7 = "d2d4de";
|
||||
selection-foreground = "161821";
|
||||
selection-background = "c6c8d1";
|
||||
};
|
||||
|
||||
key-bindings = {
|
||||
|
|
19
home/ghostty.nix
Normal file
19
home/ghostty.nix
Normal file
|
@ -0,0 +1,19 @@
|
|||
{ ... }: {
|
||||
programs.ghostty = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
clearDefaultKeybinds = true;
|
||||
settings = {
|
||||
theme = "iceberg-dark";
|
||||
font-family = "IBM Plex Mono";
|
||||
font-size = "12";
|
||||
window-decoration = false;
|
||||
confirm-close-surface = false;
|
||||
keybind = [
|
||||
"ctrl+q=quit"
|
||||
"ctrl+shift+c=copy_to_clipboard"
|
||||
"ctrl+shift+v=paste_from_clipboard"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
21
home/irssi.nix
Normal file
21
home/irssi.nix
Normal file
|
@ -0,0 +1,21 @@
|
|||
{...}: {
|
||||
programs.irssi = {
|
||||
enable = true;
|
||||
networks.liberachat = {
|
||||
nick = "cy7";
|
||||
server = {
|
||||
address = "irc.libera.chat";
|
||||
port = 6697;
|
||||
autoConnect = true;
|
||||
};
|
||||
channels = {
|
||||
nixos.autoJoin = true;
|
||||
linux.autoJoin = true;
|
||||
rust.autoJoin = true;
|
||||
};
|
||||
};
|
||||
extraConfig = ''
|
||||
ignores = ( { level = "JOINS PARTS QUITS MODES NICKS"; } )
|
||||
'';
|
||||
};
|
||||
}
|
67
home/kitty.nix
Normal file
67
home/kitty.nix
Normal file
|
@ -0,0 +1,67 @@
|
|||
{pkgs, ...}: {
|
||||
programs.kitty = {
|
||||
enable = true;
|
||||
font = {
|
||||
name = "IBM Plex Mono";
|
||||
package = pkgs.ibm-plex;
|
||||
size = 12;
|
||||
};
|
||||
themeFile = "GitHub_Dark";
|
||||
settings = {
|
||||
enable_audio_bell = false;
|
||||
# how many windows should be open before kitty asks
|
||||
# for confirmation
|
||||
confirm_os_window_close = 0;
|
||||
clear_all_shortcuts = true;
|
||||
|
||||
# will probably lower this later but the max allowed is actually 4GB
|
||||
# this is NOT stored in memory and can only be viewed wth scrollback_pager
|
||||
"scrollback_pager_history_size" = "1024";
|
||||
# see https://github.com/sharkdp/bat/issues/1077#issuecomment-652785399
|
||||
"scrollback_pager" = "bat --pager='less -FR +G'";
|
||||
};
|
||||
keybindings = {
|
||||
# kitty_mod is ctrl+shift by default
|
||||
"kitty_mod+c" = "copy_to_clipboard";
|
||||
"kitty_mod+v" = "paste_from_clipboard";
|
||||
# "ctrl+q" = "quit";
|
||||
|
||||
"kitty_mod+m" = "show_scrollback";
|
||||
|
||||
# windows
|
||||
"kitty_mod+h" = "neighboring_window left";
|
||||
"kitty_mod+alt+h" = "move_window left";
|
||||
"kitty_mod+l" = "neighboring_window right";
|
||||
"kitty_mod+alt+l" = "move_window right";
|
||||
"kitty_mod+j" = "neighboring_window down";
|
||||
"kitty_mod+alt+j" = "move_window down";
|
||||
"kitty_mod+k" = "neighboring_window up";
|
||||
"kitty_mod+alt+k" = "move_window up";
|
||||
"ctrl+f3" = "detach_window new-tab";
|
||||
"ctrl+f4" = "detach_window tab-left";
|
||||
"ctrl+f5" = "load_config_file";
|
||||
"ctrl+alt+l" = "next_layout";
|
||||
"ctrl+alt+t" = "goto_layout tall";
|
||||
"ctrl+alt+s" = "goto_layout stack";
|
||||
"kitty_mod+enter" = "new_window_with_cwd";
|
||||
"kitty_mod+r" = "resize_window";
|
||||
|
||||
# tabs
|
||||
"kitty_mod+n" = "next_tab";
|
||||
"kitty_mod+p" = "previous_tab";
|
||||
"kitty_mod+alt+n" = "move_tab_forward";
|
||||
"kitty_mod+alt+p" = "move_tab_backward";
|
||||
"kitty_mod+w" = "close_tab";
|
||||
"kitty_mod+t" = "new_tab_with_cwd";
|
||||
"ctrl+f2" = "detach_tab";
|
||||
|
||||
# hints
|
||||
"kitty_mod+o>o" = "open_url_with_hints";
|
||||
"kitty_mod+o>p" = "kitten hints --type path --program -";
|
||||
"kitty_mod+o>n" = "kitten hints --type line --program -";
|
||||
"kitty_mod+o>w" = "kitten hints --type word --program -";
|
||||
"kitty_mod+o>h" = "kitten hints --type hash --program -";
|
||||
"kitty_mod+o>l" = "kitten hints --type linenum";
|
||||
};
|
||||
};
|
||||
}
|
200
home/niri/default.nix
Normal file
200
home/niri/default.nix
Normal file
|
@ -0,0 +1,200 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
wallpaper = "${./nixos-c-book.png}";
|
||||
terminal = "kitty";
|
||||
menu = [
|
||||
"fuzzel"
|
||||
"-w"
|
||||
"100"
|
||||
];
|
||||
browser = "librewolf";
|
||||
file-manager = "thunar";
|
||||
clipboard = "cliphist list | ${lib.concatStringsSep " " menu} --dmenu | cliphist decode | wl-copy";
|
||||
in
|
||||
{
|
||||
programs.niri.settings = {
|
||||
prefer-no-csd = true;
|
||||
input.keyboard.xkb.options = "ctrl:nocaps";
|
||||
spawn-at-startup = [
|
||||
{ command = [ "${lib.getExe pkgs.waybar}" ]; }
|
||||
{
|
||||
command = [
|
||||
"${lib.getExe pkgs.swaybg}"
|
||||
"-m"
|
||||
"fill"
|
||||
"-i"
|
||||
wallpaper
|
||||
];
|
||||
}
|
||||
{ command = [ "${lib.getExe pkgs.xwayland-satellite}" ]; }
|
||||
{
|
||||
command = [
|
||||
"wl-paste"
|
||||
"--watch"
|
||||
"cliphist"
|
||||
"store"
|
||||
];
|
||||
}
|
||||
];
|
||||
hotkey-overlay.skip-at-startup = true;
|
||||
|
||||
input = {
|
||||
touchpad = {
|
||||
tap = true;
|
||||
dwt = true;
|
||||
natural-scroll = true;
|
||||
click-method = "clickfinger";
|
||||
};
|
||||
warp-mouse-to-focus = true;
|
||||
focus-follows-mouse.enable = false;
|
||||
};
|
||||
|
||||
environment = {
|
||||
DISPLAY = ":0"; # for xwayland-satellite
|
||||
ANKI_WAYLAND = "1";
|
||||
};
|
||||
|
||||
layout = {
|
||||
gaps = 0;
|
||||
focus-ring = {
|
||||
width = 4;
|
||||
active.color = "#4c7899";
|
||||
inactive.color = "#333333";
|
||||
};
|
||||
always-center-single-column = true;
|
||||
border.enable = false;
|
||||
};
|
||||
|
||||
window-rules = [
|
||||
{
|
||||
matches = [
|
||||
{
|
||||
app-id = "anki";
|
||||
title = "Add";
|
||||
}
|
||||
{ app-id = "mpv"; }
|
||||
{ app-id = "Bitwarden"; }
|
||||
];
|
||||
open-floating = true;
|
||||
}
|
||||
{
|
||||
matches = [ { app-id = "anki"; } ];
|
||||
default-column-width.proportion = .25;
|
||||
}
|
||||
{
|
||||
matches = [
|
||||
{ app-id = "foot"; }
|
||||
{
|
||||
app-id = "anki";
|
||||
title = "^Browse";
|
||||
}
|
||||
{ app-id = "com.mitchellh.ghostt"; }
|
||||
{ app-id = "org.kde.okular"; }
|
||||
{ app-id = "kitty"; }
|
||||
];
|
||||
default-column-width.proportion = .5;
|
||||
}
|
||||
{
|
||||
matches = [ { app-id = "librewolf"; } ];
|
||||
default-column-width.proportion = .75;
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
programs.niri.settings.binds =
|
||||
with config.lib.niri.actions;
|
||||
let
|
||||
sh = spawn "sh" "-c";
|
||||
in
|
||||
{
|
||||
"Mod+Return".action = spawn terminal;
|
||||
"Mod+D".action = spawn menu;
|
||||
|
||||
"Mod+Shift+E".action = quit;
|
||||
"Mod+Equal".action = set-column-width "+10%";
|
||||
"Mod+Minus".action = set-column-width "-10%";
|
||||
"Mod+Shift+Equal".action = set-window-height "+10%";
|
||||
"Mod+Shift+Minus".action = set-window-height "-10%";
|
||||
"Super+Alt+L".action = spawn "swaylock";
|
||||
"Mod+Ctrl+Q".action = close-window;
|
||||
"Mod+H".action = focus-column-left;
|
||||
"Mod+L".action = focus-column-right;
|
||||
"Mod+K".action = focus-window-up;
|
||||
"Mod+J".action = focus-window-down;
|
||||
"Mod+Shift+H".action = move-column-left;
|
||||
"Mod+Shift+L".action = move-column-right;
|
||||
"Mod+Shift+K".action = move-window-up;
|
||||
"Mod+Shift+J".action = move-window-down;
|
||||
"Mod+U".action = focus-workspace-up;
|
||||
"Mod+I".action = focus-workspace-down;
|
||||
"Mod+Shift+U".action = move-window-to-workspace-up;
|
||||
"Mod+Shift+I".action = move-window-to-workspace-down;
|
||||
"Mod+W".action = maximize-column;
|
||||
"Mod+C".action = center-column;
|
||||
"Mod+Shift+Space".action = toggle-window-floating;
|
||||
"Mod+Space".action = switch-focus-between-floating-and-tiling;
|
||||
"Print".action = screenshot;
|
||||
"Alt+Print".action = screenshot-window;
|
||||
"Ctrl+Print".action = screenshot-screen;
|
||||
"Mod+R".action = switch-preset-column-width;
|
||||
"Mod+Shift+R".action = switch-preset-window-height;
|
||||
"Mod+Ctrl+R".action = reset-window-height;
|
||||
"Mod+F".action = fullscreen-window;
|
||||
"Mod+WheelScrollDown" = {
|
||||
cooldown-ms = 150;
|
||||
action = focus-column-right;
|
||||
};
|
||||
"Mod+WheelScrollUp" = {
|
||||
cooldown-ms = 150;
|
||||
action = focus-column-left;
|
||||
};
|
||||
"Mod+Shift+WheelScrollDown" = {
|
||||
cooldown-ms = 150;
|
||||
action = focus-workspace-down;
|
||||
};
|
||||
"Mod+Shift+WheelScrollUp" = {
|
||||
cooldown-ms = 150;
|
||||
action = focus-workspace-up;
|
||||
};
|
||||
|
||||
"XF86AudioRaiseVolume".action = sh "wpctl set-volume @DEFAULT_AUDIO_SINK@ 1%+";
|
||||
"XF86AudioLowerVolume".action = sh "wpctl set-volume @DEFAULT_AUDIO_SINK@ 1%-";
|
||||
"XF86AudioMute".action = sh "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle";
|
||||
"XF86MonBrightnessUp".action = sh "brightnessctl set 1%+";
|
||||
"XF86MonBrightnessDown".action = sh "brightnessctl set 1%-";
|
||||
|
||||
"Mod+1".action = focus-workspace 1;
|
||||
"Mod+2".action = focus-workspace 2;
|
||||
"Mod+3".action = focus-workspace 3;
|
||||
"Mod+4".action = focus-workspace 4;
|
||||
"Mod+5".action = focus-workspace 5;
|
||||
"Mod+6".action = focus-workspace 6;
|
||||
"Mod+7".action = focus-workspace 7;
|
||||
"Mod+8".action = focus-workspace 8;
|
||||
"Mod+9".action = focus-workspace 9;
|
||||
"Mod+Shift+1".action = move-column-to-workspace 1;
|
||||
"Mod+Shift+2".action = move-column-to-workspace 2;
|
||||
"Mod+Shift+3".action = move-column-to-workspace 3;
|
||||
"Mod+Shift+4".action = move-column-to-workspace 4;
|
||||
"Mod+Shift+5".action = move-column-to-workspace 5;
|
||||
"Mod+Shift+6".action = move-column-to-workspace 6;
|
||||
"Mod+Shift+7".action = move-column-to-workspace 7;
|
||||
"Mod+Shift+8".action = move-column-to-workspace 8;
|
||||
"Mod+Shift+9".action = move-column-to-workspace 9;
|
||||
|
||||
"Mod+Alt+B".action = spawn browser;
|
||||
"Mod+Alt+A".action = spawn "anki";
|
||||
"Mod+Alt+F".action = spawn file-manager;
|
||||
"Mod+Alt+E".action = spawn "evolution";
|
||||
"Mod+P".action = spawn "bitwarden";
|
||||
"Mod+Comma".action = sh clipboard;
|
||||
|
||||
"MouseForward".action = spawn "sh" "${./scripts/remote.sh}" "btn1";
|
||||
"MouseBack".action = spawn "sh" "${./scripts/remote.sh}";
|
||||
};
|
||||
}
|
BIN
home/niri/nixos-c-book.png
Normal file
BIN
home/niri/nixos-c-book.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 150 KiB |
25
home/niri/scripts/remote.sh
Executable file
25
home/niri/scripts/remote.sh
Executable file
|
@ -0,0 +1,25 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
active_window=$(niri msg --json focused-window |jq -r .app_id)
|
||||
|
||||
if [ "$1" = "btn1" ]; then
|
||||
if [ "$active_window" = "anki" ]; then
|
||||
wtype " "
|
||||
elif [ "$active_window" = "kitty" ]; then
|
||||
wtype -M ctrl -M shift -k c -m ctrl -m shift
|
||||
elif [ "$active_window" = "chromium-browser" ] || [ "$active_window" = "librewolf" ]; then
|
||||
wtype -M alt -P right -p right -m alt
|
||||
else
|
||||
wtype -M ctrl -k c -m ctrl
|
||||
fi
|
||||
else
|
||||
if [ "$active_window" = "anki" ]; then
|
||||
wtype "1"
|
||||
elif [ "$active_window" = "kitty" ]; then
|
||||
wtype -M ctrl -M shift -k v -m ctrl
|
||||
elif [ "$active_window" = "chromium-browser" ] || [ "$active_window" = "librewolf" ]; then
|
||||
wtype -M alt -P left -p left -m alt
|
||||
else
|
||||
wtype -M ctrl -k v -m ctrl
|
||||
fi
|
||||
fi
|
|
@ -1,4 +1,4 @@
|
|||
{ pkgs, ... }:
|
||||
{ pkgs, inputs, ... }:
|
||||
{
|
||||
programs.nixvim = {
|
||||
enable = true;
|
||||
|
@ -15,15 +15,18 @@
|
|||
incsearch = true;
|
||||
smartcase = true;
|
||||
};
|
||||
colorscheme = "iceberg";
|
||||
clipboard.register = "unnamedplus";
|
||||
colorscheme = "github_dark_tritanopia";
|
||||
clipboard.register = "unnamed";
|
||||
|
||||
globals = {
|
||||
mapleader = ",";
|
||||
};
|
||||
|
||||
extraPlugins = with pkgs.vimPlugins; [
|
||||
iceberg-vim
|
||||
extraPlugins = [
|
||||
(pkgs.vimUtils.buildVimPlugin {
|
||||
name = "gitub-theme";
|
||||
src = inputs.nvim-github-theme;
|
||||
})
|
||||
];
|
||||
|
||||
keymaps = [
|
||||
|
@ -95,8 +98,8 @@
|
|||
"<C-h>" = "cmp.mapping.abort()";
|
||||
"<C-n>" = "cmp.mapping.select_next_item()";
|
||||
"<C-p>" = "cmp.mapping.select_prev_item()";
|
||||
"<C-d>" = "cmp.mapping.scroll_docs(-4)";
|
||||
"<C-u>" = "cmp.mapping.scroll_docs(4)";
|
||||
"<C-u>" = "cmp.mapping.scroll_docs(-4)";
|
||||
"<C-d>" = "cmp.mapping.scroll_docs(4)";
|
||||
"<C-k>" = ''
|
||||
cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
|
@ -147,7 +150,16 @@
|
|||
servers = {
|
||||
bashls.enable = true;
|
||||
lua_ls.enable = true;
|
||||
nil_ls.enable = true;
|
||||
nil_ls = {
|
||||
enable = true;
|
||||
settings = {
|
||||
formatting.command = [
|
||||
"nix"
|
||||
"fmt"
|
||||
];
|
||||
nix.flake.autoArchive = true;
|
||||
};
|
||||
};
|
||||
rust_analyzer = {
|
||||
enable = true;
|
||||
installRustc = true;
|
||||
|
@ -163,14 +175,20 @@
|
|||
plugins.fzf-lua = {
|
||||
enable = true;
|
||||
keymaps = {
|
||||
"<leader>ff" = "git_files";
|
||||
"<leader>ff" = "files";
|
||||
"<leader>fg" = "live_grep";
|
||||
};
|
||||
};
|
||||
|
||||
plugins.neo-tree = {
|
||||
enable = true;
|
||||
closeIfLastWindow = true;
|
||||
buffers.followCurrentFile.enabled = true;
|
||||
window.width = 30;
|
||||
};
|
||||
|
||||
plugins.gitsigns = {
|
||||
enable = true;
|
||||
settings.current_line_blame = true;
|
||||
};
|
||||
|
||||
plugins.cmp-buffer.enable = true;
|
||||
|
@ -182,6 +200,8 @@
|
|||
plugins.nvim-autopairs.enable = true;
|
||||
plugins.rainbow-delimiters.enable = true;
|
||||
plugins.web-devicons.enable = true;
|
||||
plugins.gitsigns.enable = true;
|
||||
plugins.auto-save.enable = true;
|
||||
plugins.indent-blankline.enable = true;
|
||||
plugins.undotree.enable = true;
|
||||
};
|
||||
}
|
||||
|
|
18
home/vscode.nix
Normal file
18
home/vscode.nix
Normal file
|
@ -0,0 +1,18 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
programs.vscode = {
|
||||
enable = true;
|
||||
package = pkgs.vscodium;
|
||||
enableUpdateCheck = false;
|
||||
enableExtensionUpdateCheck = false;
|
||||
mutableExtensionsDir = false;
|
||||
extensions = with pkgs.vscode-extensions; [
|
||||
vscodevim.vim
|
||||
jnoortheen.nix-ide # nix language support
|
||||
editorconfig.editorconfig # editorconfig
|
||||
dracula-theme.theme-dracula # color scheme
|
||||
tomoki1207.pdf # pdf viewer
|
||||
yzhang.markdown-all-in-one # markdown tools
|
||||
];
|
||||
};
|
||||
}
|
|
@ -6,8 +6,8 @@
|
|||
"margin-left": 0,
|
||||
"margin-right": 0,
|
||||
"margin-top": 0,
|
||||
"modules-left": ["sway/workspaces", "clock#time", "clock#date", "battery"], // Sets modules for the left of the bar
|
||||
"modules-center": ["sway/window"], // Set modules for the center of the bar
|
||||
"modules-left": ["niri/workspaces", "clock#time", "clock#date", "battery"], // Sets modules for the left of the bar
|
||||
"modules-center": ["niri/window"], // Set modules for the center of the bar
|
||||
"modules-right": ["tray", "temperature", "cpu", "memory", "wireplumber"], // Set modules for the right of the bar
|
||||
"clock#time": {
|
||||
"format": "<span color=\"#7aa2f7\"> </span>{:%H:%M:%S}",
|
||||
|
@ -71,7 +71,7 @@
|
|||
"on-click": "pavucontrol",
|
||||
"interval": 4,
|
||||
},
|
||||
"sway/window": {
|
||||
"niri/window": {
|
||||
"max-length": 64,
|
||||
},
|
||||
"tray": {
|
||||
|
|
22
home/yt/codespace.nix
Normal file
22
home/yt/codespace.nix
Normal file
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
imports = [
|
||||
./common.nix
|
||||
];
|
||||
home = {
|
||||
username = "codespace";
|
||||
homeDirectory = "/home/codespace";
|
||||
stateVersion = "24.05";
|
||||
};
|
||||
programs.home-manager.enable = true;
|
||||
|
||||
systemd.user.startServices = "sd-switch";
|
||||
|
||||
home.packages = with pkgs; [
|
||||
foot.terminfo
|
||||
attic-client
|
||||
];
|
||||
}
|
|
@ -30,7 +30,7 @@
|
|||
programs.git = {
|
||||
enable = true;
|
||||
userName = "cy";
|
||||
userEmail = "hi@cything.io";
|
||||
userEmail = "cy@cy7.sh";
|
||||
delta = {
|
||||
enable = true;
|
||||
options = {
|
||||
|
|
|
@ -6,6 +6,9 @@
|
|||
imports = [
|
||||
./common.nix
|
||||
../foot.nix
|
||||
../niri
|
||||
../irssi.nix
|
||||
../kitty.nix
|
||||
];
|
||||
home = {
|
||||
username = "yt";
|
||||
|
@ -18,9 +21,9 @@
|
|||
|
||||
qt = {
|
||||
enable = true;
|
||||
platformTheme.name = "gtk";
|
||||
style.name = "adwaita-dark";
|
||||
style.package = pkgs.adwaita-qt;
|
||||
platformTheme.name = "kde";
|
||||
style.name = "breeze-dark";
|
||||
style.package = pkgs.kdePackages.breeze;
|
||||
};
|
||||
|
||||
gtk = {
|
||||
|
@ -39,8 +42,17 @@
|
|||
};
|
||||
};
|
||||
|
||||
home.sessionVariables = {
|
||||
ANKI_WAYLAND = "1";
|
||||
home.pointerCursor = {
|
||||
package = pkgs.bibata-cursors;
|
||||
name = "Bibata-Modern";
|
||||
gtk.enable = true;
|
||||
x11.enable = true;
|
||||
};
|
||||
|
||||
dconf.settings = {
|
||||
"org/gnome/desktop/interface" = {
|
||||
cursor-theme = "Bibata-Modern";
|
||||
};
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [
|
||||
|
@ -50,7 +62,6 @@
|
|||
bitwarden-desktop
|
||||
bitwarden-cli
|
||||
fastfetch
|
||||
discord
|
||||
nwg-look
|
||||
kdePackages.gwenview
|
||||
kdePackages.okular
|
||||
|
@ -99,6 +110,8 @@
|
|||
clang
|
||||
seahorse
|
||||
github-cli
|
||||
fuzzel
|
||||
nixpkgs-review
|
||||
];
|
||||
|
||||
programs.waybar.enable = true;
|
||||
|
@ -121,7 +134,6 @@
|
|||
};
|
||||
|
||||
xdg.configFile = {
|
||||
sway.source = ../sway;
|
||||
rofi.source = ../rofi;
|
||||
waybar.source = ../waybar;
|
||||
mpv.source = ../mpv;
|
||||
|
@ -138,4 +150,9 @@
|
|||
};
|
||||
|
||||
services.gnome-keyring.enable = true;
|
||||
|
||||
programs.direnv = {
|
||||
enable = true;
|
||||
nix-direnv.enable = true;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -87,9 +87,9 @@
|
|||
"ta" = "tmux new-session -A -s";
|
||||
"se" = "sudoedit";
|
||||
"s" = "sudo";
|
||||
"nrs" = "sudo nixos-rebuild switch --flake .";
|
||||
"nrt" = "sudo nixos-rebuild test --flake .";
|
||||
"hrs" = "home-manager switch --flake .";
|
||||
"nrs" = "sudo nixos-rebuild switch -L --flake .";
|
||||
"nrt" = "sudo nixos-rebuild test -L --flake .";
|
||||
"hrs" = "home-manager switch -L --flake .";
|
||||
"g" = "git";
|
||||
"ga" = "git add";
|
||||
"gaa" = "git add --all";
|
||||
|
@ -116,4 +116,5 @@
|
|||
programs.zoxide.enableZshIntegration = true;
|
||||
programs.eza.enableZshIntegration = true;
|
||||
programs.nix-index.enableZshIntegration = false;
|
||||
programs.direnv.enableZshIntegration = false;
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@ git.cy7.sh {
|
|||
reverse_proxy localhost:3000
|
||||
}
|
||||
|
||||
rss.cything.io {
|
||||
rss.cy7.sh {
|
||||
import common
|
||||
reverse_proxy localhost:8080
|
||||
}
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
{ ... }:
|
||||
{ inputs, ... }:
|
||||
{
|
||||
services.conduwuit = {
|
||||
enable = true;
|
||||
package = inputs.conduwuit.packages.x86_64-linux.static-x86_64-linux-musl-all-features-x86_64-haswell-optimised;
|
||||
settings.global = {
|
||||
port = [ 8448 ];
|
||||
server_name = "cything.io";
|
||||
|
|
|
@ -7,9 +7,12 @@
|
|||
virtualisation.oci-containers.containers.element = {
|
||||
image = "vectorim/element-web";
|
||||
autoStart = true;
|
||||
ports = [ "127.0.0.1:8089:80" ];
|
||||
ports = [ "127.0.0.1:8089:8089" ];
|
||||
pull = "newer";
|
||||
networks = [ "element-net" ];
|
||||
environment = {
|
||||
ELEMENT_WEB_PORT = "8089";
|
||||
};
|
||||
};
|
||||
|
||||
systemd.services.create-element-net = {
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
HTTP_PORT = 3000;
|
||||
HTTP_ADDR = "127.0.0.1";
|
||||
DOMAIN = "git.cy7.sh";
|
||||
LANDING_PAGE = "/cy";
|
||||
LANDING_PAGE = "explore";
|
||||
};
|
||||
session.COOKIE_SECURE = true;
|
||||
service.DISABLE_REGISTRATION = true;
|
||||
|
@ -20,6 +20,7 @@
|
|||
};
|
||||
actions.ENABLED = false;
|
||||
repository.ENABLE_PUSH_CREATE_USER = true;
|
||||
indexer.REPO_INDEXER_ENABLED = true;
|
||||
};
|
||||
database = {
|
||||
type = "postgres";
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
adminCredentialsFile = config.sops.secrets."miniflux/env".path;
|
||||
config = {
|
||||
PORT = 8080;
|
||||
BASE_URL = "https://rss.cything.io";
|
||||
BASE_URL = "https://rss.cy7.sh";
|
||||
FORCE_REFRESH_INTERVAL = 0; # don't rate limit me
|
||||
};
|
||||
};
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
inputs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
|
@ -10,12 +9,6 @@
|
|||
./hardware-configuration.nix
|
||||
../common.nix
|
||||
../zsh.nix
|
||||
{
|
||||
disabledModules = [
|
||||
"services/backup/btrbk.nix"
|
||||
];
|
||||
}
|
||||
(inputs.nixpkgs-btrbk + "/nixos/modules/services/backup/btrbk.nix")
|
||||
];
|
||||
|
||||
sops.age.keyFile = "/root/.config/sops/age/keys.txt";
|
||||
|
@ -48,7 +41,7 @@
|
|||
efi.canTouchEfiVariables = false; # toggle when installing
|
||||
};
|
||||
tmp.cleanOnBoot = true;
|
||||
kernelPackages = pkgs.linuxPackages_latest;
|
||||
kernelPackages = pkgs.linuxKernel.packages.linux_zen;
|
||||
extraModulePackages = with config.boot.kernelPackages; [
|
||||
rtl8821ce
|
||||
];
|
||||
|
@ -195,11 +188,6 @@
|
|||
};
|
||||
services.blueman.enable = true;
|
||||
|
||||
programs.sway = {
|
||||
enable = true;
|
||||
wrapperFeatures.gtk = true;
|
||||
};
|
||||
|
||||
my.backup = {
|
||||
enable = true;
|
||||
jobName = "ytnixRsync";
|
||||
|
@ -322,4 +310,9 @@
|
|||
};
|
||||
|
||||
services.trezord.enable = true;
|
||||
|
||||
my.niri = {
|
||||
enable = true;
|
||||
package = pkgs.niri-unstable;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -2,5 +2,6 @@
|
|||
{
|
||||
imports = [
|
||||
./backup.nix
|
||||
./niri.nix
|
||||
];
|
||||
}
|
||||
|
|
21
modules/niri.nix
Normal file
21
modules/niri.nix
Normal file
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.my.niri;
|
||||
in
|
||||
{
|
||||
options.my.niri = {
|
||||
enable = lib.mkEnableOption "niri";
|
||||
package = lib.mkPackageOption pkgs "niri" { };
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
programs.niri.package = cfg.package;
|
||||
programs.niri.enable = true;
|
||||
programs.xwayland.enable = true;
|
||||
};
|
||||
}
|
|
@ -1,23 +1,28 @@
|
|||
final: prev: {
|
||||
final: prev:
|
||||
let
|
||||
newRust = final.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml;
|
||||
newRustPlatform = final.makeRustPlatform {
|
||||
cargo = newRust;
|
||||
rustc = newRust;
|
||||
};
|
||||
in
|
||||
{
|
||||
conduwuit = prev.conduwuit.override (old: {
|
||||
rustPlatform = old.rustPlatform // {
|
||||
rustPlatform = newRustPlatform // {
|
||||
buildRustPackage =
|
||||
args:
|
||||
old.rustPlatform.buildRustPackage (
|
||||
newRustPlatform.buildRustPackage (
|
||||
args
|
||||
// {
|
||||
version = "0.5.0-rc2";
|
||||
src = final.fetchFromGitHub {
|
||||
owner = "girlbossceo";
|
||||
repo = "conduwuit";
|
||||
rev = "8c74e35e7640a041c1f3496d82585e5240294352";
|
||||
hash = "sha256-/2YD3TXT9pQ7oPEm9wDrq35afU88qukMIWqrBX5JyXg=";
|
||||
rev = "5b8464252c2c03edf65e43153be026dbb768a12a";
|
||||
hash = "sha256-yNdxoVZX13QUDJYM6zTMY9ExvacTqB+f0MLvDreSW8U=";
|
||||
};
|
||||
doCheck = false;
|
||||
cargoHash = "sha256-ZenMTCEJrALKQnW7/eXqrhFj+BedE9i/rQZMsPHl8K0=";
|
||||
cargoPatches = [
|
||||
./fix-lint.patch
|
||||
];
|
||||
cargoHash = "sha256-g19UujLI9d4aw+1273gfC17LDLOciqBvuLhe/VCsh80=";
|
||||
# unstable has this set to "conduit"
|
||||
meta.mainProgram = "conduwuit";
|
||||
|
||||
|
|
|
@ -1,74 +0,0 @@
|
|||
diff --git a/Cargo.lock b/Cargo.lock
|
||||
index 3f900a114..0d30a3fec 100644
|
||||
--- a/Cargo.lock
|
||||
+++ b/Cargo.lock
|
||||
@@ -4493,7 +4493,7 @@ checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3"
|
||||
[[package]]
|
||||
name = "tracing"
|
||||
version = "0.1.41"
|
||||
-source = "git+https://github.com/girlbossceo/tracing?rev=ccc4fbd8238c2d5ba354e61ec17ac610af11401d#ccc4fbd8238c2d5ba354e61ec17ac610af11401d"
|
||||
+source = "git+https://github.com/girlbossceo/tracing?rev=3cf1c991e3660785d3855a34245949557db33209#3cf1c991e3660785d3855a34245949557db33209"
|
||||
dependencies = [
|
||||
"log",
|
||||
"pin-project-lite",
|
||||
@@ -4504,7 +4504,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "tracing-attributes"
|
||||
version = "0.1.28"
|
||||
-source = "git+https://github.com/girlbossceo/tracing?rev=ccc4fbd8238c2d5ba354e61ec17ac610af11401d#ccc4fbd8238c2d5ba354e61ec17ac610af11401d"
|
||||
+source = "git+https://github.com/girlbossceo/tracing?rev=3cf1c991e3660785d3855a34245949557db33209#3cf1c991e3660785d3855a34245949557db33209"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
@@ -4514,7 +4514,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "tracing-core"
|
||||
version = "0.1.33"
|
||||
-source = "git+https://github.com/girlbossceo/tracing?rev=ccc4fbd8238c2d5ba354e61ec17ac610af11401d#ccc4fbd8238c2d5ba354e61ec17ac610af11401d"
|
||||
+source = "git+https://github.com/girlbossceo/tracing?rev=3cf1c991e3660785d3855a34245949557db33209#3cf1c991e3660785d3855a34245949557db33209"
|
||||
dependencies = [
|
||||
"once_cell",
|
||||
"valuable",
|
||||
@@ -4534,7 +4534,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "tracing-log"
|
||||
version = "0.2.0"
|
||||
-source = "git+https://github.com/girlbossceo/tracing?rev=ccc4fbd8238c2d5ba354e61ec17ac610af11401d#ccc4fbd8238c2d5ba354e61ec17ac610af11401d"
|
||||
+source = "git+https://github.com/girlbossceo/tracing?rev=3cf1c991e3660785d3855a34245949557db33209#3cf1c991e3660785d3855a34245949557db33209"
|
||||
dependencies = [
|
||||
"log",
|
||||
"once_cell",
|
||||
@@ -4562,7 +4562,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "tracing-subscriber"
|
||||
version = "0.3.18"
|
||||
-source = "git+https://github.com/girlbossceo/tracing?rev=ccc4fbd8238c2d5ba354e61ec17ac610af11401d#ccc4fbd8238c2d5ba354e61ec17ac610af11401d"
|
||||
+source = "git+https://github.com/girlbossceo/tracing?rev=3cf1c991e3660785d3855a34245949557db33209#3cf1c991e3660785d3855a34245949557db33209"
|
||||
dependencies = [
|
||||
"matchers",
|
||||
"nu-ansi-term",
|
||||
diff --git a/Cargo.toml b/Cargo.toml
|
||||
index 76acda807..a2916a6aa 100644
|
||||
--- a/Cargo.toml
|
||||
+++ b/Cargo.toml
|
||||
@@ -513,16 +513,16 @@ version = "0.2"
|
||||
# https://github.com/girlbossceo/tracing/commit/b348dca742af641c47bc390261f60711c2af573c
|
||||
[patch.crates-io.tracing-subscriber]
|
||||
git = "https://github.com/girlbossceo/tracing"
|
||||
-rev = "ccc4fbd8238c2d5ba354e61ec17ac610af11401d"
|
||||
+rev = "3cf1c991e3660785d3855a34245949557db33209"
|
||||
[patch.crates-io.tracing]
|
||||
git = "https://github.com/girlbossceo/tracing"
|
||||
-rev = "ccc4fbd8238c2d5ba354e61ec17ac610af11401d"
|
||||
+rev = "3cf1c991e3660785d3855a34245949557db33209"
|
||||
[patch.crates-io.tracing-core]
|
||||
git = "https://github.com/girlbossceo/tracing"
|
||||
-rev = "ccc4fbd8238c2d5ba354e61ec17ac610af11401d"
|
||||
+rev = "3cf1c991e3660785d3855a34245949557db33209"
|
||||
[patch.crates-io.tracing-log]
|
||||
git = "https://github.com/girlbossceo/tracing"
|
||||
-rev = "ccc4fbd8238c2d5ba354e61ec17ac610af11401d"
|
||||
+rev = "3cf1c991e3660785d3855a34245949557db33209"
|
||||
|
||||
# adds a tab completion callback: https://github.com/girlbossceo/rustyline-async/commit/de26100b0db03e419a3d8e1dd26895d170d1fe50
|
||||
# adds event for CTRL+\: https://github.com/girlbossceo/rustyline-async/commit/67d8c49aeac03a5ef4e818f663eaa94dd7bf339b
|
28
overlay/conduwuit/rust-toolchain.toml
Normal file
28
overlay/conduwuit/rust-toolchain.toml
Normal file
|
@ -0,0 +1,28 @@
|
|||
# This is the authoritiative configuration of this project's Rust toolchain.
|
||||
#
|
||||
# Other files that need upkeep when this changes:
|
||||
#
|
||||
# * `Cargo.toml`
|
||||
# * `flake.nix`
|
||||
#
|
||||
# Search in those files for `rust-toolchain.toml` to find the relevant places.
|
||||
# If you're having trouble making the relevant changes, bug a maintainer.
|
||||
|
||||
[toolchain]
|
||||
channel = "1.84.0"
|
||||
profile = "minimal"
|
||||
components = [
|
||||
# For rust-analyzer
|
||||
"rust-src",
|
||||
"rust-analyzer",
|
||||
# For CI and editors
|
||||
"rustfmt",
|
||||
"clippy",
|
||||
]
|
||||
targets = [
|
||||
#"x86_64-apple-darwin",
|
||||
"x86_64-unknown-linux-gnu",
|
||||
"x86_64-unknown-linux-musl",
|
||||
"aarch64-unknown-linux-musl",
|
||||
#"aarch64-apple-darwin",
|
||||
]
|
|
@ -2,6 +2,7 @@ let
|
|||
overlays = [
|
||||
./conduwuit
|
||||
./attic
|
||||
./kernel.nix
|
||||
];
|
||||
importedOverlays = map (m: import m) overlays;
|
||||
in
|
||||
|
|
11
overlay/kernel.nix
Normal file
11
overlay/kernel.nix
Normal file
|
@ -0,0 +1,11 @@
|
|||
final: prev:
|
||||
let
|
||||
inherit (prev) lib;
|
||||
in
|
||||
{
|
||||
linuxKernels.kernels.linux_zen = prev.linuxKernels.kernels.linux_zen.override (old: {
|
||||
extraStructuredConfig = with lib.kernel; {
|
||||
CONFIG_SCHED_MUQSS = yes;
|
||||
};
|
||||
});
|
||||
}
|
Loading…
Add table
Reference in a new issue