Compare commits

...

7 commits

7 changed files with 160 additions and 117 deletions

203
flake.lock generated
View file

@ -10,11 +10,11 @@
"systems": "systems"
},
"locked": {
"lastModified": 1736955230,
"narHash": "sha256-uenf8fv2eG5bKM8C/UvFaiJMZ4IpUFaQxk9OH5t/1gA=",
"lastModified": 1747514353,
"narHash": "sha256-E1WjB+zvDw4x058mg3MIdK5j2huvnNpTEEt2brhg2H8=",
"owner": "ryantm",
"repo": "agenix",
"rev": "e600439ec4c273cf11e06fe4d9d906fb98fa097c",
"rev": "6697e8babbd8f323dfd5e28f160a0128582c128b",
"type": "github"
},
"original": {
@ -26,11 +26,11 @@
"arkenfox-userjs": {
"flake": false,
"locked": {
"lastModified": 1741229528,
"narHash": "sha256-21DoV4SMueMFRHMsvfsPfQIOtsvRWNY06rE4gB7xFnc=",
"lastModified": 1745247844,
"narHash": "sha256-YfgmhyqLH067pjqRSeCpfqFkeaac1nBvsKcrRNkKw7o=",
"owner": "arkenfox",
"repo": "user.js",
"rev": "3d76c74c80485931425464fec0e59d6cb461677a",
"rev": "7f852e94fc80fd0aa19f1c948319974e3301187f",
"type": "github"
},
"original": {
@ -39,29 +39,6 @@
"type": "github"
}
},
"csharp-language-server": {
"inputs": {
"flake-utils": [
"flake-utils"
],
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1743061507,
"narHash": "sha256-M605lQQ035J61tZ48tye8JUCN4MZKXhcTP3SqXqtr4g=",
"owner": "SofusA",
"repo": "csharp-language-server",
"rev": "a119d6002874d9335dbff0a9445f652762eb6685",
"type": "github"
},
"original": {
"owner": "SofusA",
"repo": "csharp-language-server",
"type": "github"
}
},
"darwin": {
"inputs": {
"nixpkgs": [
@ -70,11 +47,11 @@
]
},
"locked": {
"lastModified": 1700795494,
"narHash": "sha256-gzGLZSiOhf155FW7262kdHo2YDeugp3VuIFb4/GGng0=",
"lastModified": 1744478979,
"narHash": "sha256-dyN+teG9G82G+m+PX/aSAagkC+vUv0SgUw3XkPhQodQ=",
"owner": "lnl7",
"repo": "nix-darwin",
"rev": "4b9b83d5a92e8c1fbfd8eb27eda375908c11ec4d",
"rev": "43975d782b418ebf4969e9ccba82466728c2851b",
"type": "github"
},
"original": {
@ -125,18 +102,17 @@
},
"firefox-addons": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"dir": "pkgs/firefox-addons",
"lastModified": 1742773104,
"narHash": "sha256-dAhrL+gEjNN5U/Sosy7IrX0Y0qPA0U7Gp9TBhqEliNU=",
"lastModified": 1747541019,
"narHash": "sha256-j3GieFJQqdtDLQmGMVhtiPy/3gP3PjlPybKywN4hOOQ=",
"owner": "rycee",
"repo": "nur-expressions",
"rev": "d74460da63a8c08a69a1f143b04f2ab1a6b2f5c2",
"rev": "830ffcdb44051917600abb79007e8593e9effc53",
"type": "gitlab"
},
"original": {
@ -179,13 +155,28 @@
}
},
"flake-compat_3": {
"locked": {
"lastModified": 1747046372,
"narHash": "sha256-CIVLLkVgvHYbgI2UpXvIIBJ12HWgX+fjA8Xf8PUmqCY=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "9100a0f413b0c601e0533d1d94ffd501ce2e7885",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-compat_4": {
"flake": false,
"locked": {
"lastModified": 1717312683,
"narHash": "sha256-FrlieJH50AuvagamEvWMIE6D2OAnERuDboFDYAED/dE=",
"lastModified": 1746162366,
"narHash": "sha256-5SSSZ/oQkwfcAz/o/6TlejlVGqeK08wyREBQ5qFFPhM=",
"owner": "nix-community",
"repo": "flake-compat",
"rev": "38fd3954cf65ce6faf3d0d45cd26059e059f07ea",
"rev": "0f158086a2ecdbb138cd0429410e44994f1b7e4b",
"type": "github"
},
"original": {
@ -194,7 +185,7 @@
"type": "github"
}
},
"flake-compat_4": {
"flake-compat_5": {
"flake": false,
"locked": {
"lastModified": 1696426674,
@ -217,11 +208,11 @@
]
},
"locked": {
"lastModified": 1741352980,
"narHash": "sha256-+u2UunDA4Cl5Fci3m7S643HzKmIDAe+fiXrLqYsR2fs=",
"lastModified": 1743550720,
"narHash": "sha256-hIshGgKZCgWh6AYJpJmRgFdR3WUbkY04o82X05xqQiY=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "f4330d22f1c5d2ba72d3d22df5597d123fdb60a9",
"rev": "c621e8422220273271f52058f618c94e405bb0f5",
"type": "github"
},
"original": {
@ -252,21 +243,6 @@
}
},
"flake-utils": {
"locked": {
"lastModified": 1629284811,
"narHash": "sha256-JHgasjPR0/J1J3DRm4KxM4zTyAj4IOJY8vIl75v/kPI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "c5d161cc0af116a2e17f54316f0bf43f0819785c",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_2": {
"inputs": {
"systems": "systems_2"
},
@ -313,11 +289,11 @@
]
},
"locked": {
"lastModified": 1703113217,
"narHash": "sha256-7ulcXOk63TIT2lVDSExj7XzFx09LpdSAPtvgtM7yQPE=",
"lastModified": 1745494811,
"narHash": "sha256-YZCh2o9Ua1n9uCvrvi5pRxtuVNml8X2a03qIFfRKpFs=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "3bfaacf46133c037bb356193bd2f1765d9dc82c1",
"rev": "abfad3d2958c9e6300a883bd443512c55dfeb1be",
"type": "github"
},
"original": {
@ -333,11 +309,11 @@
]
},
"locked": {
"lastModified": 1742655702,
"narHash": "sha256-jbqlw4sPArFtNtA1s3kLg7/A4fzP4GLk9bGbtUJg0JQ=",
"lastModified": 1747331121,
"narHash": "sha256-3MmiUN/jOHBHQUnjqzg6qKArc17j2OS6jisEppDY4g8=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "0948aeedc296f964140d9429223c7e4a0702a1ff",
"rev": "1eec32f0efe3b830927989767a9e6ece0d82d608",
"type": "github"
},
"original": {
@ -370,6 +346,49 @@
"type": "gitlab"
}
},
"nix-alien": {
"inputs": {
"flake-compat": "flake-compat_3",
"nix-index-database": "nix-index-database",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1747293822,
"narHash": "sha256-1R3Ro+RQCUUnIFZDObP9/2QBLk3xvgbXU67Qii+YZ8s=",
"owner": "thiagokokada",
"repo": "nix-alien",
"rev": "ea7eb3a76520fa8d92879afb819756ffc0bc629e",
"type": "github"
},
"original": {
"owner": "thiagokokada",
"repo": "nix-alien",
"type": "github"
}
},
"nix-index-database": {
"inputs": {
"nixpkgs": [
"nix-alien",
"nixpkgs"
]
},
"locked": {
"lastModified": 1746934494,
"narHash": "sha256-3n6i+F0sDASjkhbvgFDpPDZGp7z19IrRtjfF9TwJpCA=",
"owner": "nix-community",
"repo": "nix-index-database",
"rev": "e9b21b01e4307176b9718a29ac514838e7f6f4ff",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nix-index-database",
"type": "github"
}
},
"nixlib": {
"locked": {
"lastModified": 1643502816,
@ -387,7 +406,7 @@
},
"nixos-cosmic": {
"inputs": {
"flake-compat": "flake-compat_3",
"flake-compat": "flake-compat_4",
"nixpkgs": [
"nixpkgs"
],
@ -395,11 +414,11 @@
"rust-overlay": "rust-overlay"
},
"locked": {
"lastModified": 1742863891,
"narHash": "sha256-/mGCIxO7zlWCHOZLaOMRoJgSLpIav0PBKWG3BQddElw=",
"lastModified": 1747566515,
"narHash": "sha256-mBT3EypUn1HZ5iRGDmZQPtVNYxQxnkIsasggSCndYjw=",
"owner": "lilyinstarlight",
"repo": "nixos-cosmic",
"rev": "366999efebcad2165f472ef93e9c996693bda75d",
"rev": "93f3add95306179d15f8a6b1cfc87bfdc1702a33",
"type": "github"
},
"original": {
@ -410,11 +429,11 @@
},
"nixos-hardware": {
"locked": {
"lastModified": 1742806253,
"narHash": "sha256-zvQ4GsCJT6MTOzPKLmlFyM+lxo0JGQ0cSFaZSACmWfY=",
"lastModified": 1747129300,
"narHash": "sha256-L3clA5YGeYCF47ghsI7Tcex+DnaaN/BbQ4dR2wzoiKg=",
"owner": "NixOS",
"repo": "nixos-hardware",
"rev": "ecaa2d911e77c265c2a5bac8b583c40b0f151726",
"rev": "e81fd167b33121269149c57806599045fd33eeed",
"type": "github"
},
"original": {
@ -425,11 +444,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1742751704,
"narHash": "sha256-rBfc+H1dDBUQ2mgVITMGBPI1PGuCznf9rcWX/XIULyE=",
"lastModified": 1747335874,
"narHash": "sha256-IKKIXTSYJMmUtE+Kav5Rob8SgLPnfnq4Qu8LyT4gdqQ=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "f0946fa5f1fb876a9dc2e1850d9d3a4e3f914092",
"rev": "ba8b70ee098bc5654c459d6a95dfc498b91ff858",
"type": "github"
},
"original": {
@ -441,11 +460,11 @@
},
"nixpkgs-stable": {
"locked": {
"lastModified": 1742512142,
"narHash": "sha256-8XfURTDxOm6+33swQJu/hx6xw1Tznl8vJJN5HwVqckg=",
"lastModified": 1747335874,
"narHash": "sha256-IKKIXTSYJMmUtE+Kav5Rob8SgLPnfnq4Qu8LyT4gdqQ=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "7105ae3957700a9646cc4b766f5815b23ed0c682",
"rev": "ba8b70ee098bc5654c459d6a95dfc498b91ff858",
"type": "github"
},
"original": {
@ -457,11 +476,11 @@
},
"nixpkgs-unstable": {
"locked": {
"lastModified": 1742669843,
"narHash": "sha256-G5n+FOXLXcRx+3hCJ6Rt6ZQyF1zqQ0DL0sWAMn2Nk0w=",
"lastModified": 1747327360,
"narHash": "sha256-LSmTbiq/nqZR9B2t4MRnWG7cb0KVNU70dB7RT4+wYK4=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "1e5b653dff12029333a6546c11e108ede13052eb",
"rev": "e06158e58f3adee28b139e9c2bcfcc41f8625b46",
"type": "github"
},
"original": {
@ -496,11 +515,11 @@
"systems": "systems_3"
},
"locked": {
"lastModified": 1742893502,
"narHash": "sha256-W8M7Kzat8ySVY+bBW0FF6jB4xjdb8sLm14OHVyyu0KQ=",
"lastModified": 1747556457,
"narHash": "sha256-L1iSnAQYsveQs1haZ9CcidvYKhYotchzgM9GqYie0Rg=",
"owner": "astro",
"repo": "nix-openwrt-imagebuilder",
"rev": "89d3674159e5606b0c1db636e7c7463b7b976b45",
"rev": "568956f921869b6f36af3809fab4a914ed17082c",
"type": "github"
},
"original": {
@ -511,18 +530,18 @@
},
"pre-commit-hooks": {
"inputs": {
"flake-compat": "flake-compat_4",
"flake-compat": "flake-compat_5",
"gitignore": "gitignore",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1742649964,
"narHash": "sha256-DwOTp7nvfi8mRfuL1escHDXabVXFGT1VlPD1JHrtrco=",
"lastModified": 1747372754,
"narHash": "sha256-2Y53NGIX2vxfie1rOW0Qb86vjRZ7ngizoo+bnXU9D9k=",
"owner": "cachix",
"repo": "pre-commit-hooks.nix",
"rev": "dcf5072734cb576d2b0c59b2ac44f5050b5eac82",
"rev": "80479b6ec16fefd9c1db3ea13aeb038c60530f46",
"type": "github"
},
"original": {
@ -535,13 +554,13 @@
"inputs": {
"agenix": "agenix",
"arkenfox-userjs": "arkenfox-userjs",
"csharp-language-server": "csharp-language-server",
"deploy-rs": "deploy-rs",
"firefox-addons": "firefox-addons",
"flake-parts": "flake-parts",
"flake-utils": "flake-utils_2",
"flake-utils": "flake-utils",
"home-manager": "home-manager_2",
"matrix-appservices": "matrix-appservices",
"nix-alien": "nix-alien",
"nixos-cosmic": "nixos-cosmic",
"nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs",
@ -559,11 +578,11 @@
]
},
"locked": {
"lastModified": 1742437918,
"narHash": "sha256-Vflb6KJVDikFcM9E231mRN88uk4+jo7BWtaaQMifthI=",
"lastModified": 1747535902,
"narHash": "sha256-rKWBtLcqQeu8PpfKIBn1ORXS2udSH/MwnQFwfSpFOLg=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "f03085549609e49c7bcbbee86a1949057d087199",
"rev": "b7a99615d26b82c39b73ccc9026545c3f3403b71",
"type": "github"
},
"original": {

View file

@ -28,6 +28,11 @@ rec {
flake-utils.url = "github:numtide/flake-utils";
nix-alien = {
url = "github:thiagokokada/nix-alien";
inputs.nixpkgs.follows = "nixpkgs";
};
home-manager = {
url = "github:nix-community/home-manager/release-24.11";
inputs.nixpkgs.follows = "nixpkgs";
@ -79,11 +84,6 @@ rec {
inputs.nixpkgs.follows = "nixpkgs";
};
csharp-language-server = {
url = "github:SofusA/csharp-language-server";
# inputs.nixpkgs.follows = "nixpkgs";
inputs.flake-utils.follows = "flake-utils";
};
};
outputs =

View file

@ -22,16 +22,12 @@ in
enable = true;
package = pkgs.unstable.helix;
languages.language = [
{
name = "c-sharp";
language-servers = [ "roslyn" ];
auto-format = true;
}
{
name = "javascript";
language-servers = typescriptLanguageServers;
# TODO also configure eslint for diagnostics
# formatter.command = "eslint_d --fix";
# formatter.command = ["eslint_d"];
# formatter.args = ["--fix"];
formatter = prettier "typescript";
auto-format = true;
}
@ -59,7 +55,7 @@ in
}
{
name = "nix";
# `nix fmt` does not support stdin
# HINT `nix fmt` is a bit slow
formatter.command = "nixfmt";
language-servers = [
"nixd"
@ -74,12 +70,32 @@ in
}
{
name = "protobuf";
formatter.command = "buf format -w";
formatter.command = "buf";
formatter.args = [
"format"
"-w"
];
language-servers = [
"bufls"
"buf-lint"
];
}
{
name = "hcl";
language-id = "opentofu";
language-servers = [ "opentofu-ls" ];
injection-regex = "(hcl|tf|tofu)";
file-types = [
"hcl"
"tf"
"tofu"
];
}
{
name = "tfvars";
language-id = "opentofu-vars";
language-servers = [ "opentofu-ls" ];
}
{
name = "graphql";
formatter = prettier "graphql";
@ -140,7 +156,6 @@ in
};
};
};
roslyn.command = "csharp-language-server";
statix = {
command = "efm-langserver";
config = {
@ -212,6 +227,13 @@ in
};
};
};
opentofu-ls = {
command = "opentofu-ls";
args = [ "serve" ];
config = {
opentofu.path = "tofu";
};
};
};
settings = {
theme = "dark_plus";

View file

@ -4,21 +4,11 @@
home.packages = with pkgs; [
# language servers
efm-langserver
unstable.roslyn-ls
(pkgs.symlinkJoin {
name = "csharp-language-server";
paths = [ inputs.csharp-language-server.packages.${system}.csharp-language-server ];
buildInputs = [ pkgs.makeWrapper ];
postBuild = ''
wrapProgram $out/bin/csharp-language-server \
--prefix PATH : "${pkgs.lib.makeBinPath [ pkgs.dotnet-sdk_9 ]}"
'';
})
omnisharp-roslyn
nil
unstable.nixd
nls
terraform-ls
unstable.opentofu-ls
pyright
nodePackages.bash-language-server
nodePackages.vim-language-server
@ -31,6 +21,7 @@
haskellPackages.haskell-language-server
rust-analyzer
sumneko-lua-language-server
marksman
# linters & formatters
topiary

View file

@ -7,6 +7,7 @@
programs.zellij.settings = {
default_layout = "compact"; # or default
default_mode = "normal";
show_startup_tips = false;
ui.pane_frames = {
hide_session_name = true;
};

View file

@ -5,6 +5,7 @@
./zram.nix
./i18n.nix
./nix.nix
./nix-ld.nix
./networking.nix
./hardened.nix
];

9
system/nix-ld.nix Normal file
View file

@ -0,0 +1,9 @@
{ inputs, system, ... }:
{
environment.systemPackages = [
inputs.nix-alien.packages.${system}.nix-alien
];
programs.nix-ld.enable = true;
}