Compare commits
1 commit
main
...
flake-refa
| Author | SHA1 | Date | |
|---|---|---|---|
| b98ec76e3d |
26 changed files with 613 additions and 729 deletions
239
flake.lock
generated
239
flake.lock
generated
|
|
@ -1,51 +1,5 @@
|
|||
{
|
||||
"nodes": {
|
||||
"caelestia-cli": {
|
||||
"inputs": {
|
||||
"caelestia-shell": [
|
||||
"caelestia-shell"
|
||||
],
|
||||
"nixpkgs": [
|
||||
"caelestia-shell",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1777726295,
|
||||
"narHash": "sha256-Db9B3uTLDSj7zjQ4L3tIk9RcxHXbWRKw5fw8JozikyI=",
|
||||
"owner": "caelestia-dots",
|
||||
"repo": "cli",
|
||||
"rev": "a00e71d6b7572a8dbbb7945a45b79acf2401ad56",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "caelestia-dots",
|
||||
"repo": "cli",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"caelestia-shell": {
|
||||
"inputs": {
|
||||
"caelestia-cli": "caelestia-cli",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
],
|
||||
"quickshell": "quickshell"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1778065483,
|
||||
"narHash": "sha256-o16Q7F9BjZFIPKDis/w/aBbSY6hZRPP/svS8GJ1xuoM=",
|
||||
"owner": "caelestia-dots",
|
||||
"repo": "shell",
|
||||
"rev": "4763a690cd41ba8c13e69d89a0d2d655332d1e89",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "caelestia-dots",
|
||||
"repo": "shell",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"easy-hosts": {
|
||||
"locked": {
|
||||
"lastModified": 1755470564,
|
||||
|
|
@ -68,11 +22,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1772408722,
|
||||
"narHash": "sha256-rHuJtdcOjK7rAHpHphUb1iCvgkU3GpfvicLMwwnfMT0=",
|
||||
"lastModified": 1762980239,
|
||||
"narHash": "sha256-8oNVE8TrD19ulHinjaqONf9QWCKK+w4url56cdStMpM=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "f20dc5d9b8027381c474144ecabc9034d6a839a3",
|
||||
"rev": "52a2caecc898d0b46b2b905f058ccc5081f842da",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -81,24 +35,36 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-parts_2": {
|
||||
"flake-utils": {
|
||||
"inputs": {
|
||||
"nixpkgs-lib": [
|
||||
"nixvim",
|
||||
"nixpkgs"
|
||||
]
|
||||
"systems": "systems"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1769996383,
|
||||
"narHash": "sha256-AnYjnFWgS49RlqX7LrC4uA+sCCDBj0Ry/WOJ5XWAsa0=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "57928607ea566b5db3ad13af0e57e921e6b12381",
|
||||
"lastModified": 1731533236,
|
||||
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flakey-profile": {
|
||||
"locked": {
|
||||
"lastModified": 1712898590,
|
||||
"narHash": "sha256-FhGIEU93VHAChKEXx905TSiPZKga69bWl1VB37FK//I=",
|
||||
"owner": "lf-",
|
||||
"repo": "flakey-profile",
|
||||
"rev": "243c903fd8eadc0f63d205665a92d4df91d42d9d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "lf-",
|
||||
"repo": "flakey-profile",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
|
|
@ -109,11 +75,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1773810247,
|
||||
"narHash": "sha256-6Vz1Thy/1s7z+Rq5OfkWOBAdV4eD+OrvDs10yH6xJzQ=",
|
||||
"lastModified": 1763416652,
|
||||
"narHash": "sha256-8EBEEvtzQ11LCxpQHMNEBQAGtQiCu/pqP9zSovDSbNM=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "d47357a4c806d18a3e853ad2699eaec3c01622e7",
|
||||
"rev": "ea164b7c9ccdc2321379c2ff78fd4317b4c41312",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -122,6 +88,43 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"lix": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1763570812,
|
||||
"narHash": "sha256-A42G8ulTZ1MFCR0VsLF21CoKi0XKGUYwtVBHGm5mFgQ=",
|
||||
"rev": "f3b2f3496bd6d346cba475d0ba152a9d3a83dec7",
|
||||
"type": "tarball",
|
||||
"url": "https://git.lix.systems/api/v1/repos/lix-project/lix/archive/f3b2f3496bd6d346cba475d0ba152a9d3a83dec7.tar.gz"
|
||||
},
|
||||
"original": {
|
||||
"type": "tarball",
|
||||
"url": "https://git.lix.systems/lix-project/lix/archive/main.tar.gz"
|
||||
}
|
||||
},
|
||||
"lix-module": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils",
|
||||
"flakey-profile": "flakey-profile",
|
||||
"lix": [
|
||||
"lix"
|
||||
],
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1763435414,
|
||||
"narHash": "sha256-i2467FddWfd19q5Qoj+1/BAeg6LZmM5m4mYGRSQn/as=",
|
||||
"rev": "192c92b603731fbc1bade6c1b18c8d8a0086f703",
|
||||
"type": "tarball",
|
||||
"url": "https://git.lix.systems/api/v1/repos/lix-project/nixos-module/archive/192c92b603731fbc1bade6c1b18c8d8a0086f703.tar.gz"
|
||||
},
|
||||
"original": {
|
||||
"type": "tarball",
|
||||
"url": "https://git.lix.systems/lix-project/nixos-module/archive/main.tar.gz"
|
||||
}
|
||||
},
|
||||
"niri": {
|
||||
"inputs": {
|
||||
"niri-stable": "niri-stable",
|
||||
|
|
@ -134,11 +137,11 @@
|
|||
"xwayland-satellite-unstable": "xwayland-satellite-unstable"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1773848336,
|
||||
"narHash": "sha256-fWAuQtxkD6j6KP7xtUgJZzVfRYLxhTJ1DeBG4vAFO7Q=",
|
||||
"lastModified": 1763538184,
|
||||
"narHash": "sha256-6umNY06L6ZUjinthjVZIwyWyAjxOXSPhXfY0U1CVTWw=",
|
||||
"owner": "sodiboo",
|
||||
"repo": "niri-flake",
|
||||
"rev": "ea96ac8a3effd1eb372f57b782c857d391c48439",
|
||||
"rev": "85a16f400641eed912431efcec16f12e2100d46a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -167,11 +170,11 @@
|
|||
"niri-unstable": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1773130184,
|
||||
"narHash": "sha256-3bwx4WqCB06yfQIGB+OgIckOkEDyKxiTD5pOo4Xz2rI=",
|
||||
"lastModified": 1763531615,
|
||||
"narHash": "sha256-cMi8tz+0+gWtlYqVnyMv7phOeQ0/4WmzZ/lxCyraUVw=",
|
||||
"owner": "YaLTeR",
|
||||
"repo": "niri",
|
||||
"rev": "b07bde3ee82dd73115e6b949e4f3f63695da35ea",
|
||||
"rev": "c722634c269ae97a5ea185691bcd0b8c73a600e5",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -182,11 +185,11 @@
|
|||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1773628058,
|
||||
"narHash": "sha256-YgVQzPaKa5eVf/rGA5Rn7BWJcP0T98JkE+2KuKVTyzA=",
|
||||
"rev": "f8573b9c935cfaa162dd62cc9e75ae2db86f85df",
|
||||
"lastModified": 1763464769,
|
||||
"narHash": "sha256-mU85VDFRIgKGq1EhT71bLjhvjJ5yuMEe0Ip1kwCbR80=",
|
||||
"rev": "6f374686605df381de8541c072038472a5ea2e2d",
|
||||
"type": "tarball",
|
||||
"url": "https://releases.nixos.org/nixpkgs/nixpkgs-26.05pre963857.f8573b9c935c/nixexprs.tar.xz"
|
||||
"url": "https://releases.nixos.org/nixpkgs/nixpkgs-25.11pre898015.6f374686605d/nixexprs.tar.xz"
|
||||
},
|
||||
"original": {
|
||||
"type": "tarball",
|
||||
|
|
@ -195,96 +198,32 @@
|
|||
},
|
||||
"nixpkgs-stable": {
|
||||
"locked": {
|
||||
"lastModified": 1773814637,
|
||||
"narHash": "sha256-GNU+ooRmrHLfjlMsKdn0prEKVa0faVanm0jrgu1J/gY=",
|
||||
"lastModified": 1763334038,
|
||||
"narHash": "sha256-LBVOyaH6NFzQ3X/c6vfMZ9k4SV2ofhpxeL9YnhHNJQQ=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "fea3b367d61c1a6592bc47c72f40a9f3e6a53e96",
|
||||
"rev": "4c8cdd5b1a630e8f72c9dd9bf582b1afb3127d2c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-25.11",
|
||||
"ref": "nixos-25.05",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixvim": {
|
||||
"inputs": {
|
||||
"flake-parts": "flake-parts_2",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
],
|
||||
"systems": "systems"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1772402258,
|
||||
"narHash": "sha256-3DmCFOdmbkFML1/G9gj8Wb+rCCZFPOQtNoMCpqOF8SA=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nixvim",
|
||||
"rev": "21ae25e13b01d3b4cdc750b5f9e7bad68b150c10",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "nixvim",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"quickshell": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"caelestia-shell",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1777706159,
|
||||
"narHash": "sha256-TuD8hw9lkRCEb+6v93iB7HDvcmvH8R0qyD6wBmPGfv8=",
|
||||
"ref": "refs/heads/master",
|
||||
"rev": "8db8ca1fecfcce8def1f9265fa1742baa0e0c271",
|
||||
"revCount": 813,
|
||||
"type": "git",
|
||||
"url": "https://git.outfoxxed.me/outfoxxed/quickshell"
|
||||
},
|
||||
"original": {
|
||||
"type": "git",
|
||||
"url": "https://git.outfoxxed.me/outfoxxed/quickshell"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"caelestia-shell": "caelestia-shell",
|
||||
"easy-hosts": "easy-hosts",
|
||||
"flake-parts": "flake-parts",
|
||||
"home-manager": "home-manager",
|
||||
"lix": "lix",
|
||||
"lix-module": "lix-module",
|
||||
"niri": "niri",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"nixvim": "nixvim",
|
||||
"silentSDDM": "silentSDDM",
|
||||
"sops-nix": "sops-nix"
|
||||
}
|
||||
},
|
||||
"silentSDDM": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1771956684,
|
||||
"narHash": "sha256-+EtzmEzGA2xqwIvKrP0euYaOzrmTQWEWAiWV+k2WBEM=",
|
||||
"owner": "uiriansan",
|
||||
"repo": "SilentSDDM",
|
||||
"rev": "34f82e1fb8412fff78b82a0dcce763492b36054c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "uiriansan",
|
||||
"repo": "SilentSDDM",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"sops-nix": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
|
|
@ -292,11 +231,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1773698643,
|
||||
"narHash": "sha256-VCiDjE8kNs8uCAK73Ezk1r3fFuc4JepvW07YFqaN968=",
|
||||
"lastModified": 1763509310,
|
||||
"narHash": "sha256-s2WzTAD3vJtPACBCZXezNUMTG/wC6SFsU9DxazB9wDI=",
|
||||
"owner": "Mic92",
|
||||
"repo": "sops-nix",
|
||||
"rev": "8237de83e8200d16fe0c4467b02a1c608ff28044",
|
||||
"rev": "3ee33c0ed7c5aa61b4e10484d2ebdbdc98afb03e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -340,11 +279,11 @@
|
|||
"xwayland-satellite-unstable": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1773622265,
|
||||
"narHash": "sha256-wToKwH7IgWdGLMSIWksEDs4eumR6UbbsuPQ42r0oTXQ=",
|
||||
"lastModified": 1762747449,
|
||||
"narHash": "sha256-Z1TKiux8K09a93w4PFDFsj8HFugXNy3iCC3Z8MpR5Rk=",
|
||||
"owner": "Supreeeme",
|
||||
"repo": "xwayland-satellite",
|
||||
"rev": "a879e5e0896a326adc79c474bf457b8b99011027",
|
||||
"rev": "6338574bc5c036487486acde264f38f39ea15fad",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
|
|||
49
flake.nix
49
flake.nix
|
|
@ -13,7 +13,7 @@
|
|||
|
||||
shared = {
|
||||
modules = [
|
||||
# inputs.lix-module.nixosModules.default
|
||||
inputs.lix-module.nixosModules.default
|
||||
./nixosModules
|
||||
];
|
||||
};
|
||||
|
|
@ -25,11 +25,7 @@
|
|||
inputs.home-manager.lib.homeManagerConfiguration {
|
||||
extraSpecialArgs = { inherit inputs; };
|
||||
pkgs = inputs.nixpkgs.legacyPackages.${system};
|
||||
modules = with inputs;[
|
||||
./hmModules
|
||||
nixvim.homeModules.nixvim
|
||||
caelestia-shell.homeManagerModules.default
|
||||
] ++ extraModules;
|
||||
modules = [ ./hmModules ] ++ extraModules;
|
||||
};
|
||||
in {
|
||||
"pan@juri" = userConfig "x86_64-linux" [ ./users/juri ];
|
||||
|
|
@ -59,29 +55,22 @@
|
|||
inputs.nixpkgs-lib.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
caelestia-shell = {
|
||||
type = "github";
|
||||
owner = "caelestia-dots";
|
||||
repo = "shell";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
easy-hosts = {
|
||||
type = "github";
|
||||
owner = "tgirlcloud";
|
||||
repo = "easy-hosts";
|
||||
};
|
||||
|
||||
# lix = {
|
||||
# url = "https://git.lix.systems/lix-project/lix/archive/main.tar.gz";
|
||||
# flake = false;
|
||||
# };
|
||||
#
|
||||
# lix-module = {
|
||||
# url = "https://git.lix.systems/lix-project/nixos-module/archive/main.tar.gz";
|
||||
# inputs.nixpkgs.follows = "nixpkgs";
|
||||
# inputs.lix.follows = "lix";
|
||||
# };
|
||||
lix = {
|
||||
url = "https://git.lix.systems/lix-project/lix/archive/main.tar.gz";
|
||||
flake = false;
|
||||
};
|
||||
|
||||
lix-module = {
|
||||
url = "https://git.lix.systems/lix-project/nixos-module/archive/main.tar.gz";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
inputs.lix.follows = "lix";
|
||||
};
|
||||
|
||||
niri = {
|
||||
type = "github";
|
||||
|
|
@ -90,25 +79,11 @@
|
|||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
nixvim = {
|
||||
type = "github";
|
||||
owner = "nix-community";
|
||||
repo = "nixvim";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
sops-nix = {
|
||||
type = "github";
|
||||
owner = "Mic92";
|
||||
repo = "sops-nix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
silentSDDM = {
|
||||
type = "github";
|
||||
owner = "uiriansan";
|
||||
repo = "SilentSDDM";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,52 +0,0 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
options.beets = {
|
||||
enable = lib.mkEnableOption "Enables beets music";
|
||||
plugins = {
|
||||
the.enable = lib.mkOption { default = true; };
|
||||
ftintitle.enable = lib.mkOption { default = true; };
|
||||
lyrics.enable = lib.mkOption { default = true; };
|
||||
fetchart = {
|
||||
enable = lib.mkOption { default = true; };
|
||||
embed = lib.mkOption { default = true; };
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf config.beets.enable {
|
||||
programs.beets.enable = true;
|
||||
|
||||
programs.beets.settings = {
|
||||
directory = "${config.xdg.userDirs.music}";
|
||||
library = "${config.xdg.userDirs.music}.db";
|
||||
|
||||
paths.default = with config.beets.plugins; let
|
||||
# raw_artist = if ftintitle.enable
|
||||
# then "$album_artist_no_feat"
|
||||
# else "$albumartist";
|
||||
raw_artist = "$albumartist";
|
||||
artist = if the.enable
|
||||
then "%the{${raw_artist}}/"
|
||||
else raw_artist;
|
||||
|
||||
the_rest = "$album%aunique{}/$track $title";
|
||||
in artist + the_rest;
|
||||
|
||||
embedart = with config.beets.plugins.fetchart;
|
||||
lib.mkIf (enable && embed) {
|
||||
maxwidth = 500;
|
||||
};
|
||||
|
||||
plugins = with lib; with config.beets.plugins;
|
||||
optional (the.enable) "the" ++
|
||||
optional (ftintitle.enable) "ftintitle" ++
|
||||
optional (lyrics.enable) "lyrics" ++
|
||||
optional (fetchart.enable) "fetchart" ++
|
||||
optional (fetchart.embed) "embedart" ++ [
|
||||
"musicbrainz"
|
||||
"info"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,61 +0,0 @@
|
|||
{ inputs, config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
options.caelestia-shell = {
|
||||
enable = lib.mkEnableOption "Enables caelestia-shell";
|
||||
};
|
||||
|
||||
config = lib.mkIf config.caelestia-shell.enable {
|
||||
programs.caelestia = {
|
||||
enable = true;
|
||||
cli.enable = true;
|
||||
systemd.enable = true;
|
||||
settings = {
|
||||
general.idle.timeouts = [ { timeout = 180; idleAction = "lock"; } ];
|
||||
appearance = {
|
||||
anim.durations.scale = 0.8;
|
||||
transparency = { base = 0.75; enabled = true; layers = 0.4; };
|
||||
};
|
||||
background.desktopClock = {
|
||||
enabled = true;
|
||||
scale = 2.0;
|
||||
};
|
||||
bar = {
|
||||
clock = {
|
||||
background = true;
|
||||
showDate = true;
|
||||
showIcon = false;
|
||||
};
|
||||
entries = [
|
||||
{ id = "logo"; enabled = true; }
|
||||
{ id = "spacer"; enabled = true; }
|
||||
{ id = "tray"; enabled = true; }
|
||||
{ id = "clock"; enabled = true; }
|
||||
{ id = "power"; enabled = true; }
|
||||
];
|
||||
persistent = false;
|
||||
popouts = { activeWindow = false; statusIcons = false; };
|
||||
scrollActions = { workspaces = false; brightness = false; };
|
||||
showOnHover = true;
|
||||
};
|
||||
border = {
|
||||
rounding = 6;
|
||||
thickness = 4;
|
||||
};
|
||||
dashboard.showMedia = false;
|
||||
launcher.enabled = false;
|
||||
osd.enableBrightness = false;
|
||||
paths.wallpaperDir = "${config.xdg.userDirs.pictures}/wallpapers";
|
||||
services = {
|
||||
weatherLocation = "47.61600, -122.31903";
|
||||
useFahrenheit = false;
|
||||
useTwelveHourClock = false;
|
||||
};
|
||||
utilities = {
|
||||
enabled = false;
|
||||
toasts.configLoaded = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,93 +0,0 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
{
|
||||
options.foot = {
|
||||
enable = lib.mkEnableOption "Enables foot";
|
||||
make_default = lib.mkEnableOption "Makes foot default terminal emulator";
|
||||
font = lib.mkOption { default = ""; };
|
||||
font_size = lib.mkOption { default = 24; };
|
||||
theme = {
|
||||
catppuccin.enable = lib.mkEnableOption "Enables catppuccin theme for foot";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf config.foot.enable {
|
||||
programs.foot = {
|
||||
enable = true;
|
||||
settings = {
|
||||
main.font = "${config.foot.font}:size=${builtins.toString config.foot.font_size}";
|
||||
colors-dark = lib.mkIf config.foot.theme.catppuccin.enable {
|
||||
cursor = "11111b f5e0dc";
|
||||
foreground = "cdd6f4";
|
||||
background = "1e1e2e";
|
||||
|
||||
regular0 = "45475a";
|
||||
regular1 = "f38ba8";
|
||||
regular2 = "a6e3a1";
|
||||
regular3 = "f9e2af";
|
||||
regular4 = "89b4fa";
|
||||
regular5 = "f5c2e7";
|
||||
regular6 = "94e2d5";
|
||||
regular7 = "bac2de";
|
||||
|
||||
bright0 = "585b70";
|
||||
bright1 = "f38ba8";
|
||||
bright2 = "a6e3a1";
|
||||
bright3 = "f9e2af";
|
||||
bright4 = "89b4fa";
|
||||
bright5 = "f5c2e7";
|
||||
bright6 = "94e2d5";
|
||||
bright7 = "a6adc8";
|
||||
|
||||
"16" = "fab387";
|
||||
"17" = "f5e0dc";
|
||||
|
||||
selection-foreground = "cdd6f4";
|
||||
selection-background = "414356";
|
||||
|
||||
search-box-no-match = "11111b f38ba8";
|
||||
search-box-match = "cdd6f4 313244";
|
||||
|
||||
jump-labels = "11111b fab387";
|
||||
urls = "89b4fa";
|
||||
};
|
||||
colors-light = lib.mkIf config.foot.theme.catppuccin.enable {
|
||||
cursor = "eff1f5 dc8a78";
|
||||
foreground = "4c4f69";
|
||||
background = "eff1f5";
|
||||
|
||||
regular0 = "5c5f77";
|
||||
regular1 = "d20f39";
|
||||
regular2 = "40a02b";
|
||||
regular3 = "df8e1d";
|
||||
regular4 = "1e66f5";
|
||||
regular5 = "ea76cb";
|
||||
regular6 = "179299";
|
||||
regular7 = "acb0be";
|
||||
|
||||
bright0 = "6c6f85";
|
||||
bright1 = "d20f39";
|
||||
bright2 = "40a02b";
|
||||
bright3 = "df8e1d";
|
||||
bright4 = "1e66f5";
|
||||
bright5 = "ea76cb";
|
||||
bright6 = "179299";
|
||||
bright7 = "bcc0cc";
|
||||
|
||||
"16" = "fe640b";
|
||||
"17" = "dc8a78";
|
||||
|
||||
selection-foreground = "4c4f69";
|
||||
selection-background = "ccced7";
|
||||
|
||||
search-box-no-match = "dce0e8 d20f39";
|
||||
search-box-match = "4c4f69 ccd0da";
|
||||
|
||||
jump-labels = "dce0e8 fe640b";
|
||||
urls = "1e66f5";
|
||||
};
|
||||
};
|
||||
};
|
||||
defaultApps.terminal = lib.mkIf config.foot.make_default "foot";
|
||||
};
|
||||
}
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
config = lib.mkIf config.lutris.enable {
|
||||
home.packages = with pkgs; [
|
||||
lutris
|
||||
wineWow64Packages.stable
|
||||
wineWowPackages.stable
|
||||
# (lutris.override {
|
||||
# extraLibraries = pkgs: [
|
||||
# # List library dependencies here
|
||||
|
|
|
|||
|
|
@ -14,242 +14,156 @@
|
|||
catppuccin.enable = lib.mkEnableOption "Enables catppuccin theme";
|
||||
};
|
||||
plugins = {
|
||||
comments.enable = lib.mkOption { default = true; };
|
||||
fugitive.enable = lib.mkOption { default = true; };
|
||||
lualine.enable = lib.mkOption { default = true; };
|
||||
luasnip.enable = lib.mkOption { default = false; };
|
||||
nvimcmp.enable = lib.mkOption { default = true; };
|
||||
opencode.enable = lib.mkOption { default = true; };
|
||||
comments.enable = lib.mkEnableOption "Enables nvim-comment";
|
||||
fugitive.enable = lib.mkEnableOption "Enables git-fugitive";
|
||||
lualine.enable = lib.mkEnableOption "Enables lualine";
|
||||
luasnip.enable = lib.mkEnableOption "Enables luasnip snippets";
|
||||
nvimcmp.enable = lib.mkEnableOption "Enables nvim completion";
|
||||
telescope = {
|
||||
enable = lib.mkOption { default = true; };
|
||||
fzf.enable = lib.mkOption { default = true; };
|
||||
enable = lib.mkEnableOption "Enables telescope";
|
||||
fzf.enable = lib.mkEnableOption "Enables telescope-fzf";
|
||||
};
|
||||
treesitter.enable = lib.mkOption { default = true; };
|
||||
wiki.enable = lib.mkOption { default = false; };
|
||||
treesitter.enable = lib.mkEnableOption "Enables treesitter";
|
||||
wiki.enable = lib.mkEnableOption "Enables a wiki";
|
||||
};
|
||||
};
|
||||
|
||||
imports = [
|
||||
./plugin/lsp.nix
|
||||
./plugin/nvimcmp.nix
|
||||
./plugin/telescope.nix
|
||||
./plugin/treesitter.nix
|
||||
];
|
||||
|
||||
config = lib.mkIf config.neovim.enable {
|
||||
home.sessionVariables = {
|
||||
EDITOR = "nvim";
|
||||
VISUAL = "nvim";
|
||||
};
|
||||
|
||||
programs.nixvim = {
|
||||
programs.neovim = {
|
||||
enable = true;
|
||||
viAlias = true;
|
||||
vimAlias = true;
|
||||
vimdiffAlias = true;
|
||||
|
||||
globals = {
|
||||
mapleader = " ";
|
||||
maplocalleader = " ";
|
||||
rust_recommended_style = 0;
|
||||
};
|
||||
extraLuaConfig = ''
|
||||
${builtins.readFile ./options.lua}
|
||||
'';
|
||||
|
||||
opts = {
|
||||
list = true;
|
||||
updatetime = 750;
|
||||
extraPackages = with pkgs; [
|
||||
(lib.mkIf config.neovim.languages.c.enable libclang)
|
||||
(lib.mkIf config.neovim.languages.go.enable gopls)
|
||||
(lib.mkIf config.neovim.languages.nix.enable nil)
|
||||
(lib.mkIf config.neovim.languages.rust.enable rust-analyzer)
|
||||
];
|
||||
|
||||
tabstop = 2;
|
||||
softtabstop = 0;
|
||||
shiftwidth = 2;
|
||||
smarttab = true;
|
||||
expandtab = true;
|
||||
# Additional packages are added through imports
|
||||
plugins = let
|
||||
lopts = lib.lists.optionals;
|
||||
cfgp = config.neovim.plugins;
|
||||
cfgl = config.neovim.languages;
|
||||
cfgt = config.neovim.themes;
|
||||
|
||||
colorcolumn = "81";
|
||||
showmatch = true;
|
||||
number = true;
|
||||
relativenumber = true;
|
||||
|
||||
swapfile = false;
|
||||
backup = false;
|
||||
undofile = true;
|
||||
undodir = "${config.xdg.configHome}/nvim/undodir";
|
||||
|
||||
smartcase = true;
|
||||
};
|
||||
|
||||
keymaps = with config.lib.nixvim; [
|
||||
{
|
||||
key = "<leader>d";
|
||||
mode = "n";
|
||||
action = mkRaw "vim.diagnostic.open_float";
|
||||
}
|
||||
{
|
||||
key = "<C-J>";
|
||||
mode = "n";
|
||||
action = "<C-W><C-J>";
|
||||
}
|
||||
{
|
||||
key = "<C-K>";
|
||||
mode = "n";
|
||||
action = "<C-W><C-K>";
|
||||
}
|
||||
{
|
||||
key = "<C-L>";
|
||||
mode = "n";
|
||||
action = "<C-W><C-L>";
|
||||
}
|
||||
{
|
||||
key = "<C-H>";
|
||||
mode = "n";
|
||||
action = "<C-W><C-H>";
|
||||
}
|
||||
{
|
||||
key = "<C-y>";
|
||||
mode = "x";
|
||||
action = "\"+y";
|
||||
options.remap = true;
|
||||
}
|
||||
{
|
||||
key = "<C-y>";
|
||||
mode = "n";
|
||||
action = "\"+yy";
|
||||
options.remap = true;
|
||||
}
|
||||
{
|
||||
key = "<C-p>";
|
||||
mode = "n";
|
||||
action = "\"+P";
|
||||
options.remap = true;
|
||||
}
|
||||
] ++ lib.lists.optionals config.neovim.plugins.opencode.enable (let
|
||||
ocFunc = cmd: let raw = "function() require('opencode').${cmd} end";
|
||||
in (config.lib.nixvim.mkRaw raw);
|
||||
in [
|
||||
{
|
||||
key = "<leader>ot";
|
||||
action = ocFunc "toggle()";
|
||||
mode = [ "n" "x" ];
|
||||
options.desc = "Toggle opencode";
|
||||
}
|
||||
{
|
||||
key = "<leader>oa";
|
||||
action = ocFunc "ask('', { submit = true })";
|
||||
mode = [ "n" "x" ];
|
||||
options.desc = "Ask opencode...";
|
||||
}
|
||||
{
|
||||
key = "<leader>or";
|
||||
action = ocFunc "operator('@this ')";
|
||||
mode = [ "n" "x" ];
|
||||
options.desc = "Add range to opencode";
|
||||
}
|
||||
]);
|
||||
};
|
||||
|
||||
programs.nixvim.colorschemes = with config.neovim.themes; {
|
||||
catppuccin = lib.mkIf catppuccin.enable {
|
||||
enable = true;
|
||||
flavour = "mocha";
|
||||
integrations.vimwiki = lib.mkIf wiki.enable true;
|
||||
};
|
||||
};
|
||||
|
||||
programs.nixvim.plugins = with config.neovim.plugins; {
|
||||
comment.enable = comments.enable;
|
||||
|
||||
fugitive.enable = fugitive.enable;
|
||||
|
||||
lualine = lib.mkIf lualine.enable {
|
||||
enable = true;
|
||||
icons_enabled = true;
|
||||
};
|
||||
web-devicons.enable = lualine.enable;
|
||||
|
||||
luasnip.enable = luasnip.enable;
|
||||
friendly-snippets.enable = luasnip.enable;
|
||||
|
||||
cmp = {
|
||||
enable = nvimcmp.enable;
|
||||
autoEnableSources = true;
|
||||
settings = {
|
||||
sources = [
|
||||
{ name = "nvim_lsp"; }
|
||||
{ name = "path"; }
|
||||
{ name = "buffer"; }
|
||||
] ++ lib.optional luasnip.enable { name = "cmp-luasnip"; };
|
||||
mapping = with config.lib.nixvim; {
|
||||
"<Tab>" = mkRaw
|
||||
"cmp.mapping(cmp.mapping.select_next_item(), {'i', 's'})";
|
||||
"<S-Tab>" = mkRaw
|
||||
"cmp.mapping(cmp.mapping.select_prev_item(), {'i', 's'})";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
opencode = {
|
||||
enable = opencode.enable;
|
||||
settings = {
|
||||
input.enabled = true;
|
||||
lsp.enabled = true;
|
||||
events.permissions.enabled = false;
|
||||
};
|
||||
};
|
||||
snacks.enable = opencode.enable;
|
||||
|
||||
telescope = {
|
||||
enable = telescope.enable;
|
||||
keymaps = {
|
||||
"<leader>ff" = "find_files";
|
||||
"<leader>fg" = "git_files";
|
||||
};
|
||||
extensions = {
|
||||
fzf = lib.mkIf telescope.fzf.enable {
|
||||
enable = true;
|
||||
fuzzy = true;
|
||||
override_generic_sorter = true;
|
||||
override_file_sorter = true;
|
||||
case_mode = "smart_case";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
treesitter = {
|
||||
enable = treesitter.enable;
|
||||
highlight.enable = true;
|
||||
indent.enable = true;
|
||||
folding.enable = false;
|
||||
};
|
||||
|
||||
vimwiki = {
|
||||
enable = wiki.enable;
|
||||
list = [
|
||||
comments = lopts cfgp.comments.enable (with pkgs.vimPlugins; [
|
||||
{
|
||||
path = "${config.xdg.userDirs.documents}/wiki";
|
||||
links_space_char = "_";
|
||||
ext = ".md";
|
||||
syntax = "markdown";
|
||||
plugin = comment-nvim;
|
||||
type = "lua";
|
||||
config = "require(\"Comment\").setup()";
|
||||
}
|
||||
];
|
||||
};
|
||||
]);
|
||||
|
||||
nvim-lspconfig.enable = true;
|
||||
nix.enable = config.neovim.languages.nix.enable;
|
||||
rustaceanvim.enable = config.neovim.languages.rust.enable;
|
||||
typsecript-tools.enable = config.neovim.languages.typescript.enable;
|
||||
};
|
||||
fugitive = lopts cfgp.fugitive.enable (with pkgs.vimPlugins; [
|
||||
vim-fugitive
|
||||
]);
|
||||
|
||||
programs.nixvim.lsp = {
|
||||
enable = true;
|
||||
servers = with config.neovim.languages; {
|
||||
clangd.enable = c.enable;
|
||||
gopls.enable = go.enable;
|
||||
nil_ls.enable = nix.enable;
|
||||
rust_analyzer.enable = rust.enable;
|
||||
tsserver.enable = typescript.enable;
|
||||
};
|
||||
keymaps = [
|
||||
{ key = "gd"; lspBufAction = "definition"; }
|
||||
{ key = "gD"; lspBufAction = "declaration"; }
|
||||
{ key = "gi"; lspBufAction = "implementation"; }
|
||||
{ key = "gt"; lspBufAction = "type_definition"; }
|
||||
{ key = "K"; lspBufAction = "hover"; }
|
||||
] ++ lib.optional config.neovim.plugins.telescope.enable {
|
||||
key = "gr";
|
||||
action = config.lib.nixvim.mkRaw
|
||||
"require('telescope.builtin').lsp_references";
|
||||
};
|
||||
luasnip-pkg = lopts cfgp.luasnip.enable (with pkgs.vimPlugins; [
|
||||
luasnip
|
||||
friendly-snippets
|
||||
(lib.mkIf cfgp.nvimcmp.enable cmp_luasnip)
|
||||
]);
|
||||
|
||||
lualine = lopts cfgp.lualine.enable (with pkgs.vimPlugins; [
|
||||
{
|
||||
plugin = lualine-nvim;
|
||||
type = "lua";
|
||||
config = ''
|
||||
require("lualine").setup {
|
||||
options = {
|
||||
icons_enabled = true,
|
||||
'' + lib.strings.optionalString cfgt.catppuccin.enable ''
|
||||
theme = "catppuccin"
|
||||
'' + ''
|
||||
}
|
||||
}
|
||||
'';
|
||||
}
|
||||
nvim-web-devicons
|
||||
]);
|
||||
|
||||
nix-pkg = lopts cfgl.nix.enable (with pkgs.vimPlugins; [
|
||||
vim-nix
|
||||
]);
|
||||
|
||||
rust-pkg = lopts cfgl.rust.enable (with pkgs.vimPlugins; [
|
||||
{
|
||||
plugin = rustaceanvim;
|
||||
type = "lua";
|
||||
config = ''
|
||||
vim.g.rust_recommended_style = 0
|
||||
'';
|
||||
}
|
||||
]);
|
||||
|
||||
go-pkg = lopts cfgl.go.enable (with pkgs.vimPlugins; [
|
||||
go-nvim
|
||||
]);
|
||||
|
||||
typescript-pkg = lopts cfgl.typescript.enable (with pkgs.vimPlugins; [
|
||||
{
|
||||
plugin = typescript-tools-nvim;
|
||||
type = "lua";
|
||||
config = ''
|
||||
require("typescript-tools").setup {}
|
||||
'';
|
||||
}
|
||||
]);
|
||||
|
||||
catppuccin-pkg = lopts cfgt.catppuccin.enable (with pkgs.vimPlugins; [
|
||||
{
|
||||
plugin = catppuccin-nvim;
|
||||
type = "lua";
|
||||
config = ''
|
||||
vim.cmd.colorscheme "catppuccin-mocha"
|
||||
require('catppuccin').setup({
|
||||
integrations = {
|
||||
'' + lib.strings.optionalString cfgp.wiki.enable ''
|
||||
vimwiki = true
|
||||
'' + ''
|
||||
}
|
||||
})
|
||||
'';
|
||||
}
|
||||
]);
|
||||
|
||||
wiki = lopts cfgp.wiki.enable (with pkgs.vimPlugins; [
|
||||
{
|
||||
plugin = vimwiki;
|
||||
type = "lua";
|
||||
config = ''
|
||||
vim.g.vimwiki_list = {
|
||||
{
|
||||
path = '${config.xdg.userDirs.documents}/wiki',
|
||||
links_space_char = '_',
|
||||
ext = '.md',
|
||||
syntax = 'markdown',
|
||||
}
|
||||
}
|
||||
'';
|
||||
}
|
||||
]);
|
||||
in comments ++ fugitive ++ luasnip-pkg ++ lualine ++ nix-pkg ++ rust-pkg
|
||||
++ go-pkg ++ wiki ++ catppuccin-pkg ++ typescript-pkg;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
60
hmModules/apps/neovim/options.lua
Normal file
60
hmModules/apps/neovim/options.lua
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
-- Globals
|
||||
vim.g.mapleader = ' '
|
||||
vim.g.maplocalleader = ' '
|
||||
vim.opt.list = true
|
||||
vim.bo.filetype = "on"
|
||||
vim.opt.updatetime = 300
|
||||
|
||||
-- Indentations
|
||||
vim.opt.tabstop = 2
|
||||
vim.opt.softtabstop = 0
|
||||
vim.opt.shiftwidth = 2
|
||||
vim.opt.smarttab = true
|
||||
vim.opt.expandtab = true
|
||||
|
||||
-- Style
|
||||
vim.opt.colorcolumn = "80"
|
||||
vim.opt.showmatch = true
|
||||
vim.opt.number = true
|
||||
vim.opt.relativenumber = true
|
||||
|
||||
-- Easy Split Navigation
|
||||
-- nnoremap <C-J> <C-W><C-J>
|
||||
-- nnoremap <C-K> <C-W><C-K>
|
||||
-- nnoremap <C-L> <C-W><C-L>
|
||||
-- nnoremap <C-H> <C-W><C-H>
|
||||
|
||||
-- Searching
|
||||
vim.opt.smartcase = true
|
||||
|
||||
-- Backups
|
||||
vim.opt.swapfile = false
|
||||
vim.opt.backup = false
|
||||
vim.opt.undofile = true
|
||||
vim.opt.undodir = '/home/pan/.config/nvim/undodir'
|
||||
|
||||
-- Error viewing
|
||||
vim.keymap.set('n', '<Leader>d', function() vim.diagnostic.open_float() end)
|
||||
|
||||
-- Easy copy and pasting to external programs
|
||||
-- map <C-y> "+yy
|
||||
-- map <C-p> "+P
|
||||
|
||||
-- autocmd BufRead,BufNewFile *.md call WritingMode()
|
||||
-- autocmd BufRead,BufNewFile *.tex call WritingMode()
|
||||
-- autocmd BufRead,BufNewFile *.svx call WritingMode()
|
||||
|
||||
-- autocmd BufRead,BufNewFile *.py call PythonMode()
|
||||
|
||||
-- function! WritingMode()
|
||||
-- setlocal textwidth=80
|
||||
-- setlocal wrap linebreak nolist
|
||||
-- setlocal whichwrap+=<,>,h,l
|
||||
-- nnoremap j gj
|
||||
-- nnoremap k gk
|
||||
-- setlocal spell spelllang=en_us
|
||||
-- endfunction
|
||||
-- function! PythonMode()
|
||||
-- setlocal foldmethod=indent
|
||||
-- setlocal foldlevel=99
|
||||
-- endfunction
|
||||
53
hmModules/apps/neovim/plugin/lsp.nix
Normal file
53
hmModules/apps/neovim/plugin/lsp.nix
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
config = lib.mkIf config.neovim.enable {
|
||||
programs.neovim.plugins = let
|
||||
cfgp = config.neovim.plugins;
|
||||
cfgl = config.neovim.languages;
|
||||
|
||||
configText = ''
|
||||
local on_attach = function(_, bufnr)
|
||||
|
||||
local bufmap = function(keys, func)
|
||||
vim.keymap.set('n', keys, func, { buffer = bufnr })
|
||||
end
|
||||
|
||||
bufmap('<leader>r', vim.lsp.buf.rename)
|
||||
bufmap('<leader>a', vim.lsp.buf.code_action)
|
||||
|
||||
bufmap('gd', vim.lsp.buf.definition)
|
||||
bufmap('gD', vim.lsp.buf.declaration)
|
||||
bufmap('gI', vim.lsp.buf.implementation)
|
||||
bufmap('<leader>D', vim.lsp.buf.type_definition)
|
||||
|
||||
'' + lib.strings.optionalString cfgp.telescope.enable ''
|
||||
bufmap('gr', require('telescope.builtin').lsp_references)
|
||||
bufmap('<leader>s', require('telescope.builtin').lsp_document_symbols)
|
||||
bufmap('<leader>S', require('telescope.builtin').lsp_dynamic_workspace_symbols)
|
||||
'' + ''
|
||||
|
||||
bufmap('K', vim.lsp.buf.hover)
|
||||
|
||||
vim.api.nvim_buf_create_user_command(bufnr, 'Format', function(_)
|
||||
vim.lsp.buf.format()
|
||||
end, {})
|
||||
end
|
||||
|
||||
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||
'' + lib.strings.optionalString cfgl.c.enable ''
|
||||
require('lspconfig').clangd.setup {}
|
||||
'' + lib.strings.optionalString cfgl.go.enable ''
|
||||
require('lspconfig').gopls.setup {}
|
||||
'' + lib.strings.optionalString cfgl.nix.enable ''
|
||||
require('lspconfig').nil_ls.setup {}
|
||||
'';
|
||||
in with pkgs.vimPlugins; [
|
||||
{
|
||||
plugin = nvim-lspconfig;
|
||||
type = "lua";
|
||||
config = configText;
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
72
hmModules/apps/neovim/plugin/nvimcmp.nix
Normal file
72
hmModules/apps/neovim/plugin/nvimcmp.nix
Normal file
|
|
@ -0,0 +1,72 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
let
|
||||
cfgp = config.neovim.plugins;
|
||||
in {
|
||||
config = lib.mkIf (config.neovim.enable && cfgp.nvimcmp.enable) {
|
||||
programs.neovim.plugins = let
|
||||
|
||||
configText = ''
|
||||
local cmp = require('cmp')
|
||||
'' + lib.strings.optionalString cfgp.luasnip.enable ''
|
||||
local luasnip = require('luasnip')
|
||||
|
||||
require('luasnip.loaders.from_vscode').lazy_load()
|
||||
luasnip.config.setup {}
|
||||
'' + ''
|
||||
|
||||
cmp.setup {
|
||||
mapping = cmp.mapping.preset.insert {
|
||||
['<C-n>'] = cmp.mapping.select_next_item(),
|
||||
['<C-p>'] = cmp.mapping.select_prev_item(),
|
||||
['<C-d>'] = cmp.mapping.scroll_docs(-4),
|
||||
['<C-f>'] = cmp.mapping.scroll_docs(4),
|
||||
['<C-Space>'] = cmp.mapping.complete {},
|
||||
['<CR>'] = cmp.mapping.confirm {
|
||||
behavior = cmp.ConfirmBehavior.Replace,
|
||||
select = true,
|
||||
},
|
||||
['<Tab>'] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_next_item()
|
||||
'' + lib.strings.optionalString cfgp.luasnip.enable ''
|
||||
elseif luasnip.expand_or_locally_jumpable() then
|
||||
luasnip.expand_or_jump()
|
||||
'' + ''
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { 'i', 's' }),
|
||||
['<S-Tab>'] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_prev_item()
|
||||
'' + lib.strings.optionalString cfgp.luasnip.enable ''
|
||||
elseif luasnip.locally_jumpable(-1) then
|
||||
luasnip.jump(-1)
|
||||
'' + ''
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { 'i', 's' }),
|
||||
},
|
||||
'' + lib.strings.optionalString cfgp.luasnip.enable ''
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
luasnip.lsp_expand(args.body)
|
||||
end,
|
||||
},
|
||||
sources = {
|
||||
{ name = 'luasnip' },
|
||||
},
|
||||
'' + ''
|
||||
}
|
||||
'';
|
||||
in with pkgs.vimPlugins; [
|
||||
{
|
||||
plugin = nvim-cmp;
|
||||
type = "lua";
|
||||
config = configText;
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
43
hmModules/apps/neovim/plugin/telescope.nix
Normal file
43
hmModules/apps/neovim/plugin/telescope.nix
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
let
|
||||
cfgp = config.neovim.plugins;
|
||||
in {
|
||||
config = lib.mkIf (config.neovim.enable && cfgp.telescope.enable) {
|
||||
programs.neovim.plugins = let
|
||||
configText = ''
|
||||
require('telescope').setup({
|
||||
extensions = {
|
||||
'' + lib.strings.optionalString cfgp.telescope.fzf.enable ''
|
||||
fzf = {
|
||||
fuzzy = true, -- false will only do exact matching
|
||||
override_generic_sorter = true, -- override the generic sorter
|
||||
override_file_sorter = true, -- override the file sorter
|
||||
case_mode = "smart_case", -- or "ignore_case" or "respect_case"
|
||||
-- the default case_mode is "smart_case"
|
||||
}
|
||||
'' + ''
|
||||
}
|
||||
})
|
||||
local builtin = require('telescope.builtin')
|
||||
vim.keymap.set('n', '<leader>ff', builtin.find_files, {})
|
||||
vim.keymap.set('n', '<leader>fg', builtin.git_files, {})
|
||||
|
||||
'' + lib.strings.optionalString cfgp.telescope.fzf.enable ''
|
||||
require('telescope').load_extension('fzf')
|
||||
'';
|
||||
in with pkgs.vimPlugins; [
|
||||
{
|
||||
plugin = telescope-nvim;
|
||||
type = "lua";
|
||||
config = configText;
|
||||
}
|
||||
(lib.mkIf cfgp.nvimcmp.enable telescope-fzf-native-nvim)
|
||||
];
|
||||
|
||||
home.packages = with pkgs; [
|
||||
(lib.mkIf cfgp.telescope.fzf.enable fzf)
|
||||
];
|
||||
|
||||
};
|
||||
}
|
||||
38
hmModules/apps/neovim/plugin/treesitter.nix
Normal file
38
hmModules/apps/neovim/plugin/treesitter.nix
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
let
|
||||
cfgp = config.neovim.plugins;
|
||||
cfgl = config.neovim.languages;
|
||||
in {
|
||||
config = lib.mkIf (config.neovim.enable && cfgp.treesitter.enable) {
|
||||
programs.neovim.plugins = let
|
||||
configText = ''
|
||||
require('nvim-treesitter.configs').setup {
|
||||
ensure_installed = {},
|
||||
|
||||
auto_install = false,
|
||||
|
||||
highlight = { enable = true },
|
||||
|
||||
indent = { enable = true },
|
||||
}
|
||||
'';
|
||||
|
||||
# I've tried many things, and can't get treesitter plugins changing
|
||||
# dynamically. For not just have them always loaded regardless of config
|
||||
treeplugs = p: [
|
||||
p.tree-sitter-c
|
||||
p.tree-sitter-go
|
||||
p.tree-sitter-nix
|
||||
p.tree-sitter-rust
|
||||
p.tree-sitter-typescript
|
||||
];
|
||||
in with pkgs.vimPlugins; [
|
||||
{
|
||||
plugin = (nvim-treesitter.withPlugins treeplugs);
|
||||
type = "lua";
|
||||
config = configText;
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
@ -23,8 +23,6 @@
|
|||
|
||||
home.sessionVariables = {
|
||||
GRADLE_USER_HOME = "${config.xdg.dataHome}/gradle";
|
||||
CARGO_HOME = "${config.xdg.dataHome}/cargo";
|
||||
JULIA_DEPOT_PATH = "${config.xdg.dataHome}/julia:$JULIA_DEPOT_PATH";
|
||||
CUDA_CACHE_PATH = "${config.xdg.cacheHome}/nv";
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -6,10 +6,7 @@
|
|||
};
|
||||
|
||||
config = lib.mkIf config.ssh.enable {
|
||||
programs.ssh = {
|
||||
enable = true;
|
||||
enableDefaultConfig = false;
|
||||
};
|
||||
programs.ssh.enable = true;
|
||||
home.packages = with pkgs; [
|
||||
sshfs # SSH File system
|
||||
];
|
||||
|
|
|
|||
|
|
@ -27,8 +27,7 @@
|
|||
|
||||
tuigreet.enable = true;
|
||||
niri.enable = true;
|
||||
tailscale.enable = true;
|
||||
|
||||
|
||||
postgres.enable = true;
|
||||
|
||||
shell.enabledShells = [ "fish" ];
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
[Kabal]
|
||||
["TheKabal2.4"]
|
||||
|
||||
["DropboxGuest3.0"]
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,9 @@
|
|||
wireless: ENC[AES256_GCM,data:VU8tpeCgEFSUC490q1hGgBrdFFscL2QybywlpiFG3suofj2Q2VVXKLK4EpF2ebpf/nBf/ggHv/uoSFxuQYYvIsMIo1bYOKvM5QNMi9HO2KmfFbmQYYzmt5CNNh9tno9wmiekeDOnKjQDGK5CoGLD4+y+VW1IVrN9XL+xRxAszgYM4qdSim7CJ1hgU89OgzVL9poVsmqxbiuWY88+ZErIspSHO0QwGOJ5Pc4OixEK2N3EtcYDhV5fBvlFv7t4b8P6BJZIn2NVXCVaW4UcEsefcxHqohd5AuYXJH7wt9aPwJRJehxd9GhVJeQ6QtPXuqZaEspd+dSvlYrvdO8pFTrIklrty30CJg3WberWmI111T8ZNFlNBghSu6nXzO9YkKfDuAYUEPVERL9jG9xF8tGb1JxhOmg33Kg6fg==,iv:07Reckni7LSfDL3qVUv4v80IOVQSbFpz49UsyiIDGWk=,tag:iMgCspLUWNCjjYT0pkMwDw==,type:str]
|
||||
wireless: ENC[AES256_GCM,data:pQv+gdAW8W9nSEJkbXWex47iuuqgJMEELldFsmgk2Y08MDZ1ytXqlphTK/jbewD3tpz4v29fSuWamv1uZpxM2+c2zCuMVTdrhAf0i/Sjqd9CWP8NQvTDI3v8ps9REFzR7n7hywnkfOkDNwRkmavSfCxK5k9SQLNC7De6P811/Fundb9r6oeIH2OEDBkZEHw8gYndjy6cLDUE2SY/cmxRsKWhATsCLcWKOpQa86zlT9dr9nMtYVF1AN5T4JR/7QKqJ8UT4mvhAA0OEfKv0Cf3euH24vtBrv5YxwDT6tQpOABOyOy9mWLc+bXDID/HX4akeU1O6+eBSpNeRgpAcMfD6b/eqKAvDvnixHubu9GemVspmeoA/91i5B70u3kjm0EKup7KLXCp5RutLnLRczDPdfbCB7bEipeRyF8P+UCuhQ==,iv:WN7mGyHpaMDdLRpFGyDUQ2D9a0t/rucfyKroJYqaHPs=,tag:7KTzBEt30nqCJclDgiWuKg==,type:str]
|
||||
sops:
|
||||
kms: []
|
||||
gcp_kms: []
|
||||
azure_kv: []
|
||||
hc_vault: []
|
||||
age:
|
||||
- recipient: age1ey3wr2wnkgny3dfgvnyrf0cptwzr7s5x464p2y9ya58lpay8lfrsds3y68
|
||||
enc: |
|
||||
|
|
@ -19,7 +23,8 @@ sops:
|
|||
Ky83VFhiVE9wK01UMDlSbnIrd2d2SHcKp6mF8PaR0ItrvLHpEgMe6fwuboyrrs9y
|
||||
7Ct6qZ1SN/4f/xJpDP2qiaQ4KTZzY1BlC3isT3CWeajOQhL/y5JCOw==
|
||||
-----END AGE ENCRYPTED FILE-----
|
||||
lastmodified: "2025-08-27T05:30:04Z"
|
||||
mac: ENC[AES256_GCM,data:hoSykxuHPAofdbXNJCyozeQYYhg3yXLOVx+K9PsSctUMrIc9ii76SDGY2h+6gFNy1rGkPxmYHueqHEJHvvoxLHcwkwoN8AddOVrnXNoIpOvwcn0GfpPIPf5rCvxSxvcsZwPW+affMMVRyRR8aJ3llj7ojuuuyTnm+HL9H9vY1PQ=,iv:pUXl49AqRerTlGoOzoWt0NrEo8rqPmBF7yiB4ZufC3M=,tag:1mP3jsP2O6yKlJVmaA7EMQ==,type:str]
|
||||
lastmodified: "2024-11-07T21:12:36Z"
|
||||
mac: ENC[AES256_GCM,data:z0ePEvsEKvcMca2x2qjTsSBwk+qI3jd8h2uAnSsGtJL5UI1OdBL8oVIGKty0pGaCvtrF01UN1ncKBGe5y12Vij2yuyv7LK4ANArxQ4+O583NdYHYeD+T75yGu4SAYjcoM23RD1h+W0SLQpCen2J3WYmJaOjtqMBv/gaFYl/DV7I=,iv:VJjZTd1g4oJCDLEp8+jH15Y2svTNtQUE1vc3WQoJJZU=,tag:4U7uh6U5PwHJ2r6/WFUbnw==,type:str]
|
||||
pgp: []
|
||||
unencrypted_suffix: _unencrypted
|
||||
version: 3.10.2
|
||||
version: 3.9.1
|
||||
|
|
|
|||
|
|
@ -4,10 +4,7 @@
|
|||
imports = [
|
||||
./hardware.nix
|
||||
];
|
||||
nvidia = {
|
||||
enable = true;
|
||||
stable = true;
|
||||
};
|
||||
nvidia.enable = true;
|
||||
pipewire.enable = true;
|
||||
polkit.enable = true;
|
||||
tablet.enable = true;
|
||||
|
|
@ -18,7 +15,7 @@
|
|||
sshd.enable = true;
|
||||
tailscale.enable = true;
|
||||
|
||||
sddm.enable = true;
|
||||
tuigreet.enable = true;
|
||||
niri.enable = true;
|
||||
|
||||
steam.enable = true;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
{ config, lib, ... }:
|
||||
|
||||
{
|
||||
options.steam = {
|
||||
|
|
@ -11,15 +11,6 @@
|
|||
enable = true;
|
||||
remotePlay.openFirewall = true;
|
||||
dedicatedServer.openFirewall = true;
|
||||
package = pkgs.steam.override {
|
||||
extraBwrapArgs = [
|
||||
"--bind $XDG_STATE_HOME/FakeSteamHome $HOME"
|
||||
"--unsetenv XDG_CACHE_HOME"
|
||||
"--unsetenv XDG_CONFIG_HOME"
|
||||
"--unsetenv XDG_DATA_HOME"
|
||||
"--unsetenv XDG_STATE_HOME"
|
||||
];
|
||||
};
|
||||
};
|
||||
programs.gamemode.enable = lib.mkIf config.steam.gamemode true;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
{ config, pkgs, lib, inputs, ... }:
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
options.system = {
|
||||
|
|
@ -9,7 +9,7 @@
|
|||
"Enable if you are running a non-EFI system";
|
||||
users.bigWheels = lib.mkOption { default = []; };
|
||||
};
|
||||
|
||||
|
||||
config = lib.mkMerge [
|
||||
(lib.mkIf config.system.isNonEFI {
|
||||
boot.loader.grub.enable = false;
|
||||
|
|
@ -29,44 +29,33 @@
|
|||
|
||||
# Packages & Default Packages
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
nix = {
|
||||
registry.nixpkgs.flake = inputs.nixpkgs;
|
||||
gc = { automatic = true; options = "--delete-older-than 5d"; };
|
||||
channel.enable = false;
|
||||
settings = {
|
||||
auto-optimise-store = true;
|
||||
keep-going = true;
|
||||
use-xdg-base-directories = true;
|
||||
experimental-features = [
|
||||
"flakes"
|
||||
"nix-command"
|
||||
];
|
||||
};
|
||||
};
|
||||
environment.systemPackages = with pkgs; [
|
||||
git
|
||||
neovim
|
||||
xdg-user-dirs
|
||||
] ++ config.system.extraPkgs;
|
||||
|
||||
users = {
|
||||
users = builtins.listToAttrs (map (
|
||||
user: {
|
||||
name = user;
|
||||
value = {
|
||||
name = user;
|
||||
isNormalUser = true;
|
||||
extraGroups = [ "network" ];
|
||||
};
|
||||
}
|
||||
) [ "pan" ]);
|
||||
groups = {
|
||||
wheel = {
|
||||
members = config.system.users.bigWheels;
|
||||
};
|
||||
network = { };
|
||||
};
|
||||
};
|
||||
# XDG Compliance
|
||||
nix.settings.use-xdg-base-directories = true;
|
||||
|
||||
# users = {
|
||||
# users = builtins.listToAttrs (map (
|
||||
# user: {
|
||||
# name = user;
|
||||
# value = {
|
||||
# name = user;
|
||||
# isNormalUser = true;
|
||||
# extraGroups = [ "network" ];
|
||||
# };
|
||||
# }
|
||||
# ) usernameList);
|
||||
# groups = {
|
||||
# wheel = {
|
||||
# members = config.system.users.bigWheels;
|
||||
# };
|
||||
# network = { };
|
||||
# };
|
||||
# };
|
||||
|
||||
fonts = {
|
||||
enableDefaultPackages = true;
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
'';
|
||||
package = pkgs.caddy.withPlugins {
|
||||
plugins = [ "github.com/caddy-dns/porkbun@v0.3.1" ];
|
||||
hash = "sha256-cM9ez2i9ZADbXSI7KNZlBCe1F1vpX5fH++qKILaHguA=";
|
||||
hash = "sha256-j/GODingW5BhfjQRajinivX/9zpiLGgyxvAjX0+amRU=";
|
||||
};
|
||||
virtualHosts = config.caddy.vhosts;
|
||||
email = config.caddy.adminEmail;
|
||||
|
|
|
|||
|
|
@ -2,22 +2,22 @@
|
|||
|
||||
{
|
||||
options.nvidia = {
|
||||
enable = lib.mkEnableOption "Enables nvidia with proprietary drivers";
|
||||
enable = lib.mkEnableOption
|
||||
"Enables nvidia with proprietary drivers";
|
||||
open = lib.mkEnableOption "Use open nvidia option for newer cards";
|
||||
stable = lib.mkEnableOption "Use stable instead of beta";
|
||||
};
|
||||
|
||||
config = lib.mkIf config.nvidia.enable {
|
||||
hardware.graphics.enable = true;
|
||||
hardware.graphics = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
services.xserver.videoDrivers = ["nvidia"];
|
||||
|
||||
hardware.nvidia = {
|
||||
open = if config.nvidia.open then true else false;
|
||||
modesetting.enable = true;
|
||||
package = if config.nvidia.stable
|
||||
then config.boot.kernelPackages.nvidiaPackages.stable
|
||||
else config.boot.kernelPackages.nvidiaPackages.beta;
|
||||
package = config.boot.kernelPackages.nvidiaPackages.beta;
|
||||
};
|
||||
|
||||
boot.kernelParams = [ "nvidia_drm.fbdev=1" ];
|
||||
|
|
|
|||
|
|
@ -1,27 +0,0 @@
|
|||
{ config, pkgs, lib, inputs', ... }:
|
||||
|
||||
{
|
||||
options.sddm = {
|
||||
enable = lib.mkEnableOption "enables sddm";
|
||||
};
|
||||
|
||||
config = lib.mkIf config.sddm.enable (let
|
||||
sddm-theme = inputs'.silentSDDM.packages.default.override {
|
||||
theme = "catppuccin-macchiato";
|
||||
};
|
||||
in {
|
||||
qt.enable = true;
|
||||
environment.systemPackages = [ sddm-theme sddm-theme.test ];
|
||||
services.displayManager.sddm = {
|
||||
wayland.enable = true;
|
||||
package = pkgs.kdePackages.sddm;
|
||||
enable = true;
|
||||
theme = sddm-theme.pname;
|
||||
extraPackages = sddm-theme.propagatedBuildInputs;
|
||||
settings.General = {
|
||||
GreeterEnvironment = "QML2_IMPORT_PATH=${sddm-theme}/share/sddm/themes/${sddm-theme.pname}/components/,QT_IM_MODULE=qtvirtualkeyboard";
|
||||
InputMethod = "qtvirtualkeyboard";
|
||||
};
|
||||
};
|
||||
});
|
||||
}
|
||||
10
users/badtz@juri/user.nix
Normal file
10
users/badtz@juri/user.nix
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
fish.enable = true;
|
||||
git = {
|
||||
enable = true;
|
||||
username = "Badtz";
|
||||
email = "may@badtz.dev";
|
||||
};
|
||||
}
|
||||
|
|
@ -1,13 +1,36 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
# "DP-2" = [
|
||||
# "home"
|
||||
# "web"
|
||||
# "med"
|
||||
# "game"
|
||||
# ];
|
||||
# "DP-1" = [
|
||||
# "chat"
|
||||
# ];
|
||||
# RULES
|
||||
# "name:web" = [ "class:(librewolf)" ];
|
||||
# "name:med" = [ "class:(librewolf),title:Picture-in-Picture" ];
|
||||
# "name:chat" = [ "class:(Beeper)" ];
|
||||
# "name:game" = [ "class:(lutris)" "class:(explorer.exe)" ];
|
||||
# OPAQUE:
|
||||
# "initialTitle:^(Discord Popout)$"
|
||||
# "class:^(firefox)$"
|
||||
# "class:^(Gimp)$"
|
||||
# "class:^(feh)$"
|
||||
# "class:^(mpv)$"
|
||||
# path = "${config.home.homeDirectory}/med/pix/bg.png";
|
||||
# theme = "miku";
|
||||
niri = {
|
||||
enable = true;
|
||||
mouse.accel = -0.53;
|
||||
outputs = {
|
||||
"DP-1" = {
|
||||
position = { x = 2560; y = 0; };
|
||||
position = { x = 2560; y = -100; };
|
||||
mode = { width = 2560; height = 1440; refresh = 144.000; };
|
||||
transform.rotation = 270;
|
||||
};
|
||||
"DP-2" = {
|
||||
position = { x = 0; y = 0; };
|
||||
|
|
@ -15,19 +38,17 @@
|
|||
};
|
||||
};
|
||||
};
|
||||
caelestia-shell.enable = true;
|
||||
|
||||
timer.enableHourly = true;
|
||||
timer.enableQuarterly = true;
|
||||
colors.enable = true;
|
||||
manpages.enable = true;
|
||||
trash.enable = true;
|
||||
|
||||
fish.enable = true;
|
||||
foot = {
|
||||
enable = true;
|
||||
make_default = true;
|
||||
font = "Cascadia Code";
|
||||
theme.catppuccin.enable = true;
|
||||
};
|
||||
kitty.enable = true;
|
||||
kitty.make_default = true;
|
||||
kitty.font = "Cascadia Code";
|
||||
git.enable = true;
|
||||
git.username = "Julia Lange";
|
||||
git.email = "public@julialange.org";
|
||||
|
|
@ -46,35 +67,51 @@
|
|||
mpv.enable = true;
|
||||
zathura.enable = true;
|
||||
feh.enable = true;
|
||||
beets.enable = true;
|
||||
|
||||
neovim = {
|
||||
enable = true;
|
||||
languages = {
|
||||
c.enable = true;
|
||||
nix.enable = true;
|
||||
rust.enable = true;
|
||||
typescript.enable = true;
|
||||
};
|
||||
themes.catppuccin.enable = true;
|
||||
neovim.enable = true;
|
||||
neovim.languages = {
|
||||
c.enable = true;
|
||||
nix.enable = true;
|
||||
rust.enable = true;
|
||||
typescript.enable = true;
|
||||
};
|
||||
neovim.plugins = {
|
||||
comments.enable = true;
|
||||
fugitive.enable = true;
|
||||
lualine.enable = true;
|
||||
luasnip.enable = true;
|
||||
nvimcmp.enable = true;
|
||||
telescope = {
|
||||
enable = true;
|
||||
fzf.enable = true;
|
||||
};
|
||||
treesitter.enable = true;
|
||||
wiki.enable = true;
|
||||
};
|
||||
neovim.themes.catppuccin.enable = true;
|
||||
|
||||
lf.enable = true;
|
||||
lf.hiddenfiles = [
|
||||
"${config.home.homeDirectory}/.mozilla" # Unsupported
|
||||
"${config.home.homeDirectory}/.librewolf" # Unsupported
|
||||
"${config.home.homeDirectory}/.ssh" # openssh assumes
|
||||
"${config.home.homeDirectory}/.manpath" # man-db has it hardcoded
|
||||
"${config.home.homeDirectory}/.face" # caelestia-shell requires
|
||||
"${config.home.homeDirectory}/.librewolf"
|
||||
"${config.home.homeDirectory}/.nix-defexpr"
|
||||
"${config.home.homeDirectory}/.nix-profile"
|
||||
"${config.home.homeDirectory}/.nv"
|
||||
"${config.home.homeDirectory}/.pki"
|
||||
"${config.home.homeDirectory}/.steam*"
|
||||
"${config.home.homeDirectory}/.zshenv"
|
||||
];
|
||||
zoxide.enable = true;
|
||||
|
||||
gimp.enable = true;
|
||||
|
||||
beeper.enable = true;
|
||||
discord.enable = true;
|
||||
|
||||
lutris.enable = true;
|
||||
|
||||
extraPkgs = with pkgs; [
|
||||
signal-desktop
|
||||
ente-desktop
|
||||
# Applications
|
||||
logseq
|
||||
claude-code
|
||||
];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue