flake.nix: use flake-parts
All checks were successful
Check flake / build-amd64-linux (push) Successful in 1m28s
All checks were successful
Check flake / build-amd64-linux (push) Successful in 1m28s
This commit is contained in:
175
flake.lock
generated
175
flake.lock
generated
@@ -3,8 +3,12 @@
|
|||||||
"agenix": {
|
"agenix": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"darwin": "darwin",
|
"darwin": "darwin",
|
||||||
"home-manager": "home-manager",
|
"home-manager": [
|
||||||
"nixpkgs": "nixpkgs",
|
"nixpkgs"
|
||||||
|
],
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
],
|
||||||
"systems": "systems"
|
"systems": "systems"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
@@ -95,7 +99,7 @@
|
|||||||
"deploy-rs": {
|
"deploy-rs": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-compat": "flake-compat",
|
"flake-compat": "flake-compat",
|
||||||
"nixpkgs": "nixpkgs_2",
|
"nixpkgs": "nixpkgs",
|
||||||
"utils": "utils"
|
"utils": "utils"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
@@ -212,7 +216,41 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"flake-compat_5": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1747046372,
|
||||||
|
"narHash": "sha256-CIVLLkVgvHYbgI2UpXvIIBJ12HWgX+fjA8Xf8PUmqCY=",
|
||||||
|
"owner": "edolstra",
|
||||||
|
"repo": "flake-compat",
|
||||||
|
"rev": "9100a0f413b0c601e0533d1d94ffd501ce2e7885",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "edolstra",
|
||||||
|
"repo": "flake-compat",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"flake-parts": {
|
"flake-parts": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs-lib": "nixpkgs-lib"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1754487366,
|
||||||
|
"narHash": "sha256-pHYj8gUBapuUzKV/kN/tR3Zvqc7o6gdFB9XKXIp1SQ8=",
|
||||||
|
"owner": "hercules-ci",
|
||||||
|
"repo": "flake-parts",
|
||||||
|
"rev": "af66ad14b28a127c5c0f3bbb298218fc63528a18",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "hercules-ci",
|
||||||
|
"repo": "flake-parts",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"flake-parts_2": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs-lib": [
|
"nixpkgs-lib": [
|
||||||
"nixvim",
|
"nixvim",
|
||||||
@@ -257,7 +295,7 @@
|
|||||||
"nixos-mailserver",
|
"nixos-mailserver",
|
||||||
"flake-compat"
|
"flake-compat"
|
||||||
],
|
],
|
||||||
"gitignore": "gitignore_2",
|
"gitignore": "gitignore_3",
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"nixos-mailserver",
|
"nixos-mailserver",
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
@@ -277,6 +315,26 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"git-hooks-nix": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-compat": "flake-compat_2",
|
||||||
|
"gitignore": "gitignore",
|
||||||
|
"nixpkgs": "nixpkgs_2"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1754416808,
|
||||||
|
"narHash": "sha256-c6yg0EQ9xVESx6HGDOCMcyRSjaTpNJP10ef+6fRcofA=",
|
||||||
|
"owner": "cachix",
|
||||||
|
"repo": "git-hooks.nix",
|
||||||
|
"rev": "9c52372878df6911f9afc1e2a1391f55e4dfc864",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "cachix",
|
||||||
|
"repo": "git-hooks.nix",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"gitea-github-theme": {
|
"gitea-github-theme": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
@@ -295,6 +353,27 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"gitignore": {
|
"gitignore": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"git-hooks-nix",
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1709087332,
|
||||||
|
"narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=",
|
||||||
|
"owner": "hercules-ci",
|
||||||
|
"repo": "gitignore.nix",
|
||||||
|
"rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "hercules-ci",
|
||||||
|
"repo": "gitignore.nix",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"gitignore_2": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"hyprland",
|
"hyprland",
|
||||||
@@ -316,7 +395,7 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"gitignore_2": {
|
"gitignore_3": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"nixos-mailserver",
|
"nixos-mailserver",
|
||||||
@@ -338,7 +417,7 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"gitignore_3": {
|
"gitignore_4": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"pre-commit-hooks",
|
"pre-commit-hooks",
|
||||||
@@ -360,27 +439,6 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"home-manager": {
|
"home-manager": {
|
||||||
"inputs": {
|
|
||||||
"nixpkgs": [
|
|
||||||
"agenix",
|
|
||||||
"nixpkgs"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1745494811,
|
|
||||||
"narHash": "sha256-YZCh2o9Ua1n9uCvrvi5pRxtuVNml8X2a03qIFfRKpFs=",
|
|
||||||
"owner": "nix-community",
|
|
||||||
"repo": "home-manager",
|
|
||||||
"rev": "abfad3d2958c9e6300a883bd443512c55dfeb1be",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nix-community",
|
|
||||||
"repo": "home-manager",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"home-manager_2": {
|
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
@@ -475,11 +533,11 @@
|
|||||||
"xdph": "xdph"
|
"xdph": "xdph"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1755184403,
|
"lastModified": 1755277479,
|
||||||
"narHash": "sha256-VI+ZPD/uIFjzYW8IcyvBgvwyDIvUe4/xh/kOHTbITX8=",
|
"narHash": "sha256-LrXtv1RIEds93j+OiSEvYFVX4fcGk2vrEzva19oxvco=",
|
||||||
"owner": "hyprwm",
|
"owner": "hyprwm",
|
||||||
"repo": "Hyprland",
|
"repo": "Hyprland",
|
||||||
"rev": "60d769a89908c29e19100059985db15a7b6bab6a",
|
"rev": "edc473e8b0c14e768445422080af9978d132bff6",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -767,7 +825,7 @@
|
|||||||
"nixos-mailserver": {
|
"nixos-mailserver": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"blobs": "blobs",
|
"blobs": "blobs",
|
||||||
"flake-compat": "flake-compat_3",
|
"flake-compat": "flake-compat_4",
|
||||||
"git-hooks": "git-hooks",
|
"git-hooks": "git-hooks",
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
@@ -791,16 +849,16 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1754028485,
|
"lastModified": 1743014863,
|
||||||
"narHash": "sha256-IiiXB3BDTi6UqzAZcf2S797hWEPCRZOwyNThJIYhUfk=",
|
"narHash": "sha256-jAIUqsiN2r3hCuHji80U7NNEafpIMBXiwKlSrjWMlpg=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "59e69648d345d6e8fef86158c555730fa12af9de",
|
"rev": "bd3bac8bfb542dbde7ffffb6987a1a1f9d41699f",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"ref": "nixos-25.05",
|
"ref": "nixpkgs-unstable",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
@@ -821,13 +879,28 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"nixpkgs-lib": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1753579242,
|
||||||
|
"narHash": "sha256-zvaMGVn14/Zz8hnp4VWT9xVnhc8vuL3TStRqwk22biA=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "nixpkgs.lib",
|
||||||
|
"rev": "0f36c44e01a6129be94e3ade315a5883f0228a6e",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "nixpkgs.lib",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"nixpkgs-unstable": {
|
"nixpkgs-unstable": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1755027561,
|
"lastModified": 1755186698,
|
||||||
"narHash": "sha256-IVft239Bc8p8Dtvf7UAACMG5P3ZV+3/aO28gXpGtMXI=",
|
"narHash": "sha256-wNO3+Ks2jZJ4nTHMuks+cxAiVBGNuEBXsT29Bz6HASo=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "005433b926e16227259a1843015b5b2b7f7d1fc3",
|
"rev": "fbcf476f790d8a217c3eab4e12033dc4a0f6d23c",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -838,11 +911,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs_2": {
|
"nixpkgs_2": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1743014863,
|
"lastModified": 1754340878,
|
||||||
"narHash": "sha256-jAIUqsiN2r3hCuHji80U7NNEafpIMBXiwKlSrjWMlpg=",
|
"narHash": "sha256-lgmUyVQL9tSnvvIvBp7x1euhkkCho7n3TMzgjdvgPoU=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "bd3bac8bfb542dbde7ffffb6987a1a1f9d41699f",
|
"rev": "cab778239e705082fe97bb4990e0d24c50924c04",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -870,11 +943,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs_4": {
|
"nixpkgs_4": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1754937576,
|
"lastModified": 1755078291,
|
||||||
"narHash": "sha256-3sWA5WJybUE16kIMZ3+uxcxKZY/JRR4DFBqLdSLBo7w=",
|
"narHash": "sha256-Hu/gTDoi4uy6TAKISPHQusSMy8U6xUbLSDjKBYdhDIY=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "ddae11e58c0c345bf66efbddbf2192ed0e58f896",
|
"rev": "3385ca0cd7e14c1a1eb80401fe011705ff012323",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -885,7 +958,7 @@
|
|||||||
},
|
},
|
||||||
"nixvim": {
|
"nixvim": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-parts": "flake-parts",
|
"flake-parts": "flake-parts_2",
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
],
|
],
|
||||||
@@ -932,8 +1005,8 @@
|
|||||||
},
|
},
|
||||||
"pre-commit-hooks": {
|
"pre-commit-hooks": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-compat": "flake-compat_2",
|
"flake-compat": "flake-compat_3",
|
||||||
"gitignore": "gitignore",
|
"gitignore": "gitignore_2",
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"hyprland",
|
"hyprland",
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
@@ -955,8 +1028,8 @@
|
|||||||
},
|
},
|
||||||
"pre-commit-hooks_2": {
|
"pre-commit-hooks_2": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-compat": "flake-compat_4",
|
"flake-compat": "flake-compat_5",
|
||||||
"gitignore": "gitignore_3",
|
"gitignore": "gitignore_4",
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
]
|
]
|
||||||
@@ -981,8 +1054,10 @@
|
|||||||
"deploy-rs": "deploy-rs",
|
"deploy-rs": "deploy-rs",
|
||||||
"disko": "disko",
|
"disko": "disko",
|
||||||
"firefox-gnome-theme": "firefox-gnome-theme",
|
"firefox-gnome-theme": "firefox-gnome-theme",
|
||||||
|
"flake-parts": "flake-parts",
|
||||||
|
"git-hooks-nix": "git-hooks-nix",
|
||||||
"gitea-github-theme": "gitea-github-theme",
|
"gitea-github-theme": "gitea-github-theme",
|
||||||
"home-manager": "home-manager_2",
|
"home-manager": "home-manager",
|
||||||
"hyprland": "hyprland",
|
"hyprland": "hyprland",
|
||||||
"hyprland-plugins": "hyprland-plugins",
|
"hyprland-plugins": "hyprland-plugins",
|
||||||
"impermanence": "impermanence",
|
"impermanence": "impermanence",
|
||||||
|
185
flake.nix
185
flake.nix
@@ -2,54 +2,80 @@
|
|||||||
description = "NixOS system configuration";
|
description = "NixOS system configuration";
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "nixpkgs/nixos-25.05";
|
agenix = {
|
||||||
nixpkgs-unstable.url = "nixpkgs/nixos-unstable";
|
url = "github:ryantm/agenix";
|
||||||
# nixpkgs-master.url = "nixpkgs";
|
inputs.home-manager.follows = "nixpkgs";
|
||||||
agenix.url = "github:ryantm/agenix";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
|
||||||
deploy-rs.url = "github:serokell/deploy-rs";
|
deploy-rs.url = "github:serokell/deploy-rs";
|
||||||
|
|
||||||
disko = {
|
disko = {
|
||||||
url = "github:nix-community/disko";
|
url = "github:nix-community/disko";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
home-manager = {
|
home-manager = {
|
||||||
url = "github:nix-community/home-manager/release-25.05";
|
url = "github:nix-community/home-manager/release-25.05";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
hyprland.url = "github:hyprwm/Hyprland";
|
hyprland.url = "github:hyprwm/Hyprland";
|
||||||
|
|
||||||
hyprland-plugins = {
|
hyprland-plugins = {
|
||||||
url = "github:hyprwm/hyprland-plugins";
|
url = "github:hyprwm/hyprland-plugins";
|
||||||
inputs.hyprland.follows = "hyprland";
|
inputs.hyprland.follows = "hyprland";
|
||||||
};
|
};
|
||||||
|
|
||||||
firefox-gnome-theme = {
|
firefox-gnome-theme = {
|
||||||
url = "github:rafaelmardojai/firefox-gnome-theme";
|
url = "github:rafaelmardojai/firefox-gnome-theme";
|
||||||
flake = false;
|
flake = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
flake-parts.url = "github:hercules-ci/flake-parts";
|
||||||
|
|
||||||
|
git-hooks-nix.url = "github:cachix/git-hooks.nix";
|
||||||
|
|
||||||
gitea-github-theme = {
|
gitea-github-theme = {
|
||||||
url = "git+ssh://git@git.vimium.com/jordan/gitea-github-theme.git?ref=main";
|
url = "git+ssh://git@git.vimium.com/jordan/gitea-github-theme.git?ref=main";
|
||||||
flake = false;
|
flake = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
impermanence.url = "github:nix-community/impermanence";
|
impermanence.url = "github:nix-community/impermanence";
|
||||||
|
|
||||||
kvlibadwaita = {
|
kvlibadwaita = {
|
||||||
url = "github:GabePoel/KvLibadwaita";
|
url = "github:GabePoel/KvLibadwaita";
|
||||||
flake = false;
|
flake = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
nixos-hardware.url = "github:NixOS/nixos-hardware";
|
nixos-hardware.url = "github:NixOS/nixos-hardware";
|
||||||
|
|
||||||
nixos-mailserver = {
|
nixos-mailserver = {
|
||||||
url = "gitlab:simple-nixos-mailserver/nixos-mailserver/nixos-25.05";
|
url = "gitlab:simple-nixos-mailserver/nixos-mailserver/nixos-25.05";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
nixpkgs.url = "nixpkgs/nixos-25.05";
|
||||||
|
|
||||||
|
nixpkgs-unstable.url = "nixpkgs/nixos-unstable";
|
||||||
|
|
||||||
|
# nixpkgs-master.url = "nixpkgs";
|
||||||
|
|
||||||
nixvim = {
|
nixvim = {
|
||||||
url = "github:nix-community/nixvim/nixos-25.05";
|
url = "github:nix-community/nixvim/nixos-25.05";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
pre-commit-hooks = {
|
pre-commit-hooks = {
|
||||||
url = "github:cachix/git-hooks.nix";
|
url = "github:cachix/git-hooks.nix";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
secrets = {
|
secrets = {
|
||||||
url = "git+ssh://git@git.vimium.com/jordan/nix-secrets.git";
|
url = "git+ssh://git@git.vimium.com/jordan/nix-secrets.git";
|
||||||
flake = false;
|
flake = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
thunderbird-gnome-theme = {
|
thunderbird-gnome-theme = {
|
||||||
url = "github:rafaelmardojai/thunderbird-gnome-theme";
|
url = "github:rafaelmardojai/thunderbird-gnome-theme";
|
||||||
flake = false;
|
flake = false;
|
||||||
@@ -57,114 +83,61 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
outputs =
|
outputs =
|
||||||
inputs@{ self, nixpkgs, ... }:
|
inputs@{
|
||||||
let
|
nixpkgs,
|
||||||
inherit (nixpkgs) lib;
|
flake-parts,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
flake-parts.lib.mkFlake { inherit inputs; } {
|
||||||
|
imports = [
|
||||||
|
inputs.git-hooks-nix.flakeModule
|
||||||
|
./nix/hosts.nix
|
||||||
|
];
|
||||||
|
|
||||||
domain = "mesh.vimium.net";
|
flake = {
|
||||||
forEachSystem = lib.genAttrs [
|
overlays = nixpkgs.lib.packagesFromDirectoryRecursive {
|
||||||
"x86_64-linux"
|
callPackage = path: overrides: import path;
|
||||||
|
directory = ./overlays;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
systems = [
|
||||||
"aarch64-linux"
|
"aarch64-linux"
|
||||||
];
|
"x86_64-linux"
|
||||||
mkDeployNode = hostName: {
|
|
||||||
hostname = "${hostName}.${domain}";
|
|
||||||
|
|
||||||
profiles.system = {
|
|
||||||
user = "root";
|
|
||||||
path =
|
|
||||||
inputs.deploy-rs.lib.${
|
|
||||||
self.nixosConfigurations.${hostName}.config.system.build.toplevel.system
|
|
||||||
}.activate.nixos
|
|
||||||
self.nixosConfigurations.${hostName};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
in
|
|
||||||
{
|
|
||||||
overlays = lib.packagesFromDirectoryRecursive {
|
|
||||||
callPackage = path: overrides: import path;
|
|
||||||
directory = ./overlays;
|
|
||||||
};
|
|
||||||
|
|
||||||
legacyPackages = forEachSystem (
|
|
||||||
system:
|
|
||||||
lib.packagesFromDirectoryRecursive {
|
|
||||||
callPackage = nixpkgs.legacyPackages.${system}.callPackage;
|
|
||||||
directory = ./pkgs;
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
nixosConfigurations = lib.pipe ./hosts [
|
|
||||||
builtins.readDir
|
|
||||||
(lib.filterAttrs (name: value: value == "directory"))
|
|
||||||
(lib.mapAttrs (
|
|
||||||
name: value:
|
|
||||||
lib.nixosSystem {
|
|
||||||
specialArgs = { inherit inputs; };
|
|
||||||
|
|
||||||
modules = [
|
|
||||||
{
|
|
||||||
networking = {
|
|
||||||
inherit domain;
|
|
||||||
hostName = name;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
./hosts/${name}
|
|
||||||
];
|
|
||||||
}
|
|
||||||
))
|
|
||||||
];
|
];
|
||||||
|
|
||||||
checks =
|
perSystem =
|
||||||
builtins.mapAttrs (system: deployLib: deployLib.deployChecks self.deploy) inputs.deploy-rs.lib
|
{ pkgs, ... }:
|
||||||
// (forEachSystem (system: {
|
{
|
||||||
pre-commit-check = inputs.pre-commit-hooks.lib.${system}.run {
|
formatter = pkgs.nixfmt-rfc-style;
|
||||||
src = ./.;
|
|
||||||
hooks = {
|
legacyPackages = pkgs.lib.packagesFromDirectoryRecursive {
|
||||||
check-case-conflicts.enable = true;
|
callPackage = pkgs.callPackage;
|
||||||
check-executables-have-shebangs.enable = true;
|
directory = ./pkgs;
|
||||||
check-merge-conflicts.enable = true;
|
|
||||||
deadnix = {
|
|
||||||
enable = true;
|
|
||||||
settings = {
|
|
||||||
noLambdaArg = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
detect-private-keys.enable = true;
|
|
||||||
end-of-file-fixer.enable = true;
|
|
||||||
fix-byte-order-marker.enable = true;
|
|
||||||
mixed-line-endings.enable = true;
|
|
||||||
nixfmt-rfc-style.enable = true;
|
|
||||||
trim-trailing-whitespace.enable = true;
|
|
||||||
};
|
|
||||||
excludes = [ "pkgs/libcamera-rpi/libcamera-rpi-ipa-priv-key.pem" ];
|
|
||||||
};
|
};
|
||||||
}));
|
|
||||||
|
|
||||||
formatter = forEachSystem (system: nixpkgs.legacyPackages.${system}.nixfmt-rfc-style);
|
pre-commit = {
|
||||||
|
settings = {
|
||||||
devShells = forEachSystem (system: {
|
excludes = [ "pkgs/libcamera-rpi/libcamera-rpi-ipa-priv-key.pem" ];
|
||||||
default = nixpkgs.legacyPackages.${system}.mkShell {
|
hooks = {
|
||||||
inherit (self.checks.${system}.pre-commit-check) shellHook;
|
check-case-conflicts.enable = true;
|
||||||
buildInputs = [
|
check-executables-have-shebangs.enable = true;
|
||||||
inputs.agenix.packages.${system}.agenix
|
check-merge-conflicts.enable = true;
|
||||||
inputs.deploy-rs.packages.${system}.deploy-rs
|
deadnix = {
|
||||||
]
|
enable = true;
|
||||||
++ self.checks.${system}.pre-commit-check.enabledPackages;
|
settings = {
|
||||||
|
noLambdaArg = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
detect-private-keys.enable = true;
|
||||||
|
end-of-file-fixer.enable = true;
|
||||||
|
fix-byte-order-marker.enable = true;
|
||||||
|
mixed-line-endings.enable = true;
|
||||||
|
nixfmt-rfc-style.enable = true;
|
||||||
|
trim-trailing-whitespace.enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
});
|
|
||||||
|
|
||||||
deploy = {
|
|
||||||
magicRollback = true;
|
|
||||||
autoRollback = true;
|
|
||||||
sshUser = "root";
|
|
||||||
nodes = lib.genAttrs [
|
|
||||||
"artemis"
|
|
||||||
"mail"
|
|
||||||
"pi"
|
|
||||||
"skycam"
|
|
||||||
"vps1"
|
|
||||||
"vps2"
|
|
||||||
] mkDeployNode;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
60
nix/hosts.nix
Normal file
60
nix/hosts.nix
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
{
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
{
|
||||||
|
flake =
|
||||||
|
{ config, lib, ... }:
|
||||||
|
let
|
||||||
|
domain = "mesh.vimium.net";
|
||||||
|
mkDeployNode = hostName: {
|
||||||
|
hostname = "${hostName}.${domain}";
|
||||||
|
|
||||||
|
profiles.system = {
|
||||||
|
user = "root";
|
||||||
|
path =
|
||||||
|
inputs.deploy-rs.lib.${
|
||||||
|
config.nixosConfigurations.${hostName}.config.system.build.toplevel.system
|
||||||
|
}.activate.nixos
|
||||||
|
config.nixosConfigurations.${hostName};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
nixosConfigurations = lib.pipe ../hosts [
|
||||||
|
builtins.readDir
|
||||||
|
(lib.filterAttrs (name: value: value == "directory"))
|
||||||
|
(lib.mapAttrs (
|
||||||
|
name: value:
|
||||||
|
inputs.nixpkgs.lib.nixosSystem {
|
||||||
|
specialArgs = { inherit inputs; };
|
||||||
|
|
||||||
|
modules = [
|
||||||
|
{
|
||||||
|
networking = {
|
||||||
|
inherit domain;
|
||||||
|
hostName = name;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
../hosts/${name}
|
||||||
|
];
|
||||||
|
}
|
||||||
|
))
|
||||||
|
];
|
||||||
|
|
||||||
|
deploy = {
|
||||||
|
magicRollback = true;
|
||||||
|
autoRollback = true;
|
||||||
|
sshUser = "root";
|
||||||
|
nodes = lib.genAttrs [
|
||||||
|
"artemis"
|
||||||
|
"mail"
|
||||||
|
"pi"
|
||||||
|
"skycam"
|
||||||
|
"vps1"
|
||||||
|
"vps2"
|
||||||
|
] mkDeployNode;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Reference in New Issue
Block a user