Compare commits
13
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
326ee9a03b | ||
|
|
b192e41653 | ||
|
|
3d3276e9c4 | ||
|
|
dce2751ab9 | ||
|
|
a23fd391b8 | ||
|
|
c2160cb3c7 | ||
|
|
26e8af76fc | ||
|
|
ba181a3bdd | ||
|
|
8cda62c832 | ||
|
|
61e1108ff7 | ||
|
|
2df0a3a2f9 | ||
|
|
89fec69f3e | ||
|
|
da805e15c6 |
Generated
+55
-103
@@ -1,41 +1,6 @@
|
|||||||
{
|
{
|
||||||
"nodes": {
|
"nodes": {
|
||||||
"apple-silicon": {
|
|
||||||
"inputs": {
|
|
||||||
"flake-compat": "flake-compat",
|
|
||||||
"nixpkgs": "nixpkgs"
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1748659443,
|
|
||||||
"narHash": "sha256-dav2hzyCmXZ3n6lEZrfZBG51+g6PUhkzRl3d6Ypd9x0=",
|
|
||||||
"owner": "nix-community",
|
|
||||||
"repo": "nixos-apple-silicon",
|
|
||||||
"rev": "3ddc251d2acce5019b0fa770e224d068610a34e4",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nix-community",
|
|
||||||
"ref": "release-2025-05-30",
|
|
||||||
"repo": "nixos-apple-silicon",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"flake-compat": {
|
"flake-compat": {
|
||||||
"locked": {
|
|
||||||
"lastModified": 1688025799,
|
|
||||||
"narHash": "sha256-ktpB4dRtnksm9F5WawoIkEneh1nrEvuxb5lJFt1iOyw=",
|
|
||||||
"owner": "nix-community",
|
|
||||||
"repo": "flake-compat",
|
|
||||||
"rev": "8bf105319d44f6b9f0d764efa4fdef9f1cc9ba1c",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nix-community",
|
|
||||||
"repo": "flake-compat",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"flake-compat_2": {
|
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1761588595,
|
"lastModified": 1761588595,
|
||||||
@@ -149,10 +114,10 @@
|
|||||||
},
|
},
|
||||||
"ghostty": {
|
"ghostty": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-compat": "flake-compat_2",
|
"flake-compat": "flake-compat",
|
||||||
"flake-utils": "flake-utils",
|
"flake-utils": "flake-utils",
|
||||||
"home-manager": "home-manager",
|
"home-manager": "home-manager",
|
||||||
"nixpkgs": "nixpkgs_2",
|
"nixpkgs": "nixpkgs",
|
||||||
"zig": "zig",
|
"zig": "zig",
|
||||||
"zon2nix": "zon2nix"
|
"zon2nix": "zon2nix"
|
||||||
},
|
},
|
||||||
@@ -214,6 +179,26 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"home-manager-unstable": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs-unstable"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1794963576,
|
||||||
|
"narHash": "sha256-+CPrP74GDJ63f7bgEFC9Av4hbxc7K9WUNv1ZVRifRe8=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "home-manager",
|
||||||
|
"rev": "2b13c9cb3aa20653e6f8ee0b7f8331a53ea9b0a9",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "home-manager",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"home-manager_2": {
|
"home-manager_2": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
@@ -256,6 +241,22 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"nix-flatpak": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1790428548,
|
||||||
|
"narHash": "sha256-OsZ/I7v3ArCrk0XOUvkiU1dFtGtE1qZTHRGjvBXIKUU=",
|
||||||
|
"owner": "gmodena",
|
||||||
|
"repo": "nix-flatpak",
|
||||||
|
"rev": "f1f045fc8b35ff59f88982c1752d3f3a42ca6a61",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "gmodena",
|
||||||
|
"ref": "latest",
|
||||||
|
"repo": "nix-flatpak",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"nixgl": {
|
"nixgl": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-utils": "flake-utils_3",
|
"flake-utils": "flake-utils_3",
|
||||||
@@ -277,36 +278,17 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixos-hardware": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1768584846,
|
|
||||||
"narHash": "sha256-IRPmIOV2tPwxbhP/I9M5AmwhTC0lMPtoPStC+8T6xl0=",
|
|
||||||
"owner": "NixOS",
|
|
||||||
"repo": "nixos-hardware",
|
|
||||||
"rev": "cce68f4a54fa4e3d633358364477f5cc1d782440",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "NixOS",
|
|
||||||
"ref": "master",
|
|
||||||
"repo": "nixos-hardware",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1748460289,
|
"lastModified": 1768032153,
|
||||||
"narHash": "sha256-7doLyJBzCllvqX4gszYtmZUToxKvMUrg45EUWaUYmBg=",
|
"narHash": "sha256-zvxtwlM8ZlulmZKyYCQAPpkm5dngSEnnHjmjV7Teloc=",
|
||||||
"owner": "nixos",
|
"rev": "3146c6aa9995e7351a398e17470e15305e6e18ff",
|
||||||
"repo": "nixpkgs",
|
"type": "tarball",
|
||||||
"rev": "96ec055edbe5ee227f28cdbc3f1ddf1df5965102",
|
"url": "https://releases.nixos.org/nixpkgs/nixpkgs-26.05pre925418.3146c6aa9995/nixexprs.tar.xz"
|
||||||
"type": "github"
|
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "nixos",
|
"type": "tarball",
|
||||||
"ref": "nixos-unstable",
|
"url": "https://channels.nixos.org/nixpkgs-unstable/nixexprs.tar.xz"
|
||||||
"repo": "nixpkgs",
|
|
||||||
"type": "github"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs-darwin": {
|
"nixpkgs-darwin": {
|
||||||
@@ -325,29 +307,13 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs-electron-32": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1729595756,
|
|
||||||
"narHash": "sha256-rNaLWDqjgy23Y6M3K/e7Kiyimq04ikDMrErpqgXWcV0=",
|
|
||||||
"owner": "NixOS",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "782740762fb281404740b6b7084d356c3dab1173",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "NixOS",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "782740762fb281404740b6b7084d356c3dab1173",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs-unstable": {
|
"nixpkgs-unstable": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1768564909,
|
"lastModified": 1794890597,
|
||||||
"narHash": "sha256-Kell/SpJYVkHWMvnhqJz/8DqQg2b6PguxVWOuadbHCc=",
|
"narHash": "sha256-lME2lHoDHAaSHP3/okgiVoJ0icVEvsQH8LeU3We7tcc=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "e4bae1bd10c9c57b2cf517953ab70060a828ee6f",
|
"rev": "04906337b6d53e8bb0eaf0470ae9f070a4d4eb55",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -358,19 +324,6 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs_2": {
|
"nixpkgs_2": {
|
||||||
"locked": {
|
|
||||||
"lastModified": 1768032153,
|
|
||||||
"narHash": "sha256-zvxtwlM8ZlulmZKyYCQAPpkm5dngSEnnHjmjV7Teloc=",
|
|
||||||
"rev": "3146c6aa9995e7351a398e17470e15305e6e18ff",
|
|
||||||
"type": "tarball",
|
|
||||||
"url": "https://releases.nixos.org/nixpkgs/nixpkgs-26.05pre925418.3146c6aa9995/nixexprs.tar.xz"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"type": "tarball",
|
|
||||||
"url": "https://channels.nixos.org/nixpkgs-unstable/nixexprs.tar.xz"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs_3": {
|
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1768323494,
|
"lastModified": 1768323494,
|
||||||
"narHash": "sha256-yBXJLE6WCtrGo7LKiB6NOt6nisBEEkguC/lq/rP3zRQ=",
|
"narHash": "sha256-yBXJLE6WCtrGo7LKiB6NOt6nisBEEkguC/lq/rP3zRQ=",
|
||||||
@@ -386,7 +339,7 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs_4": {
|
"nixpkgs_3": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1749086602,
|
"lastModified": 1749086602,
|
||||||
"narHash": "sha256-DJcgJMekoxVesl9kKjfLPix2Nbr42i7cpEHJiTnBUwU=",
|
"narHash": "sha256-DJcgJMekoxVesl9kKjfLPix2Nbr42i7cpEHJiTnBUwU=",
|
||||||
@@ -402,7 +355,7 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs_5": {
|
"nixpkgs_4": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1747542820,
|
"lastModified": 1747542820,
|
||||||
"narHash": "sha256-GaOZntlJ6gPPbbkTLjbd8BMWaDYafhuuYRNrxCGnPJw=",
|
"narHash": "sha256-GaOZntlJ6gPPbbkTLjbd8BMWaDYafhuuYRNrxCGnPJw=",
|
||||||
@@ -442,16 +395,15 @@
|
|||||||
},
|
},
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"apple-silicon": "apple-silicon",
|
|
||||||
"ghostty": "ghostty",
|
"ghostty": "ghostty",
|
||||||
"godig": "godig",
|
"godig": "godig",
|
||||||
"home-manager": "home-manager_2",
|
"home-manager": "home-manager_2",
|
||||||
|
"home-manager-unstable": "home-manager-unstable",
|
||||||
"nix-darwin": "nix-darwin",
|
"nix-darwin": "nix-darwin",
|
||||||
|
"nix-flatpak": "nix-flatpak",
|
||||||
"nixgl": "nixgl",
|
"nixgl": "nixgl",
|
||||||
"nixos-hardware": "nixos-hardware",
|
"nixpkgs": "nixpkgs_2",
|
||||||
"nixpkgs": "nixpkgs_3",
|
|
||||||
"nixpkgs-darwin": "nixpkgs-darwin",
|
"nixpkgs-darwin": "nixpkgs-darwin",
|
||||||
"nixpkgs-electron-32": "nixpkgs-electron-32",
|
|
||||||
"nixpkgs-unstable": "nixpkgs-unstable",
|
"nixpkgs-unstable": "nixpkgs-unstable",
|
||||||
"opencode-tunneler": "opencode-tunneler",
|
"opencode-tunneler": "opencode-tunneler",
|
||||||
"sops-nix": "sops-nix",
|
"sops-nix": "sops-nix",
|
||||||
@@ -483,7 +435,7 @@
|
|||||||
"ssh-agent-switcher": {
|
"ssh-agent-switcher": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-utils": "flake-utils_5",
|
"flake-utils": "flake-utils_5",
|
||||||
"nixpkgs": "nixpkgs_4"
|
"nixpkgs": "nixpkgs_3"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1749108251,
|
"lastModified": 1749108251,
|
||||||
@@ -592,7 +544,7 @@
|
|||||||
},
|
},
|
||||||
"walker": {
|
"walker": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": "nixpkgs_5",
|
"nixpkgs": "nixpkgs_4",
|
||||||
"systems": "systems_6"
|
"systems": "systems_6"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
|
|||||||
@@ -8,9 +8,6 @@
|
|||||||
nix-darwin.url = "github:LnL7/nix-darwin/nix-darwin-25.11";
|
nix-darwin.url = "github:LnL7/nix-darwin/nix-darwin-25.11";
|
||||||
nix-darwin.inputs.nixpkgs.follows = "nixpkgs-darwin";
|
nix-darwin.inputs.nixpkgs.follows = "nixpkgs-darwin";
|
||||||
|
|
||||||
# Required for webcord.
|
|
||||||
nixpkgs-electron-32.url = "github:NixOS/nixpkgs/782740762fb281404740b6b7084d356c3dab1173";
|
|
||||||
|
|
||||||
nixgl.url = "github:nix-community/nixGL";
|
nixgl.url = "github:nix-community/nixGL";
|
||||||
nixgl.inputs.nixpkgs.follows = "nixpkgs";
|
nixgl.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
|
||||||
@@ -19,14 +16,16 @@
|
|||||||
url = "github:mic92/sops-nix";
|
url = "github:mic92/sops-nix";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
apple-silicon = {
|
|
||||||
url = "github:nix-community/nixos-apple-silicon/release-2025-05-30";
|
|
||||||
};
|
|
||||||
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
|
|
||||||
home-manager = {
|
home-manager = {
|
||||||
url = "github:nix-community/home-manager/release-25.11";
|
url = "github:nix-community/home-manager/release-25.11";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
home-manager-unstable = {
|
||||||
|
url = "github:nix-community/home-manager";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs-unstable";
|
||||||
|
};
|
||||||
|
# Declarative flatpaks.
|
||||||
|
nix-flatpak.url = "github:gmodena/nix-flatpak/?ref=latest";
|
||||||
ghostty = {
|
ghostty = {
|
||||||
url = "github:ghostty-org/ghostty";
|
url = "github:ghostty-org/ghostty";
|
||||||
};
|
};
|
||||||
@@ -68,8 +67,6 @@
|
|||||||
nixpkgs,
|
nixpkgs,
|
||||||
nixpkgs-unstable,
|
nixpkgs-unstable,
|
||||||
nix-darwin,
|
nix-darwin,
|
||||||
apple-silicon,
|
|
||||||
nixos-hardware,
|
|
||||||
home-manager,
|
home-manager,
|
||||||
ghostty,
|
ghostty,
|
||||||
nixgl,
|
nixgl,
|
||||||
@@ -79,50 +76,6 @@
|
|||||||
...
|
...
|
||||||
}@inputs: {
|
}@inputs: {
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
nixlap = nixpkgs.lib.nixosSystem {
|
|
||||||
system = "x86_64-linux";
|
|
||||||
specialArgs = {
|
|
||||||
inherit inputs ghostty;
|
|
||||||
};
|
|
||||||
modules = [
|
|
||||||
./hosts/nixlap/configuration.nix
|
|
||||||
nixos-hardware.nixosModules.framework-13-7040-amd
|
|
||||||
home-manager.nixosModules.home-manager
|
|
||||||
{
|
|
||||||
home-manager.extraSpecialArgs = { inherit inputs; };
|
|
||||||
home-manager.useGlobalPkgs = true;
|
|
||||||
home-manager.useUserPackages = true;
|
|
||||||
home-manager.users.jmug = import ./hosts/nixlap/home.nix;
|
|
||||||
home-manager.users.root = import ./hosts/nixlap/home-root.nix;
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
asahi = let
|
|
||||||
pkgs-unstable_aarch64-linux = import nixpkgs-unstable {
|
|
||||||
system = "aarch64-linux";
|
|
||||||
config = {
|
|
||||||
allowUnfree = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
in nixpkgs.lib.nixosSystem {
|
|
||||||
system = "aarch64-linux";
|
|
||||||
specialArgs = {
|
|
||||||
inherit inputs apple-silicon ghostty;
|
|
||||||
};
|
|
||||||
modules = [
|
|
||||||
./hosts/asahi/configuration.nix
|
|
||||||
home-manager.nixosModules.home-manager
|
|
||||||
{
|
|
||||||
home-manager.extraSpecialArgs = {
|
|
||||||
pkgs-unstable = pkgs-unstable_aarch64-linux;
|
|
||||||
inherit inputs;
|
|
||||||
};
|
|
||||||
home-manager.useGlobalPkgs = true;
|
|
||||||
home-manager.useUserPackages = true;
|
|
||||||
home-manager.users.jmug = import ./hosts/asahi/home.nix;
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
devbox = nixpkgs.lib.nixosSystem {
|
devbox = nixpkgs.lib.nixosSystem {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
specialArgs = {
|
specialArgs = {
|
||||||
@@ -131,13 +84,17 @@
|
|||||||
modules = [
|
modules = [
|
||||||
./hosts/devbox/configuration.nix
|
./hosts/devbox/configuration.nix
|
||||||
home-manager.nixosModules.home-manager
|
home-manager.nixosModules.home-manager
|
||||||
{
|
({ config, ... }: {
|
||||||
home-manager.extraSpecialArgs = { inherit inputs ssh-agent-switcher; };
|
home-manager.extraSpecialArgs = {
|
||||||
|
inherit inputs ssh-agent-switcher;
|
||||||
|
inherit (config) user;
|
||||||
|
homeConfigurationName = "devbox";
|
||||||
|
};
|
||||||
home-manager.useGlobalPkgs = true;
|
home-manager.useGlobalPkgs = true;
|
||||||
home-manager.useUserPackages = true;
|
home-manager.useUserPackages = true;
|
||||||
home-manager.users.jmug = import ./hosts/devbox/home.nix;
|
home-manager.users.jmug = import ./hosts/devbox/home.nix;
|
||||||
home-manager.users.root = import ./hosts/devbox/home-root.nix;
|
home-manager.users.root = import ./hosts/devbox/home-root.nix;
|
||||||
}
|
})
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
nixbox = let
|
nixbox = let
|
||||||
@@ -161,11 +118,11 @@
|
|||||||
inherit inputs;
|
inherit inputs;
|
||||||
inherit ssh-agent-switcher;
|
inherit ssh-agent-switcher;
|
||||||
inherit (config) user;
|
inherit (config) user;
|
||||||
|
homeConfigurationName = "nixbox";
|
||||||
};
|
};
|
||||||
home-manager.useGlobalPkgs = true;
|
home-manager.useGlobalPkgs = true;
|
||||||
home-manager.useUserPackages = true;
|
home-manager.useUserPackages = true;
|
||||||
home-manager.users.jmug = import ./hosts/nixbox/home.nix;
|
home-manager.users.jmug = import ./hosts/nixbox/home.nix;
|
||||||
# home-manager.users.root = import ./hosts/devbox/home-root.nix;
|
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
@@ -195,6 +152,7 @@
|
|||||||
inherit (config) user;
|
inherit (config) user;
|
||||||
inherit opencode-tunneler;
|
inherit opencode-tunneler;
|
||||||
inherit godig;
|
inherit godig;
|
||||||
|
homeConfigurationName = "macbook";
|
||||||
};
|
};
|
||||||
home-manager.useGlobalPkgs = true;
|
home-manager.useGlobalPkgs = true;
|
||||||
home-manager.useUserPackages = true;
|
home-manager.useUserPackages = true;
|
||||||
@@ -224,10 +182,38 @@
|
|||||||
./users/alarm/home.nix
|
./users/alarm/home.nix
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
# Ubuntu desktop.
|
||||||
|
# Apply with ./ubuntu/bootstrap.sh on first install (safe to rerun to sync).
|
||||||
|
ubuntu = let
|
||||||
|
pkgs = import nixpkgs-unstable {
|
||||||
|
system = "x86_64-linux";
|
||||||
|
config.allowUnfree = true;
|
||||||
|
overlays = [
|
||||||
|
# Use the host's flatpak. Ubuntu sets
|
||||||
|
# kernel.apparmor_restrict_unprivileged_userns=1 so so nixpkgs'
|
||||||
|
# flatpak can't sandbox extra-data installs (e.g. Slack's apply_extra).
|
||||||
|
(final: prev: {
|
||||||
|
flatpak = final.writeShellScriptBin "flatpak" ''exec /usr/bin/flatpak "$@"'';
|
||||||
|
})
|
||||||
|
];
|
||||||
|
};
|
||||||
|
in inputs.home-manager-unstable.lib.homeManagerConfiguration {
|
||||||
|
inherit pkgs;
|
||||||
|
extraSpecialArgs = {
|
||||||
|
inherit inputs;
|
||||||
|
homeConfigurationName = "ubuntu";
|
||||||
|
# Shared modules take a pkgs-unstable arg, for this config pkgs-unstable and pkgs are the same.
|
||||||
|
pkgs-unstable = pkgs;
|
||||||
|
};
|
||||||
|
modules = [
|
||||||
|
./hosts/ubuntu/home.nix
|
||||||
|
];
|
||||||
|
};
|
||||||
# For machines that don't run NixOS.
|
# For machines that don't run NixOS.
|
||||||
devbox = home-manager.lib.homeManagerConfiguration {
|
devbox = home-manager.lib.homeManagerConfiguration {
|
||||||
pkgs = nixpkgs.legacyPackages."x86_64-linux";
|
pkgs = nixpkgs.legacyPackages."x86_64-linux";
|
||||||
extraSpecialArgs = {
|
extraSpecialArgs = {
|
||||||
|
homeConfigurationName = "devbox";
|
||||||
pkgs-unstable = pkgs-unstable_x86_64-linux;
|
pkgs-unstable = pkgs-unstable_x86_64-linux;
|
||||||
};
|
};
|
||||||
modules = [
|
modules = [
|
||||||
@@ -237,6 +223,7 @@
|
|||||||
armdevbox = home-manager.lib.homeManagerConfiguration {
|
armdevbox = home-manager.lib.homeManagerConfiguration {
|
||||||
pkgs = nixpkgs.legacyPackages."aarch64-linux";
|
pkgs = nixpkgs.legacyPackages."aarch64-linux";
|
||||||
extraSpecialArgs = {
|
extraSpecialArgs = {
|
||||||
|
homeConfigurationName = "armdevbox";
|
||||||
pkgs-unstable = pkgs-unstable_aarch64-linux;
|
pkgs-unstable = pkgs-unstable_aarch64-linux;
|
||||||
};
|
};
|
||||||
modules = [
|
modules = [
|
||||||
|
|||||||
@@ -1,5 +0,0 @@
|
|||||||
{ pkgs, ... }: {
|
|
||||||
home.packages = with pkgs; [
|
|
||||||
calibre
|
|
||||||
];
|
|
||||||
}
|
|
||||||
@@ -1,177 +0,0 @@
|
|||||||
;---Most generic types---
|
|
||||||
(module) @module
|
|
||||||
|
|
||||||
(identifier) @variable
|
|
||||||
|
|
||||||
(concrete_type) @type
|
|
||||||
|
|
||||||
;---annotations----
|
|
||||||
(annotation_type_def
|
|
||||||
(annotation_pre_colon
|
|
||||||
(identifier) @type))
|
|
||||||
|
|
||||||
(annotation_type_def
|
|
||||||
(annotation_pre_colon
|
|
||||||
(identifier) @function)
|
|
||||||
(function_type))
|
|
||||||
|
|
||||||
;----decleration types----
|
|
||||||
(value_declaration
|
|
||||||
(decl_left
|
|
||||||
(identifier_pattern
|
|
||||||
(identifier) @variable.parameter)))
|
|
||||||
|
|
||||||
;---records----
|
|
||||||
(field_name) @variable.member
|
|
||||||
|
|
||||||
(record_field_pattern
|
|
||||||
(_
|
|
||||||
(identifier) @variable))
|
|
||||||
|
|
||||||
;matches the second identifier and all subsequent ones
|
|
||||||
(field_access_expr
|
|
||||||
(identifier) @variable.member)
|
|
||||||
|
|
||||||
;highlight module members as records instead of free variables
|
|
||||||
; avoids highlighting them as out-of-scope vars
|
|
||||||
(variable_expr
|
|
||||||
(module) (identifier) @variable.member)
|
|
||||||
|
|
||||||
;----comments----
|
|
||||||
(line_comment) @comment @spell
|
|
||||||
|
|
||||||
(doc_comment) @comment.documentation @spell
|
|
||||||
|
|
||||||
;-----Punctuation----
|
|
||||||
[
|
|
||||||
"?"
|
|
||||||
(arrow)
|
|
||||||
(fat_arrow)
|
|
||||||
"|"
|
|
||||||
","
|
|
||||||
":"
|
|
||||||
] @punctuation.delimiter
|
|
||||||
|
|
||||||
[
|
|
||||||
"("
|
|
||||||
")"
|
|
||||||
"{"
|
|
||||||
"}"
|
|
||||||
"["
|
|
||||||
"]"
|
|
||||||
] @punctuation.bracket
|
|
||||||
|
|
||||||
[
|
|
||||||
"|"
|
|
||||||
"&"
|
|
||||||
"<-"
|
|
||||||
".."
|
|
||||||
(operator)
|
|
||||||
] @operator
|
|
||||||
|
|
||||||
(wildcard_pattern) @constant.builtin
|
|
||||||
|
|
||||||
[
|
|
||||||
"if"
|
|
||||||
"then"
|
|
||||||
"else"
|
|
||||||
] @keyword.conditional
|
|
||||||
|
|
||||||
[
|
|
||||||
(implements)
|
|
||||||
(when)
|
|
||||||
(is)
|
|
||||||
"as"
|
|
||||||
(to)
|
|
||||||
] @keyword
|
|
||||||
|
|
||||||
;----headers-----
|
|
||||||
|
|
||||||
[
|
|
||||||
"app"
|
|
||||||
"expect"
|
|
||||||
"module"
|
|
||||||
"package"
|
|
||||||
"import"
|
|
||||||
] @keyword
|
|
||||||
|
|
||||||
[
|
|
||||||
(import_as)
|
|
||||||
"imports"
|
|
||||||
] @keyword.import
|
|
||||||
|
|
||||||
|
|
||||||
(value_declaration
|
|
||||||
(decl_left
|
|
||||||
(identifier_pattern
|
|
||||||
(identifier) @function))
|
|
||||||
(expr_body
|
|
||||||
(anon_fun_expr)))
|
|
||||||
|
|
||||||
;----tags----
|
|
||||||
(tags_type
|
|
||||||
(tag_type) @constructor)
|
|
||||||
|
|
||||||
[
|
|
||||||
(tag)
|
|
||||||
(opaque_tag)
|
|
||||||
] @constructor
|
|
||||||
|
|
||||||
;-----builtins----
|
|
||||||
(variable_expr
|
|
||||||
(module) @module
|
|
||||||
(identifier) @boolean
|
|
||||||
(#any-of? @boolean "true" "false")
|
|
||||||
(#eq? @module "Bool"))
|
|
||||||
|
|
||||||
"dbg" @keyword.debug
|
|
||||||
|
|
||||||
;----function invocations ----
|
|
||||||
(function_call_pnc_expr
|
|
||||||
caller: (variable_expr
|
|
||||||
(identifier) @function.call))
|
|
||||||
|
|
||||||
(function_call_pnc_expr
|
|
||||||
caller: (field_access_expr
|
|
||||||
(identifier) @function.call .))
|
|
||||||
|
|
||||||
(bin_op_expr
|
|
||||||
(operator
|
|
||||||
"|>") @operator
|
|
||||||
(variable_expr
|
|
||||||
(identifier) @function))
|
|
||||||
|
|
||||||
;----function arguments----
|
|
||||||
(argument_patterns
|
|
||||||
(identifier_pattern
|
|
||||||
(identifier) @variable.parameter))
|
|
||||||
|
|
||||||
(argument_patterns
|
|
||||||
(_
|
|
||||||
(identifier_pattern
|
|
||||||
(identifier) @variable.parameter)))
|
|
||||||
|
|
||||||
(argument_patterns
|
|
||||||
(_
|
|
||||||
(_
|
|
||||||
(identifier_pattern
|
|
||||||
(identifier) @variable.parameter))))
|
|
||||||
|
|
||||||
;-----consts-----
|
|
||||||
[
|
|
||||||
(int)
|
|
||||||
(uint)
|
|
||||||
(iint)
|
|
||||||
(xint)
|
|
||||||
(natural)
|
|
||||||
] @number
|
|
||||||
|
|
||||||
[
|
|
||||||
(decimal)
|
|
||||||
(float)
|
|
||||||
] @number.float
|
|
||||||
|
|
||||||
(string) @string
|
|
||||||
(multiline_string) @string
|
|
||||||
|
|
||||||
(char) @character
|
|
||||||
@@ -1,61 +0,0 @@
|
|||||||
; (value_declaration(expr_body(anon_fun_expr)))@indent.ignore
|
|
||||||
[
|
|
||||||
(when_is_expr)
|
|
||||||
(when_is_branch)
|
|
||||||
(record_expr)
|
|
||||||
(anon_fun_expr)
|
|
||||||
(list_expr)
|
|
||||||
(parenthesized_expr)
|
|
||||||
(function_call_pnc_expr)
|
|
||||||
(tuple_expr)
|
|
||||||
(backpassing_expr)
|
|
||||||
(imports)
|
|
||||||
(exposes)
|
|
||||||
(exposes_list)
|
|
||||||
(exposing)
|
|
||||||
;;patterns
|
|
||||||
(record_pattern)
|
|
||||||
(tuple_pattern)
|
|
||||||
(list_pattern)
|
|
||||||
|
|
||||||
;;ability stuff
|
|
||||||
(ability_implementation)
|
|
||||||
(opaque_type_def)
|
|
||||||
;;types
|
|
||||||
(record_type)
|
|
||||||
(tags_type)
|
|
||||||
(record_expr)
|
|
||||||
(implements_implementation)
|
|
||||||
"{"
|
|
||||||
"("
|
|
||||||
"["
|
|
||||||
]
|
|
||||||
@indent.begin
|
|
||||||
|
|
||||||
; ((record_type)
|
|
||||||
; @indent.align
|
|
||||||
; (#set! indent.open_delimiter "{")
|
|
||||||
; (#set! indent.close_delimiter "}"))
|
|
||||||
; ((record_expr)
|
|
||||||
; @indent.align
|
|
||||||
; (#set! indent.open_delimiter "{")
|
|
||||||
; (#set! indent.close_delimiter "}"))
|
|
||||||
; ((tags_type) @indent.align
|
|
||||||
; (#set! indent.open_delimiter "[")
|
|
||||||
; (#set! indent.close_delimiter "]"))
|
|
||||||
; ((implements_implementation) @indent.align
|
|
||||||
; (#set! indent.open_delimiter "[")
|
|
||||||
; (#set! indent.close_delimiter "]"))
|
|
||||||
|
|
||||||
|
|
||||||
(expr_body)@indent.begin
|
|
||||||
|
|
||||||
(ERROR "=")@indent.begin
|
|
||||||
(then )@indent.begin
|
|
||||||
(else)@indent.begin
|
|
||||||
[
|
|
||||||
; result:(_)
|
|
||||||
"]"
|
|
||||||
"}"
|
|
||||||
")"
|
|
||||||
]@indent.branch
|
|
||||||
@@ -1,57 +0,0 @@
|
|||||||
;injection from function calls
|
|
||||||
(function_call_pnc_expr
|
|
||||||
(variable_expr (identifier) @injection.language)
|
|
||||||
(const [(multiline_string) (string)] @injection.content)
|
|
||||||
(#any-eq? @injection.language
|
|
||||||
"json"
|
|
||||||
"toml"
|
|
||||||
"yaml"
|
|
||||||
"xml"
|
|
||||||
"sql"
|
|
||||||
"lua"
|
|
||||||
"js"
|
|
||||||
"html"
|
|
||||||
"css"
|
|
||||||
"http"
|
|
||||||
"jq"
|
|
||||||
"latex"
|
|
||||||
"md"
|
|
||||||
"nix"
|
|
||||||
"regex"
|
|
||||||
)
|
|
||||||
)
|
|
||||||
;injection from piping function calls
|
|
||||||
(bin_op_expr
|
|
||||||
part: (const
|
|
||||||
[(multiline_string) (string)] @injection.content
|
|
||||||
)
|
|
||||||
part: (operator)
|
|
||||||
part: (variable_expr
|
|
||||||
(identifier) @injection.language
|
|
||||||
)
|
|
||||||
(#any-eq? @injection.language
|
|
||||||
"json"
|
|
||||||
"toml"
|
|
||||||
"yaml"
|
|
||||||
"xml"
|
|
||||||
"sql"
|
|
||||||
"lua"
|
|
||||||
"js"
|
|
||||||
"html"
|
|
||||||
"css"
|
|
||||||
"http"
|
|
||||||
"jq"
|
|
||||||
"latex"
|
|
||||||
"md"
|
|
||||||
"nix"
|
|
||||||
"regex"
|
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
||||||
(
|
|
||||||
[
|
|
||||||
(line_comment)
|
|
||||||
(doc_comment)
|
|
||||||
] @injection.content
|
|
||||||
(#set! injection.language "comment")
|
|
||||||
)
|
|
||||||
@@ -1,42 +0,0 @@
|
|||||||
(expr_body) @local.scope
|
|
||||||
|
|
||||||
(argument_patterns
|
|
||||||
(identifier_pattern
|
|
||||||
(identifier) @local.definition))
|
|
||||||
|
|
||||||
; (argument_patterns(long_identifier)@local.definition)
|
|
||||||
(exposes_list
|
|
||||||
(identifier) @local.reference)
|
|
||||||
|
|
||||||
(import_expr(as)(module)@local.definition)
|
|
||||||
|
|
||||||
(opaque_type_def
|
|
||||||
(apply_type
|
|
||||||
(concrete_type) @local.definition.type))
|
|
||||||
|
|
||||||
(alias_type_def
|
|
||||||
(apply_type
|
|
||||||
(concrete_type) @local.definition.type))
|
|
||||||
|
|
||||||
(value_declaration
|
|
||||||
(decl_left
|
|
||||||
(identifier_pattern
|
|
||||||
(identifier) @local.definition.function))
|
|
||||||
(expr_body
|
|
||||||
(anon_fun_expr)))
|
|
||||||
|
|
||||||
(value_declaration
|
|
||||||
(decl_left
|
|
||||||
(identifier_pattern
|
|
||||||
(identifier) @local.definition.var)))
|
|
||||||
|
|
||||||
(identifier_pattern
|
|
||||||
(identifier) @local.definition)
|
|
||||||
|
|
||||||
(when_is_branch pattern: (_ (identifier_pattern (identifier) @local.definition)))
|
|
||||||
(spread_pattern (identifier) @local.definition)
|
|
||||||
|
|
||||||
(identifier) @local.reference
|
|
||||||
|
|
||||||
(tag_expr
|
|
||||||
(tag)) @local.reference
|
|
||||||
@@ -1,33 +0,0 @@
|
|||||||
(anon_fun_expr
|
|
||||||
(expr_body) @function.inner
|
|
||||||
) @function.outer
|
|
||||||
|
|
||||||
(argument_patterns
|
|
||||||
((_) @parameter.inner . ","? @parameter.outer) @parameter.outer
|
|
||||||
)
|
|
||||||
|
|
||||||
(function_type
|
|
||||||
((_) @parameter.inner . ","? @parameter.outer) @parameter.outer(#not-eq? @parameter.inner "->")
|
|
||||||
)
|
|
||||||
|
|
||||||
(function_pnc_expr
|
|
||||||
.
|
|
||||||
(_)
|
|
||||||
(parenthesized_expr (expr_body) @parameter.inner) @parameter.outer
|
|
||||||
)
|
|
||||||
|
|
||||||
(function_pnc_expr
|
|
||||||
.
|
|
||||||
(_) ((_) @parameter.inner) @parameter.outer
|
|
||||||
)
|
|
||||||
|
|
||||||
[
|
|
||||||
(annotation_type_def ) @class.inner
|
|
||||||
(alias_type_def ) @class.inner
|
|
||||||
(opaque_type_def ) @class.inner
|
|
||||||
] @class.outer
|
|
||||||
|
|
||||||
(apply_type_arg) @parameter.inner
|
|
||||||
|
|
||||||
(line_comment) @comment.outer
|
|
||||||
(doc_comment) @comment.outer
|
|
||||||
@@ -1,54 +0,0 @@
|
|||||||
-----------------------------------------------------
|
|
||||||
-----------------------------------------------------
|
|
||||||
-----------------------------------------------------
|
|
||||||
------------- VSCode specific config ----------------
|
|
||||||
-----------------------------------------------------
|
|
||||||
-----------------------------------------------------
|
|
||||||
-----------------------------------------------------
|
|
||||||
-----------------------------------------------------
|
|
||||||
|
|
||||||
vim.api.nvim_set_keymap('n', '<Space>', '<NOP>', {noremap = true, silent = true})
|
|
||||||
vim.g.mapleader = ' '
|
|
||||||
|
|
||||||
-- Exit insert mode with ,h.
|
|
||||||
vim.api.nvim_set_keymap('i', ',h', '<ESC>', {noremap = true, silent = true})
|
|
||||||
|
|
||||||
-- Quick save.
|
|
||||||
vim.api.nvim_set_keymap('n', '<Leader>fw', ':w<CR>', {silent = true})
|
|
||||||
|
|
||||||
-- Remap for colemak-dhm.
|
|
||||||
-- Left.
|
|
||||||
vim.api.nvim_set_keymap('', 'm', 'h', {noremap = true, silent = true})
|
|
||||||
vim.api.nvim_set_keymap('', 'h', 'm', {noremap = true, silent = true})
|
|
||||||
-- Down.
|
|
||||||
vim.api.nvim_set_keymap('', 'j', 'n', {noremap = true, silent = true})
|
|
||||||
vim.api.nvim_set_keymap('', 'n', 'j', {noremap = true, silent = true})
|
|
||||||
-- Up.
|
|
||||||
vim.api.nvim_set_keymap('', 'k', 'e', {noremap = true, silent = true})
|
|
||||||
vim.api.nvim_set_keymap('', 'e', 'k', {noremap = true, silent = true})
|
|
||||||
-- Right.
|
|
||||||
vim.api.nvim_set_keymap('', 'l', 'i', {noremap = true, silent = true})
|
|
||||||
vim.api.nvim_set_keymap('', 'i', 'l', {noremap = true, silent = true})
|
|
||||||
|
|
||||||
-- C-g as ESC
|
|
||||||
vim.api.nvim_set_keymap('n', '<C-g>', '<ESC>', {silent = true})
|
|
||||||
vim.api.nvim_set_keymap('i', '<C-g>', '<ESC>', {silent = true})
|
|
||||||
vim.api.nvim_set_keymap('v', '<C-g>', '<ESC>', {silent = true})
|
|
||||||
vim.api.nvim_set_keymap('s', '<C-g>', '<ESC>', {silent = true})
|
|
||||||
vim.api.nvim_set_keymap('x', '<C-g>', '<ESC>', {silent = true})
|
|
||||||
vim.api.nvim_set_keymap('c', '<C-g>', '<ESC>', {silent = true})
|
|
||||||
vim.api.nvim_set_keymap('o', '<C-g>', '<ESC>', {silent = true})
|
|
||||||
vim.api.nvim_set_keymap('l', '<C-g>', '<ESC>', {silent = true})
|
|
||||||
vim.api.nvim_set_keymap('t', '<C-g>', '<ESC>', {silent = true})
|
|
||||||
|
|
||||||
-- Move right when in insert mode.
|
|
||||||
vim.api.nvim_set_keymap("i", '<C-l>', '<Right>', {noremap = true, silent = true})
|
|
||||||
|
|
||||||
-- Lsp
|
|
||||||
vim.api.nvim_set_keymap('n', '<Leader>lgd', "<cmd>lua require('vscode-neovim').call('editor.action.goToDeclaration')<CR>", {noremap = true, silent = true})
|
|
||||||
vim.api.nvim_set_keymap('n', '<Leader>lgr', "<cmd>lua require('vscode-neovim').call('editor.action.referenceSearch.trigger')<CR>", {noremap = true, silent = true})
|
|
||||||
vim.api.nvim_set_keymap('n', '<Leader>lr', "<cmd>lua require('vscode-neovim').call('editor.action.rename')<CR>", {noremap = true, silent = true})
|
|
||||||
|
|
||||||
-- Tab movement.
|
|
||||||
vim.api.nvim_set_keymap('n', '<Leader>m', "<cmd>lua require('vscode-neovim').call('workbench.action.previousEditorInGroup')<CR>", {noremap = true, silent = true})
|
|
||||||
vim.api.nvim_set_keymap('n', '<Leader>i', "<cmd>lua require('vscode-neovim').call('workbench.action.nextEditorInGroup')<CR>", {noremap = true, silent = true})
|
|
||||||
@@ -1,30 +1,9 @@
|
|||||||
|
vim.g.mapleader = ' '
|
||||||
|
vim.g.maplocalleader = ' '
|
||||||
|
|
||||||
require('settings')
|
require('settings')
|
||||||
require('nv-globals')
|
|
||||||
require('plugins')
|
require('plugins')
|
||||||
require('colorscheme')
|
require('colorscheme')
|
||||||
require('settings')
|
|
||||||
|
|
||||||
-- Must go after plugins.
|
|
||||||
require("oil").setup()
|
|
||||||
|
|
||||||
-- LSP
|
|
||||||
require('lsp')
|
|
||||||
require('lsp.typescript-ls')
|
|
||||||
require('lsp.python-ls')
|
|
||||||
require('lsp.lua-ls')
|
|
||||||
require('lsp.go-ls')
|
|
||||||
require('lsp.zls-ls')
|
|
||||||
require('lsp.clang-ls')
|
|
||||||
require('lsp.rust-analyzer')
|
|
||||||
|
|
||||||
-- Completion
|
|
||||||
require('completion')
|
require('completion')
|
||||||
|
require('lsp')
|
||||||
require('nv-prettier')
|
|
||||||
|
|
||||||
require('nv-telescope')
|
|
||||||
|
|
||||||
-- require('langs.roc')
|
|
||||||
|
|
||||||
-- Set up keymaps after everything is configured.
|
|
||||||
require('keymappings')
|
require('keymappings')
|
||||||
|
|||||||
@@ -0,0 +1,35 @@
|
|||||||
|
{
|
||||||
|
"auto-pairs": { "branch": "master", "commit": "39f06b873a8449af8ff6a3eee716d3da14d63a76" },
|
||||||
|
"cmp-buffer": { "branch": "main", "commit": "b74fab3656eea9de20a9b8116afa3cfc4ec09657" },
|
||||||
|
"cmp-nvim-lsp": { "branch": "main", "commit": "cbc7b02bb99fae35cb42f514762b89b5126651ef" },
|
||||||
|
"cmp-path": { "branch": "main", "commit": "c642487086dbd9a93160e1679a1327be111cbc25" },
|
||||||
|
"cmp-snippy": { "branch": "master", "commit": "6e39210aa3a74e2bf6462f492eaf0d436cd2b7d3" },
|
||||||
|
"conform.nvim": { "branch": "master", "commit": "016802de402556da54c36bd7359b441266b01cdd" },
|
||||||
|
"gitsigns.nvim": { "branch": "main", "commit": "070a5d7b985546cc57e1fc61e5bc507fecac6045" },
|
||||||
|
"grug-far.nvim": { "branch": "main", "commit": "11595bf747edc270bce2069d1020502ad4ae56cf" },
|
||||||
|
"indent-blankline.nvim": { "branch": "master", "commit": "f1e186e44d3b7f9ae918008e2c28ce37c6023d2d" },
|
||||||
|
"lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" },
|
||||||
|
"lightline.vim": { "branch": "master", "commit": "d042c506cb2e7a59112a72447e0b5fe8739d9d1d" },
|
||||||
|
"nvim-cmp": { "branch": "main", "commit": "2ffe79f1f021def8dd1fcd81deb16f1bb0d989f3" },
|
||||||
|
"nvim-lspconfig": { "branch": "master", "commit": "046b1a797af1effe8e0474b9af9657a3761ec58a" },
|
||||||
|
"nvim-snippy": { "branch": "master", "commit": "1f5a5c82cb4902522806a58cf25479f6f8fe16ac" },
|
||||||
|
"nvim-web-devicons": { "branch": "master", "commit": "58447c1fca354bbf184425e4a8d01deecbd6f3c4" },
|
||||||
|
"oil.nvim": { "branch": "master", "commit": "b73018b75affd13fa38e2fc94ef753b465f770d7" },
|
||||||
|
"palenight.vim": { "branch": "master", "commit": "9e9b102c54b830b72f51917b6b86c3b3b02dcea2" },
|
||||||
|
"plenary.nvim": { "branch": "master", "commit": "74b06c6c75e4eeb3108ec01852001636d85a932b" },
|
||||||
|
"telescope-file-browser.nvim": { "branch": "master", "commit": "3610dc7dc91f06aa98b11dca5cc30dfa98626b7e" },
|
||||||
|
"telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" },
|
||||||
|
"telescope.nvim": { "branch": "master", "commit": "84b9ba066d1860f7a586ce9cd732fd6c4f77d1d9" },
|
||||||
|
"transparent.nvim": { "branch": "main", "commit": "a4145c52f5421f1626a4d7dc0f41e785c4439944" },
|
||||||
|
"trouble.nvim": { "branch": "main", "commit": "bd67efe408d4816e25e8491cc5ad4088e708a69a" },
|
||||||
|
"vim-commentary": { "branch": "master", "commit": "64a654ef4a20db1727938338310209b6a63f60c9" },
|
||||||
|
"vim-gitbranch": { "branch": "master", "commit": "1a8ba866f3eaf0194783b9f8573339d6ede8f1ed" },
|
||||||
|
"vim-go": { "branch": "master", "commit": "47694979496d4bf2e90ce75d95f1dec3f41cbefb" },
|
||||||
|
"vim-polyglot": { "branch": "master", "commit": "f061eddb7cdcc614c8406847b2bfb53099832a4e" },
|
||||||
|
"vim-rooter": { "branch": "master", "commit": "51402fb77c4d6ae94994e37dc7ca13bec8f4afcc" },
|
||||||
|
"vim-smoothie": { "branch": "master", "commit": "df1e324e9f3395c630c1c523d0555a01d2eb1b7e" },
|
||||||
|
"vim-styled-components": { "branch": "main", "commit": "75e178916fc3e61385350933a23055927f5f60b7" },
|
||||||
|
"vim-surround": { "branch": "master", "commit": "3d188ed2113431cf8dac77be61b842acb64433d9" },
|
||||||
|
"vim_current_word": { "branch": "master", "commit": "967c73804e38e5b2ceaa536328a4f76f1157a482" },
|
||||||
|
"zig.vim": { "branch": "master", "commit": "4842ab8cb1b000a9acb0a06170d404d12a154918" }
|
||||||
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
vim.api.nvim_set_option('background', 'dark')
|
vim.opt.background = 'dark'
|
||||||
vim.api.nvim_set_option('termguicolors', true)
|
vim.opt.termguicolors = true
|
||||||
|
|
||||||
-- colorscheme
|
-- colorscheme
|
||||||
vim.cmd([[
|
vim.cmd([[
|
||||||
|
|||||||
@@ -1,14 +1,26 @@
|
|||||||
vim.o.completeopt = "menuone,noselect"
|
local cmp = require('cmp')
|
||||||
-- Avoid having a "Pattern not found" message
|
|
||||||
vim.cmd("set shortmess+=c")
|
|
||||||
|
|
||||||
local cmp = require'cmp'
|
|
||||||
local snippy = require('snippy')
|
local snippy = require('snippy')
|
||||||
|
|
||||||
|
-- Neovim shifts wide floating menus back onto the screen. nvim-cmp otherwise
|
||||||
|
-- anchors docs to the requested column, which can overlap the shifted menu.
|
||||||
|
local entries_view = require('cmp.view.custom_entries_view')
|
||||||
|
entries_view.info = function(self)
|
||||||
|
local info = self.entries_win:info()
|
||||||
|
info.col = math.max(0, math.min(info.col, vim.o.columns - info.width))
|
||||||
|
return info
|
||||||
|
end
|
||||||
|
|
||||||
|
vim.opt.completeopt = { 'menuone', 'noselect' }
|
||||||
|
vim.opt.shortmess:append('c')
|
||||||
|
|
||||||
cmp.setup({
|
cmp.setup({
|
||||||
window = {
|
window = {
|
||||||
completion = cmp.config.window.bordered(),
|
completion = cmp.config.window.bordered({ border = 'rounded' }),
|
||||||
documentation = cmp.config.window.bordered(),
|
documentation = cmp.config.window.bordered({
|
||||||
|
border = 'rounded',
|
||||||
|
-- Leave a column between the menu and docs, on either side.
|
||||||
|
col_offset = 1,
|
||||||
|
}),
|
||||||
},
|
},
|
||||||
snippet = {
|
snippet = {
|
||||||
expand = function(args)
|
expand = function(args)
|
||||||
@@ -23,11 +35,11 @@ cmp.setup({
|
|||||||
}),
|
}),
|
||||||
sources = cmp.config.sources({
|
sources = cmp.config.sources({
|
||||||
{ name = 'nvim_lsp' },
|
{ name = 'nvim_lsp' },
|
||||||
{ name = 'async_path' },
|
{ name = 'path' },
|
||||||
{ name = 'snippy' },
|
{ name = 'snippy' },
|
||||||
}, {
|
}, {
|
||||||
{ name = 'buffer' },
|
{ name = 'buffer' },
|
||||||
})
|
}),
|
||||||
})
|
})
|
||||||
|
|
||||||
snippy.setup({
|
snippy.setup({
|
||||||
@@ -38,81 +50,3 @@ snippy.setup({
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
require('lspsaga').setup({})
|
|
||||||
|
|
||||||
-- require'compe'.setup {
|
|
||||||
-- enabled = true;
|
|
||||||
-- autocomplete = true;
|
|
||||||
-- debug = false;
|
|
||||||
-- min_length = 1;
|
|
||||||
-- preselect = 'always';
|
|
||||||
-- throttle_time = 80;
|
|
||||||
-- source_timeout = 200;
|
|
||||||
-- incomplete_delay = 400;
|
|
||||||
-- max_abbr_width = 100;
|
|
||||||
-- max_kind_width = 100;
|
|
||||||
-- max_menu_width = 100;
|
|
||||||
-- documentation = true;
|
|
||||||
|
|
||||||
-- source = {
|
|
||||||
-- path = true;
|
|
||||||
-- buffer = false;
|
|
||||||
-- calc = false;
|
|
||||||
-- vsnip = false; -- Could be used if I want to start using snippets.
|
|
||||||
-- nvim_lsp = true;
|
|
||||||
-- nvim_lua = true;
|
|
||||||
-- tags = true;
|
|
||||||
-- snippets_nvim = true;
|
|
||||||
-- treesitter = true;
|
|
||||||
-- };
|
|
||||||
-- }
|
|
||||||
|
|
||||||
-- vim.cmd([[
|
|
||||||
-- autocmd FileType ocaml call compe#setup({
|
|
||||||
-- \ 'preselect': 'disable'
|
|
||||||
-- \ }, 0)
|
|
||||||
-- ]])
|
|
||||||
|
|
||||||
-- local t = function(str)
|
|
||||||
-- return vim.api.nvim_replace_termcodes(str, true, true, true)
|
|
||||||
-- end
|
|
||||||
|
|
||||||
-- _G.comp_jump_if_avail = function()
|
|
||||||
-- if vim.fn.pumvisible() == 1 then
|
|
||||||
-- return t "<C-n>"
|
|
||||||
-- end
|
|
||||||
-- end
|
|
||||||
-- _G.comp_jump_prev_if_avail = function()
|
|
||||||
-- if vim.fn.pumvisible() == 1 then
|
|
||||||
-- return t "<C-p>"
|
|
||||||
-- end
|
|
||||||
-- end
|
|
||||||
-- _G.tab_complete = function()
|
|
||||||
-- if vim.fn.pumvisible() == 1 then
|
|
||||||
-- return vim.fn['compe#confirm']('')
|
|
||||||
-- else
|
|
||||||
-- return t "<Tab>"
|
|
||||||
-- end
|
|
||||||
-- end
|
|
||||||
-- _G.enter_complete = function()
|
|
||||||
-- if vim.bo.filetype == "ocaml" then
|
|
||||||
-- return t "<CR>"
|
|
||||||
-- elseif vim.fn.pumvisible() == 1 then
|
|
||||||
-- return vim.fn['compe#confirm']('')
|
|
||||||
-- else
|
|
||||||
-- return t "<CR>"
|
|
||||||
-- end
|
|
||||||
-- end
|
|
||||||
|
|
||||||
-- vim.api.nvim_set_keymap("i", "<C-n>", "v:lua.comp_jump_if_avail()", {expr = true})
|
|
||||||
-- vim.api.nvim_set_keymap("s", "<C-n>", "v:lua.comp_jump_if_avail()", {expr = true})
|
|
||||||
-- vim.api.nvim_set_keymap("i", "<C-e>", "v:lua.comp_jump_prev_if_avail()", {expr = true})
|
|
||||||
-- vim.api.nvim_set_keymap("s", "<C-e>", "v:lua.comp_jump_prev_if_avail()", {expr = true})
|
|
||||||
-- -- The next 4 funtcions don't work if compe doesn't automatically select the first option.
|
|
||||||
-- -- meaning the preselect option has to be set to alwasy.
|
|
||||||
-- vim.api.nvim_set_keymap("i", "<Tab>", "v:lua.tab_complete()", {expr = true})
|
|
||||||
-- vim.api.nvim_set_keymap("s", "<Tab>", "v:lua.tab_complete()", {expr = true})
|
|
||||||
-- vim.api.nvim_set_keymap("i", "<CR>", "v:lua.enter_complete()", {expr = true})
|
|
||||||
-- vim.api.nvim_set_keymap("s", "<CR>", "v:lua.enter_complete()", {expr = true})
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,97 +1,78 @@
|
|||||||
local lsp = vim.lsp
|
local map = vim.keymap.set
|
||||||
local handlers = lsp.handlers
|
|
||||||
-- local saga = require('lspsaga')
|
|
||||||
-- saga.init_lsp_saga()
|
|
||||||
|
|
||||||
-- Space as leader.
|
map('n', '<Space>', '<Nop>', { silent = true })
|
||||||
vim.api.nvim_set_keymap('n', '<Space>', '<NOP>', {noremap = true, silent = true})
|
map('i', ',m', '<Esc>', { silent = true })
|
||||||
vim.g.mapleader = ' '
|
-- Preserve a pending comma from the ,m mapping when leaving insert mode.
|
||||||
vim.g.maplocalleader = ' '
|
map('i', '<C-c>', '<Esc>', { silent = true })
|
||||||
|
|
||||||
-- Exit insert mode with ,h.
|
for _, mode in ipairs({ 'n', 'i', 'v', 's', 'x', 'c', 'o', 't' }) do
|
||||||
vim.api.nvim_set_keymap('i', ',m', '<ESC>', {noremap = true, silent = true})
|
map(mode, '<C-g>', '<Esc>', { silent = true })
|
||||||
|
end
|
||||||
|
map('i', '<C-l>', '<Right>', { silent = true })
|
||||||
|
|
||||||
-- Remap for colemak-dhm.
|
for _, direction in ipairs({ 'h', 'j', 'k', 'l' }) do
|
||||||
-- Left.
|
map('n', '<leader>w' .. direction, '<C-w>' .. direction, { desc = 'Move to window ' .. direction })
|
||||||
-- vim.api.nvim_set_keymap('', 'm', 'h', {noremap = true, silent = true})
|
end
|
||||||
-- vim.api.nvim_set_keymap('', 'h', 'm', {noremap = true, silent = true})
|
map('n', '<leader>fw', '<cmd>write<cr>', { desc = 'Write file' })
|
||||||
-- Down.
|
map('n', '<leader><leader>', '<C-^>', { desc = 'Alternate buffer' })
|
||||||
-- vim.api.nvim_set_keymap('', 'j', 'n', {noremap = true, silent = true})
|
|
||||||
-- vim.api.nvim_set_keymap('', 'n', 'j', {noremap = true, silent = true})
|
|
||||||
-- Up.
|
|
||||||
-- vim.api.nvim_set_keymap('', 'k', 'e', {noremap = true, silent = true})
|
|
||||||
-- vim.api.nvim_set_keymap('', 'e', 'k', {noremap = true, silent = true})
|
|
||||||
-- Right.
|
|
||||||
-- vim.api.nvim_set_keymap('', 'l', 'i', {noremap = true, silent = true})
|
|
||||||
-- vim.api.nvim_set_keymap('', 'i', 'l', {noremap = true, silent = true})
|
|
||||||
|
|
||||||
-- C-g as ESC
|
map('n', '<leader>ff', function()
|
||||||
vim.api.nvim_set_keymap('n', '<C-g>', '<ESC>', {silent = true})
|
-- Include dotfiles; rg (telescope's preferred backend) hides them by default,
|
||||||
vim.api.nvim_set_keymap('i', '<C-g>', '<ESC>', {silent = true})
|
-- while a plain --hidden would flood results with .git internals.
|
||||||
vim.api.nvim_set_keymap('v', '<C-g>', '<ESC>', {silent = true})
|
if vim.fn.executable('rg') == 1 then
|
||||||
vim.api.nvim_set_keymap('s', '<C-g>', '<ESC>', {silent = true})
|
require('telescope.builtin').find_files({
|
||||||
vim.api.nvim_set_keymap('x', '<C-g>', '<ESC>', {silent = true})
|
find_command = { 'rg', '--files', '--hidden', '--glob', '!.git', '--color', 'never' },
|
||||||
vim.api.nvim_set_keymap('c', '<C-g>', '<ESC>', {silent = true})
|
})
|
||||||
vim.api.nvim_set_keymap('o', '<C-g>', '<ESC>', {silent = true})
|
else
|
||||||
vim.api.nvim_set_keymap('l', '<C-g>', '<ESC>', {silent = true})
|
require('telescope.builtin').find_files({ hidden = true })
|
||||||
vim.api.nvim_set_keymap('t', '<C-g>', '<ESC>', {silent = true})
|
end
|
||||||
|
end, { desc = 'Find files' })
|
||||||
|
map('n', '<leader>fb', '<cmd>Oil .<cr>', { desc = 'Browse current directory' })
|
||||||
|
map('n', '<leader>fc', function()
|
||||||
|
-- With no file in the buffer there is no directory to search; warn rather
|
||||||
|
-- than let expand('%:p:h') fall back to the cwd (the whole project).
|
||||||
|
local dir
|
||||||
|
if vim.bo.filetype == 'oil' then
|
||||||
|
dir = require('oil').get_current_dir()
|
||||||
|
else
|
||||||
|
local bufname = vim.api.nvim_buf_get_name(0)
|
||||||
|
if bufname ~= '' then
|
||||||
|
dir = vim.fn.fnamemodify(bufname, ':p:h')
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if not dir or vim.fn.isdirectory(dir) ~= 1 then
|
||||||
|
vim.notify('No file to find alongside of (try <leader>ff)', vim.log.levels.WARN)
|
||||||
|
return
|
||||||
|
end
|
||||||
|
require('telescope').extensions.file_browser.file_browser({ path = dir })
|
||||||
|
end, { desc = 'Fuzzy-browse file directory' })
|
||||||
|
map('n', '<leader>fo', '<cmd>Oil<cr>', { desc = 'Browse file directory' })
|
||||||
|
map('n', '<leader>ps', function()
|
||||||
|
require('telescope.builtin').live_grep({
|
||||||
|
-- See <leader>ff: include dotfiles, but not .git's contents.
|
||||||
|
additional_args = { '--hidden', '--glob', '!.git' },
|
||||||
|
})
|
||||||
|
end, { desc = 'Search text' })
|
||||||
|
map('n', '<leader>bs', '<cmd>Telescope buffers<cr>', { desc = 'Search buffers' })
|
||||||
|
map('n', '<leader>sr', '<cmd>GrugFar<cr>', { desc = 'Search and replace' })
|
||||||
|
map('n', '<leader>rsr', '<cmd>GrugFarWithin<cr>', { desc = 'Open range replacement' })
|
||||||
|
|
||||||
-- Move right when in insert mode.
|
map({ 'n', 'x' }, '<leader>ca', vim.lsp.buf.code_action, { desc = 'Code action' })
|
||||||
vim.api.nvim_set_keymap("i", '<C-l>', '<Right>', {noremap = true, silent = true})
|
map('n', '<leader>lgd', vim.lsp.buf.definition, { desc = 'Go to definition' })
|
||||||
|
map('n', '<leader>lgD', vim.lsp.buf.declaration, { desc = 'Go to declaration' })
|
||||||
|
map('n', '<leader>lgr', vim.lsp.buf.references, { desc = 'Find references' })
|
||||||
|
map('n', '<leader>lgi', vim.lsp.buf.implementation, { desc = 'Go to implementation' })
|
||||||
|
map('n', '<leader>lr', vim.lsp.buf.rename, { desc = 'Rename symbol' })
|
||||||
|
map('n', '<leader>lf', function()
|
||||||
|
require('conform').format({ async = true, lsp_format = 'fallback' })
|
||||||
|
end, { desc = 'Format buffer' })
|
||||||
|
map('x', '<leader>lrf', vim.lsp.buf.format, { desc = 'Format selection' })
|
||||||
|
map('n', 'K', function()
|
||||||
|
vim.lsp.buf.hover({ border = 'rounded', max_width = 80 })
|
||||||
|
end, { desc = 'Hover documentation' })
|
||||||
|
|
||||||
-- Leader window movement.
|
map('n', '<leader>lld', function()
|
||||||
vim.api.nvim_set_keymap("n", '<Leader>wh', '<C-w>h', {noremap = true, silent = true})
|
vim.diagnostic.open_float({ scope = 'line', border = 'rounded' })
|
||||||
vim.api.nvim_set_keymap("n", '<Leader>wj', '<C-w>j', {noremap = true, silent = true})
|
end, { desc = 'Line diagnostics' })
|
||||||
vim.api.nvim_set_keymap("n", '<Leader>wk', '<C-w>k', {noremap = true, silent = true})
|
map('n', '<leader>lwd', '<cmd>Trouble diagnostics toggle<cr>', { desc = 'Workspace diagnostics' })
|
||||||
vim.api.nvim_set_keymap("n", '<Leader>wl', '<C-w>l', {noremap = true, silent = true})
|
map('n', '<leader>ldd', '<cmd>Trouble diagnostics toggle filter.buf=0<cr>', { desc = 'Buffer diagnostics' })
|
||||||
|
|
||||||
-- Quick save.
|
|
||||||
vim.api.nvim_set_keymap('n', '<Leader>fw', ':w<CR>', {silent = true})
|
|
||||||
|
|
||||||
-- Toggle between buffers.
|
|
||||||
vim.api.nvim_set_keymap('n', '<Leader><Leader>', '<C-^>', {noremap = true, silent = true})
|
|
||||||
|
|
||||||
-- Find files inside the current folder.
|
|
||||||
vim.api.nvim_set_keymap('n', '<Leader>ff', '<cmd>Telescope find_files<cr>',{})
|
|
||||||
-- Find files and folders allowing creation.
|
|
||||||
vim.api.nvim_set_keymap('n', '<Leader>fb', '<cmd>Telescope file_browser<cr>', {noremap = true})
|
|
||||||
-- File brosers starting at the cwd.
|
|
||||||
vim.api.nvim_set_keymap('n', '<Leader>fc', '<cmd>Telescope file_browser path=%:p:h<cr>', {noremap = true})
|
|
||||||
-- File browser that allows edits in-buffer.
|
|
||||||
vim.keymap.set("n", "<Leader>fo", "<CMD>Oil<CR>", { desc = "Open parent directory" })
|
|
||||||
-- Do a grep search in the current folder.
|
|
||||||
vim.api.nvim_set_keymap('n', '<Leader>ps', ':Rg<cr>',{})
|
|
||||||
-- Search among the currently open buffers.
|
|
||||||
vim.api.nvim_set_keymap('n', '<Leader>bs', '<cmd>Telescope buffers<cr>',{})
|
|
||||||
-- Code actions.
|
|
||||||
vim.api.nvim_set_keymap('n', '<Leader>ca', "<Cmd>lua vim.lsp.buf.code_action()<CR>",{silent = true, noremap = true})
|
|
||||||
vim.api.nvim_set_keymap('x', '<Leader>ca', "<Cmd>lua vim.lsp.buf.range_code_action()<CR>",{silent = true, noremap = true})
|
|
||||||
-- Search and replace.
|
|
||||||
vim.api.nvim_set_keymap('n', '<Leader>sr', ':GrugFar<cr>', {noremap = true, silent = true})
|
|
||||||
vim.api.nvim_set_keymap('n', '<Leader>rsr', ':GrugFarWithin<cr>', {noremap = true, silent = true})
|
|
||||||
|
|
||||||
|
|
||||||
-- Hover doc popup
|
|
||||||
local pop_opts = { border = "rounded", max_width = 80 }
|
|
||||||
handlers["textDocument/hover"] = lsp.with(handlers.hover, pop_opts)
|
|
||||||
handlers["textDocument/signatureHelp"] = lsp.with(handlers.signature_help, pop_opts)
|
|
||||||
|
|
||||||
vim.api.nvim_set_keymap('n', '<Leader>lgd', '<cmd>lua vim.lsp.buf.definition()<CR>', {noremap = true, silent = true})
|
|
||||||
vim.api.nvim_set_keymap('n', '<Leader>lgD', '<cmd>lua vim.lsp.buf.declaration()<CR>', {noremap = true, silent = true})
|
|
||||||
vim.api.nvim_set_keymap('n', '<Leader>lgr', '<cmd>lua vim.lsp.buf.references()<CR>', {noremap = true, silent = true})
|
|
||||||
vim.api.nvim_set_keymap('n', '<Leader>lgi', '<cmd>lua vim.lsp.buf.implementation()<CR>', {noremap = true, silent = true})
|
|
||||||
vim.api.nvim_set_keymap('n', '<Leader>lf', '<cmd>lua require("conform").format({ async = true, lsp_fallback = true })<CR>', {noremap = true, silent = true})
|
|
||||||
vim.keymap.set('v', '<Leader>lrf', vim.lsp.buf.format)
|
|
||||||
vim.api.nvim_set_keymap('n', '<Leader>lr', '<cmd>Lspsaga rename<CR>', {silent = true})
|
|
||||||
vim.api.nvim_set_keymap('n', 'K', '<cmd>lua vim.lsp.buf.hover()<CR>', {noremap = true, silent = true})
|
|
||||||
|
|
||||||
------ Trouble
|
|
||||||
vim.api.nvim_set_keymap("n", "<leader>lld", '<cmd>lua vim.diagnostic.open_float({scope="line"})<CR>',
|
|
||||||
{silent = true, noremap = true}
|
|
||||||
) -- Mnemonic "lsp line diagnostics"
|
|
||||||
vim.api.nvim_set_keymap("n", "<leader>lwd", "<cmd>Trouble workspace_diagnostics<cr>",
|
|
||||||
{silent = true, noremap = true}
|
|
||||||
) -- Mnemonic "lsp workspace diagnostics"
|
|
||||||
vim.api.nvim_set_keymap("n", "<leader>ldd", "<cmd>Trouble document_diagnostics<cr>",
|
|
||||||
{silent = true, noremap = true}
|
|
||||||
) -- Mnemonic "lsp document diagnostics"
|
|
||||||
|
|||||||
@@ -1,26 +0,0 @@
|
|||||||
-- make .roc files have the correct filetype
|
|
||||||
vim.api.nvim_create_autocmd({ "BufEnter", "BufWinEnter" }, {
|
|
||||||
pattern = { "*.roc" },
|
|
||||||
command = "set filetype=roc",
|
|
||||||
})
|
|
||||||
|
|
||||||
-- add roc tree-sitter
|
|
||||||
local parsers = require("nvim-treesitter.parsers").get_parser_configs()
|
|
||||||
|
|
||||||
parsers.roc = {
|
|
||||||
install_info = {
|
|
||||||
url = "https://github.com/faldor20/tree-sitter-roc",
|
|
||||||
files = { "src/parser.c", "src/scanner.c" },
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
require'nvim-treesitter.configs'.setup {
|
|
||||||
highlight = {
|
|
||||||
enable = true,
|
|
||||||
-- Setting this to true will run `:h syntax` and tree-sitter at the same time.
|
|
||||||
-- Set this to `true` if you depend on 'syntax' being enabled (like for indentation).
|
|
||||||
-- Using this option may slow down your editor, and you may see some duplicate highlights.
|
|
||||||
-- Instead of true it can also be a list of languages
|
|
||||||
-- additional_vim_regex_highlighting = false,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
require'lspconfig'.arduino_language_server.setup {
|
|
||||||
cmd = {
|
|
||||||
"arduino-language-server",
|
|
||||||
"-cli-config", "/Users/aym/Library/Arduino15/arduino-cli.yaml",
|
|
||||||
"-fqbn", "adafruit:nrf52:feather52841",
|
|
||||||
"-cli", "arduino-cli",
|
|
||||||
"-clangd", "clangd"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
vim.lsp.enable('clangd')
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
local elixir_ls_binary = "/Users/" .. USER .. "/.config/nvim/lang-srvrs/elixir-ls/language_server.sh"
|
|
||||||
|
|
||||||
require'lspconfig'.elixirls.setup{
|
|
||||||
cmd = { elixir_ls_binary };
|
|
||||||
}
|
|
||||||
|
|
||||||
vim.api.nvim_command('autocmd BufWritePost *.ex :lua vim.lsp.buf.formatting()')
|
|
||||||
vim.api.nvim_command('autocmd BufWritePost *.exs :lua vim.lsp.buf.formatting()')
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
require("flutter-tools").setup{
|
|
||||||
} -- use defaults
|
|
||||||
|
|
||||||
@@ -1,74 +0,0 @@
|
|||||||
-- local capabilities = require('cmp_nvim_lsp').default_capabilities()
|
|
||||||
--vim.lsp.config('gopls', {
|
|
||||||
-- on_attach = function(client, bufnr)
|
|
||||||
-- require "lsp_signature".on_attach({
|
|
||||||
-- bind = true,
|
|
||||||
-- -- floating_window = true,
|
|
||||||
-- --hint_enable = true,
|
|
||||||
-- fix_pos = true,
|
|
||||||
-- use_lspsaga = true,
|
|
||||||
-- handler_opts = {
|
|
||||||
-- border = "rounded" -- double, single, shadow, none
|
|
||||||
-- },
|
|
||||||
-- })
|
|
||||||
-- end,
|
|
||||||
-- cmd = {"gopls", "serve"},
|
|
||||||
-- settings = {
|
|
||||||
-- autostart = true,
|
|
||||||
-- gopls = {
|
|
||||||
-- analyses = {
|
|
||||||
-- unusedparams = true,
|
|
||||||
-- },
|
|
||||||
-- staticcheck = true,
|
|
||||||
-- },
|
|
||||||
-- },
|
|
||||||
-- autostart = true,
|
|
||||||
-- root_dir = require('lspconfig').util.root_pattern(".git","go.mod"),
|
|
||||||
-- init_options = {usePlaceholders = false, completeUnimported = true},
|
|
||||||
-- -- capabilities = capabilities,
|
|
||||||
-- single_file_support = true;
|
|
||||||
--})
|
|
||||||
vim.lsp.enable('gopls')
|
|
||||||
|
|
||||||
|
|
||||||
------ Configre vim-go
|
|
||||||
-- Disable autocomplete since we already have it with native lsp.
|
|
||||||
vim.g.go_code_completion_enabled = 0
|
|
||||||
-- Disable gopls for the same reasons as above.
|
|
||||||
vim.g.go_gopls_enabled = 0
|
|
||||||
|
|
||||||
-- Simplify code when formatting.
|
|
||||||
vim.g.go_fmt_command = 'gofmt'
|
|
||||||
vim.g.go_fmt_options = {
|
|
||||||
gofmt = '-s',
|
|
||||||
}
|
|
||||||
|
|
||||||
vim.g.go_imports_mode = 'goimports'
|
|
||||||
|
|
||||||
-- Could confilg with lsp saga, should experiment.
|
|
||||||
vim.g.go_doc_keywordprg_enabled = 0
|
|
||||||
|
|
||||||
-- Use my own universal mappings for lsp.
|
|
||||||
vim.g.go_def_mapping_enabled = 0
|
|
||||||
|
|
||||||
-- Use globally installed binaries first. (gopls) installed through brew.
|
|
||||||
vim.g.go_search_bin_path_first = 0
|
|
||||||
|
|
||||||
-- When auto-creating a template file, use the package rather than a file.
|
|
||||||
vim.g.go_template_use_pkg = 1
|
|
||||||
|
|
||||||
-- Configure folding.
|
|
||||||
-- vim.cmd("autocmd FileType go setlocal foldmethod=syntax")
|
|
||||||
-- vim.g.go_fmt_experimental = 1
|
|
||||||
|
|
||||||
-- Use a ruler for go files.
|
|
||||||
vim.cmd("autocmd FileType go setlocal colorcolumn=80")
|
|
||||||
-- Automatically add comment symbol on next line and wrap it.
|
|
||||||
vim.cmd("autocmd FileType go setlocal fo+=c fo+=r")
|
|
||||||
|
|
||||||
-- Highlights.
|
|
||||||
vim.g.go_highlight_operators = 1
|
|
||||||
vim.g.go_highlight_types = 1
|
|
||||||
vim.g.go_highlight_extra_types = 1
|
|
||||||
vim.g.go_highlight_functions = 1
|
|
||||||
vim.g.go_highlight_function_calls = 1
|
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
local capabilities = require('cmp_nvim_lsp').default_capabilities()
|
||||||
|
|
||||||
|
for _, server in ipairs({ 'ts_ls', 'basedpyright', 'gopls', 'zls', 'clangd', 'rust_analyzer' }) do
|
||||||
|
vim.lsp.config(server, { capabilities = capabilities })
|
||||||
|
vim.lsp.enable(server)
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Bare-metal cross-compile: clangd won't execute an unlisted driver,
|
||||||
|
-- so allowlist the Arm one to get its newlib/ARM system include paths.
|
||||||
|
vim.lsp.config('clangd', {
|
||||||
|
cmd = { 'clangd', '--query-driver=**/arm-none-eabi-*' },
|
||||||
|
})
|
||||||
|
|
||||||
|
vim.lsp.config('lua_ls', {
|
||||||
|
capabilities = capabilities,
|
||||||
|
on_init = function(client)
|
||||||
|
local workspace = client.workspace_folders and client.workspace_folders[1]
|
||||||
|
if workspace and (vim.uv.fs_stat(workspace.name .. '/.luarc.json')
|
||||||
|
or vim.uv.fs_stat(workspace.name .. '/.luarc.jsonc')) then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
client.config.settings.Lua = vim.tbl_deep_extend('force', client.config.settings.Lua or {}, {
|
||||||
|
runtime = { version = 'LuaJIT' },
|
||||||
|
workspace = { checkThirdParty = false, library = { vim.env.VIMRUNTIME } },
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
settings = { Lua = {} },
|
||||||
|
})
|
||||||
|
vim.lsp.enable('lua_ls')
|
||||||
|
|||||||
@@ -1,36 +0,0 @@
|
|||||||
local capabilities = require('cmp_nvim_lsp').default_capabilities()
|
|
||||||
vim.lsp.config('lua_ls', {
|
|
||||||
on_init = function(client)
|
|
||||||
if client.workspace_folders then
|
|
||||||
local path = client.workspace_folders[1].name
|
|
||||||
if vim.uv.fs_stat(path..'/.luarc.json') or vim.uv.fs_stat(path..'/.luarc.jsonc') then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
client.config.settings.Lua = vim.tbl_deep_extend('force', client.config.settings.Lua, {
|
|
||||||
runtime = {
|
|
||||||
-- Tell the language server which version of Lua you're using
|
|
||||||
-- (most likely LuaJIT in the case of Neovim)
|
|
||||||
version = 'LuaJIT'
|
|
||||||
},
|
|
||||||
-- Make the server aware of Neovim runtime files
|
|
||||||
workspace = {
|
|
||||||
checkThirdParty = false,
|
|
||||||
library = {
|
|
||||||
vim.env.VIMRUNTIME
|
|
||||||
-- Depending on the usage, you might want to add additional paths here.
|
|
||||||
-- "${3rd}/luv/library"
|
|
||||||
-- "${3rd}/busted/library",
|
|
||||||
}
|
|
||||||
-- or pull in all of 'runtimepath'. NOTE: this is a lot slower and will cause issues when working on your own configuration (see https://github.com/neovim/nvim-lspconfig/issues/3189)
|
|
||||||
-- library = vim.api.nvim_get_runtime_file("", true)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
settings = {
|
|
||||||
Lua = {}
|
|
||||||
},
|
|
||||||
capabilities = capabilities,
|
|
||||||
})
|
|
||||||
vim.lsp.enable('lua_ls')
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
require'lspconfig'.ocamllsp.setup{}
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
-- require'lspconfig'.pyright.setup{}
|
|
||||||
|
|
||||||
vim.lsp.enable('basedpyright')
|
|
||||||
|
|
||||||
-- Autoformat on save.
|
|
||||||
-- vim.cmd("autocmd BufWritePre *.py execute ':Black'")
|
|
||||||
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
require'lspconfig'.roc_ls.setup{
|
|
||||||
offset_encoding = "utf-8",
|
|
||||||
}
|
|
||||||
|
|
||||||
-- Should get rid of this once semantic highlighting gets better!
|
|
||||||
vim.api.nvim_create_autocmd('LspAttach', {
|
|
||||||
group = vim.api.nvim_create_augroup('UserLspConfig', {}),
|
|
||||||
callback = function(ev)
|
|
||||||
local client = vim.lsp.get_client_by_id(ev.data.client_id)
|
|
||||||
client.server_capabilities.semanticTokensProvider = nil
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
vim.lsp.enable('rust_analyzer')
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
local lspconfig = require "lspconfig"
|
|
||||||
local capabilities = require('cmp_nvim_lsp').default_capabilities()
|
|
||||||
|
|
||||||
lspconfig.millet.setup{
|
|
||||||
cmd = { "millet-ls" },
|
|
||||||
capabilities = capabilities,
|
|
||||||
}
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
vim.lsp.config('ts_ls', {
|
|
||||||
filetypes = { "javascript", "javascriptreact", "javascript.jsx", "typescript", "typescriptreact", "typescript.tsx" },
|
|
||||||
root_dir = require('lspconfig/util').root_pattern("package.json", "tsconfig.json", "jsconfig.json", ".git")
|
|
||||||
})
|
|
||||||
vim.lsp.enable('ts_ls')
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
vim.lsp.enable('zls')
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
DATA_PATH = vim.fn.stdpath('data')
|
|
||||||
CACHE_PATH = vim.fn.stdpath('cache')
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
vim.g["prettier#autoformat"] = 1
|
|
||||||
vim.g["prettier#autoformat_require_pragma"] = 0
|
|
||||||
vim.g["prettier#exec_cmd_async"] = 1
|
|
||||||
|
|
||||||
@@ -1,11 +1,17 @@
|
|||||||
-- This is your opts table
|
require('telescope').setup({
|
||||||
require("telescope").setup {
|
|
||||||
extensions = {
|
extensions = {
|
||||||
["ui-select"] = {
|
['ui-select'] = require('telescope.themes').get_dropdown({}),
|
||||||
require("telescope.themes").get_dropdown {}
|
['file_browser'] = {
|
||||||
}
|
-- oil.nvim already owns directory buffers.
|
||||||
}
|
hijack_netrw = false,
|
||||||
}
|
-- List dotfiles by default like oil; toggle with h / <C-h>.
|
||||||
|
hidden = { file_browser = true, folder_browser = true },
|
||||||
|
-- One grouped section of folders at the top.
|
||||||
|
grouped = true,
|
||||||
|
dir_icon_hl = 'Directory',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
require("telescope").load_extension("ui-select")
|
require('telescope').load_extension('ui-select')
|
||||||
require("telescope").load_extension "file_browser"
|
require('telescope').load_extension('file_browser')
|
||||||
|
|||||||
@@ -1,155 +1,91 @@
|
|||||||
local execute = vim.api.nvim_command
|
local lazypath = vim.fn.stdpath('data') .. '/lazy/lazy.nvim'
|
||||||
local fn = vim.fn
|
if not vim.uv.fs_stat(lazypath) then
|
||||||
|
local output = vim.fn.system({
|
||||||
|
'git', 'clone', '--filter=blob:none', '--branch=stable',
|
||||||
|
'https://github.com/folke/lazy.nvim.git', lazypath,
|
||||||
|
})
|
||||||
|
if vim.v.shell_error ~= 0 then
|
||||||
|
error('Could not install lazy.nvim: ' .. output)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
vim.opt.rtp:prepend(lazypath)
|
||||||
|
|
||||||
local install_path = fn.stdpath('data') .. '/site/pack/packer/start/packer.nvim'
|
-- Home Manager links the checked-in snapshot into the read-only Nix store.
|
||||||
|
-- Seed a writable lockfile once. After :Lazy update, copy the state lockfile
|
||||||
if fn.empty(fn.glob(install_path)) > 0 then
|
-- back to lazy-lock.json in this repo to commit reviewed plugin revisions.
|
||||||
fn.system({'git', 'clone', 'https://github.com/wbthomason/packer.nvim', install_path})
|
local lockfile = vim.fn.stdpath('state') .. '/lazy-lock.json'
|
||||||
execute 'packadd packer.nvim'
|
local snapshot = vim.fn.stdpath('config') .. '/lazy-lock.json'
|
||||||
|
if not vim.uv.fs_stat(lockfile) and vim.uv.fs_stat(snapshot) then
|
||||||
|
vim.fn.mkdir(vim.fn.fnamemodify(lockfile, ':h'), 'p')
|
||||||
|
vim.fn.writefile(vim.fn.readfile(snapshot), lockfile)
|
||||||
end
|
end
|
||||||
|
|
||||||
return require('packer').startup(function(use)
|
require('lazy').setup({
|
||||||
-- Packer can manage itself as an optional plugin
|
-- LSP and completion
|
||||||
use 'wbthomason/packer.nvim'
|
{ 'neovim/nvim-lspconfig', lazy = false },
|
||||||
|
{ 'hrsh7th/nvim-cmp', dependencies = {
|
||||||
|
'hrsh7th/cmp-nvim-lsp',
|
||||||
|
'hrsh7th/cmp-buffer',
|
||||||
|
'hrsh7th/cmp-path',
|
||||||
|
'dcampos/nvim-snippy',
|
||||||
|
'dcampos/cmp-snippy',
|
||||||
|
}, lazy = false },
|
||||||
|
|
||||||
-- LSP
|
-- Appearance and syntax
|
||||||
use 'neovim/nvim-lspconfig'
|
{ 'drewtempelmeyer/palenight.vim', lazy = false, priority = 1000 },
|
||||||
use ({
|
'nvim-tree/nvim-web-devicons',
|
||||||
'nvimdev/lspsaga.nvim',
|
'sheerun/vim-polyglot',
|
||||||
config = function()
|
'https://codeberg.org/ziglang/zig.vim',
|
||||||
require('lspsaga').setup({})
|
'styled-components/vim-styled-components',
|
||||||
end,
|
'dominikduda/vim_current_word',
|
||||||
|
{ 'lukas-reineke/indent-blankline.nvim', main = 'ibl', ft = { 'yaml', 'helm' }, opts = {
|
||||||
|
scope = { enabled = false },
|
||||||
|
} },
|
||||||
|
'itchyny/lightline.vim',
|
||||||
|
'itchyny/vim-gitbranch',
|
||||||
|
{ 'tribela/transparent.nvim', opts = {} },
|
||||||
|
|
||||||
|
-- Navigation and search
|
||||||
|
'airblade/vim-rooter',
|
||||||
|
{ 'nvim-telescope/telescope.nvim', tag = 'v0.1.9', dependencies = {
|
||||||
|
'nvim-lua/plenary.nvim',
|
||||||
|
'nvim-telescope/telescope-ui-select.nvim',
|
||||||
|
}, config = function()
|
||||||
|
require('nv-telescope')
|
||||||
|
end },
|
||||||
|
{ 'nvim-telescope/telescope-file-browser.nvim', lazy = false,
|
||||||
|
commit = '3610dc7dc91f06aa98b11dca5cc30dfa98626b7e' },
|
||||||
|
{ 'stevearc/oil.nvim', opts = { view_options = { show_hidden = true } } },
|
||||||
|
{ 'MagicDuck/grug-far.nvim', opts = {} },
|
||||||
|
|
||||||
|
-- Diagnostics, Git, and editing
|
||||||
|
{ 'folke/trouble.nvim', opts = {} },
|
||||||
|
{ 'lewis6991/gitsigns.nvim', opts = {} },
|
||||||
|
'jiangmiao/auto-pairs',
|
||||||
|
{ 'fatih/vim-go', init = function()
|
||||||
|
vim.g.go_code_completion_enabled = 0
|
||||||
|
vim.g.go_gopls_enabled = 0
|
||||||
|
vim.g.go_fmt_command = 'gofmt'
|
||||||
|
vim.g.go_fmt_options = { gofmt = '-s' }
|
||||||
|
vim.g.go_imports_mode = 'goimports'
|
||||||
|
vim.g.go_doc_keywordprg_enabled = 0
|
||||||
|
vim.g.go_def_mapping_enabled = 0
|
||||||
|
vim.g.go_search_bin_path_first = 0
|
||||||
|
vim.g.go_template_use_pkg = 1
|
||||||
|
vim.g.go_highlight_operators = 1
|
||||||
|
vim.g.go_highlight_types = 1
|
||||||
|
vim.g.go_highlight_extra_types = 1
|
||||||
|
vim.g.go_highlight_functions = 1
|
||||||
|
vim.g.go_highlight_function_calls = 1
|
||||||
|
end },
|
||||||
|
{ 'stevearc/conform.nvim', opts = {
|
||||||
|
formatters_by_ft = { ocaml = { 'ocamlformat' } },
|
||||||
|
} },
|
||||||
|
'tpope/vim-commentary',
|
||||||
|
'tpope/vim-surround',
|
||||||
|
'psliwka/vim-smoothie',
|
||||||
|
}, {
|
||||||
|
lockfile = lockfile,
|
||||||
|
checker = { enabled = false },
|
||||||
|
change_detection = { notify = false },
|
||||||
})
|
})
|
||||||
use {
|
|
||||||
'nvim-treesitter/nvim-treesitter',
|
|
||||||
run = ':TSUpdate'
|
|
||||||
}
|
|
||||||
-- Autocomplete
|
|
||||||
use 'hrsh7th/cmp-nvim-lsp'
|
|
||||||
use 'hrsh7th/cmp-buffer'
|
|
||||||
use 'https://codeberg.org/FelipeLema/cmp-async-path'
|
|
||||||
use 'dcampos/nvim-snippy'
|
|
||||||
use 'dcampos/cmp-snippy'
|
|
||||||
use 'hrsh7th/nvim-cmp'
|
|
||||||
|
|
||||||
-- Function signatures
|
|
||||||
use "ray-x/lsp_signature.nvim"
|
|
||||||
|
|
||||||
-- Theme
|
|
||||||
use 'drewtempelmeyer/palenight.vim'
|
|
||||||
use 'kyazdani42/nvim-web-devicons'
|
|
||||||
|
|
||||||
-- Syntax
|
|
||||||
use 'sheerun/vim-polyglot'
|
|
||||||
use 'https://codeberg.org/ziglang/zig.vim'
|
|
||||||
-- use {
|
|
||||||
--- 'prettier/vim-prettier',
|
|
||||||
-- run = "yarn install",
|
|
||||||
-- ft = {"javascript", "typescript", "json"}
|
|
||||||
-- }
|
|
||||||
use {'styled-components/vim-styled-components', branch = "main"}
|
|
||||||
use 'dominikduda/vim_current_word'
|
|
||||||
use {
|
|
||||||
'lukas-reineke/indent-blankline.nvim',
|
|
||||||
ft = {'yaml', 'yml', 'helm'},
|
|
||||||
config = function()
|
|
||||||
vim.opt.list = true
|
|
||||||
vim.opt.listchars:append("space:⋅")
|
|
||||||
vim.opt.listchars:append("eol:↴")
|
|
||||||
|
|
||||||
require("indent_blankline").setup {
|
|
||||||
show_end_of_line = true,
|
|
||||||
space_char_blankline = " ",
|
|
||||||
}
|
|
||||||
end
|
|
||||||
}
|
|
||||||
|
|
||||||
use 'airblade/vim-rooter'
|
|
||||||
|
|
||||||
-- Find tools.
|
|
||||||
use { "nvim-telescope/telescope-file-browser.nvim" }
|
|
||||||
use {'nvim-telescope/telescope-ui-select.nvim' }
|
|
||||||
use {
|
|
||||||
'nvim-telescope/telescope.nvim',
|
|
||||||
requires = {{'nvim-lua/popup.nvim'}, {'nvim-lua/plenary.nvim'}},
|
|
||||||
}
|
|
||||||
use { "junegunn/fzf" }
|
|
||||||
use { "junegunn/fzf.vim" }
|
|
||||||
use { "MagicDuck/grug-far.nvim" }
|
|
||||||
|
|
||||||
|
|
||||||
-- Diagnostics
|
|
||||||
-- Lua
|
|
||||||
use {
|
|
||||||
"folke/trouble.nvim",
|
|
||||||
requires = "kyazdani42/nvim-web-devicons",
|
|
||||||
config = function()
|
|
||||||
require("trouble").setup {
|
|
||||||
-- your configuration comes here
|
|
||||||
-- or leave it empty to use the default settings
|
|
||||||
}
|
|
||||||
end
|
|
||||||
}
|
|
||||||
|
|
||||||
-- Git symobls.
|
|
||||||
use {
|
|
||||||
'lewis6991/gitsigns.nvim',
|
|
||||||
tag = 'release',
|
|
||||||
config = function()
|
|
||||||
require('gitsigns').setup()
|
|
||||||
end
|
|
||||||
}
|
|
||||||
|
|
||||||
use 'jiangmiao/auto-pairs'
|
|
||||||
use 'itchyny/lightline.vim'
|
|
||||||
use 'itchyny/vim-gitbranch'
|
|
||||||
|
|
||||||
-- Golang
|
|
||||||
use 'fatih/vim-go'
|
|
||||||
|
|
||||||
-- Flutter/Dart
|
|
||||||
use {'akinsho/flutter-tools.nvim', requires = 'nvim-lua/plenary.nvim'}
|
|
||||||
|
|
||||||
-- Pyhton
|
|
||||||
-- use 'a-vrma/black-nvim'
|
|
||||||
use {
|
|
||||||
'psf/black', branch = "stable"
|
|
||||||
}
|
|
||||||
|
|
||||||
-- Ocaml
|
|
||||||
use {
|
|
||||||
"stevearc/conform.nvim",
|
|
||||||
config = function()
|
|
||||||
require("conform").setup({
|
|
||||||
formatters_by_ft = {
|
|
||||||
ocaml = { "ocamlformat" },
|
|
||||||
},
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
}
|
|
||||||
|
|
||||||
use 'tpope/vim-commentary'
|
|
||||||
use 'tpope/vim-surround'
|
|
||||||
|
|
||||||
-- Smooth scrolling
|
|
||||||
use 'psliwka/vim-smoothie'
|
|
||||||
|
|
||||||
-- Yuck (Eww config language).
|
|
||||||
-- use 'elkowar/yuck.vim'
|
|
||||||
|
|
||||||
-- Better file viewer
|
|
||||||
use({
|
|
||||||
"stevearc/oil.nvim",
|
|
||||||
config = function()
|
|
||||||
require("oil").setup()
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
||||||
use({
|
|
||||||
"tribela/transparent.nvim",
|
|
||||||
config = function()
|
|
||||||
require("transparent").setup({})
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
||||||
end)
|
|
||||||
|
|||||||
@@ -1,45 +1,40 @@
|
|||||||
-- Comes from the Chris@Machine config.
|
vim.opt.iskeyword:append('-')
|
||||||
|
vim.opt.hidden = true
|
||||||
|
vim.opt.wrap = false
|
||||||
|
vim.opt.fileencoding = 'utf-8'
|
||||||
|
vim.opt.splitbelow = true
|
||||||
|
vim.opt.splitright = true
|
||||||
|
vim.opt.conceallevel = 0
|
||||||
|
vim.opt.tabstop = 4
|
||||||
|
vim.opt.shiftwidth = 4
|
||||||
|
vim.opt.expandtab = true
|
||||||
|
vim.opt.smartindent = true
|
||||||
|
vim.opt.number = true
|
||||||
|
vim.opt.relativenumber = true
|
||||||
|
vim.opt.cursorline = true
|
||||||
|
vim.opt.showmode = false
|
||||||
|
vim.opt.backup = false
|
||||||
|
vim.opt.writebackup = false
|
||||||
|
vim.opt.signcolumn = 'yes'
|
||||||
|
vim.opt.updatetime = 300
|
||||||
|
vim.opt.timeoutlen = 500
|
||||||
|
|
||||||
vim.cmd('set iskeyword+=-') -- treat dash separated words as a word text object"
|
vim.api.nvim_create_autocmd('FileType', {
|
||||||
vim.o.hidden = true -- Required to keep multiple buffers open multiple buffers
|
pattern = { 'helm', 'yaml', 'yml' },
|
||||||
vim.wo.wrap = false -- Display long lines as just one line
|
callback = function()
|
||||||
vim.o.fileencoding = "utf-8" -- The encoding written to file
|
vim.opt_local.fixendofline = false
|
||||||
vim.o.splitbelow = true -- Horizontal splits will automatically be below
|
vim.opt_local.list = true
|
||||||
vim.o.splitright = true -- Vertical splits will automatically be to the right
|
vim.opt_local.listchars:append({ space = '⋅', eol = '↴' })
|
||||||
vim.o.conceallevel = 0 -- So that I can see `` in markdown files
|
end,
|
||||||
vim.cmd('set ts=4') -- Insert 2 spaces for a tab
|
})
|
||||||
vim.cmd('set sw=4') -- Change the number of space characters inserted for indentation
|
|
||||||
vim.bo.expandtab = true -- Converts tabs to spaces
|
|
||||||
vim.bo.smartindent = true -- Makes indenting smart
|
|
||||||
vim.wo.number = true -- set numbered lines
|
|
||||||
vim.wo.cursorline = true -- Enable highlighting of the current line
|
|
||||||
--vim.o.showtabline = 2 -- Always show tabs
|
|
||||||
vim.o.showmode = false -- We don't need to see things like -- INSERT -- anymore
|
|
||||||
vim.o.backup = false -- This is recommended by coc
|
|
||||||
vim.o.writebackup = false -- This is recommended by coc
|
|
||||||
vim.wo.signcolumn = "yes" -- Always show the signcolumn, otherwise it would shift the text each time
|
|
||||||
vim.o.updatetime = 300 -- Faster completion
|
|
||||||
vim.o.timeoutlen = 500 -- By default timeoutlen is 1000 ms
|
|
||||||
|
|
||||||
vim.cmd(":set number relativenumber")
|
vim.api.nvim_create_autocmd('FileType', {
|
||||||
|
pattern = 'go',
|
||||||
|
callback = function()
|
||||||
vim.cmd("autocmd FileType helm set nofixendofline")
|
vim.opt_local.colorcolumn = '80'
|
||||||
vim.cmd("autocmd FileType yaml set nofixendofline")
|
vim.opt_local.formatoptions:append({ 'c', 'r' })
|
||||||
vim.cmd("autocmd FileType yml set nofixendofline")
|
end,
|
||||||
vim.cmd("autocmd BufReadPost * :lua require('gitsigns').setup()")
|
})
|
||||||
|
|
||||||
------ Folding
|
|
||||||
-- vim.o.foldlevel = 99
|
|
||||||
-- Persist folds.
|
|
||||||
-- Ignore errors.
|
|
||||||
-- vim.cmd([[
|
|
||||||
-- augroup AutoSaveFolds
|
|
||||||
-- autocmd!
|
|
||||||
-- autocmd BufWinLeave * silent! mkview
|
|
||||||
-- autocmd BufWinEnter * silent! loadview
|
|
||||||
-- augroup END
|
|
||||||
-- ]])
|
|
||||||
|
|
||||||
-- Show full file path in lightline.
|
-- Show full file path in lightline.
|
||||||
vim.cmd([[
|
vim.cmd([[
|
||||||
@@ -65,21 +60,8 @@ function! FilenameForLightline()
|
|||||||
endfunction
|
endfunction
|
||||||
]])
|
]])
|
||||||
|
|
||||||
-- Custom command for ripgrep.
|
|
||||||
-- vim.cmd([[
|
|
||||||
-- function! RipgrepFzf(query, fullscreen)
|
|
||||||
-- let command_fmt = 'rg --column --line-number --no-heading --color=always --smart-case -- %s || true'
|
|
||||||
-- let initial_command = printf(command_fmt, shellescape(a:query))
|
|
||||||
-- let reload_command = printf(command_fmt, '{q}')
|
|
||||||
-- let spec = {'options': ['--phony', '--query', a:query, '--bind', 'change:reload:'.reload_command]}
|
|
||||||
-- call fzf#vim#grep(initial_command, 1, fzf#vim#with_preview(spec), a:fullscreen)
|
|
||||||
-- endfunction
|
|
||||||
|
|
||||||
-- command! -nargs=* -bang RG call RipgrepFzf(<q-args>, <bang>0)
|
|
||||||
-- ]])
|
|
||||||
|
|
||||||
-- Use upstream zig plugin instead of polyglot.
|
-- Use upstream zig plugin instead of polyglot.
|
||||||
vim.g.polyglot_disabled = { "zig" }
|
vim.g.polyglot_disabled = { 'zig' }
|
||||||
|
|
||||||
-- Prioritize Objective-C
|
-- Prioritize Objective-C
|
||||||
vim.filetype.add({
|
vim.filetype.add({
|
||||||
@@ -89,17 +71,15 @@ vim.filetype.add({
|
|||||||
})
|
})
|
||||||
|
|
||||||
-- Soft line wrapping for markdown.
|
-- Soft line wrapping for markdown.
|
||||||
local markdown_group = vim.api.nvim_create_augroup("MarkdownSpecific", { clear = true })
|
local markdown_group = vim.api.nvim_create_augroup('MarkdownSpecific', { clear = true })
|
||||||
vim.api.nvim_create_autocmd("FileType", {
|
vim.api.nvim_create_autocmd('FileType', {
|
||||||
pattern = { "markdown" }, -- Match markdown file patterns
|
pattern = 'markdown',
|
||||||
group = markdown_group,
|
group = markdown_group,
|
||||||
callback = function()
|
callback = function()
|
||||||
vim.opt_local.wrap = true
|
vim.opt_local.wrap = true
|
||||||
vim.opt_local.linebreak = true
|
vim.opt_local.linebreak = true
|
||||||
vim.opt_local.textwidth = 0 -- Visual wrap to window edge
|
vim.opt_local.textwidth = 0
|
||||||
-- Optionally remap j/k for wrapped line navigation
|
vim.keymap.set('n', 'j', 'gj', { silent = true, buffer = true })
|
||||||
vim.keymap.set('n', 'j', 'gj', { noremap = true, silent = true, buffer = true })
|
vim.keymap.set('n', 'k', 'gk', { silent = true, buffer = true })
|
||||||
vim.keymap.set('n', 'k', 'gk', { noremap = true, silent = true, buffer = true })
|
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
{ lib, config, ... }: {
|
{ lib, config, pkgs, ... }: {
|
||||||
options.ghostty.font-size = lib.mkOption {
|
options.ghostty.font-size = lib.mkOption {
|
||||||
# Using a string to support floats.
|
# Using a string to support floats.
|
||||||
type = lib.types.str;
|
type = lib.types.str;
|
||||||
@@ -21,6 +21,11 @@
|
|||||||
# This is the default to open the configuration
|
# This is the default to open the configuration
|
||||||
# I type this by accident way to frequently...
|
# I type this by accident way to frequently...
|
||||||
keybind = ctrl+comma=unbind
|
keybind = ctrl+comma=unbind
|
||||||
|
'' + lib.optionalString pkgs.stdenv.hostPlatform.isLinux ''
|
||||||
|
|
||||||
|
# Support configs where Meta+C/V is turned into Ctrl+Insert/Shift+Insert.
|
||||||
|
keybind = ctrl+insert=copy_to_clipboard
|
||||||
|
keybind = shift+insert=paste_from_clipboard
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
config.home.file.".config/ghostty/themes/PaleNight" = {
|
config.home.file.".config/ghostty/themes/PaleNight" = {
|
||||||
|
|||||||
@@ -1,42 +0,0 @@
|
|||||||
{ ... }: {
|
|
||||||
home.file.".config/ghostty/config" = {
|
|
||||||
text = ''
|
|
||||||
# If not preset, this causes issues when sshing into linux servers.
|
|
||||||
term = xterm-256color
|
|
||||||
font-family = "BigBlueTermPlus Nerd Font"
|
|
||||||
font-size = 17.2
|
|
||||||
theme = "PaleNight"
|
|
||||||
background-opacity = 0.9
|
|
||||||
window-decoration = true
|
|
||||||
|
|
||||||
# This is the default to open the configuration
|
|
||||||
# I type this by accident way to frequently...
|
|
||||||
keybind = ctrl+comma=unbind
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
home.file.".config/ghostty/themes/PaleNight" = {
|
|
||||||
text = ''
|
|
||||||
palette = 0=#000000
|
|
||||||
palette = 1=#ff5555
|
|
||||||
palette = 2=#50fa7b
|
|
||||||
palette = 3=#f1fa8c
|
|
||||||
palette = 4=#caa9fa
|
|
||||||
palette = 5=#ff79c6
|
|
||||||
palette = 6=#8be9fd
|
|
||||||
palette = 7=#bfbfbf
|
|
||||||
palette = 8=#575b70
|
|
||||||
palette = 9=#ff6e67
|
|
||||||
palette = 10=#5af78e
|
|
||||||
palette = 11=#f4f99d
|
|
||||||
palette = 12=#caa9fa
|
|
||||||
palette = 13=#ff92d0
|
|
||||||
palette = 14=#9aedfe
|
|
||||||
palette = 15=#e6e6e6
|
|
||||||
background = 282a36
|
|
||||||
foreground = f8f8f2
|
|
||||||
cursor-color = #ffcb6b
|
|
||||||
selection-background = #717cb4
|
|
||||||
selection-foreground = #80cbc4
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
home.file.".config/herdr/config.toml" = {
|
home.file.".config/herdr/config.toml" = {
|
||||||
text = ''
|
text = ''
|
||||||
|
onboarding = false
|
||||||
|
|
||||||
[keys]
|
[keys]
|
||||||
prefix = "ctrl+a"
|
prefix = "ctrl+a"
|
||||||
|
|
||||||
@@ -9,6 +11,12 @@
|
|||||||
workspace_picker = "prefix+s"
|
workspace_picker = "prefix+s"
|
||||||
settings = "prefix+shift+s"
|
settings = "prefix+shift+s"
|
||||||
|
|
||||||
|
# j/k switch workspaces in the picker; pane up/down move to the arrows.
|
||||||
|
navigate_workspace_up = "k"
|
||||||
|
navigate_workspace_down = "j"
|
||||||
|
navigate_pane_up = "up"
|
||||||
|
navigate_pane_down = "down"
|
||||||
|
|
||||||
# Side-by-side panes (tmux's "|" / "\" split -h).
|
# Side-by-side panes (tmux's "|" / "\" split -h).
|
||||||
# NOTE: "backslash" as a key name is inferred, not confirmed in the docs.
|
# NOTE: "backslash" as a key name is inferred, not confirmed in the docs.
|
||||||
# Verify against `herdr --default-config` and adjust if it doesn't bind.
|
# Verify against `herdr --default-config` and adjust if it doesn't bind.
|
||||||
|
|||||||
@@ -0,0 +1,289 @@
|
|||||||
|
// Managed by Home Manager (home-modules/niri). Local edits get overwritten.
|
||||||
|
// https://niri-wm.github.io/niri/Configuration:-Introduction
|
||||||
|
//
|
||||||
|
// keyd turns Meta+C/V/X into copy/paste/cut before niri sees them, so center
|
||||||
|
// is on Mod+Backslash and floating on Mod+P instead.
|
||||||
|
|
||||||
|
input {
|
||||||
|
keyboard {
|
||||||
|
xkb {
|
||||||
|
layout "us"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// No tap-to-click; two-finger click is right click.
|
||||||
|
touchpad {
|
||||||
|
natural-scroll
|
||||||
|
dwt
|
||||||
|
click-method "clickfinger"
|
||||||
|
scroll-factor 0.75
|
||||||
|
}
|
||||||
|
|
||||||
|
// Only onto fully visible windows, so hovering never scrolls the view.
|
||||||
|
focus-follows-mouse max-scroll-amount="0%"
|
||||||
|
}
|
||||||
|
|
||||||
|
// `niri msg outputs` lists names and modes.
|
||||||
|
output "eDP-1" {
|
||||||
|
scale 1.6
|
||||||
|
}
|
||||||
|
|
||||||
|
output "HDMI-A-1" {
|
||||||
|
mode "3840x2160"
|
||||||
|
scale 1.333333
|
||||||
|
}
|
||||||
|
|
||||||
|
layout {
|
||||||
|
gaps 8
|
||||||
|
center-focused-column "never"
|
||||||
|
|
||||||
|
// Mod+R cycles through these.
|
||||||
|
preset-column-widths {
|
||||||
|
proportion 0.33333
|
||||||
|
proportion 0.5
|
||||||
|
proportion 0.66667
|
||||||
|
}
|
||||||
|
default-column-width { proportion 0.5; }
|
||||||
|
|
||||||
|
focus-ring {
|
||||||
|
off
|
||||||
|
}
|
||||||
|
|
||||||
|
// Fallback; noctalia.kdl overrides these. No gradients: they'd win over
|
||||||
|
// its solid colors.
|
||||||
|
border {
|
||||||
|
width 2
|
||||||
|
active-color "#ffc33b"
|
||||||
|
inactive-color "#595959aa"
|
||||||
|
urgent-color "#9b0000"
|
||||||
|
}
|
||||||
|
|
||||||
|
shadow {
|
||||||
|
on
|
||||||
|
softness 30
|
||||||
|
spread 5
|
||||||
|
offset x=0 y=5
|
||||||
|
color "#0007"
|
||||||
|
}
|
||||||
|
|
||||||
|
// Shows Noctalia's wallpaper on the backdrop.
|
||||||
|
background-color "transparent"
|
||||||
|
}
|
||||||
|
|
||||||
|
// Border/focus colors from the wallpaper, written by Noctalia's niri template.
|
||||||
|
include optional=true "noctalia.kdl"
|
||||||
|
|
||||||
|
spawn-at-startup "noctalia"
|
||||||
|
spawn-at-startup "tailscale" "systray"
|
||||||
|
|
||||||
|
// Add `skip-at-startup` to stop the popup at login.
|
||||||
|
hotkey-overlay {
|
||||||
|
}
|
||||||
|
|
||||||
|
prefer-no-csd
|
||||||
|
|
||||||
|
screenshot-path "~/Pictures/Screenshots/Screenshot from %Y-%m-%d %H-%M-%S.png"
|
||||||
|
|
||||||
|
animations {
|
||||||
|
}
|
||||||
|
|
||||||
|
// Wallpaper stays put while workspaces scroll.
|
||||||
|
// https://docs.noctalia.dev/noctalia/compositors/niri/
|
||||||
|
layer-rule {
|
||||||
|
match namespace="^noctalia-wallpaper"
|
||||||
|
place-within-backdrop true
|
||||||
|
}
|
||||||
|
|
||||||
|
overview {
|
||||||
|
workspace-shadow {
|
||||||
|
off
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
window-rule {
|
||||||
|
geometry-corner-radius 5
|
||||||
|
clip-to-geometry true
|
||||||
|
}
|
||||||
|
|
||||||
|
window-rule {
|
||||||
|
match title="^Picture-in-Picture$"
|
||||||
|
open-floating true
|
||||||
|
}
|
||||||
|
|
||||||
|
window-rule {
|
||||||
|
match app-id="dev.noctalia.Noctalia"
|
||||||
|
open-floating true
|
||||||
|
default-column-width { fixed 1080; }
|
||||||
|
default-window-height { fixed 920; }
|
||||||
|
}
|
||||||
|
|
||||||
|
// Lets Noctalia notification actions focus the app that sent them.
|
||||||
|
debug {
|
||||||
|
honor-xdg-activation-with-invalid-serial
|
||||||
|
}
|
||||||
|
|
||||||
|
binds {
|
||||||
|
Mod+Shift+Slash { show-hotkey-overlay; }
|
||||||
|
|
||||||
|
Mod+Return hotkey-overlay-title="Open a Terminal: ghostty" { spawn "ghostty"; }
|
||||||
|
Mod+Space repeat=false hotkey-overlay-title="Launcher" { spawn "noctalia" "msg" "panel-toggle" "launcher"; }
|
||||||
|
Mod+S repeat=false hotkey-overlay-title="Control Center" { spawn "noctalia" "msg" "panel-toggle" "control-center"; }
|
||||||
|
Mod+Shift+Comma repeat=false hotkey-overlay-title="Noctalia Settings" { spawn "noctalia" "msg" "settings-toggle"; }
|
||||||
|
Mod+Ctrl+Q hotkey-overlay-title="Lock the Screen" { spawn "noctalia" "msg" "session" "lock"; }
|
||||||
|
|
||||||
|
// Through Noctalia so they show its OSD.
|
||||||
|
XF86AudioRaiseVolume allow-when-locked=true { spawn "noctalia" "msg" "volume-up"; }
|
||||||
|
XF86AudioLowerVolume allow-when-locked=true { spawn "noctalia" "msg" "volume-down"; }
|
||||||
|
XF86AudioMute allow-when-locked=true { spawn "noctalia" "msg" "volume-mute"; }
|
||||||
|
XF86AudioMicMute allow-when-locked=true { spawn "noctalia" "msg" "mic-mute"; }
|
||||||
|
XF86MonBrightnessUp allow-when-locked=true { spawn "noctalia" "msg" "brightness-up"; }
|
||||||
|
XF86MonBrightnessDown allow-when-locked=true { spawn "noctalia" "msg" "brightness-down"; }
|
||||||
|
XF86AudioPlay allow-when-locked=true { spawn "noctalia" "msg" "media" "toggle"; }
|
||||||
|
XF86AudioPause allow-when-locked=true { spawn "noctalia" "msg" "media" "toggle"; }
|
||||||
|
XF86AudioStop allow-when-locked=true { spawn "noctalia" "msg" "media" "stop"; }
|
||||||
|
XF86AudioPrev allow-when-locked=true { spawn "noctalia" "msg" "media" "previous"; }
|
||||||
|
XF86AudioNext allow-when-locked=true { spawn "noctalia" "msg" "media" "next"; }
|
||||||
|
|
||||||
|
Mod+O repeat=false { toggle-overview; }
|
||||||
|
|
||||||
|
Mod+W repeat=false { close-window; }
|
||||||
|
Mod+Q repeat=false { close-window; }
|
||||||
|
|
||||||
|
Mod+Left { focus-column-left; }
|
||||||
|
Mod+Down { focus-window-down; }
|
||||||
|
Mod+Up { focus-window-up; }
|
||||||
|
Mod+Right { focus-column-right; }
|
||||||
|
Mod+H { focus-column-left; }
|
||||||
|
Mod+J { focus-window-down; }
|
||||||
|
Mod+K { focus-window-up; }
|
||||||
|
Mod+L { focus-column-right; }
|
||||||
|
|
||||||
|
Mod+Ctrl+Left { move-column-left; }
|
||||||
|
Mod+Ctrl+Down { move-window-down; }
|
||||||
|
Mod+Ctrl+Up { move-window-up; }
|
||||||
|
Mod+Ctrl+Right { move-column-right; }
|
||||||
|
Mod+Ctrl+H { move-column-left; }
|
||||||
|
Mod+Ctrl+J { move-window-down; }
|
||||||
|
Mod+Ctrl+K { move-window-up; }
|
||||||
|
Mod+Ctrl+L { move-column-right; }
|
||||||
|
|
||||||
|
Mod+Home { focus-column-first; }
|
||||||
|
Mod+End { focus-column-last; }
|
||||||
|
Mod+Ctrl+Home { move-column-to-first; }
|
||||||
|
Mod+Ctrl+End { move-column-to-last; }
|
||||||
|
|
||||||
|
Mod+Shift+Left { focus-monitor-left; }
|
||||||
|
Mod+Shift+Down { focus-monitor-down; }
|
||||||
|
Mod+Shift+Up { focus-monitor-up; }
|
||||||
|
Mod+Shift+Right { focus-monitor-right; }
|
||||||
|
Mod+Shift+H { focus-monitor-left; }
|
||||||
|
Mod+Shift+J { focus-monitor-down; }
|
||||||
|
Mod+Shift+K { focus-monitor-up; }
|
||||||
|
Mod+Shift+L { focus-monitor-right; }
|
||||||
|
|
||||||
|
Mod+Shift+Ctrl+Left { move-column-to-monitor-left; }
|
||||||
|
Mod+Shift+Ctrl+Down { move-column-to-monitor-down; }
|
||||||
|
Mod+Shift+Ctrl+Up { move-column-to-monitor-up; }
|
||||||
|
Mod+Shift+Ctrl+Right { move-column-to-monitor-right; }
|
||||||
|
Mod+Shift+Ctrl+H { move-column-to-monitor-left; }
|
||||||
|
Mod+Shift+Ctrl+J { move-column-to-monitor-down; }
|
||||||
|
Mod+Shift+Ctrl+K { move-column-to-monitor-up; }
|
||||||
|
Mod+Shift+Ctrl+L { move-column-to-monitor-right; }
|
||||||
|
|
||||||
|
// Mod+Page_Up/Down are also the MX Master thumb buttons (logid.cfg).
|
||||||
|
Mod+Page_Down { focus-workspace-down; }
|
||||||
|
Mod+Page_Up { focus-workspace-up; }
|
||||||
|
Mod+U { focus-workspace-down; }
|
||||||
|
Mod+I { focus-workspace-up; }
|
||||||
|
Mod+Ctrl+Page_Down { move-column-to-workspace-down; }
|
||||||
|
Mod+Ctrl+Page_Up { move-column-to-workspace-up; }
|
||||||
|
Mod+Ctrl+U { move-column-to-workspace-down; }
|
||||||
|
Mod+Ctrl+I { move-column-to-workspace-up; }
|
||||||
|
|
||||||
|
Mod+Shift+Page_Down { move-workspace-down; }
|
||||||
|
Mod+Shift+Page_Up { move-workspace-up; }
|
||||||
|
Mod+Shift+U { move-workspace-down; }
|
||||||
|
Mod+Shift+I { move-workspace-up; }
|
||||||
|
|
||||||
|
Mod+WheelScrollDown cooldown-ms=150 { focus-workspace-down; }
|
||||||
|
Mod+WheelScrollUp cooldown-ms=150 { focus-workspace-up; }
|
||||||
|
Mod+Ctrl+WheelScrollDown cooldown-ms=150 { move-column-to-workspace-down; }
|
||||||
|
Mod+Ctrl+WheelScrollUp cooldown-ms=150 { move-column-to-workspace-up; }
|
||||||
|
|
||||||
|
Mod+WheelScrollRight { focus-column-right; }
|
||||||
|
Mod+WheelScrollLeft { focus-column-left; }
|
||||||
|
Mod+Ctrl+WheelScrollRight { move-column-right; }
|
||||||
|
Mod+Ctrl+WheelScrollLeft { move-column-left; }
|
||||||
|
|
||||||
|
Mod+Shift+WheelScrollDown { focus-column-right; }
|
||||||
|
Mod+Shift+WheelScrollUp { focus-column-left; }
|
||||||
|
Mod+Ctrl+Shift+WheelScrollDown { move-column-right; }
|
||||||
|
Mod+Ctrl+Shift+WheelScrollUp { move-column-left; }
|
||||||
|
|
||||||
|
Mod+1 { focus-workspace 1; }
|
||||||
|
Mod+2 { focus-workspace 2; }
|
||||||
|
Mod+3 { focus-workspace 3; }
|
||||||
|
Mod+4 { focus-workspace 4; }
|
||||||
|
Mod+5 { focus-workspace 5; }
|
||||||
|
Mod+6 { focus-workspace 6; }
|
||||||
|
Mod+7 { focus-workspace 7; }
|
||||||
|
Mod+8 { focus-workspace 8; }
|
||||||
|
Mod+9 { focus-workspace 9; }
|
||||||
|
Mod+Shift+1 { move-column-to-workspace 1; }
|
||||||
|
Mod+Shift+2 { move-column-to-workspace 2; }
|
||||||
|
Mod+Shift+3 { move-column-to-workspace 3; }
|
||||||
|
Mod+Shift+4 { move-column-to-workspace 4; }
|
||||||
|
Mod+Shift+5 { move-column-to-workspace 5; }
|
||||||
|
Mod+Shift+6 { move-column-to-workspace 6; }
|
||||||
|
Mod+Shift+7 { move-column-to-workspace 7; }
|
||||||
|
Mod+Shift+8 { move-column-to-workspace 8; }
|
||||||
|
Mod+Shift+9 { move-column-to-workspace 9; }
|
||||||
|
Mod+Ctrl+1 { move-column-to-workspace 1; }
|
||||||
|
Mod+Ctrl+2 { move-column-to-workspace 2; }
|
||||||
|
Mod+Ctrl+3 { move-column-to-workspace 3; }
|
||||||
|
Mod+Ctrl+4 { move-column-to-workspace 4; }
|
||||||
|
Mod+Ctrl+5 { move-column-to-workspace 5; }
|
||||||
|
Mod+Ctrl+6 { move-column-to-workspace 6; }
|
||||||
|
Mod+Ctrl+7 { move-column-to-workspace 7; }
|
||||||
|
Mod+Ctrl+8 { move-column-to-workspace 8; }
|
||||||
|
Mod+Ctrl+9 { move-column-to-workspace 9; }
|
||||||
|
|
||||||
|
Mod+BracketLeft { consume-or-expel-window-left; }
|
||||||
|
Mod+BracketRight { consume-or-expel-window-right; }
|
||||||
|
Mod+Comma { consume-window-into-column; }
|
||||||
|
Mod+Period { expel-window-from-column; }
|
||||||
|
Mod+T { toggle-column-tabbed-display; }
|
||||||
|
|
||||||
|
Mod+R { switch-preset-column-width; }
|
||||||
|
Mod+Shift+R { switch-preset-column-width-back; }
|
||||||
|
Mod+Ctrl+Shift+R { switch-preset-window-height; }
|
||||||
|
Mod+Ctrl+R { reset-window-height; }
|
||||||
|
|
||||||
|
Mod+F { maximize-column; }
|
||||||
|
Mod+Shift+F { fullscreen-window; }
|
||||||
|
Mod+M { maximize-window-to-edges; }
|
||||||
|
Mod+Ctrl+F { expand-column-to-available-width; }
|
||||||
|
|
||||||
|
Mod+Backslash { center-column; }
|
||||||
|
Mod+Ctrl+Backslash { center-visible-columns; }
|
||||||
|
|
||||||
|
Mod+Minus { set-column-width "-10%"; }
|
||||||
|
Mod+Equal { set-column-width "+10%"; }
|
||||||
|
Mod+Shift+Minus { set-window-height "-10%"; }
|
||||||
|
Mod+Shift+Equal { set-window-height "+10%"; }
|
||||||
|
|
||||||
|
Mod+P { toggle-window-floating; }
|
||||||
|
Mod+Shift+P { switch-focus-between-floating-and-tiling; }
|
||||||
|
|
||||||
|
Print { screenshot; }
|
||||||
|
Mod+Shift+S { screenshot; }
|
||||||
|
Ctrl+Print { screenshot-screen; }
|
||||||
|
Alt+Print { screenshot-window; }
|
||||||
|
|
||||||
|
// For apps that grab the keyboard (remote desktop, VMs).
|
||||||
|
Mod+Escape allow-inhibiting=false { toggle-keyboard-shortcuts-inhibit; }
|
||||||
|
|
||||||
|
Mod+Shift+Q { quit; }
|
||||||
|
Mod+Shift+E { quit; }
|
||||||
|
Ctrl+Alt+Delete { quit; }
|
||||||
|
}
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
# niri + Noctalia config. The binaries come from apt.
|
||||||
|
{ config, pkgs, ... }:
|
||||||
|
let
|
||||||
|
# Fail `homesw` on a bad config. The nix packages only validate, so they
|
||||||
|
# should match the apt versions.
|
||||||
|
checked = name: src: check: pkgs.runCommand name { } ''
|
||||||
|
${check src}
|
||||||
|
cp ${src} $out
|
||||||
|
'';
|
||||||
|
in {
|
||||||
|
xdg.configFile."niri/config.kdl".source = checked "niri-config.kdl" ./config.kdl
|
||||||
|
(src: "${pkgs.niri}/bin/niri validate -c ${src}");
|
||||||
|
|
||||||
|
# noctalia only warns on unknown keys.
|
||||||
|
xdg.configFile."noctalia/config.toml".source = checked "noctalia-config.toml"
|
||||||
|
(pkgs.replaceVars ./noctalia.toml {
|
||||||
|
# Linked by ../wallpapers.nix.
|
||||||
|
wallpapers = "${config.home.homeDirectory}/Pictures/Wallpapers";
|
||||||
|
})
|
||||||
|
(src: ''
|
||||||
|
log=$(${pkgs.noctalia}/bin/noctalia config validate ${src} 2>&1) || { echo "$log"; exit 1; }
|
||||||
|
echo "$log"
|
||||||
|
if echo "$log" | grep -q WARN; then exit 1; fi
|
||||||
|
'');
|
||||||
|
}
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
# Managed by Home Manager (home-modules/niri). Local edits get overwritten.
|
||||||
|
# Settings UI changes go to ~/.local/state/noctalia/settings.toml and win over
|
||||||
|
# this file. `noctalia config export` prints the merged result.
|
||||||
|
# https://docs.noctalia.dev/noctalia/configuration/
|
||||||
|
# The wallpaper paths are filled in by default.nix.
|
||||||
|
|
||||||
|
[wallpaper]
|
||||||
|
directory = "@wallpapers@"
|
||||||
|
|
||||||
|
[wallpaper.default]
|
||||||
|
path = "@wallpapers@/Macintosh-1.png"
|
||||||
|
|
||||||
|
# "faithful" stays closest to the wallpaper's own colors.
|
||||||
|
[theme]
|
||||||
|
source = "wallpaper"
|
||||||
|
wallpaper_scheme = "faithful"
|
||||||
|
|
||||||
|
# Writes ~/.config/niri/noctalia.kdl, included by config.kdl.
|
||||||
|
[theme.templates]
|
||||||
|
builtin_ids = ["niri"]
|
||||||
|
|
||||||
|
# Lock at 10 min, screens off 30 s later.
|
||||||
|
[idle.behavior.lock]
|
||||||
|
action = "lock"
|
||||||
|
timeout = 600
|
||||||
|
enabled = true
|
||||||
|
|
||||||
|
[idle.behavior.screen-off]
|
||||||
|
action = "screen_off"
|
||||||
|
timeout = 630
|
||||||
|
enabled = true
|
||||||
@@ -1,19 +1,89 @@
|
|||||||
{ ... } : {
|
{ ... }:
|
||||||
home.file.".config/opencode/opencode.jsonc" = {
|
let
|
||||||
text = ''
|
# W&B Inference (CoreWeave), OpenAI-compatible.
|
||||||
{
|
# The API key is NOT in this repo. Put it on each machine with:
|
||||||
"$schema": "https://opencode.ai/config.json",
|
# mkdir -p ~/.keys && install -m 600 /dev/stdin ~/.keys/wandb
|
||||||
"permission": {
|
# (paste the key, then Ctrl-D)
|
||||||
"edit": "ask",
|
# NOTE: opencode refuses to start if a {file:...} reference is missing.
|
||||||
"webfetch": "ask",
|
wandbTokenFile = "~/.keys/wandb";
|
||||||
"bash": {
|
|
||||||
"git status": "allow",
|
# Model IDs from https://docs.coreweave.com/inference/models (Nov 2026).
|
||||||
"git diff": "allow",
|
# Prices are $/1M tokens, input/output.
|
||||||
"ls": "allow",
|
wandbModels = {
|
||||||
"pwd": "allow"
|
# Quality.
|
||||||
}
|
"zai-org/GLM-5.3" = { name = "GLM 5.3"; context = 1048576; }; # $0.75/$3.00
|
||||||
}
|
"moonshotai/Kimi-K2.7-Code" = { name = "Kimi K2.7 Code"; context = 262144; }; # $0.60/$3.00
|
||||||
}
|
"deepseek-ai/DeepSeek-V4-Pro-0813" = { name = "DeepSeek V4 Pro"; context = 1048576; }; # $1.31/$3.96
|
||||||
'';
|
# Balanced.
|
||||||
|
"deepseek-ai/DeepSeek-V4.1-Flash-1017" = { name = "DeepSeek V4.1 Flash 1017"; context = 1048576; }; # $0.30/$1.20
|
||||||
|
"MiniMaxAI/MiniMax-M3" = { name = "MiniMax M3"; context = 262144; }; # $0.23/$0.96
|
||||||
|
# Speed.
|
||||||
|
"zai-org/GLM-5.3-Flash" = { name = "GLM 5.3 Flash"; context = 1048576; }; # $0.12/$0.38
|
||||||
|
"nvidia/NVIDIA-Nemotron-3.5-Lightning-30B-A3B" = { name = "Nemotron 3.5 Lightning"; context = 262144; }; # $0.07/$0.20
|
||||||
};
|
};
|
||||||
|
|
||||||
|
fastModel = "wandb/zai-org/GLM-5.3-Flash";
|
||||||
|
|
||||||
|
rule = action: resource: effect: { inherit action resource effect; };
|
||||||
|
|
||||||
|
# Last matching rule wins; unmatched checks default to "ask".
|
||||||
|
# `opencode --auto` (alias: oca) turns every "ask" into "allow", but "deny"
|
||||||
|
# is still enforced, so the deny list below is the guardrail for auto mode.
|
||||||
|
permissions = [
|
||||||
|
# Normal (non-auto) mode: prompt for edits and fetches.
|
||||||
|
(rule "edit" "*" "ask")
|
||||||
|
(rule "webfetch" "*" "ask")
|
||||||
|
(rule "shell" "git status *" "allow")
|
||||||
|
(rule "shell" "git diff *" "allow")
|
||||||
|
(rule "shell" "git log *" "allow")
|
||||||
|
(rule "shell" "ls *" "allow")
|
||||||
|
(rule "shell" "pwd" "allow")
|
||||||
|
|
||||||
|
# Hard denies, in every mode.
|
||||||
|
(rule "shell" "sudo *" "deny")
|
||||||
|
(rule "shell" "git push *--force*" "deny")
|
||||||
|
(rule "shell" "git push * -f" "deny")
|
||||||
|
(rule "shell" "git push * -f *" "deny")
|
||||||
|
(rule "shell" "git push -f *" "deny")
|
||||||
|
(rule "shell" "git reset --hard *" "deny")
|
||||||
|
(rule "shell" "git clean *" "deny")
|
||||||
|
(rule "shell" "rm -rf /*" "deny")
|
||||||
|
(rule "shell" "rm -rf ~*" "deny")
|
||||||
|
] ++ builtins.concatMap (dir: [
|
||||||
|
(rule "read" dir "deny")
|
||||||
|
(rule "edit" dir "deny")
|
||||||
|
]) [ "~/.keys/*" "~/.ssh/*" "~/.aws/*" "~/.config/sops/*" ];
|
||||||
|
|
||||||
|
opencodeConfig = {
|
||||||
|
"$schema" = "https://opencode.ai/config.json";
|
||||||
|
|
||||||
|
model = "wandb/zai-org/GLM-5.3";
|
||||||
|
# Cheap background calls.
|
||||||
|
agents = {
|
||||||
|
title.model = fastModel;
|
||||||
|
summary.model = fastModel;
|
||||||
|
};
|
||||||
|
|
||||||
|
providers.wandb = {
|
||||||
|
name = "W&B Inference";
|
||||||
|
package = "@opencode/ai/providers/openai-compatible";
|
||||||
|
settings = {
|
||||||
|
baseURL = "https://api.inference.wandb.ai/v1";
|
||||||
|
apiKey = "{file:${wandbTokenFile}}";
|
||||||
|
};
|
||||||
|
# "<team>/<project>" to bill against. Required when the account is in
|
||||||
|
# several teams; the default entity (coreweave1) rejects this key.
|
||||||
|
headers."OpenAI-Project" = "cw-wb/at";
|
||||||
|
models = builtins.mapAttrs (_: m: {
|
||||||
|
inherit (m) name;
|
||||||
|
limit = { inherit (m) context; output = 32768; };
|
||||||
|
}) wandbModels;
|
||||||
|
};
|
||||||
|
|
||||||
|
inherit permissions;
|
||||||
|
};
|
||||||
|
in {
|
||||||
|
home.file.".config/opencode/opencode.jsonc".text = builtins.toJSON opencodeConfig;
|
||||||
|
|
||||||
|
programs.zsh.shellAliases.oca = "opencode --auto";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,28 @@
|
|||||||
|
# Glue for running Home Manager on Ubuntu.
|
||||||
|
{ config, ... }: {
|
||||||
|
# Nix-installed apps/fonts/terminfo visible to the host system.
|
||||||
|
targets.genericLinux.enable = true;
|
||||||
|
# GUI apps come from apt/flatpak, so nix packages don't need host GPU drivers.
|
||||||
|
targets.genericLinux.gpu.enable = false;
|
||||||
|
|
||||||
|
# Things the stock ~/.profile and ~/.bashrc provided that are still needed.
|
||||||
|
# ~/.local/bin: native installers put binaries here.
|
||||||
|
home.sessionPath = [ "$HOME/.local/bin" "$HOME/bin" ];
|
||||||
|
|
||||||
|
programs.zsh = {
|
||||||
|
# Keep ~/.zshrc etc. in $HOME
|
||||||
|
dotDir = config.home.homeDirectory;
|
||||||
|
# Ubuntu's /etc/zsh/zshrc runs compinit; Home Manager runs it again.
|
||||||
|
envExtra = ''
|
||||||
|
skip_global_compinit=1
|
||||||
|
'';
|
||||||
|
# zsh doesn't read /etc/profile, so /etc/profile.d/* (nix-daemon, /snap/bin,
|
||||||
|
# flatpak XDG_DATA_DIRS, vte) would be skipped for login shells.
|
||||||
|
profileExtra = ''
|
||||||
|
emulate sh -c '. /etc/profile'
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
# GNOME's gcr-ssh-agent already owns SSH_AUTH_SOCK; don't start another agent.
|
||||||
|
services.ssh-agent.enable = false;
|
||||||
|
}
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
{ pkgs, ... }: {
|
|
||||||
home.packages = with pkgs; [
|
|
||||||
vscode-fhs
|
|
||||||
];
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
# recursive links each file, so local-only wallpapers can still go in the folder.
|
||||||
|
{ ... }: {
|
||||||
|
home.file."Pictures/Wallpapers" = {
|
||||||
|
source = ../wallpapers;
|
||||||
|
recursive = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -1,188 +0,0 @@
|
|||||||
# Edit this configuration file to define what should be installed on
|
|
||||||
# your system. Help is available in the configuration.nix(5) man page, on
|
|
||||||
# https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
|
|
||||||
|
|
||||||
{ config,
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
apple-silicon,
|
|
||||||
ghostty,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
|
|
||||||
{
|
|
||||||
imports =
|
|
||||||
[ # Include the results of the hardware scan.
|
|
||||||
./hardware-configuration.nix
|
|
||||||
apple-silicon.nixosModules.apple-silicon-support
|
|
||||||
# Sops and other stuff.
|
|
||||||
../common/core
|
|
||||||
../common/optional/yubikey.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
# Use the systemd-boot EFI boot loader.
|
|
||||||
boot.loader.systemd-boot.enable = true;
|
|
||||||
boot.loader.efi.canTouchEfiVariables = false;
|
|
||||||
|
|
||||||
# Bluetooth.
|
|
||||||
hardware.bluetooth.enable = true;
|
|
||||||
hardware.bluetooth.powerOnBoot = false;
|
|
||||||
services.blueman.enable = true;
|
|
||||||
|
|
||||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
|
||||||
# Allow unfree packages
|
|
||||||
nixpkgs.config.allowUnfree = true;
|
|
||||||
|
|
||||||
networking.hostName = "asahi-nix"; # Define your hostname.
|
|
||||||
networking.wireless = {
|
|
||||||
enable = true;
|
|
||||||
secretsFile = config.sops.secrets."wireless.env".path;
|
|
||||||
networks = {
|
|
||||||
"UG_LivingRoom_5G" = {
|
|
||||||
pskRaw = "ext:home_psk";
|
|
||||||
};
|
|
||||||
"pioneer" = {
|
|
||||||
pskRaw = "ext:woods_pioneer_psk";
|
|
||||||
};
|
|
||||||
"Thruline Coffee Co - GuestWiFi" = {};
|
|
||||||
"Woods WiFi" = {};
|
|
||||||
# Midway Laundry
|
|
||||||
"NETGEARFDD76C-3" = {};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
hardware.asahi = {
|
|
||||||
enable = true;
|
|
||||||
setupAsahiSound = true;
|
|
||||||
peripheralFirmwareDirectory = ./firmware;
|
|
||||||
useExperimentalGPUDriver = true;
|
|
||||||
experimentalGPUInstallMode = "overlay";
|
|
||||||
};
|
|
||||||
|
|
||||||
# Set your time zone.
|
|
||||||
time.timeZone = "America/Los_Angeles";
|
|
||||||
|
|
||||||
# This doesn't seem to be doing anything in hyprland because it configure libinput directly.
|
|
||||||
# I'll leave it here just in case, but doesn't seem necessary.
|
|
||||||
services.libinput = {
|
|
||||||
enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
users.users.jmug = {
|
|
||||||
isNormalUser = true;
|
|
||||||
extraGroups = [ "wheel" ];
|
|
||||||
packages = with pkgs; [
|
|
||||||
git
|
|
||||||
];
|
|
||||||
shell = pkgs.zsh;
|
|
||||||
};
|
|
||||||
programs.zsh.enable = true;
|
|
||||||
programs.neovim = {
|
|
||||||
enable = true;
|
|
||||||
defaultEditor = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
services.keyd = {
|
|
||||||
enable = true;
|
|
||||||
keyboards.colemakdhm = {
|
|
||||||
ids = [ "05ac:0351:6f083222" ];
|
|
||||||
settings = {
|
|
||||||
main = {
|
|
||||||
e = "f";
|
|
||||||
r = "p";
|
|
||||||
t = "b";
|
|
||||||
y = "j";
|
|
||||||
u = "l";
|
|
||||||
i = "u";
|
|
||||||
o = "y";
|
|
||||||
p = ";";
|
|
||||||
s = "r";
|
|
||||||
d = "s";
|
|
||||||
f = "t";
|
|
||||||
h = "m";
|
|
||||||
j = "n";
|
|
||||||
k = "e";
|
|
||||||
l = "i";
|
|
||||||
";" = "o";
|
|
||||||
v = "d";
|
|
||||||
b = "v";
|
|
||||||
n = "k";
|
|
||||||
m = "h";
|
|
||||||
capslock = "leftcontrol";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
keyd
|
|
||||||
htop
|
|
||||||
# Misc utils
|
|
||||||
ripgrep
|
|
||||||
fzf
|
|
||||||
unzip
|
|
||||||
nautilus
|
|
||||||
# Terminal
|
|
||||||
ghostty.packages.aarch64-linux.default
|
|
||||||
kitty
|
|
||||||
# Theming
|
|
||||||
palenight-theme
|
|
||||||
# Lock screen
|
|
||||||
hyprlock
|
|
||||||
# Idling
|
|
||||||
sway-audio-idle-inhibit
|
|
||||||
];
|
|
||||||
|
|
||||||
fonts = {
|
|
||||||
fontDir.enable = true;
|
|
||||||
packages = with pkgs; [
|
|
||||||
nerd-fonts.bigblue-terminal
|
|
||||||
nerd-fonts.fira-code
|
|
||||||
nerd-fonts.caskaydia-cove
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
security.pam.services.hyprlock = {};
|
|
||||||
programs.hyprland = {
|
|
||||||
enable = true;
|
|
||||||
xwayland.enable = true;
|
|
||||||
};
|
|
||||||
environment.sessionVariables = {
|
|
||||||
# Enable wayland support for chromium/electron apps.
|
|
||||||
GDK_BACKEND = "wayland";
|
|
||||||
NIXOS_OZONE_WL = "1";
|
|
||||||
MOZ_ENABLE_WAYLAND = "1";
|
|
||||||
QT_QPA_PLATFORM = "wayland";
|
|
||||||
# This caused issues with walker, but might be some other
|
|
||||||
# issue with wayland/hyprland, so will leave it here for now.
|
|
||||||
# QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
|
|
||||||
# WLR_NO_HARDWARE_CURSORS = "1";
|
|
||||||
};
|
|
||||||
|
|
||||||
# This is not really enabling X11, bad naming.
|
|
||||||
services.xserver = {
|
|
||||||
enable = true;
|
|
||||||
displayManager.gdm = {
|
|
||||||
enable = true;
|
|
||||||
wayland = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
# This is used to scale the gdm login screen,
|
|
||||||
# try to set it up for fractional scaling in
|
|
||||||
# the future.
|
|
||||||
home-manager.users.gdm = { lib, ... }: {
|
|
||||||
home.stateVersion = "25.05"; # Do not change!!!
|
|
||||||
dconf.settings = {
|
|
||||||
"org/gnome/desktop/interface" = {
|
|
||||||
scaling-factor = lib.hm.gvariant.mkUint32 2;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# USB devices.
|
|
||||||
services.devmon.enable = true;
|
|
||||||
services.gvfs.enable = true;
|
|
||||||
services.udisks2.enable = true;
|
|
||||||
|
|
||||||
system.stateVersion = "25.05"; # Don't change!!!
|
|
||||||
}
|
|
||||||
Binary file not shown.
Binary file not shown.
@@ -1,39 +0,0 @@
|
|||||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
|
||||||
# and may be overwritten by future invocations. Please make changes
|
|
||||||
# to /etc/nixos/configuration.nix instead.
|
|
||||||
{ config, lib, pkgs, modulesPath, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
imports =
|
|
||||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
|
||||||
];
|
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = [ "usb_storage" ];
|
|
||||||
boot.initrd.kernelModules = [ ];
|
|
||||||
boot.kernelModules = [ ];
|
|
||||||
boot.extraModulePackages = [ ];
|
|
||||||
|
|
||||||
fileSystems."/" =
|
|
||||||
{ device = "/dev/disk/by-uuid/b5800f37-1df2-4d6c-b2c7-7c274d56e938";
|
|
||||||
fsType = "ext4";
|
|
||||||
};
|
|
||||||
|
|
||||||
fileSystems."/boot" =
|
|
||||||
{ device = "/dev/disk/by-uuid/547D-181B";
|
|
||||||
fsType = "vfat";
|
|
||||||
options = [ "fmask=0022" "dmask=0022" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
swapDevices =
|
|
||||||
[ { device = "/dev/disk/by-uuid/e4138eb3-f8cf-436f-9a0f-3c67d3095582"; }
|
|
||||||
];
|
|
||||||
|
|
||||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
|
||||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
|
||||||
# still possible to use this option, but it's recommended to use it in conjunction
|
|
||||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
|
||||||
networking.useDHCP = lib.mkDefault true;
|
|
||||||
# networking.interfaces.wlan0.useDHCP = lib.mkDefault true;
|
|
||||||
|
|
||||||
nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux";
|
|
||||||
}
|
|
||||||
@@ -1,183 +0,0 @@
|
|||||||
{
|
|
||||||
lib,
|
|
||||||
config,
|
|
||||||
inputs,
|
|
||||||
pkgs,
|
|
||||||
pkgs-unstable,
|
|
||||||
...
|
|
||||||
} :
|
|
||||||
let
|
|
||||||
pathToKeys = ../common/keys/yubi;
|
|
||||||
yubiKeys =
|
|
||||||
lib.lists.forEach (builtins.attrNames (builtins.readDir pathToKeys))
|
|
||||||
(key: lib.substring 0 (lib.stringLength key - lib.stringLength ".pub") key); # Remove .pub suffix.
|
|
||||||
yubikeyPublicKeyEntries = lib.attrsets.mergeAttrsList (
|
|
||||||
lib.lists.map
|
|
||||||
(key: { ".ssh/${key}.pub".source = "${pathToKeys}/${key}.pub"; })
|
|
||||||
yubiKeys
|
|
||||||
);
|
|
||||||
in
|
|
||||||
{
|
|
||||||
imports = [
|
|
||||||
# TODO: Move all hyprland related config to its own module.
|
|
||||||
../../home-modules/hyprland
|
|
||||||
|
|
||||||
../../home-modules/direnv.nix
|
|
||||||
../../home-modules/ghostty-config.nix
|
|
||||||
../../home-modules/git.nix
|
|
||||||
../../home-modules/lazygit.nix
|
|
||||||
../../home-modules/nvim.nix
|
|
||||||
../../home-modules/sops.nix
|
|
||||||
../../home-modules/ssh-client.nix
|
|
||||||
../../home-modules/starship.nix
|
|
||||||
../../home-modules/tmux.nix
|
|
||||||
../../home-modules/zsh.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
ghostty.font-size = "14";
|
|
||||||
ghostty.window-decoration = false;
|
|
||||||
|
|
||||||
home = {
|
|
||||||
username = "jmug";
|
|
||||||
homeDirectory = "/home/jmug";
|
|
||||||
|
|
||||||
packages = with pkgs; [
|
|
||||||
# Media
|
|
||||||
loupe
|
|
||||||
vlc
|
|
||||||
# Audio
|
|
||||||
wireplumber
|
|
||||||
spotify-player
|
|
||||||
# Screen management
|
|
||||||
brightnessctl
|
|
||||||
# Secret management.
|
|
||||||
age
|
|
||||||
sops
|
|
||||||
# Browsers
|
|
||||||
ungoogled-chromium
|
|
||||||
# Coms
|
|
||||||
(webcord.override { electron = inputs.nixpkgs-electron-32.legacyPackages."aarch64-linux".electron; })
|
|
||||||
whatsie
|
|
||||||
obs-studio
|
|
||||||
# Dev tools
|
|
||||||
flyctl
|
|
||||||
pkgs-unstable.claude-code
|
|
||||||
# AWS tools
|
|
||||||
awscli2
|
|
||||||
(callPackage ../../nixos-modules/shell-apps/aws-cli-mfa.nix {})
|
|
||||||
];
|
|
||||||
|
|
||||||
pointerCursor = {
|
|
||||||
gtk.enable = true;
|
|
||||||
x11.enable = true;
|
|
||||||
hyprcursor.enable = true;
|
|
||||||
name = "Posy_Cursor_Black";
|
|
||||||
package = pkgs."posy-cursors";
|
|
||||||
};
|
|
||||||
|
|
||||||
file = {} // yubikeyPublicKeyEntries;
|
|
||||||
|
|
||||||
stateVersion = "25.05"; # Do not change!!!
|
|
||||||
};
|
|
||||||
|
|
||||||
home.activation.aws-cli-mfa-config = lib.hm.dag.entryAfter ["writeBoundary"] ''
|
|
||||||
mkdir -p ~/.config/aws-cli-mfa
|
|
||||||
cat > ~/.config/aws-cli-mfa/config.yaml << EOF
|
|
||||||
mfa_serial: $(cat ${config.sops.secrets."aws/jmug_ace_mfa_serial".path})
|
|
||||||
role_arn: $(cat ${config.sops.secrets."aws/role_arn".path})
|
|
||||||
session_duration: 43200
|
|
||||||
EOF
|
|
||||||
'';
|
|
||||||
|
|
||||||
gtk = {
|
|
||||||
enable = true;
|
|
||||||
gtk3 = {
|
|
||||||
extraConfig = {
|
|
||||||
gtk-application-prefer-dark-theme = 1;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
gtk4 = {
|
|
||||||
extraConfig = {
|
|
||||||
gtk-application-prefer-dark-theme = 1;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
theme = {
|
|
||||||
name = "palenight";
|
|
||||||
package = pkgs.palenight-theme;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
qt = {
|
|
||||||
enable = true;
|
|
||||||
platformTheme = "gtk";
|
|
||||||
};
|
|
||||||
dconf.settings = {
|
|
||||||
"org/gnome/desktop/interface" = {
|
|
||||||
color-scheme = "prefer-dark";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
xdg.configFile = {
|
|
||||||
"gtk-4.0/assets".source = "${config.gtk.theme.package}/share/themes/${config.gtk.theme.name}/gtk-4.0/assets";
|
|
||||||
"gtk-4.0/gtk.css".source = "${config.gtk.theme.package}/share/themes/${config.gtk.theme.name}/gtk-4.0/gtk.css";
|
|
||||||
"gtk-4.0/gtk-dark.css".source = "${config.gtk.theme.package}/share/themes/${config.gtk.theme.name}/gtk-4.0/gtk-dark.css";
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.ssh = {
|
|
||||||
enable = true;
|
|
||||||
addKeysToAgent = "yes";
|
|
||||||
matchBlocks = {
|
|
||||||
"git" = {
|
|
||||||
host = "github.com";
|
|
||||||
user = "git";
|
|
||||||
identityFile = [
|
|
||||||
"/home/jmug/.ssh/id_yubikey" # Auto updated symlik that matches all yubikeys.
|
|
||||||
"/home/jmug/.ssh/id_jmug" # Fallback key with passphrase.
|
|
||||||
];
|
|
||||||
};
|
|
||||||
"forgejo" = {
|
|
||||||
host = "code.jmug.me";
|
|
||||||
user = "git";
|
|
||||||
identityFile = [
|
|
||||||
"/home/jmug/.ssh/id_yubikey" # Auto updated symlik that matches all yubikeys.
|
|
||||||
"/home/jmug/.ssh/id_jmug" # Fallback key with passphrase.
|
|
||||||
];
|
|
||||||
};
|
|
||||||
wsl = {
|
|
||||||
user = "jmug";
|
|
||||||
hostname = "192.168.10.241";
|
|
||||||
port = 69;
|
|
||||||
forwardAgent = true;
|
|
||||||
identityFile = [
|
|
||||||
"/home/jmug/.ssh/id_yubikey" # Auto updated symlik that matches all yubikeys.
|
|
||||||
];
|
|
||||||
};
|
|
||||||
ws = {
|
|
||||||
user = "jmug";
|
|
||||||
hostname = "98.59.213.212";
|
|
||||||
port = 69;
|
|
||||||
forwardAgent = true;
|
|
||||||
identityFile = [
|
|
||||||
"/home/jmug/.ssh/id_yubikey" # Auto updated symlik that matches all yubikeys.
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
programs.zsh.shellAliases = {
|
|
||||||
# TODO BEGIN Interpolate the name of the host here.
|
|
||||||
# flakeconf = "sudo nvim /etc/nixos/flake.nix";
|
|
||||||
# nosconf = "sudo nvim /etc/nixos/hosts/devbox/configuration.nix";
|
|
||||||
# homeconf = "sudo nvim /etc/nixos/hosts/devbox/home.nix";
|
|
||||||
# nvconf = "sudo nvim /etc/nixos/home-modules/explicit-configs/nvim/init.lua";
|
|
||||||
# TODO END Interpolate the name of the host here.
|
|
||||||
rshellconf = "source ~/.zshrc";
|
|
||||||
fly = "flyctl";
|
|
||||||
# TODO: Interpolate the name of the host here.
|
|
||||||
nrsw = "sudo nixos-rebuild switch --flake /home/jmug/nixos#asahi"; # parametrize this as home dir.
|
|
||||||
awsmfa = "eval $(aws-cli-mfa)";
|
|
||||||
uawsmfa = "eval $(aws-cli-mfa --unset)";
|
|
||||||
};
|
|
||||||
|
|
||||||
# Let Home Manager install and manage itself.
|
|
||||||
programs.home-manager.enable = true;
|
|
||||||
}
|
|
||||||
@@ -58,6 +58,7 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
programs.zsh.enable = true;
|
programs.zsh.enable = true;
|
||||||
|
user.name = "jmug";
|
||||||
users.users.jmug = {
|
users.users.jmug = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
description = "Mariano Uvalle";
|
description = "Mariano Uvalle";
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
{ config, pkgs, ... } :
|
{ config, pkgs, homeConfigurationName, ... } :
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -22,8 +22,7 @@
|
|||||||
shellAliases = {
|
shellAliases = {
|
||||||
lg = "lazygit";
|
lg = "lazygit";
|
||||||
n = "nvim";
|
n = "nvim";
|
||||||
# TODO: Interpolate the hostname here.
|
nrsw = "nixos-rebuild switch --flake /etc/nixos#${homeConfigurationName}";
|
||||||
nrsw = "nixos-rebuild switch --flake /etc/nixos#devbox";
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
pkgs,
|
pkgs,
|
||||||
ssh-agent-switcher,
|
ssh-agent-switcher,
|
||||||
user,
|
user,
|
||||||
|
homeConfigurationName,
|
||||||
...
|
...
|
||||||
} :
|
} :
|
||||||
let
|
let
|
||||||
@@ -99,15 +100,8 @@ EOF
|
|||||||
|
|
||||||
programs.zsh = {
|
programs.zsh = {
|
||||||
shellAliases = {
|
shellAliases = {
|
||||||
# TODO BEGIN Interpolate the name of the host here.
|
|
||||||
# flakeconf = "sudo nvim /etc/nixos/flake.nix";
|
|
||||||
# nosconf = "sudo nvim /etc/nixos/hosts/devbox/configuration.nix";
|
|
||||||
# homeconf = "sudo nvim /etc/nixos/hosts/devbox/home.nix";
|
|
||||||
# nvconf = "sudo nvim /etc/nixos/home-modules/explicit-configs/nvim/init.lua";
|
|
||||||
# TODO END Interpolate the name of the host here.
|
|
||||||
rshellconf = "source ~/.zshrc";
|
rshellconf = "source ~/.zshrc";
|
||||||
# TODO: Interpolate the name of the host here.
|
nrsw = "sudo nixos-rebuild switch --flake ${homeDirectory}/nixos#${homeConfigurationName}";
|
||||||
nrsw = "sudo nixos-rebuild switch --flake /home/jmug/nixos#devbox";
|
|
||||||
fly = "flyctl";
|
fly = "flyctl";
|
||||||
awsmfa = "eval $(aws-cli-mfa)";
|
awsmfa = "eval $(aws-cli-mfa)";
|
||||||
uawsmfa = "eval $(aws-cli-mfa --unset)";
|
uawsmfa = "eval $(aws-cli-mfa --unset)";
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
enable = true;
|
enable = true;
|
||||||
onActivation = {
|
onActivation = {
|
||||||
autoUpdate = true;
|
autoUpdate = true;
|
||||||
cleanup = "uninstall";
|
# cleanup = "uninstall";
|
||||||
upgrade = true;
|
upgrade = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
opencode-tunneler,
|
opencode-tunneler,
|
||||||
godig,
|
godig,
|
||||||
user,
|
user,
|
||||||
|
homeConfigurationName,
|
||||||
...
|
...
|
||||||
} :
|
} :
|
||||||
let
|
let
|
||||||
@@ -122,6 +123,11 @@ in {
|
|||||||
hostname = "40.160.241.66";
|
hostname = "40.160.241.66";
|
||||||
forwardAgent = true;
|
forwardAgent = true;
|
||||||
};
|
};
|
||||||
|
handmade-runner = {
|
||||||
|
user = "jmug";
|
||||||
|
hostname = "40.160.151.45";
|
||||||
|
forwardAgent = true;
|
||||||
|
};
|
||||||
racknerd = {
|
racknerd = {
|
||||||
user = "jmug";
|
user = "jmug";
|
||||||
hostname = "155.94.155.137";
|
hostname = "155.94.155.137";
|
||||||
@@ -145,7 +151,6 @@ in {
|
|||||||
|
|
||||||
programs.zsh = {
|
programs.zsh = {
|
||||||
shellAliases = {
|
shellAliases = {
|
||||||
# TODO BEGIN Interpolate the name of the host here.
|
|
||||||
flakeconf = "nvim ${homeDirectory}/nixos/flake.nix";
|
flakeconf = "nvim ${homeDirectory}/nixos/flake.nix";
|
||||||
sysconf = "nvim ${homeDirectory}/nixos/hosts/macbook/configuration.nix";
|
sysconf = "nvim ${homeDirectory}/nixos/hosts/macbook/configuration.nix";
|
||||||
homeconf = "nvim ${homeDirectory}/nixos/hosts/macbook/home.nix";
|
homeconf = "nvim ${homeDirectory}/nixos/hosts/macbook/home.nix";
|
||||||
@@ -153,11 +158,13 @@ in {
|
|||||||
k = "kubectl";
|
k = "kubectl";
|
||||||
|
|
||||||
rshellconf = "source ${homeDirectory}/.zshrc";
|
rshellconf = "source ${homeDirectory}/.zshrc";
|
||||||
nrsw = "sudo darwin-rebuild switch --flake ${homeDirectory}/nixos#macbook";
|
nrsw = "sudo darwin-rebuild switch --flake ${homeDirectory}/nixos#${homeConfigurationName}";
|
||||||
opencode-local = "${homeDirectory}/dev/opencode/dist-local/bin/opencode";
|
opencode-local = "${homeDirectory}/dev/opencode/dist-local/bin/opencode";
|
||||||
};
|
};
|
||||||
|
|
||||||
initContent = ''
|
initContent = ''
|
||||||
|
eval "$(mise activate zsh)"
|
||||||
|
|
||||||
export PATH=$PATH:$HOME/bin
|
export PATH=$PATH:$HOME/bin
|
||||||
export PATH=$PATH:$HOME/.opencode/bin
|
export PATH=$PATH:$HOME/.opencode/bin
|
||||||
export PATH=$PATH:$HOME/.local/bin
|
export PATH=$PATH:$HOME/.local/bin
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
pkgs-unstable,
|
pkgs-unstable,
|
||||||
ssh-agent-switcher,
|
ssh-agent-switcher,
|
||||||
user,
|
user,
|
||||||
|
homeConfigurationName,
|
||||||
...
|
...
|
||||||
} :
|
} :
|
||||||
let
|
let
|
||||||
@@ -123,8 +124,7 @@ in {
|
|||||||
homeconf = "nvim ${homeDirectory}/nixos/hosts/nixbox/home.nix";
|
homeconf = "nvim ${homeDirectory}/nixos/hosts/nixbox/home.nix";
|
||||||
nvconf = "sudo nvim ${homeDirectory}/nixos/home-modules/explicit-configs/nvim/init.lua";
|
nvconf = "sudo nvim ${homeDirectory}/nixos/home-modules/explicit-configs/nvim/init.lua";
|
||||||
rshellconf = "source ~/.zshrc";
|
rshellconf = "source ~/.zshrc";
|
||||||
# TODO: Interpolate the name of the host here.
|
nrsw = "sudo nixos-rebuild switch --flake ${homeDirectory}/nixos#${homeConfigurationName}";
|
||||||
nrsw = "sudo nixos-rebuild switch --flake ${homeDirectory}/nixos#nixbox";
|
|
||||||
fly = "flyctl";
|
fly = "flyctl";
|
||||||
# awsmfa = "eval $(aws-cli-mfa)";
|
# awsmfa = "eval $(aws-cli-mfa)";
|
||||||
# uawsmfa = "eval $(aws-cli-mfa --unset)";
|
# uawsmfa = "eval $(aws-cli-mfa --unset)";
|
||||||
|
|||||||
@@ -0,0 +1,196 @@
|
|||||||
|
# Ubuntu desktop. User config only.
|
||||||
|
# OS packages and /etc files are handled by ../../ubuntu/bootstrap.sh.
|
||||||
|
{
|
||||||
|
inputs,
|
||||||
|
pkgs,
|
||||||
|
homeConfigurationName,
|
||||||
|
...
|
||||||
|
} :
|
||||||
|
let
|
||||||
|
homeDirectory = "/home/jmug";
|
||||||
|
in {
|
||||||
|
imports = [
|
||||||
|
../../home-modules/default.nix
|
||||||
|
../../home-modules/ubuntu.nix
|
||||||
|
../../home-modules/direnv.nix
|
||||||
|
../../home-modules/ghostty-config.nix
|
||||||
|
../../home-modules/git.nix
|
||||||
|
../../home-modules/herdr.nix
|
||||||
|
../../home-modules/lazygit.nix
|
||||||
|
../../home-modules/niri
|
||||||
|
../../home-modules/nvim.nix
|
||||||
|
../../home-modules/opencode-config.nix
|
||||||
|
../../home-modules/starship.nix
|
||||||
|
../../home-modules/wallpapers.nix
|
||||||
|
../../home-modules/zsh.nix
|
||||||
|
|
||||||
|
inputs.nix-flatpak.homeManagerModules.nix-flatpak
|
||||||
|
];
|
||||||
|
|
||||||
|
# TODO(yubikey): Port the yubikey setup (sops-managed key handles in ~/.ssh,
|
||||||
|
# id_yubikey symlink via udev, ykman/pcscd from apt, yubikey public keys).
|
||||||
|
# See modules/nixos/yubikey and home-modules/sops.nix.
|
||||||
|
|
||||||
|
nvim = {
|
||||||
|
enable = true;
|
||||||
|
package = pkgs.neovim; # pkgs is already nixpkgs-unstable.
|
||||||
|
};
|
||||||
|
|
||||||
|
ghostty = {
|
||||||
|
font-size = "14";
|
||||||
|
# GNOME needs server-side decorations to move/resize windows.
|
||||||
|
# TODO: Turn off if dropping GNOME for niri.
|
||||||
|
window-decoration = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
fonts.fontconfig.enable = true;
|
||||||
|
|
||||||
|
home = {
|
||||||
|
username = "jmug";
|
||||||
|
inherit homeDirectory;
|
||||||
|
|
||||||
|
sessionVariables = {
|
||||||
|
EDITOR = "nvim";
|
||||||
|
};
|
||||||
|
|
||||||
|
packages = with pkgs; [
|
||||||
|
# Fonts (ghostty uses BigBlueTermPlus).
|
||||||
|
nerd-fonts.bigblue-terminal
|
||||||
|
nerd-fonts.fira-code
|
||||||
|
nerd-fonts.caskaydia-cove
|
||||||
|
|
||||||
|
# Languages / toolchains. The C toolchain (gcc, clang, cmake) comes from
|
||||||
|
# apt so native builds link against the system's libraries.
|
||||||
|
bun
|
||||||
|
rustup
|
||||||
|
nodejs_24
|
||||||
|
# eas-cli
|
||||||
|
|
||||||
|
# Cloud / infra.
|
||||||
|
awscli2
|
||||||
|
google-cloud-sdk
|
||||||
|
flyctl
|
||||||
|
ngrok
|
||||||
|
gh
|
||||||
|
|
||||||
|
# Secrets.
|
||||||
|
sops
|
||||||
|
age
|
||||||
|
|
||||||
|
# Serial consoles.
|
||||||
|
minicom
|
||||||
|
picocom
|
||||||
|
tio
|
||||||
|
|
||||||
|
# Misc CLI.
|
||||||
|
opencode
|
||||||
|
glow
|
||||||
|
pipx
|
||||||
|
watchman
|
||||||
|
exercism
|
||||||
|
fastfetch
|
||||||
|
btop
|
||||||
|
tree
|
||||||
|
bluetui
|
||||||
|
];
|
||||||
|
|
||||||
|
stateVersion = "25.11";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Desktop apps. Installed per-user from flathub on activation.
|
||||||
|
services.flatpak = {
|
||||||
|
enable = true;
|
||||||
|
packages = [
|
||||||
|
"app.zen_browser.zen"
|
||||||
|
"com.slack.Slack"
|
||||||
|
"com.obsproject.Studio"
|
||||||
|
"org.videolan.VLC"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.ssh = {
|
||||||
|
enable = true;
|
||||||
|
enableDefaultConfig = false;
|
||||||
|
# Keys: ~/.ssh/id_* defaults, served by GNOME's agent.
|
||||||
|
# TODO(yubikey): IdentityFile id_yubikey / id_jmug like hosts/nixbox.
|
||||||
|
settings = {
|
||||||
|
"*" = {
|
||||||
|
AddKeysToAgent = "no";
|
||||||
|
Compression = false;
|
||||||
|
ServerAliveInterval = 0;
|
||||||
|
ServerAliveCountMax = 3;
|
||||||
|
HashKnownHosts = false;
|
||||||
|
UserKnownHostsFile = "~/.ssh/known_hosts";
|
||||||
|
ControlMaster = "no";
|
||||||
|
ControlPath = "~/.ssh/master-%r@%n:%p";
|
||||||
|
ControlPersist = "no";
|
||||||
|
};
|
||||||
|
"github.com" = { User = "git"; AddKeysToAgent = "yes"; };
|
||||||
|
"code.jmug.me" = { User = "git"; AddKeysToAgent = "yes"; };
|
||||||
|
homeserver = { User = "jmug"; HostName = "100.122.244.59"; ForwardAgent = true; };
|
||||||
|
devbox = { User = "jmug"; HostName = "100.102.140.44"; ForwardAgent = true; };
|
||||||
|
handmade = { User = "jmug"; HostName = "82.180.160.149"; ForwardAgent = true; };
|
||||||
|
handmade-gitea = { User = "jmug"; HostName = "40.160.241.66"; ForwardAgent = true; };
|
||||||
|
racknerd = { User = "jmug"; HostName = "155.94.155.137"; AddKeysToAgent = "yes"; ForwardAgent = false; };
|
||||||
|
beefy = { User = "jmug"; HostName = "100.127.115.24"; AddKeysToAgent = "yes"; ForwardAgent = true; };
|
||||||
|
mid = { User = "jmug"; HostName = "100.82.115.89"; AddKeysToAgent = "yes"; ForwardAgent = true; };
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.zsh.shellAliases = {
|
||||||
|
flakeconf = "nvim ${homeDirectory}/nixos/flake.nix";
|
||||||
|
homeconf = "nvim ${homeDirectory}/nixos/hosts/ubuntu/home.nix";
|
||||||
|
nvconf = "nvim ${homeDirectory}/nixos/home-modules/explicit-configs/nvim/init.lua";
|
||||||
|
rshellconf = "source ${homeDirectory}/.zshrc";
|
||||||
|
# Home Manager only.
|
||||||
|
homesw = "home-manager switch -b hm-backup --flake ${homeDirectory}/nixos#${homeConfigurationName}";
|
||||||
|
# apt packages, repos, /etc files, then Home Manager.
|
||||||
|
syssw = "${homeDirectory}/nixos/ubuntu/bootstrap.sh";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Friendlier names for the built-in SoundWire audio (Intel SOF "sof-soundwire"
|
||||||
|
# card), which otherwise shows up as "sof-soundwire Speaker" etc.
|
||||||
|
# TODO: X1 Carbon Gen 14 specific (harmless elsewhere: rules only match
|
||||||
|
# sof_sdw nodes). Move to a per-machine module when another host lands.
|
||||||
|
xdg.configFile."wireplumber/wireplumber.conf.d/51-builtin-audio-names.conf".text = ''
|
||||||
|
monitor.alsa.rules = [
|
||||||
|
{
|
||||||
|
matches = [ { device.name = "~alsa_card.*sof_sdw.*" } ]
|
||||||
|
actions = { update-props = { device.description = "Built-in Audio", device.nick = "Built-in Audio" } }
|
||||||
|
}
|
||||||
|
{
|
||||||
|
matches = [ { node.name = "~alsa_output.*sof_sdw.*Speaker.*" } ]
|
||||||
|
actions = { update-props = { node.description = "Speakers" } }
|
||||||
|
}
|
||||||
|
{
|
||||||
|
matches = [ { node.name = "~alsa_output.*sof_sdw.*Headphones.*" } ]
|
||||||
|
actions = { update-props = { node.description = "Headphones" } }
|
||||||
|
}
|
||||||
|
{
|
||||||
|
matches = [ { node.name = "~alsa_input.*sof_sdw.*Mic.*" } ]
|
||||||
|
actions = { update-props = { node.description = "Internal Microphones" } }
|
||||||
|
}
|
||||||
|
{
|
||||||
|
matches = [ { node.name = "~alsa_output.*sof_sdw.*HDMI1.*" } ]
|
||||||
|
actions = { update-props = { node.description = "HDMI / DisplayPort 1" } }
|
||||||
|
}
|
||||||
|
{
|
||||||
|
matches = [ { node.name = "~alsa_output.*sof_sdw.*HDMI2.*" } ]
|
||||||
|
actions = { update-props = { node.description = "HDMI / DisplayPort 2" } }
|
||||||
|
}
|
||||||
|
{
|
||||||
|
matches = [ { node.name = "~alsa_output.*sof_sdw.*HDMI3.*" } ]
|
||||||
|
actions = { update-props = { node.description = "HDMI / DisplayPort 3" } }
|
||||||
|
}
|
||||||
|
]
|
||||||
|
'';
|
||||||
|
|
||||||
|
# mise is installed by `ubuntu/bootstrap.sh tools`.
|
||||||
|
programs.zsh.initContent = ''
|
||||||
|
if [ -x "$HOME/.local/bin/mise" ]; then
|
||||||
|
eval "$("$HOME/.local/bin/mise" activate zsh)"
|
||||||
|
fi
|
||||||
|
'';
|
||||||
|
|
||||||
|
programs.home-manager.enable = true;
|
||||||
|
}
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
{ pkgs }:
|
|
||||||
pkgs.writeShellApplication {
|
|
||||||
name = "hello";
|
|
||||||
runtimeInputs = with pkgs; [ cowsay lolcat ];
|
|
||||||
text = ''
|
|
||||||
echo "Hello World!" | cowsay | lolcat
|
|
||||||
'';
|
|
||||||
}
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
{ pkgs }:
|
|
||||||
pkgs.writeShellApplication {
|
|
||||||
name = "print-colors";
|
|
||||||
text = ''
|
|
||||||
printf "|039| \033[39mDefault \033[m |049| \033[49mDefault \033[m |037| \033[37mLight gray \033[m |047| \033[47mLight gray \033[m\n"
|
|
||||||
printf "|030| \033[30mBlack \033[m |040| \033[40mBlack \033[m |090| \033[90mDark gray \033[m |100| \033[100mDark gray \033[m\n"
|
|
||||||
printf "|031| \033[31mRed \033[m |041| \033[41mRed \033[m |091| \033[91mLight red \033[m |101| \033[101mLight red \033[m\n"
|
|
||||||
printf "|032| \033[32mGreen \033[m |042| \033[42mGreen \033[m |092| \033[92mLight green \033[m |102| \033[102mLight green \033[m\n"
|
|
||||||
printf "|033| \033[33mYellow \033[m |043| \033[43mYellow \033[m |093| \033[93mLight yellow \033[m |103| \033[103mLight yellow \033[m\n"
|
|
||||||
printf "|034| \033[34mBlue \033[m |044| \033[44mBlue \033[m |094| \033[94mLight blue \033[m |104| \033[104mLight blue \033[m\n"
|
|
||||||
printf "|035| \033[35mMagenta \033[m |045| \033[45mMagenta \033[m |095| \033[95mLight magenta \033[m |105| \033[105mLight magenta \033[m\n"
|
|
||||||
printf "|036| \033[36mCyan \033[m |046| \033[46mCyan \033[m |096| \033[96mLight cyan \033[m |106| \033[106mLight cyan \033[m\n"
|
|
||||||
'';
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -0,0 +1,63 @@
|
|||||||
|
# Ubuntu machines
|
||||||
|
|
||||||
|
Ubuntu machines are managed in layers:
|
||||||
|
|
||||||
|
| Layer | Where | Applied by |
|
||||||
|
|---|---|---|
|
||||||
|
| User env: CLI tools, dotfiles, fonts, ssh hosts | `hosts/ubuntu/home.nix` | Home Manager |
|
||||||
|
| Desktop apps (flatpak) | `services.flatpak` in `hosts/ubuntu/home.nix` | nix-flatpak, on HM activation |
|
||||||
|
| OS packages | `apt-packages.txt` | `bootstrap.sh` |
|
||||||
|
| Third-party apt repos (tailscale, Dux Labs PPA for niri, Noctalia) | `bootstrap.sh` | `bootstrap.sh` |
|
||||||
|
| niri + Noctalia config | `home-modules/niri` | Home Manager (validated at build time) |
|
||||||
|
| System config files | `etc/**`, mirrored into `/etc` | `bootstrap.sh` |
|
||||||
|
| Self-updating tools from upstream installers (mise, herdr, tuicr) into `~/.local/bin` | `bootstrap.sh` | `bootstrap.sh tools` (kept up to date with update commands) |
|
||||||
|
|
||||||
|
## Fresh machine
|
||||||
|
|
||||||
|
```sh
|
||||||
|
sudo apt install -y git curl
|
||||||
|
git clone <this repo> ~/nixos
|
||||||
|
~/nixos/ubuntu/bootstrap.sh
|
||||||
|
sudo tailscale up
|
||||||
|
# log out and back in
|
||||||
|
```
|
||||||
|
|
||||||
|
After that:
|
||||||
|
|
||||||
|
- `homesw`: Home Manager only.
|
||||||
|
- `syssw`: everything (same as running `bootstrap.sh`).
|
||||||
|
|
||||||
|
## Keyboard (keyd)
|
||||||
|
|
||||||
|
`etc/keyd/default.conf` applies to every keyboard except YubiKeys (`etc/keyd/iqunix.conf` covers the IQUNIX MG75, which skips the Alt/Meta swap):
|
||||||
|
|
||||||
|
- Caps Lock and Left Control are swapped.
|
||||||
|
- Left Alt and Left Meta are swapped, so the key next to space is Meta.
|
||||||
|
- Meta+C, Meta+V and Meta+X copy, paste and cut. keyd sends Ctrl+Insert,
|
||||||
|
Shift+Insert and Ctrl+X, the same as omarchy's Hyprland binds. These work
|
||||||
|
in GTK/Qt apps, browsers and Electron. Ghostty gets the matching bindings
|
||||||
|
in `home-modules/ghostty-config.nix`.
|
||||||
|
|
||||||
|
To test keyd: `sudo keyd.rvaiya monitor`. To bypass a broken config: press Backspace+Escape+Enter together, which kills keyd.
|
||||||
|
|
||||||
|
## Desktop (niri + Noctalia)
|
||||||
|
|
||||||
|
GNOME stays installed. Pick **Niri** or **Ubuntu** in the GDM session menu
|
||||||
|
(gear icon on the password screen).
|
||||||
|
|
||||||
|
- niri comes from `ppa:duxlabs/dux-repo`, pinned so the PPA's other packages
|
||||||
|
don't replace Ubuntu's. Noctalia (bar, launcher, lock, idle, wallpaper)
|
||||||
|
comes from `pkg.noctalia.dev`.
|
||||||
|
- Config: `home-modules/niri/config.kdl` and `home-modules/niri/noctalia.toml`.
|
||||||
|
`homesw` fails if either doesn't validate.
|
||||||
|
- Noctalia's settings UI writes to `~/.local/state/noctalia/settings.toml`,
|
||||||
|
which overrides `noctalia.toml`. Copy the keepers into the repo.
|
||||||
|
- Because of keyd, Mod+C/V/X never reach niri: center is on Mod+Backslash and
|
||||||
|
floating is on Mod+P. Mod+Shift+/ lists the binds.
|
||||||
|
- Closing the lid suspends only on battery, so a Bluetooth keyboard or mouse
|
||||||
|
can wake the screens while docked.
|
||||||
|
|
||||||
|
## TODO
|
||||||
|
|
||||||
|
- [ ] **YubiKey**: port `modules/nixos/yubikey` and `home-modules/sops.nix`. ykman and pcscd from apt, the udev rule plus yubikey-up/down scripts in `etc/`, the sops age key from cold storage, and the `id_yubikey` identity files in the ssh config.
|
||||||
|
- [ ] **system-manager**: explore [numtide/system-manager](https://github.com/numtide/system-manager) to move `etc/` and the systemd service setup into Nix.
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
# Installed by bootstrap.sh. One package per line, # for comments.
|
||||||
|
|
||||||
|
# Shell:
|
||||||
|
zsh
|
||||||
|
|
||||||
|
# Desktop:
|
||||||
|
flatpak
|
||||||
|
ghostty
|
||||||
|
wl-clipboard
|
||||||
|
niri # Dux Labs PPA.
|
||||||
|
noctalia
|
||||||
|
|
||||||
|
# Input:
|
||||||
|
keyd
|
||||||
|
logiops
|
||||||
|
|
||||||
|
# Containers:
|
||||||
|
docker.io
|
||||||
|
docker-buildx
|
||||||
|
docker-compose-v2
|
||||||
|
|
||||||
|
# C toolchain:
|
||||||
|
build-essential
|
||||||
|
clang
|
||||||
|
clangd
|
||||||
|
cmake
|
||||||
|
pkg-config
|
||||||
|
|
||||||
|
# Out-of-tree kernel modules:
|
||||||
|
dkms
|
||||||
Executable
+223
@@ -0,0 +1,223 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Bootstrap / sync an Ubuntu machine from this repo. Idempotent: re-run it
|
||||||
|
# whenever apt-packages.txt, ubuntu/etc/**, or the Home Manager config change.
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
REPO="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
||||||
|
HERE="$REPO/ubuntu"
|
||||||
|
HM_TARGET="${HM_TARGET:-ubuntu}"
|
||||||
|
ALL_STEPS=(nix repos apt etc services shell tools home)
|
||||||
|
|
||||||
|
# Tools installed with their upstream install script instead of Nix/apt.
|
||||||
|
TOOLS=(
|
||||||
|
"mise|https://mise.run"
|
||||||
|
"herdr|https://herdr.dev/install.sh"
|
||||||
|
"tuicr|https://tuicr.dev/install.sh"
|
||||||
|
)
|
||||||
|
|
||||||
|
log() { printf '\n\033[1;34m==> %s\033[0m\n' "$*"; }
|
||||||
|
info() { printf ' %s\n' "$*"; }
|
||||||
|
|
||||||
|
# Strip comments/blank lines from a list file.
|
||||||
|
read_list() { sed -e 's/#.*//' -e 's/[[:space:]]*$//' -e '/^$/d' "$1"; }
|
||||||
|
|
||||||
|
step_nix() {
|
||||||
|
log "nix"
|
||||||
|
if command -v nix >/dev/null 2>&1; then
|
||||||
|
info "already installed: $(nix --version)"
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
# Determinate's installer, but upstream Nix (makes it easier to uninstall if needed).
|
||||||
|
curl -fsSL https://install.determinate.systems/nix \
|
||||||
|
| sh -s -- install --no-confirm --prefer-upstream-nix
|
||||||
|
# shellcheck disable=SC1091
|
||||||
|
. /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh
|
||||||
|
}
|
||||||
|
|
||||||
|
step_repos() {
|
||||||
|
log "third-party apt repos"
|
||||||
|
local codename changed=0
|
||||||
|
# shellcheck disable=SC1091
|
||||||
|
codename="$(. /etc/os-release && echo "$VERSION_CODENAME")"
|
||||||
|
|
||||||
|
# Tailscale: https://tailscale.com/kb/1031/install-linux
|
||||||
|
if [ ! -f /etc/apt/sources.list.d/tailscale.list ]; then
|
||||||
|
curl -fsSL "https://pkgs.tailscale.com/stable/ubuntu/${codename}.noarmor.gpg" \
|
||||||
|
| sudo tee /usr/share/keyrings/tailscale-archive-keyring.gpg >/dev/null
|
||||||
|
curl -fsSL "https://pkgs.tailscale.com/stable/ubuntu/${codename}.tailscale-keyring.list" \
|
||||||
|
| sudo tee /etc/apt/sources.list.d/tailscale.list >/dev/null
|
||||||
|
changed=1
|
||||||
|
fi
|
||||||
|
info "tailscale repo present"
|
||||||
|
|
||||||
|
# Dux Labs PPA, for niri: https://duxlabs.dev/docs/repo
|
||||||
|
# The pin has to be in place before the first apt-get update.
|
||||||
|
local pin=apt/preferences.d/duxlabs-dux-repo
|
||||||
|
if ! sudo cmp -s "$HERE/etc/$pin" "/etc/$pin"; then
|
||||||
|
sudo install -D -m 0644 -o root -g root "$HERE/etc/$pin" "/etc/$pin"
|
||||||
|
changed=1
|
||||||
|
fi
|
||||||
|
if ! compgen -G "/etc/apt/sources.list.d/duxlabs-ubuntu-dux-repo-*" >/dev/null; then
|
||||||
|
sudo add-apt-repository -y -n ppa:duxlabs/dux-repo
|
||||||
|
changed=1
|
||||||
|
fi
|
||||||
|
info "dux labs ppa present (pinned to niri, xwayland-satellite)"
|
||||||
|
|
||||||
|
# Noctalia: https://docs.noctalia.dev/noctalia/getting-started/installation/#debian
|
||||||
|
# The keyring is a package in the repo, so apt keeps it current.
|
||||||
|
if [ ! -f /usr/share/keyrings/nickh-archive-keyring.gpg ]; then
|
||||||
|
local tmp
|
||||||
|
tmp="$(mktemp -d)"
|
||||||
|
curl -fsSL -o "$tmp/nickh-archive-keyring.deb" https://pkg.noctalia.dev/deb/nickh-archive-keyring.deb
|
||||||
|
sudo dpkg -i "$tmp/nickh-archive-keyring.deb"
|
||||||
|
rm -rf "$tmp"
|
||||||
|
fi
|
||||||
|
if [ ! -f "/etc/apt/sources.list.d/noctalia-${codename}.sources" ]; then
|
||||||
|
curl -fsSL "https://pkg.noctalia.dev/deb/noctalia-${codename}.sources" \
|
||||||
|
| sudo tee "/etc/apt/sources.list.d/noctalia-${codename}.sources" >/dev/null
|
||||||
|
changed=1
|
||||||
|
fi
|
||||||
|
info "noctalia repo present"
|
||||||
|
|
||||||
|
if [ "$changed" = 1 ]; then sudo apt-get update; fi
|
||||||
|
}
|
||||||
|
|
||||||
|
step_apt() {
|
||||||
|
log "apt packages"
|
||||||
|
local pkgs=() missing=() p
|
||||||
|
mapfile -t pkgs < <(read_list "$HERE/apt-packages.txt")
|
||||||
|
pkgs+=(tailscale) # From step_repos.
|
||||||
|
for p in "${pkgs[@]}"; do
|
||||||
|
dpkg-query -W -f='${Status}' "$p" 2>/dev/null | grep -q 'install ok installed' \
|
||||||
|
|| missing+=("$p")
|
||||||
|
done
|
||||||
|
if [ ${#missing[@]} -eq 0 ]; then
|
||||||
|
info "all ${#pkgs[@]} packages installed"
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
info "installing: ${missing[*]}"
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install -y "${missing[@]}"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Copy ubuntu/etc/** to /etc. Only touches files that differ, and reloads the
|
||||||
|
# daemons whose config changed. Removed files are orphaned.
|
||||||
|
step_etc() {
|
||||||
|
log "/etc files"
|
||||||
|
local src rel dst changed=()
|
||||||
|
while IFS= read -r -d '' src; do
|
||||||
|
rel="${src#"$HERE/etc/"}"
|
||||||
|
dst="/etc/$rel"
|
||||||
|
if sudo cmp -s "$src" "$dst"; then
|
||||||
|
info "unchanged $dst"
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
if sudo test -e "$dst"; then
|
||||||
|
sudo diff -u "$dst" "$src" || true
|
||||||
|
fi
|
||||||
|
sudo install -D -m 0644 -o root -g root "$src" "$dst"
|
||||||
|
info "updated $dst"
|
||||||
|
changed+=("$rel")
|
||||||
|
done < <(find "$HERE/etc" -type f -print0 | sort -z)
|
||||||
|
|
||||||
|
local rel_changed
|
||||||
|
for rel_changed in "${changed[@]}"; do
|
||||||
|
case "$rel_changed" in
|
||||||
|
keyd/*)
|
||||||
|
# (Ubuntu ships the CLI as keyd.rvaiya)
|
||||||
|
if systemctl is-active -q keyd.service; then sudo systemctl restart keyd.service && info "restarted keyd"; fi ;;
|
||||||
|
logid.cfg)
|
||||||
|
if systemctl is-active -q logid.service; then sudo systemctl restart logid.service && info "restarted logid"; fi ;;
|
||||||
|
systemd/logind.conf.d/*)
|
||||||
|
sudo systemctl reload systemd-logind.service && info "reloaded logind" ;;
|
||||||
|
udev/rules.d/*)
|
||||||
|
sudo udevadm control --reload-rules && sudo udevadm trigger --action=change && info "reloaded udev rules" ;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
step_services() {
|
||||||
|
log "system services"
|
||||||
|
local unit
|
||||||
|
for unit in keyd.service logid.service docker.service tailscaled.service; do
|
||||||
|
if ! systemctl cat "$unit" >/dev/null 2>&1; then
|
||||||
|
info "skip $unit (not installed)"
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
if ! systemctl is-enabled -q "$unit" 2>/dev/null || ! systemctl is-active -q "$unit"; then
|
||||||
|
sudo systemctl enable --now "$unit"
|
||||||
|
fi
|
||||||
|
info "running $unit"
|
||||||
|
done
|
||||||
|
|
||||||
|
# dialout: serial ports (ttyUSB/ttyACM).
|
||||||
|
local group
|
||||||
|
for group in docker dialout; do
|
||||||
|
if getent group "$group" >/dev/null && ! id -nG "$USER" | grep -qw "$group"; then
|
||||||
|
sudo usermod -aG "$group" "$USER"
|
||||||
|
info "added $USER to $group group (log out/in to apply)"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
step_shell() {
|
||||||
|
log "login shell"
|
||||||
|
local want=/usr/bin/zsh current
|
||||||
|
current="$(getent passwd "$USER" | cut -d: -f7)"
|
||||||
|
if [ "$current" = "$want" ]; then
|
||||||
|
info "already $want"
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
sudo chsh -s "$want" "$USER"
|
||||||
|
info "changed $current -> $want (log out/in to apply)"
|
||||||
|
}
|
||||||
|
|
||||||
|
step_tools() {
|
||||||
|
log "self-installing tools (~/.local/bin)"
|
||||||
|
local entry name url
|
||||||
|
for entry in "${TOOLS[@]}"; do
|
||||||
|
IFS='|' read -r name url <<<"$entry"
|
||||||
|
# Also check ~/.local/bin directly: on a fresh machine this script may run from a shell that doesn't have it on PATH yet.
|
||||||
|
if command -v "$name" >/dev/null 2>&1 || [ -x "$HOME/.local/bin/$name" ]; then
|
||||||
|
info "already installed: $name"
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
info "installing $name from $url"
|
||||||
|
# TUICR_INSTALL_YES skips tuicr's confirmation prompt.
|
||||||
|
curl -fsSL "$url" | TUICR_INSTALL_YES=1 sh
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
step_home() {
|
||||||
|
log "home-manager ($HM_TARGET)"
|
||||||
|
local out
|
||||||
|
out="$(nix build --no-link --print-out-paths "$REPO#homeConfigurations.$HM_TARGET.activationPackage")"
|
||||||
|
HOME_MANAGER_BACKUP_EXT=hm-backup "$out/activate"
|
||||||
|
|
||||||
|
if flatpak info --user app.zen_browser.zen >/dev/null 2>&1 \
|
||||||
|
&& flatpak info --system app.zen_browser.zen >/dev/null 2>&1; then
|
||||||
|
sudo flatpak uninstall --system -y --noninteractive app.zen_browser.zen
|
||||||
|
info "removed system-wide Zen (user install takes over)"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
main() {
|
||||||
|
local steps=("$@") s
|
||||||
|
[ ${#steps[@]} -eq 0 ] && steps=("${ALL_STEPS[@]}")
|
||||||
|
for s in "${steps[@]}"; do
|
||||||
|
if ! declare -F "step_$s" >/dev/null; then
|
||||||
|
echo "unknown step: $s (valid: ${ALL_STEPS[*]})" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
for s in "${steps[@]}"; do "step_$s"; done
|
||||||
|
|
||||||
|
log "done"
|
||||||
|
cat <<'EOF'
|
||||||
|
First run only:
|
||||||
|
- sudo tailscale up
|
||||||
|
- log out and back in (zsh login shell, docker group, keyd is live already)
|
||||||
|
EOF
|
||||||
|
}
|
||||||
|
|
||||||
|
main "$@"
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
# Managed by ~/nixos/ubuntu (bootstrap.sh repos/etc). Local edits get overwritten.
|
||||||
|
# Only niri and xwayland-satellite come from the Dux Labs PPA.
|
||||||
|
# apt uses the first matching record, so the specific one goes first.
|
||||||
|
Package: niri xwayland-satellite
|
||||||
|
Pin: release o=LP-PPA-duxlabs-dux-repo
|
||||||
|
Pin-Priority: 500
|
||||||
|
|
||||||
|
Package: *
|
||||||
|
Pin: release o=LP-PPA-duxlabs-dux-repo
|
||||||
|
Pin-Priority: 1
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
# Managed by ~/nixos/ubuntu (bootstrap.sh etc). Local edits get overwritten.
|
||||||
|
[ids]
|
||||||
|
*
|
||||||
|
# YubiKey enumerates as a keyboard, ignore it.
|
||||||
|
-1050:0407
|
||||||
|
# logid's virtual keyboard.
|
||||||
|
-0000:0000:48cf0dd2
|
||||||
|
|
||||||
|
[main]
|
||||||
|
# Caps Lock <-> Left Control.
|
||||||
|
capslock = layer(control)
|
||||||
|
leftcontrol = capslock
|
||||||
|
# Left Alt <-> Left Meta.
|
||||||
|
leftalt = layer(meta)
|
||||||
|
leftmeta = layer(alt)
|
||||||
|
|
||||||
|
# macOS-style clipboard, same mapping as omarchy's Hyprland binds
|
||||||
|
# (default/hypr/bindings/clipboard.conf), done in keyd instead.
|
||||||
|
# Ctrl/Shift+Insert copy/paste in GTK, Qt, browsers, Electron, and terminals.
|
||||||
|
[meta]
|
||||||
|
c = C-insert
|
||||||
|
v = S-insert
|
||||||
|
x = C-x
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
# Managed by ~/nixos/ubuntu (bootstrap.sh etc). Local edits get overwritten.
|
||||||
|
# IQUNIX MG75. Same as default.conf minus the Alt/Meta swap: the board
|
||||||
|
# already has Meta next to space. An explicit ID beats the * in default.conf.
|
||||||
|
[ids]
|
||||||
|
245a:8276
|
||||||
|
|
||||||
|
[main]
|
||||||
|
# Caps Lock <-> Left Control.
|
||||||
|
capslock = layer(control)
|
||||||
|
leftcontrol = capslock
|
||||||
|
|
||||||
|
# macOS-style clipboard, see default.conf.
|
||||||
|
[meta]
|
||||||
|
c = C-insert
|
||||||
|
v = S-insert
|
||||||
|
x = C-x
|
||||||
@@ -0,0 +1,104 @@
|
|||||||
|
// Managed by ~/nixos/ubuntu (bootstrap.sh etc). Local edits get overwritten.
|
||||||
|
// Ported from hosts/nixbox/configuration.nix.
|
||||||
|
|
||||||
|
// The 500 ms default is too short for the MX Master 4 reconnecting after a wake.
|
||||||
|
io_timeout: 3000.0;
|
||||||
|
|
||||||
|
devices: (
|
||||||
|
{
|
||||||
|
name: "MX Master 4";
|
||||||
|
|
||||||
|
// Matches the kernel's hi-res wheel multiplier; otherwise each notch
|
||||||
|
// scrolls a fraction of a line.
|
||||||
|
hiresscroll: {
|
||||||
|
hires: true;
|
||||||
|
invert: false;
|
||||||
|
target: false;
|
||||||
|
};
|
||||||
|
|
||||||
|
// Thumb buttons send Super+Page_Up/Page_Down: switch workspaces in GNOME and niri.
|
||||||
|
buttons: (
|
||||||
|
{
|
||||||
|
cid: 0x53;
|
||||||
|
action =
|
||||||
|
{
|
||||||
|
type : "Keypress";
|
||||||
|
keys: ["KEY_LEFTMETA", "KEY_PAGEUP"];
|
||||||
|
};
|
||||||
|
},
|
||||||
|
{
|
||||||
|
cid: 0x56;
|
||||||
|
action =
|
||||||
|
{
|
||||||
|
type : "Keypress";
|
||||||
|
keys: ["KEY_LEFTMETA", "KEY_PAGEDOWN"];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
);
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Wireless Mouse MX Master 3";
|
||||||
|
|
||||||
|
hiresscroll: {
|
||||||
|
};
|
||||||
|
|
||||||
|
thumbwheel: {
|
||||||
|
invert: true;
|
||||||
|
};
|
||||||
|
|
||||||
|
buttons: (
|
||||||
|
{
|
||||||
|
cid: 0x53;
|
||||||
|
action =
|
||||||
|
{
|
||||||
|
type : "Keypress";
|
||||||
|
keys: ["KEY_LEFTMETA", "KEY_LEFT"];
|
||||||
|
};
|
||||||
|
},
|
||||||
|
{
|
||||||
|
cid: 0x56;
|
||||||
|
action =
|
||||||
|
{
|
||||||
|
type : "Keypress";
|
||||||
|
keys: ["KEY_LEFTMETA", "KEY_RIGHT"];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
);
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "MX Vertical Advanced Ergonomic Mouse";
|
||||||
|
|
||||||
|
hiresscroll: {
|
||||||
|
hires: true;
|
||||||
|
invert: false;
|
||||||
|
target: false;
|
||||||
|
};
|
||||||
|
|
||||||
|
buttons: (
|
||||||
|
{
|
||||||
|
cid: 0x53;
|
||||||
|
action =
|
||||||
|
{
|
||||||
|
type : "Keypress";
|
||||||
|
keys: ["KEY_LEFTMETA", "KEY_PAGEUP"];
|
||||||
|
};
|
||||||
|
},
|
||||||
|
{
|
||||||
|
cid: 0x56;
|
||||||
|
action =
|
||||||
|
{
|
||||||
|
type : "Keypress";
|
||||||
|
keys: ["KEY_LEFTMETA", "KEY_PAGEDOWN"];
|
||||||
|
};
|
||||||
|
},
|
||||||
|
{
|
||||||
|
cid: 0xfd;
|
||||||
|
action =
|
||||||
|
{
|
||||||
|
type : "Keypress";
|
||||||
|
keys: ["KEY_LEFTMETA"];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
);
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
# Managed by ~/nixos/ubuntu (bootstrap.sh etc). Local edits get overwritten.
|
||||||
|
# Lid closed only suspends on battery, so Bluetooth input can wake the screens
|
||||||
|
# while docked. HandleLidSwitchDocked isn't enough: the USB-C monitor
|
||||||
|
# disconnects when niri powers it off, and logind stops counting it as a dock.
|
||||||
|
[Login]
|
||||||
|
HandleLidSwitchExternalPower=ignore
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
# Managed by ~/nixos/ubuntu (bootstrap.sh etc). Local edits get overwritten.
|
||||||
|
# Dev boards/probes without root: uaccess (logged-in user), plugdev (ssh).
|
||||||
|
# Must sort before 73-seat-late.rules or uaccess is ignored.
|
||||||
|
|
||||||
|
# Raspberry Pi: Debug Probe, Picoprobe, RP2040/RP2350 BOOTSEL.
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="2e8a", MODE="0664", GROUP="plugdev", TAG+="uaccess"
|
||||||
|
KERNEL=="hidraw*", ATTRS{idVendor}=="2e8a", MODE="0664", GROUP="plugdev", TAG+="uaccess"
|
||||||
|
|
||||||
|
# FTDI: ULX3S, JTAG programmers; hidraw for FT260.
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="0403", MODE="0664", GROUP="plugdev", TAG+="uaccess"
|
||||||
|
KERNEL=="hidraw*", ATTRS{idVendor}=="0403", MODE="0664", GROUP="plugdev", TAG+="uaccess"
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
{
|
{
|
||||||
|
homeConfigurationName,
|
||||||
pkgs,
|
pkgs,
|
||||||
pkgs-unstable,
|
pkgs-unstable,
|
||||||
...
|
...
|
||||||
@@ -12,6 +13,7 @@
|
|||||||
../../home-modules/direnv.nix
|
../../home-modules/direnv.nix
|
||||||
../../home-modules/zsh.nix
|
../../home-modules/zsh.nix
|
||||||
../../home-modules/tmux.nix
|
../../home-modules/tmux.nix
|
||||||
|
../../home-modules/herdr.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
nvim = {
|
nvim = {
|
||||||
@@ -22,13 +24,14 @@
|
|||||||
home = {
|
home = {
|
||||||
username = "jmug";
|
username = "jmug";
|
||||||
homeDirectory = "/home/jmug";
|
homeDirectory = "/home/jmug";
|
||||||
|
sessionPath = [ "$HOME/.local/bin" ];
|
||||||
|
|
||||||
stateVersion = "25.05";
|
stateVersion = "25.05";
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.zsh = {
|
programs.zsh = {
|
||||||
shellAliases = {
|
shellAliases = {
|
||||||
homesw = "home-manager --flake /home/jmug/nixos#devbox --extra-experimental-features nix-command --extra-experimental-features flakes switch";
|
homesw = "home-manager --flake /home/jmug/nixos#${homeConfigurationName} --extra-experimental-features nix-command --extra-experimental-features flakes switch";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 8.7 MiB |
Binary file not shown.
|
After Width: | Height: | Size: 9.6 MiB |
Binary file not shown.
|
After Width: | Height: | Size: 8.7 MiB |
Binary file not shown.
|
After Width: | Height: | Size: 11 MiB |
Reference in New Issue
Block a user