massive rewrite using flake-parts
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
This commit is contained in:
237
flake.lock
generated
237
flake.lock
generated
@@ -16,17 +16,17 @@
|
||||
"type": "gitlab"
|
||||
}
|
||||
},
|
||||
"emacs": {
|
||||
"emacs-overlay": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils",
|
||||
"nixpkgs": "nixpkgs"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1670295974,
|
||||
"narHash": "sha256-+oQzBTxrWag9XnIndTUXvilI78fuIlhRQ+iNtBrlUF8=",
|
||||
"lastModified": 1670438727,
|
||||
"narHash": "sha256-c8SAz45BtQTZLxX0BRoj7aGlk6jogjlTE7Tj40lQr6Q=",
|
||||
"owner": "nix-community",
|
||||
"repo": "emacs-overlay",
|
||||
"rev": "2f7fff8ee668c01803cab2f0847151fdf647134e",
|
||||
"rev": "e9c4d10bbb4e810cbfe5e31248fe835e08efb35a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -51,6 +51,24 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-parts": {
|
||||
"inputs": {
|
||||
"nixpkgs-lib": "nixpkgs-lib"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1668450977,
|
||||
"narHash": "sha256-cfLhMhnvXn6x1vPm+Jow3RiFAUSCw/l1utktCw5rVA4=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "d591857e9d7dd9ddbfba0ea02b43b927c3c0f1fa",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils": {
|
||||
"locked": {
|
||||
"lastModified": 1667395993,
|
||||
@@ -115,29 +133,10 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"home-manager-stable": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs_3"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1651519540,
|
||||
"narHash": "sha256-3k6p8VsTwwRPQjE8rrMh+o2AZACZn/eeYJ7ivdQ/Iro=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "d93d56ab8c1c6aa575854a79b9d2f69d491db7d0",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"ref": "release-21.11",
|
||||
"repo": "home-manager",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"mailserver": {
|
||||
"inputs": {
|
||||
"blobs": "blobs",
|
||||
"nixpkgs": "nixpkgs_4",
|
||||
"nixpkgs": "nixpkgs_3",
|
||||
"nixpkgs-22_05": "nixpkgs-22_05",
|
||||
"utils": "utils_2"
|
||||
},
|
||||
@@ -155,25 +154,9 @@
|
||||
"type": "gitlab"
|
||||
}
|
||||
},
|
||||
"master": {
|
||||
"locked": {
|
||||
"lastModified": 1670329699,
|
||||
"narHash": "sha256-a2COGA8sIwGtiShuO8T8fgT+MhOhpGYdsywJP34DUEg=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "2be8b0ec2fa3fc02c3fe6ed608d29743a1fd76e0",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "master",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nbfc": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs_5",
|
||||
"nixpkgs": "nixpkgs_4",
|
||||
"utils": "utils_3"
|
||||
},
|
||||
"locked": {
|
||||
@@ -194,17 +177,17 @@
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils_2",
|
||||
"nixpkgs": [
|
||||
"nvim",
|
||||
"nvim-overlay",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"dir": "contrib",
|
||||
"lastModified": 1670297660,
|
||||
"narHash": "sha256-OB1P48rxsqSqB50yTyvy75sLS5AdmJvtdRXtgCl5D8U=",
|
||||
"lastModified": 1670395896,
|
||||
"narHash": "sha256-Nz4ZCPER+Z1JGMf5XDJAcssr/wg6h7PASwy6baym8kY=",
|
||||
"owner": "neovim",
|
||||
"repo": "neovim",
|
||||
"rev": "6d7b94ea086e17d16e2490e56572f17031924af5",
|
||||
"rev": "0caae2376e6c8f6665143e77e4e7a0cdf2b054c4",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -216,7 +199,7 @@
|
||||
},
|
||||
"nix-gaming": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs_6"
|
||||
"nixpkgs": "nixpkgs_5"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1670183910,
|
||||
@@ -261,6 +244,24 @@
|
||||
"type": "indirect"
|
||||
}
|
||||
},
|
||||
"nixpkgs-lib": {
|
||||
"locked": {
|
||||
"dir": "lib",
|
||||
"lastModified": 1665349835,
|
||||
"narHash": "sha256-UK4urM3iN80UXQ7EaOappDzcisYIuEURFRoGQ/yPkug=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "34c5293a71ffdb2fe054eb5288adc1882c1eb0b1",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"dir": "lib",
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1669969257,
|
||||
@@ -278,20 +279,6 @@
|
||||
}
|
||||
},
|
||||
"nixpkgs_3": {
|
||||
"locked": {
|
||||
"lastModified": 1670047204,
|
||||
"narHash": "sha256-5NcSGchQbl9DKMQ31qmgfscmrAg7qilJF/no2nBSRzs=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "809f15f2e7fd66c3d3ba6aabffa946fbd67f93fc",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"id": "nixpkgs",
|
||||
"type": "indirect"
|
||||
}
|
||||
},
|
||||
"nixpkgs_4": {
|
||||
"locked": {
|
||||
"lastModified": 1642635915,
|
||||
"narHash": "sha256-vabPA32j81xBO5m3+qXndWp5aqepe+vu96Wkd9UnngM=",
|
||||
@@ -306,7 +293,7 @@
|
||||
"type": "indirect"
|
||||
}
|
||||
},
|
||||
"nixpkgs_5": {
|
||||
"nixpkgs_4": {
|
||||
"locked": {
|
||||
"lastModified": 1646811357,
|
||||
"narHash": "sha256-JJdz8QJ8Gz9ZChGfl4P9Cm8C9mYJLRGVsXcY9gNPtuI=",
|
||||
@@ -321,7 +308,7 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_6": {
|
||||
"nixpkgs_5": {
|
||||
"locked": {
|
||||
"lastModified": 1663491030,
|
||||
"narHash": "sha256-MVsfBhE9US5DvLtBAaTRjwYdv1tLO8xjahM8qLXTgTo=",
|
||||
@@ -337,7 +324,7 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_7": {
|
||||
"nixpkgs_6": {
|
||||
"locked": {
|
||||
"lastModified": 1670235252,
|
||||
"narHash": "sha256-5YWCit/Brz4EDT/TIwXT/5wxRxb+cz1Nls7ZodQeKiw=",
|
||||
@@ -353,13 +340,13 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_8": {
|
||||
"nixpkgs_7": {
|
||||
"locked": {
|
||||
"lastModified": 1670148586,
|
||||
"narHash": "sha256-EcDfOiTHs0UBAtyGc0wxJJdhcMjrJEgWXjJutxZGA3E=",
|
||||
"lastModified": 1670267727,
|
||||
"narHash": "sha256-hUFAn5gjNHIBpLQT0CmqpuQjQwgWUm+D6aziGAYsDmw=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "a2d2f70b82ada0eadbcb1df2bca32d841a3c1bf1",
|
||||
"rev": "a5f661b80e4c163510a5013b585a040a5c7ef55e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -369,7 +356,7 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_9": {
|
||||
"nixpkgs_8": {
|
||||
"locked": {
|
||||
"lastModified": 1665296151,
|
||||
"narHash": "sha256-uOB0oxqxN9K7XGF1hcnY+PQnlQJ+3bP2vCn/+Ru/bbc=",
|
||||
@@ -385,33 +372,18 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nur": {
|
||||
"locked": {
|
||||
"lastModified": 1670315682,
|
||||
"narHash": "sha256-/v0RgZZIjvsFuJbJLUlzRbzSlYFXq3olgJTuJBNtcoY=",
|
||||
"owner": "nix-community",
|
||||
"repo": "NUR",
|
||||
"rev": "af814db16c89385c65e758608296440555f61ccc",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "NUR",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nvim": {
|
||||
"nvim-overlay": {
|
||||
"inputs": {
|
||||
"flake-compat": "flake-compat",
|
||||
"neovim-flake": "neovim-flake",
|
||||
"nixpkgs": "nixpkgs_8"
|
||||
"nixpkgs": "nixpkgs_7"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1670314513,
|
||||
"narHash": "sha256-NfUfsaA9RaTQWTjv1fMHqPkcI1u3rqddUPLLX4s47ZM=",
|
||||
"lastModified": 1670400905,
|
||||
"narHash": "sha256-g7zvYhGPxqZnrueTo1NR7AU1j1ejatDO9W6GGzAfk6o=",
|
||||
"owner": "nix-community",
|
||||
"repo": "neovim-nightly-overlay",
|
||||
"rev": "66d0dd530766c323b5cb177773409be387231238",
|
||||
"rev": "36b9905aa2f520da2be8703ffcd887b7f1162f72",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -420,52 +392,30 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"old": {
|
||||
"locked": {
|
||||
"lastModified": 1670083709,
|
||||
"narHash": "sha256-UL4czXyVoKSCqAbNkfJEu2M+XhIVNwBGkyDt+UbtA5E=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "e09913998d89659044c29ef5df4a86542e78a2ef",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-22.05",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"emacs": "emacs",
|
||||
"emacs-overlay": "emacs-overlay",
|
||||
"flake-parts": "flake-parts",
|
||||
"home-manager": "home-manager",
|
||||
"home-manager-stable": "home-manager-stable",
|
||||
"mailserver": "mailserver",
|
||||
"master": "master",
|
||||
"nbfc": "nbfc",
|
||||
"nix-gaming": "nix-gaming",
|
||||
"nixpkgs": "nixpkgs_7",
|
||||
"nur": "nur",
|
||||
"nvim": "nvim",
|
||||
"old": "old",
|
||||
"rust": "rust",
|
||||
"stable": "stable",
|
||||
"stable-small": "stable-small",
|
||||
"utils": "utils_4"
|
||||
"nixpkgs": "nixpkgs_6",
|
||||
"nvim-overlay": "nvim-overlay",
|
||||
"rust-overlay": "rust-overlay"
|
||||
}
|
||||
},
|
||||
"rust": {
|
||||
"rust-overlay": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils_3",
|
||||
"nixpkgs": "nixpkgs_9"
|
||||
"nixpkgs": "nixpkgs_8"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1670293639,
|
||||
"narHash": "sha256-RkPLwza77YkFgxKHGzfYAYVKiD9SeIvsOA7+ihiySwI=",
|
||||
"lastModified": 1670380307,
|
||||
"narHash": "sha256-7fJN5ndnE8YbrrtYdqMo3gDV/BW37M4wNBRhjdfP/XY=",
|
||||
"owner": "oxalica",
|
||||
"repo": "rust-overlay",
|
||||
"rev": "9767af967a0becaa3bb79eeda838dbf81295eb62",
|
||||
"rev": "fc98242f5f49d39b8fd3a611c146741a35dc012d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -474,38 +424,6 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"stable": {
|
||||
"locked": {
|
||||
"lastModified": 1670193339,
|
||||
"narHash": "sha256-oHTAhX4p6+uxcabq0rKL4EyKWPbDLGKec88ocPIU/2Y=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "e169cf5b3b1e6cc4a25ff15087c2621605f83409",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-22.11",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"stable-small": {
|
||||
"locked": {
|
||||
"lastModified": 1670169715,
|
||||
"narHash": "sha256-ZWekhqQrt9wETxTz19LssfeW6zzUOIG1fq6j+Ri0V3k=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "7187c12972bde6e2c00a3dae864e1aa92efcc316",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-22.05-small",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"utils": {
|
||||
"locked": {
|
||||
"lastModified": 1667395993,
|
||||
@@ -550,21 +468,6 @@
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"utils_4": {
|
||||
"locked": {
|
||||
"lastModified": 1667395993,
|
||||
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
|
157
flake.nix
157
flake.nix
@@ -1,144 +1,43 @@
|
||||
{
|
||||
description = "dotfiles";
|
||||
|
||||
inputs = {
|
||||
stable.url = github:nixos/nixpkgs/nixos-22.11;
|
||||
stable-small.url = github:nixos/nixpkgs/nixos-22.05-small;
|
||||
old.url = github:nixos/nixpkgs/nixos-22.05;
|
||||
nixpkgs.url = github:nixos/nixpkgs/nixpkgs-unstable;
|
||||
master.url = github:nixos/nixpkgs/master;
|
||||
home-manager.url = github:nix-community/home-manager;
|
||||
home-manager-stable.url = github:nix-community/home-manager/release-21.11;
|
||||
nur.url = github:nix-community/NUR;
|
||||
utils.url = github:numtide/flake-utils;
|
||||
nvim.url = github:nix-community/neovim-nightly-overlay;
|
||||
flake-parts.url = github:hercules-ci/flake-parts;
|
||||
nvim-overlay.url = github:nix-community/neovim-nightly-overlay;
|
||||
mailserver.url = gitlab:simple-nixos-mailserver/nixos-mailserver;
|
||||
nbfc.url = github:nbfc-linux/nbfc-linux;
|
||||
emacs.url = github:nix-community/emacs-overlay;
|
||||
emacs-overlay.url = github:nix-community/emacs-overlay;
|
||||
rust-overlay.url = github:oxalica/rust-overlay;
|
||||
nix-gaming.url = github:fufexan/nix-gaming;
|
||||
rust.url = github:oxalica/rust-overlay;
|
||||
nbfc.url = github:nbfc-linux/nbfc-linux;
|
||||
};
|
||||
|
||||
outputs = inputs@{ self, utils, nixpkgs, stable, master, old, stable-small, ... }:
|
||||
with utils.lib; eachSystem
|
||||
(with system;
|
||||
[ x86_64-linux aarch64-linux ])
|
||||
(system:
|
||||
let
|
||||
mkPkgs = channel: system: import channel {
|
||||
inherit system;
|
||||
config.allowUnfree = true;
|
||||
config.allowBroken = true;
|
||||
};
|
||||
channels = final: prev: {
|
||||
stable = mkPkgs stable prev.system;
|
||||
stable-small = mkPkgs stable-small prev.system;
|
||||
unstable = mkPkgs nixpkgs prev.system;
|
||||
master = mkPkgs master prev.system;
|
||||
old = mkPkgs old prev.system;
|
||||
};
|
||||
outputs = inputs@{ self, nixpkgs, ... }:
|
||||
inputs.flake-parts.lib.mkFlake { inherit self; } {
|
||||
systems = [ "x86_64-linux" "aarch64-linux" ];
|
||||
imports = [
|
||||
./hosts
|
||||
./home
|
||||
./pkgs
|
||||
];
|
||||
|
||||
perSystem = { pkgs, system, ... }: rec {
|
||||
legacyPackages = import inputs.nixpkgs {
|
||||
inherit system;
|
||||
config.allowUnfree = true;
|
||||
overlays = [
|
||||
(import ./overlays/packages.nix)
|
||||
inputs.nvim-overlay.overlay
|
||||
inputs.emacs-overlay.overlay
|
||||
inputs.rust-overlay.overlays.default
|
||||
];
|
||||
in
|
||||
{
|
||||
legacyPackages = import nixpkgs {
|
||||
inherit system;
|
||||
overlays = overlays ++ [
|
||||
inputs.nur.overlay
|
||||
inputs.nvim.overlay
|
||||
inputs.rust.overlays.default
|
||||
inputs.emacs.overlay
|
||||
channels
|
||||
(_: _: {
|
||||
nbfc-linux = inputs.nbfc.packages.${system}.nbfc-client-c;
|
||||
gaming = inputs.nix-gaming.packages.${system};
|
||||
})
|
||||
];
|
||||
config.allowUnfree = true;
|
||||
config.allowBroken = true;
|
||||
};
|
||||
}) //
|
||||
(
|
||||
let
|
||||
personalModules = [
|
||||
./modules/sound.nix
|
||||
];
|
||||
commonModules = [
|
||||
./modules/nvim
|
||||
./modules/vault-agent.nix
|
||||
];
|
||||
serverModules = [
|
||||
./modules/minpkgs.nix
|
||||
./modules/minzsh.nix
|
||||
];
|
||||
homeModules = [
|
||||
./home/modules/secret.nix
|
||||
./home/modules/baremacs.nix
|
||||
];
|
||||
builders = [ ./modules/x86builder.nix ];
|
||||
in
|
||||
{
|
||||
homeConfigurations = {
|
||||
natto = inputs.home-manager.lib.homeManagerConfiguration {
|
||||
modules = [
|
||||
./home/natto
|
||||
{
|
||||
home = {
|
||||
homeDirectory = "/home/natto";
|
||||
username = "natto";
|
||||
packages = [
|
||||
inputs.home-manager.defaultPackage.x86_64-linux
|
||||
];
|
||||
stateVersion = "22.05";
|
||||
};
|
||||
}
|
||||
] ++ homeModules;
|
||||
pkgs = self.legacyPackages.x86_64-linux;
|
||||
};
|
||||
};
|
||||
|
||||
nixosConfigurations = {
|
||||
#Home laptop
|
||||
satori = nixpkgs.lib.nixosSystem rec {
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
./hosts/satori
|
||||
{
|
||||
nixpkgs.pkgs = self.legacyPackages.${system};
|
||||
}
|
||||
]
|
||||
++ personalModules
|
||||
++ commonModules;
|
||||
};
|
||||
formatter = pkgs.nixpkgs-fmt;
|
||||
|
||||
#Home server (RPi4)
|
||||
marisa = nixpkgs.lib.nixosSystem rec {
|
||||
system = "aarch64-linux";
|
||||
modules = [
|
||||
./hosts/marisa
|
||||
#inputs.mailserver.nixosModules.mailserver
|
||||
{
|
||||
nixpkgs.pkgs = self.legacyPackages.${system};
|
||||
}
|
||||
]
|
||||
++ commonModules
|
||||
++ serverModules;
|
||||
};
|
||||
|
||||
#Oracle Cloud VM
|
||||
remilia = nixpkgs.lib.nixosSystem rec {
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
./hosts/remilia
|
||||
inputs.mailserver.nixosModules.mailserver
|
||||
{
|
||||
nixpkgs.pkgs = self.legacyPackages.${system};
|
||||
}
|
||||
]
|
||||
++ commonModules
|
||||
++ serverModules
|
||||
++ builders;
|
||||
};
|
||||
devShells.default = pkgs.mkShell {
|
||||
packages = [ formatter ];
|
||||
};
|
||||
}
|
||||
);
|
||||
};
|
||||
};
|
||||
}
|
||||
|
16
home/default.nix
Normal file
16
home/default.nix
Normal file
@@ -0,0 +1,16 @@
|
||||
{ self, inputs, ... }:
|
||||
{
|
||||
flake.homeConfigurations = {
|
||||
natto = inputs.home-manager.lib.homeManagerConfiguration {
|
||||
modules = [
|
||||
./natto
|
||||
./modules/secret.nix
|
||||
];
|
||||
pkgs = self.legacyPackages.x86_64-linux;
|
||||
extraSpecialArgs = {
|
||||
inherit inputs;
|
||||
flake = self;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
@@ -1,166 +0,0 @@
|
||||
#modified version of home-manager emacs service module for personal use
|
||||
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.services.baremacs;
|
||||
emacsCfg = config.programs.emacs;
|
||||
emacsBinPath = "${cfg.package}/bin";
|
||||
|
||||
# Match the default socket path for the Emacs version so emacsclient continues
|
||||
# to work without wrapping it.
|
||||
socketDir = "%t/emacs";
|
||||
socketPath = "${socketDir}/server";
|
||||
|
||||
in
|
||||
{
|
||||
options.services.baremacs = {
|
||||
enable = mkEnableOption "the Emacs daemon";
|
||||
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.emacs;
|
||||
defaultText = literalExpression ''
|
||||
pkgs.emacs
|
||||
'';
|
||||
description = "The Emacs package to use.";
|
||||
};
|
||||
|
||||
socketActivation = {
|
||||
enable = mkEnableOption "systemd socket activation for the Emacs service";
|
||||
};
|
||||
|
||||
defaultEditor = {
|
||||
enable = mkOption rec {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
example = !default;
|
||||
description = "Whether to change the EDITOR environment variable or not";
|
||||
};
|
||||
editor = mkOption rec {
|
||||
type = types.enum [ "emacs" "emacsclient" ];
|
||||
default = null;
|
||||
example = "emacsclient";
|
||||
description = "Whether to change the EDITOR environment variable or not";
|
||||
};
|
||||
};
|
||||
|
||||
copyConfigFiles = {
|
||||
enable = mkOption rec {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
example = !default;
|
||||
description = "Whether to copy the config files to ~/.emacs.d or not";
|
||||
};
|
||||
files = mkOption rec {
|
||||
type = types.attrsOf types.path;
|
||||
default = { };
|
||||
example = { "init.el" = ./init.el; };
|
||||
description = "What files to copy under what name";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable (mkMerge [
|
||||
{
|
||||
assertions = [
|
||||
(lib.hm.assertions.assertPlatform "services.emacs" pkgs
|
||||
lib.platforms.linux)
|
||||
{
|
||||
assertion = cfg.defaultEditor.enable -> cfg.defaultEditor.editor != null;
|
||||
message = ''
|
||||
services.baremacs.defaultEditor.enable requires services.baremacs.defaultEditor.editor to be set
|
||||
'';
|
||||
}
|
||||
];
|
||||
|
||||
systemd.user.services.emacs = {
|
||||
Unit = {
|
||||
Description = "Emacs text editor";
|
||||
Documentation =
|
||||
"info:emacs man:emacs(1) https://gnu.org/software/emacs/";
|
||||
|
||||
# Avoid killing the Emacs session, which may be full of
|
||||
# unsaved buffers.
|
||||
X-RestartIfChanged = false;
|
||||
} // optionalAttrs (cfg.socketActivation.enable) {
|
||||
# Emacs deletes its socket when shutting down, which systemd doesn't
|
||||
# handle, resulting in a server without a socket.
|
||||
# See https://github.com/nix-community/home-manager/issues/2018
|
||||
RefuseManualStart = true;
|
||||
};
|
||||
|
||||
Service = {
|
||||
Type = "notify";
|
||||
|
||||
# We wrap ExecStart in a login shell so Emacs starts with the user's
|
||||
# environment, most importantly $PATH and $NIX_PROFILES. It may be
|
||||
# worth investigating a more targeted approach for user services to
|
||||
# iport the user environment.
|
||||
ExecStart = ''
|
||||
${pkgs.runtimeShell} -l -c "${emacsBinPath}/emacs --fg-daemon${
|
||||
# In case the user sets 'server-directory' or 'server-name' in
|
||||
# their Emacs config, we want to specify the socket path explicitly
|
||||
# so launching 'emacs.service' manually doesn't break emacsclient
|
||||
# when using socket activation.
|
||||
optionalString cfg.socketActivation.enable
|
||||
"=${escapeShellArg socketPath}"
|
||||
}"'';
|
||||
|
||||
# Emacs will exit with status 15 after having received SIGTERM, which
|
||||
# is the default "KillSignal" value systemd uses to stop services.
|
||||
SuccessExitStatus = 15;
|
||||
|
||||
Restart = "on-failure";
|
||||
} // optionalAttrs (cfg.socketActivation.enable) {
|
||||
# Use read-only directory permissions to prevent emacs from
|
||||
# deleting systemd's socket file before exiting.
|
||||
ExecStartPost =
|
||||
"${pkgs.coreutils}/bin/chmod --changes -w ${socketDir}";
|
||||
ExecStopPost =
|
||||
"${pkgs.coreutils}/bin/chmod --changes +w ${socketDir}";
|
||||
};
|
||||
} // optionalAttrs (!cfg.socketActivation.enable) {
|
||||
Install = { WantedBy = [ "default.target" ]; };
|
||||
};
|
||||
|
||||
home = {
|
||||
sessionVariables = mkIf cfg.defaultEditor.enable {
|
||||
EDITOR = let editor = cfg.defaultEditor.editor; in
|
||||
getBin (pkgs.writeShellScript "editor" ''
|
||||
exec ${
|
||||
getBin cfg.package
|
||||
}/bin/'' + editor + head (optional (editor == "emacsclient") '' "''${@:---create-frame}"''));
|
||||
};
|
||||
|
||||
packages = [ cfg.package ];
|
||||
|
||||
file = mkIf cfg.copyConfigFiles.enable
|
||||
(mapAttrs'
|
||||
(n: v:
|
||||
attrsets.nameValuePair (".emacs.d/" + n) { source = v; })
|
||||
cfg.copyConfigFiles.files);
|
||||
};
|
||||
}
|
||||
|
||||
(mkIf cfg.socketActivation.enable {
|
||||
systemd.user.sockets.emacs = {
|
||||
Unit = {
|
||||
Description = "Emacs text editor";
|
||||
Documentation =
|
||||
"info:emacs man:emacs(1) https://gnu.org/software/emacs/";
|
||||
};
|
||||
|
||||
Socket = {
|
||||
ListenStream = socketPath;
|
||||
FileDescriptorName = "server";
|
||||
SocketMode = "0600";
|
||||
DirectoryMode = "0700";
|
||||
};
|
||||
Install = { WantedBy = [ "sockets.target" ]; };
|
||||
};
|
||||
})
|
||||
]);
|
||||
}
|
@@ -1,5 +1,11 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
{
|
||||
home = {
|
||||
homeDirectory = "/home/natto";
|
||||
username = "natto";
|
||||
stateVersion = "22.11";
|
||||
};
|
||||
|
||||
imports = [
|
||||
./email.nix
|
||||
./secrets
|
||||
|
@@ -1,4 +1,4 @@
|
||||
{ config, pkgs, ... }:
|
||||
{ config, flake, inputs, pkgs, ... }:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
|
||||
@@ -36,8 +36,8 @@
|
||||
jmtpfs
|
||||
neofetch
|
||||
xdotool
|
||||
nbfc-linux
|
||||
customscripts
|
||||
(inputs.nbfc.packages.${pkgs.system}.nbfc-client-c)
|
||||
(flake.packages.${pkgs.system}.customscripts)
|
||||
|
||||
# GUI utils
|
||||
(xfce.thunar.override {
|
||||
@@ -50,7 +50,7 @@
|
||||
xfce.xfconf
|
||||
xfce.tumbler
|
||||
flameshot
|
||||
(master.discord.override {
|
||||
(discord.override {
|
||||
nss = nss_latest;
|
||||
})
|
||||
qbittorrent
|
||||
@@ -69,12 +69,12 @@
|
||||
|
||||
# Wine and games and stuff
|
||||
wineWowPackages.stable
|
||||
master.winetricks
|
||||
tlauncher
|
||||
winetricks
|
||||
citra
|
||||
yuzu
|
||||
ryujinx
|
||||
gaming.osu-stable
|
||||
(inputs.nix-gaming.packages.${pkgs.system}.osu-stable)
|
||||
(flake.packages.${pkgs.system}.tlauncher)
|
||||
|
||||
# Dev shit
|
||||
rust-analyzer
|
||||
|
@@ -1,6 +1,7 @@
|
||||
{ pkgs, config, ... }:
|
||||
{
|
||||
programs = {
|
||||
home-manager.enable = true;
|
||||
firefox = {
|
||||
enable = true;
|
||||
profiles.natto = {
|
||||
|
@@ -1,26 +1,35 @@
|
||||
{ config, pkgs, ... }:
|
||||
let
|
||||
home = config.home.homeDirectory;
|
||||
in
|
||||
{ config, pkgs, inputs, ... }:
|
||||
{
|
||||
services = {
|
||||
baremacs = {
|
||||
enable = true;
|
||||
package = pkgs.mymacs.override {
|
||||
config = ./config/emacs/config.org;
|
||||
};
|
||||
defaultEditor = {
|
||||
enable = false;
|
||||
editor = "emacsclient";
|
||||
};
|
||||
copyConfigFiles = {
|
||||
enable = true;
|
||||
files = {
|
||||
"config.org" = ./config/emacs/config.org;
|
||||
"init.el" = ./config/emacs/init.el;
|
||||
};
|
||||
};
|
||||
home.file = with config; {
|
||||
"config.org" = {
|
||||
source = ./config/emacs/config.org;
|
||||
target = "${home.homeDirectory}/.emacs.d/config.org";
|
||||
};
|
||||
"init.el" = {
|
||||
source = ./config/emacs/init.el;
|
||||
target = "${home.homeDirectory}/.emacs.d/init.el";
|
||||
};
|
||||
};
|
||||
|
||||
services = {
|
||||
emacs =
|
||||
let
|
||||
mymacs = config: # with inputs.emacs-overlay.packages.${pkgs.system}; already resolved with overlay
|
||||
with pkgs; emacsWithPackagesFromUsePackage {
|
||||
inherit config;
|
||||
package = emacsGit;
|
||||
alwaysEnsure = true;
|
||||
alwaysTangle = true;
|
||||
extraEmacsPackages = epkgs: with epkgs; [
|
||||
use-package
|
||||
(epkgs.tree-sitter-langs.withPlugins (_: epkgs.tree-sitter-langs.plugins))
|
||||
];
|
||||
};
|
||||
in
|
||||
{
|
||||
enable = true;
|
||||
package = mymacs ./config/emacs/config.org;
|
||||
};
|
||||
|
||||
sxhkd = {
|
||||
enable = false;
|
||||
|
@@ -1,7 +1,7 @@
|
||||
{ pkgs, config, ... }:
|
||||
{ pkgs, config, flake, ... }:
|
||||
{
|
||||
home.pointerCursor = {
|
||||
package = pkgs.simp1e-cursors;
|
||||
package = flake.packages.${pkgs.system}.simp1e-cursors;
|
||||
name = "Simp1e-Solarized-Light";
|
||||
x11 = {
|
||||
enable = true;
|
||||
|
56
hosts/default.nix
Normal file
56
hosts/default.nix
Normal file
@@ -0,0 +1,56 @@
|
||||
{ self, inputs, ... }:
|
||||
let
|
||||
inherit (inputs) nixpkgs;
|
||||
specialArgs = { inherit inputs; };
|
||||
|
||||
commonModules = [ ./modules/nvim ];
|
||||
personalModules = [ ./modules/sound.nix ];
|
||||
serverModules = [
|
||||
./modules/minpkgs.nix
|
||||
./modules/minzsh.nix
|
||||
];
|
||||
builders = [
|
||||
./modules/x86builder.nix
|
||||
];
|
||||
in
|
||||
{
|
||||
flake.nixosConfigurations = {
|
||||
#Home laptop
|
||||
satori = nixpkgs.lib.nixosSystem rec {
|
||||
system = "x86_64-linux";
|
||||
inherit specialArgs;
|
||||
modules = [
|
||||
./satori
|
||||
{ nixpkgs.pkgs = self.legacyPackages.${system}; }
|
||||
]
|
||||
++ personalModules
|
||||
++ commonModules;
|
||||
};
|
||||
|
||||
#Home server (RPi4)
|
||||
marisa = nixpkgs.lib.nixosSystem rec {
|
||||
system = "aarch64-linux";
|
||||
inherit specialArgs;
|
||||
modules = [
|
||||
./marisa
|
||||
{ nixpkgs.pkgs = self.legacyPackages.${system}; }
|
||||
]
|
||||
++ commonModules
|
||||
++ serverModules;
|
||||
};
|
||||
|
||||
#Oracle Cloud VM
|
||||
remilia = nixpkgs.lib.nixosSystem rec {
|
||||
system = "x86_64-linux";
|
||||
inherit specialArgs;
|
||||
modules = [
|
||||
./remilia
|
||||
inputs.mailserver.nixosModules.mailserver
|
||||
{ nixpkgs.pkgs = self.legacyPackages.${system}; }
|
||||
]
|
||||
++ commonModules
|
||||
++ serverModules
|
||||
++ builders;
|
||||
};
|
||||
};
|
||||
}
|
@@ -34,7 +34,7 @@
|
||||
|
||||
consul = {
|
||||
enable = true;
|
||||
package = pkgs.master.consul;
|
||||
package = pkgs.consul;
|
||||
extraConfigFiles = lib.singleton "/run/consul/consul.json";
|
||||
};
|
||||
};
|
||||
|
@@ -1,4 +1,4 @@
|
||||
{ config }:
|
||||
{ config, ... }:
|
||||
{
|
||||
programs = {
|
||||
zsh = {
|
@@ -1,9 +1,10 @@
|
||||
{ config, pkgs, ... }:
|
||||
{inputs, config, pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.neovim = {
|
||||
enable = true;
|
||||
package = pkgs.neovim-nightly;
|
||||
# package = inputs.nvim-overlay.packages.${pkgs.system}.default;
|
||||
# package = pkgs.neovim-nightly.overrideAttrs (_:{
|
||||
# nativeBuildInputs = with pkgs; [ unzip cmake pkgconfig gettext tree-sitter ];
|
||||
# });
|
||||
@@ -14,7 +15,7 @@
|
||||
${builtins.readFile ./init.lua}
|
||||
EOF
|
||||
'';
|
||||
packages.myVimPackage = with pkgs.unstable.vimPlugins; {
|
||||
packages.myVimPackage = with pkgs.vimPlugins; {
|
||||
start = [
|
||||
nvim-colorizer-lua
|
||||
bracey-vim
|
||||
@@ -37,7 +38,7 @@
|
||||
presence-nvim
|
||||
nvim-web-devicons
|
||||
nvim-tree-lua
|
||||
(nvim-treesitter.withPlugins (plugins: pkgs.unstable.tree-sitter.allGrammars))
|
||||
(nvim-treesitter.withPlugins (plugins: pkgs.tree-sitter.allGrammars))
|
||||
vim-latex-live-preview
|
||||
lspkind-nvim
|
||||
base16-vim
|
@@ -3,8 +3,7 @@
|
||||
{
|
||||
boot = {
|
||||
supportedFilesystems = [ "zfs" ];
|
||||
|
||||
kernelPackages = pkgs.unstable.linuxPackages_latest;
|
||||
kernelPackages = pkgs.linuxPackages_latest;
|
||||
initrd = {
|
||||
availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usb_storage" "sd_mod" "vfio-pci" ];
|
||||
/* preDeviceCommands = ''
|
||||
|
@@ -16,8 +16,8 @@ in
|
||||
opengl = {
|
||||
driSupport32Bit = true;
|
||||
enable = true;
|
||||
package = pkgs.master.mesa.drivers;
|
||||
package32 = pkgs.master.pkgsi686Linux.mesa.drivers;
|
||||
package = pkgs.mesa.drivers;
|
||||
package32 = pkgs.pkgsi686Linux.mesa.drivers;
|
||||
};
|
||||
nvidia = {
|
||||
package = config.boot.kernelPackages.nvidia_x11;
|
||||
|
@@ -1,4 +1,4 @@
|
||||
{ lib, config, pkgs, ... }:
|
||||
{ lib, config, inputs, pkgs, ... }:
|
||||
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
@@ -18,11 +18,10 @@
|
||||
cachix
|
||||
gcc
|
||||
glibc.static
|
||||
stable.openjdk
|
||||
openjdk
|
||||
virtmanager
|
||||
tree-sitter
|
||||
docker-compose
|
||||
nodePackages.typescript
|
||||
rust-bin.nightly.latest.default
|
||||
clang-tools
|
||||
rnix-lsp
|
||||
@@ -44,7 +43,7 @@
|
||||
};
|
||||
git = {
|
||||
enable = true;
|
||||
package = pkgs.master.git.override {
|
||||
package = pkgs.git.override {
|
||||
doInstallCheck = false;
|
||||
sendEmailSupport = true;
|
||||
withManual = false;
|
||||
|
@@ -45,9 +45,8 @@
|
||||
font-awesome
|
||||
monoid
|
||||
office-code-pro
|
||||
hanazono
|
||||
eb-garamond
|
||||
# noto-fonts-cjk
|
||||
noto-fonts-cjk
|
||||
];
|
||||
users.users.natto = {
|
||||
isNormalUser = true;
|
||||
|
@@ -1,22 +0,0 @@
|
||||
{ emacsWithPackagesFromUsePackage
|
||||
, stdenv
|
||||
, fetchzip
|
||||
, fetchurl
|
||||
, fetchFromGitHub
|
||||
, emacsNativeComp
|
||||
, config ? null
|
||||
, package ? emacsNativeComp
|
||||
, ...
|
||||
}:
|
||||
|
||||
assert (config != null);
|
||||
|
||||
emacsWithPackagesFromUsePackage {
|
||||
inherit config package;
|
||||
alwaysEnsure = true;
|
||||
alwaysTangle = true;
|
||||
extraEmacsPackages = epkgs: with epkgs; [
|
||||
use-package
|
||||
(epkgs.tree-sitter-langs.withPlugins (_: epkgs.tree-sitter-langs.plugins))
|
||||
];
|
||||
}
|
14
pkgs/default.nix
Normal file
14
pkgs/default.nix
Normal file
@@ -0,0 +1,14 @@
|
||||
{ self, ... }: {
|
||||
systems = [ "x86_64-linux" ];
|
||||
|
||||
flake = {
|
||||
overlays = rec {
|
||||
packages = import ./packages.nix;
|
||||
default = packages;
|
||||
};
|
||||
};
|
||||
|
||||
perSystem = { pkgs, ... }: {
|
||||
packages = self.overlays.default null pkgs;
|
||||
};
|
||||
}
|
@@ -3,7 +3,6 @@ let
|
||||
call = prev.callPackage; in
|
||||
{
|
||||
customscripts = call ./customscripts { };
|
||||
mymacs = call ./emacs { };
|
||||
tlauncher = call ./tlauncher { };
|
||||
simp1e-cursors = call ./simp1e { };
|
||||
}
|
Reference in New Issue
Block a user