flake: more work on multi-input design
This commit is contained in:
parent
270110e72d
commit
9c278a7ece
12
.envrc
12
.envrc
@ -6,12 +6,12 @@ now="$(date +%Y-%m-%d)"
|
||||
if ! test -s .direnv/pull-date || test "$now" != "$(cat .direnv/pull-date)"; then
|
||||
git checkout -- flake.lock
|
||||
git pull --rebase --autostash
|
||||
nix flake lock \
|
||||
--update-input nixpkgs \
|
||||
--update-input unstable \
|
||||
--update-input home-manager \
|
||||
--update-input nixos-hardware \
|
||||
--update-input pbsds-papers
|
||||
nix flake update
|
||||
#nix flake lock \
|
||||
# --update-input nixpkgs \
|
||||
# --update-input unstable \
|
||||
# --update-input home-manager \
|
||||
# --update-input nixos-hardware
|
||||
echo "$now" > .direnv/pull-date
|
||||
fi
|
||||
|
||||
|
255
flake.lock
generated
255
flake.lock
generated
@ -1,18 +1,18 @@
|
||||
{
|
||||
"nodes": {
|
||||
"flake-programs-sqlite": {
|
||||
"flake-programs-sqlite-2311": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
"nixpkgs-2311"
|
||||
],
|
||||
"utils": "utils"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1695855796,
|
||||
"narHash": "sha256-39vkvaNUy+3pCGbffG1Iduf4SPuVTs64IJeHYEQpvI4=",
|
||||
"lastModified": 1704884609,
|
||||
"narHash": "sha256-ZSM15G7ZxVenkBJh5QJ2z6urSICwlBbl/aLeGEmULFo=",
|
||||
"owner": "wamserma",
|
||||
"repo": "flake-programs-sqlite",
|
||||
"rev": "95a8986f1c9567d9cc7ac6f6020a275bb7de76d0",
|
||||
"rev": "37931f98fab3d8f2417485f524d4af3593896ead",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -21,25 +21,10 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils": {
|
||||
"locked": {
|
||||
"lastModified": 1659877975,
|
||||
"narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"home-manager": {
|
||||
"home-manager-2305": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
"nixpkgs-2305"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
@ -64,11 +49,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1702195709,
|
||||
"narHash": "sha256-+zRjWkm5rKqQ57PuLZ3JF3xi3vPMiOJzItb1m/43Cq4=",
|
||||
"lastModified": 1704099619,
|
||||
"narHash": "sha256-QRVMkdxLmv+aKGjcgeEg31xtJEIsYq4i1Kbyw5EPS6g=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "6761b8188b860f374b457eddfdb05c82eef9752f",
|
||||
"rev": "7e398b3d76bc1503171b1364c9d4a07ac06f3851",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -78,52 +63,24 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"katex-15": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"narHash": "sha256-Wb6EZ6zWBw3zEhO4d2mRHFzAbCn28zhS+S59kEPY9gA=",
|
||||
"type": "tarball",
|
||||
"url": "https://github.com/KaTeX/KaTeX/releases/download/v0.15.1/katex.tar.gz"
|
||||
},
|
||||
"original": {
|
||||
"type": "tarball",
|
||||
"url": "https://github.com/KaTeX/KaTeX/releases/download/v0.15.1/katex.tar.gz"
|
||||
}
|
||||
},
|
||||
"nix-filter": {
|
||||
"locked": {
|
||||
"lastModified": 1681154353,
|
||||
"narHash": "sha256-MCJ5FHOlbfQRFwN0brqPbCunLEVw05D/3sRVoNVt2tI=",
|
||||
"owner": "numtide",
|
||||
"repo": "nix-filter",
|
||||
"rev": "f529f42792ade8e32c4be274af6b6d60857fbee7",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "nix-filter",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixGL": {
|
||||
"home-manager-unstable": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils",
|
||||
"nixpkgs": [
|
||||
"pbsds-papers",
|
||||
"nixpkgs"
|
||||
"nixpkgs-unstable"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1685908677,
|
||||
"narHash": "sha256-E4zUPEUFyVWjVm45zICaHRpfGepfkE9Z2OECV9HXfA4=",
|
||||
"owner": "guibou",
|
||||
"repo": "nixGL",
|
||||
"rev": "489d6b095ab9d289fe11af0219a9ff00fe87c7c5",
|
||||
"lastModified": 1704809957,
|
||||
"narHash": "sha256-Z8sBeoeeY2O+BNqh5C+4Z1h1F1wQ2mij7yPZ2GY397M=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "e13aa9e287b3365473e5897e3667ea80a899cdfb",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "guibou",
|
||||
"repo": "nixGL",
|
||||
"owner": "nix-community",
|
||||
"ref": "master",
|
||||
"repo": "home-manager",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
@ -142,19 +99,19 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixos-generators": {
|
||||
"nixos-generators-2311": {
|
||||
"inputs": {
|
||||
"nixlib": "nixlib",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
"nixpkgs-2311"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1696058303,
|
||||
"narHash": "sha256-eNqKWpF5zG0SrgbbtljFOrRgFgRzCc4++TMFADBMLnc=",
|
||||
"lastModified": 1701689616,
|
||||
"narHash": "sha256-ewnfgvRy73HoP5KnYmy1Rcr4m4yShvsb6TCCaKoW8pc=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nixos-generators",
|
||||
"rev": "150f38bd1e09e20987feacb1b0d5991357532fb5",
|
||||
"rev": "246219bc21b943c6f6812bb7744218ba0df08600",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -178,7 +135,7 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"nixpkgs-2305": {
|
||||
"locked": {
|
||||
"lastModified": 1704290814,
|
||||
"narHash": "sha256-LWvKHp7kGxk/GEtlrGYV68qIvPHkU9iToomNFGagixU=",
|
||||
@ -194,45 +151,13 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs-2211": {
|
||||
"locked": {
|
||||
"lastModified": 1688392541,
|
||||
"narHash": "sha256-lHrKvEkCPTUO+7tPfjIcb7Trk6k31rz18vkyqmkeJfY=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "ea4c80b39be4c09702b0cb3b42eab59e2ba4f24b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-22.11",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs-2311": {
|
||||
"locked": {
|
||||
"lastModified": 1701952659,
|
||||
"narHash": "sha256-TJv2srXt6fYPUjxgLAL0cy4nuf1OZD4KuA1TrCiQqg0=",
|
||||
"lastModified": 1704732714,
|
||||
"narHash": "sha256-ABqK/HggMYA/jMUXgYyqVAcQ8QjeMyr1jcXfTpSHmps=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "b4372c4924d9182034066c823df76d6eaf1f4ec4",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-23.11",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs-2311_2": {
|
||||
"locked": {
|
||||
"lastModified": 1704295289,
|
||||
"narHash": "sha256-9WZDRfpMqCYL6g/HNWVvXF0hxdaAgwgIGeLYiOhmes8=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "b0b2c5445c64191fd8d0b31f2b1a34e45a64547d",
|
||||
"rev": "6723fa4e4f1a30d42a633bef5eb01caeb281adc3",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -244,11 +169,11 @@
|
||||
},
|
||||
"nixpkgs-stable": {
|
||||
"locked": {
|
||||
"lastModified": 1696717752,
|
||||
"narHash": "sha256-qEq1styCyQHSrw7AOhskH2qwCFx93bOwsGEzUIrZC0g=",
|
||||
"lastModified": 1704290814,
|
||||
"narHash": "sha256-LWvKHp7kGxk/GEtlrGYV68qIvPHkU9iToomNFGagixU=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "2f3b6b3fcd9fa0a4e6b544180c058a70890a7cc1",
|
||||
"rev": "70bdadeb94ffc8806c0570eb5c2695ad29f0e421",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -260,11 +185,11 @@
|
||||
},
|
||||
"nixpkgs-stable_2": {
|
||||
"locked": {
|
||||
"lastModified": 1702148972,
|
||||
"narHash": "sha256-h2jODFP6n+ABrUWcGRSVPRFfLOkM9TJ2pO+h+9JcaL0=",
|
||||
"lastModified": 1704290814,
|
||||
"narHash": "sha256-LWvKHp7kGxk/GEtlrGYV68qIvPHkU9iToomNFGagixU=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "b8f33c044e51de6dde3ad80a9676945e0e4e3227",
|
||||
"rev": "70bdadeb94ffc8806c0570eb5c2695ad29f0e421",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -274,74 +199,67 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"nixpkgs-stable_3": {
|
||||
"locked": {
|
||||
"lastModified": 1704161960,
|
||||
"narHash": "sha256-QGua89Pmq+FBAro8NriTuoO/wNaUtugt29/qqA8zeeM=",
|
||||
"lastModified": 1704290814,
|
||||
"narHash": "sha256-LWvKHp7kGxk/GEtlrGYV68qIvPHkU9iToomNFGagixU=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "63143ac2c9186be6d9da6035fa22620018c85932",
|
||||
"rev": "70bdadeb94ffc8806c0570eb5c2695ad29f0e421",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixpkgs-unstable",
|
||||
"ref": "release-23.05",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"pbsds-papers": {
|
||||
"inputs": {
|
||||
"katex-15": "katex-15",
|
||||
"nix-filter": "nix-filter",
|
||||
"nixGL": "nixGL",
|
||||
"nixpkgs": "nixpkgs_2",
|
||||
"nixpkgs-2211": "nixpkgs-2211",
|
||||
"nixpkgs-2311": "nixpkgs-2311_2",
|
||||
"typst-packages": "typst-packages"
|
||||
},
|
||||
"nixpkgs-unstable": {
|
||||
"locked": {
|
||||
"lastModified": 1704476458,
|
||||
"narHash": "sha256-NALr/WW7RQZwRVyzpi93V146u3EdJdmlzup2iz9J3Qg=",
|
||||
"ref": "refs/heads/main",
|
||||
"rev": "d9e14d0928f84d14fffe0ab518b9078a0cf2c136",
|
||||
"revCount": 460,
|
||||
"type": "git",
|
||||
"url": "ssh://git@github.com/pbsds/papers.git"
|
||||
"lastModified": 1704722960,
|
||||
"narHash": "sha256-mKGJ3sPsT6//s+Knglai5YflJUF2DGj7Ai6Ynopz0kI=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "317484b1ead87b9c1b8ac5261a8d2dd748a0492d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"type": "git",
|
||||
"url": "ssh://git@github.com/pbsds/papers.git"
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"flake-programs-sqlite": "flake-programs-sqlite",
|
||||
"home-manager": "home-manager",
|
||||
"flake-programs-sqlite-2311": "flake-programs-sqlite-2311",
|
||||
"home-manager-2305": "home-manager-2305",
|
||||
"home-manager-2311": "home-manager-2311",
|
||||
"nixos-generators": "nixos-generators",
|
||||
"home-manager-unstable": "home-manager-unstable",
|
||||
"nixos-generators-2311": "nixos-generators-2311",
|
||||
"nixos-hardware": "nixos-hardware",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"nixpkgs-2305": "nixpkgs-2305",
|
||||
"nixpkgs-2311": "nixpkgs-2311",
|
||||
"pbsds-papers": "pbsds-papers",
|
||||
"sops-nix": "sops-nix",
|
||||
"nixpkgs-unstable": "nixpkgs-unstable",
|
||||
"sops-nix-2305": "sops-nix-2305",
|
||||
"sops-nix-2311": "sops-nix-2311",
|
||||
"unstable": "unstable"
|
||||
"sops-nix-unstable": "sops-nix-unstable"
|
||||
}
|
||||
},
|
||||
"sops-nix": {
|
||||
"sops-nix-2305": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
"nixpkgs-2305"
|
||||
],
|
||||
"nixpkgs-stable": "nixpkgs-stable"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1697321388,
|
||||
"narHash": "sha256-3TdXq13fSYIj3BGo320vuGFjDQUJPQUrhXJ5jaMk7lo=",
|
||||
"lastModified": 1704908274,
|
||||
"narHash": "sha256-74W9Yyomv3COGRmKi8zvyA5tL2KLiVkBeaYmYLjXyOw=",
|
||||
"owner": "Mic92",
|
||||
"repo": "sops-nix",
|
||||
"rev": "7711514b8543891eea6ae84392c74a379c5010de",
|
||||
"rev": "c0b3a5af90fae3ba95645bbf85d2b64880addd76",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -358,11 +276,11 @@
|
||||
"nixpkgs-stable": "nixpkgs-stable_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1702177193,
|
||||
"narHash": "sha256-J2409SyXROoUHYXVy9h4Pj0VU8ReLuy/mzBc9iK4DBg=",
|
||||
"lastModified": 1704908274,
|
||||
"narHash": "sha256-74W9Yyomv3COGRmKi8zvyA5tL2KLiVkBeaYmYLjXyOw=",
|
||||
"owner": "Mic92",
|
||||
"repo": "sops-nix",
|
||||
"rev": "d806e546f96c88cd9f7d91c1c19ebc99ba6277d9",
|
||||
"rev": "c0b3a5af90fae3ba95645bbf85d2b64880addd76",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -371,35 +289,24 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"typst-packages": {
|
||||
"flake": false,
|
||||
"sops-nix-unstable": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs-unstable"
|
||||
],
|
||||
"nixpkgs-stable": "nixpkgs-stable_3"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1704289676,
|
||||
"narHash": "sha256-XSIMxPlyjXTetNvAiZq3Cdqhac++WMjc7DoJybNuofM=",
|
||||
"owner": "typst",
|
||||
"repo": "packages",
|
||||
"rev": "78a618a0a6f46103fcaa2673c8af3963f9d1d4e5",
|
||||
"lastModified": 1704908274,
|
||||
"narHash": "sha256-74W9Yyomv3COGRmKi8zvyA5tL2KLiVkBeaYmYLjXyOw=",
|
||||
"owner": "Mic92",
|
||||
"repo": "sops-nix",
|
||||
"rev": "c0b3a5af90fae3ba95645bbf85d2b64880addd76",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "typst",
|
||||
"repo": "packages",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"unstable": {
|
||||
"locked": {
|
||||
"lastModified": 1704722960,
|
||||
"narHash": "sha256-mKGJ3sPsT6//s+Knglai5YflJUF2DGj7Ai6Ynopz0kI=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "317484b1ead87b9c1b8ac5261a8d2dd748a0492d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"owner": "Mic92",
|
||||
"repo": "sops-nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
|
116
flake.nix
116
flake.nix
@ -2,33 +2,36 @@
|
||||
description = "pbsds' system/home flake";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.05";
|
||||
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
nixpkgs-2311.url = "github:NixOS/nixpkgs/nixos-23.11"; # gnome plugins broken
|
||||
|
||||
unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
nixpkgs-2305.url = "github:NixOS/nixpkgs/nixos-23.05";
|
||||
|
||||
# https://github.com/nix-community/home-manager
|
||||
home-manager.url = "github:nix-community/home-manager/release-23.05";
|
||||
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||||
home-manager-unstable.url = "github:nix-community/home-manager/master";
|
||||
home-manager-unstable.inputs.nixpkgs.follows = "nixpkgs-unstable";
|
||||
home-manager-2311.url = "github:nix-community/home-manager/release-23.11";
|
||||
home-manager-2311.inputs.nixpkgs.follows = "nixpkgs-2311";
|
||||
home-manager-2305.url = "github:nix-community/home-manager/release-23.05";
|
||||
home-manager-2305.inputs.nixpkgs.follows = "nixpkgs-2305";
|
||||
|
||||
# https://github.com/NixOS/nixos-hardware
|
||||
nixos-hardware.url = "github:NixOS/nixos-hardware";
|
||||
|
||||
# https://github.com/wamserma/flake-programs-sqlite
|
||||
flake-programs-sqlite.url = "github:wamserma/flake-programs-sqlite";
|
||||
flake-programs-sqlite.inputs.nixpkgs.follows = "nixpkgs";
|
||||
flake-programs-sqlite-2311.url = "github:wamserma/flake-programs-sqlite";
|
||||
flake-programs-sqlite-2311.inputs.nixpkgs.follows = "nixpkgs-2311";
|
||||
|
||||
# https://github.com/nix-community/nixos-generators
|
||||
nixos-generators.url = "github:nix-community/nixos-generators";
|
||||
nixos-generators.inputs.nixpkgs.follows = "nixpkgs";
|
||||
nixos-generators-2311.url = "github:nix-community/nixos-generators";
|
||||
nixos-generators-2311.inputs.nixpkgs.follows = "nixpkgs-2311";
|
||||
|
||||
# https://github.com/Mic92/sops-nix
|
||||
sops-nix.url = "github:Mic92/sops-nix";
|
||||
sops-nix.inputs.nixpkgs.follows = "nixpkgs";
|
||||
sops-nix-unstable.url = "github:Mic92/sops-nix";
|
||||
sops-nix-unstable.inputs.nixpkgs.follows = "nixpkgs-unstable";
|
||||
sops-nix-2311.url = "github:Mic92/sops-nix";
|
||||
sops-nix-2311.inputs.nixpkgs.follows = "nixpkgs-2311";
|
||||
sops-nix-2305.url = "github:Mic92/sops-nix";
|
||||
sops-nix-2305.inputs.nixpkgs.follows = "nixpkgs-2305";
|
||||
|
||||
/** /
|
||||
matrix-next.url = "github:dali99/nixos-matrix-modules"; # see https://git.pvv.ntnu.no/Drift/pvv-nixos-config/src/main/flake.nix
|
||||
@ -48,7 +51,7 @@
|
||||
nixpkgs-19.flake = false; # Earlier versions are not flake-pure
|
||||
/**/
|
||||
|
||||
pbsds-papers.url = "git+ssh://git@github.com/pbsds/papers.git";
|
||||
#pbsds-papers.url = "git+ssh://git@github.com/pbsds/papers.git";
|
||||
};
|
||||
|
||||
nixConfig.extra-substituters = [
|
||||
@ -68,26 +71,31 @@
|
||||
|
||||
outputs = {
|
||||
self,
|
||||
#nixpkgs,
|
||||
#unstable,
|
||||
nixos-hardware,
|
||||
nixos-generators,
|
||||
#home-manager,
|
||||
sops-nix,
|
||||
#flake-programs-sqlite,
|
||||
nixos-generators-2311,
|
||||
...
|
||||
} @ inputs:
|
||||
} @ inputs':
|
||||
let
|
||||
inputs-2305 = inputs // {
|
||||
unstable = inputs.nixpkgs-2311;
|
||||
inputs-edge = inputs' // {
|
||||
nixpkgs = inputs'.nixpkgs-unstable;
|
||||
unstable = inputs'.nixpkgs-unstable;
|
||||
home-manager = inputs'.home-manager-unstable;
|
||||
sops-nix = inputs'.sops-nix-unstable;
|
||||
};
|
||||
inputs-2311 = inputs // {
|
||||
nixpkgs = inputs.nixpkgs-2311;
|
||||
home-manager = inputs.home-manager-2311;
|
||||
sops-nix = inputs.sops-nix-2311;
|
||||
inputs-2311 = inputs' // {
|
||||
nixpkgs = inputs'.nixpkgs-2311;
|
||||
unstable = inputs'.nixpkgs-unstable;
|
||||
home-manager = inputs'.home-manager-2311;
|
||||
sops-nix = inputs'.sops-nix-2311;
|
||||
};
|
||||
inputs-2305 = inputs' // {
|
||||
nixpkgs = inputs'.nixpkgs-2305;
|
||||
unstable = inputs'.nixpkgs-2311;
|
||||
home-manager = inputs'.home-manager-2305;
|
||||
sops-nix = inputs'.sops-nix-2305;
|
||||
};
|
||||
|
||||
flake = inputs: system: inputs.nixpkgs.lib.mapAttrs (name: flake: {
|
||||
mkFlakeView = inputs: system: inputs.nixpkgs.lib.mapAttrs (name: flake: {
|
||||
# TODO filter non-flake inputs
|
||||
nixos = flake.nixosModules
|
||||
or null;
|
||||
@ -98,11 +106,13 @@
|
||||
or flake.lib
|
||||
or null;
|
||||
}) inputs;
|
||||
forSystems = systems: f: inputs.nixpkgs.lib.genAttrs systems (system: f rec {
|
||||
|
||||
forSystems = systems: f: inputs-edge.nixpkgs.lib.genAttrs systems (system: f rec {
|
||||
inherit system;
|
||||
inputs = inputs-edge;
|
||||
pkgs = inputs.nixpkgs.legacyPackages.${system};
|
||||
lib = inputs.nixpkgs.legacyPackages.${system}.lib;
|
||||
flakes = flake inputs system;
|
||||
flakes = mkFlakeView inputs system;
|
||||
});
|
||||
forAllSystems = forSystems [
|
||||
"x86_64-linux"
|
||||
@ -115,7 +125,7 @@
|
||||
/** /
|
||||
_module.args = lib.mkFinal {
|
||||
inherit inputs;
|
||||
flakes = flake inputs system;
|
||||
flakes = mkFlakeView inputs system;
|
||||
};
|
||||
/**/
|
||||
imports = [
|
||||
@ -124,7 +134,7 @@
|
||||
inputs.sops-nix.nixosModules.sops
|
||||
inputs.home-manager.nixosModule
|
||||
] ++ modules;
|
||||
#++ flake-programs-sqlite.nixosModules.programs-sqlite; # TODO: make work
|
||||
#++ inputs.flake-programs-sqlite.nixosModules.programs-sqlite; # TODO: make work
|
||||
|
||||
sops = {
|
||||
defaultSopsFile = lib.mkIf (builtins.pathExists ./secrets/${hostname}.yaml)
|
||||
@ -137,10 +147,10 @@
|
||||
home-manager.useGlobalPkgs = true; # go brrr, reuse overrides
|
||||
home-manager.extraSpecialArgs = {
|
||||
inherit inputs;
|
||||
flakes = flake inputs system;
|
||||
flakes = mkFlakeView inputs system;
|
||||
};
|
||||
home-manager.sharedModules = [
|
||||
sops-nix.homeManagerModules.sops
|
||||
inputs.sops-nix.homeManagerModules.sops
|
||||
];
|
||||
|
||||
# still needed even if using networkd
|
||||
@ -157,11 +167,18 @@
|
||||
# and 'nix-shell -p hello' use the same channel as system was built with
|
||||
nix.registry.nixpkgs.flake = inputs.nixpkgs;
|
||||
nix.registry.nixpkgs-unstable.flake = inputs.unstable;
|
||||
#nix.registry.nixpkgs-unstable.flake.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
nix.registry.nixpkgs-git = {
|
||||
from.id = "nixpkgs";
|
||||
from.type = "indirect";
|
||||
to.type = "github";
|
||||
to.owner = "NixOS";
|
||||
to.repo = "nixpkgs";
|
||||
to.ref = "nixpkgs-unstable-small";
|
||||
};
|
||||
nix.nixPath = [
|
||||
"nixpkgs=${inputs.nixpkgs}"
|
||||
"nixpkgs-unstable=${inputs.unstable}"
|
||||
#"nixpkgs-unstable=github:NixOS/nixpkgs/nixos-unstable"
|
||||
"nixpkgs-git=github:NixOS/nixpkgs/nixos-unstable-small"
|
||||
];
|
||||
});
|
||||
mkConfig = hostname: domain: system: inputs: modules: inputs.nixpkgs.lib.nixosSystem {
|
||||
@ -175,7 +192,7 @@
|
||||
mkHosts = mk: with nixos-hardware.nixosModules; {
|
||||
# TODO: move nixos-hardware imports to the nixos configs?
|
||||
noximilien = mk "noximilien" "pbsds.net" "x86_64-linux" inputs-2311 [ common-pc common-pc-ssd common-cpu-intel ];
|
||||
brumlebasse = mk "brumlebasse" "pbsds.net" "x86_64-linux" inputs-2305 [ common-pc common-pc-ssd common-cpu-amd ];
|
||||
brumlebasse = mk "brumlebasse" "pbsds.net" "x86_64-linux" inputs-2311 [ common-pc common-pc-ssd common-cpu-amd ];
|
||||
nord = mk "nord" "pbsds.net" "x86_64-linux" inputs-2305 [ common-pc common-pc-ssd common-cpu-intel-cpu-only common-cpu-intel-sandy-bridge common-gpu-amd common-hidpi ];
|
||||
sopp = mk "sopp" "pbsds.net" "x86_64-linux" inputs-2305 [ common-pc common-pc-ssd common-cpu-intel common-gpu-nvidia-nonprime ];
|
||||
bolle = mk "bolle" "pbsds.net" "x86_64-linux" inputs-2311 [ common-pc common-pc-ssd common-cpu-intel ];
|
||||
@ -185,19 +202,21 @@
|
||||
#bergjlot snortheimsmoen ditlefsen skrukkerud podebusk zmaragd makrell alfnes blix urke eple hasselknippe pytte uddu imdorf rosenqvist
|
||||
};
|
||||
in {
|
||||
inherit inputs;
|
||||
inherit inputs-2311;
|
||||
inputs = inputs';
|
||||
|
||||
lib = {
|
||||
inherit flake forSystems;
|
||||
} // forAllSystems ({ ... }: {
|
||||
inherit flake forSystems;
|
||||
inherit mkFlakeView forSystems;
|
||||
} // forAllSystems ({ system, ... }: {
|
||||
inherit mkFlakeView forSystems;
|
||||
flakes = mkFlakeView inputs-edge system;
|
||||
flakes-2311 = mkFlakeView inputs-2311 system;
|
||||
flakes-2305 = mkFlakeView inputs-2305 system;
|
||||
});
|
||||
|
||||
nixosModules = mkHosts mkModule;
|
||||
nixosConfigurations = mkHosts mkConfig;
|
||||
|
||||
packages = forAllSystems ({ pkgs, flakes, ... }: {
|
||||
packages = forAllSystems ({ inputs, pkgs, flakes, ... }: {
|
||||
mpv-webm = pkgs.callPackage ./pkgs/mpv-webm.nix {}; # TODO: https://github.com/NixOS/nixpkgs/pull/238659, remove when i switch to 23.11
|
||||
|
||||
nixos-rebuild-nom = with pkgs; writeScriptBin "nixos-rebuild" ''
|
||||
@ -205,7 +224,7 @@
|
||||
'';
|
||||
|
||||
# nixos-generators images
|
||||
image-brumlebasse-openstack = nixos-generators.nixosGenerate {
|
||||
image-brumlebasse-openstack = nixos-generators-2311.nixosGenerate {
|
||||
system = "x86_64-linux";
|
||||
specialArgs = { inherit inputs flakes; };
|
||||
modules = [ (mkHosts mkModule).brumlebasse ];
|
||||
@ -214,13 +233,13 @@
|
||||
});
|
||||
|
||||
homeConfigurations = forAllSystems ({ pkgs, flakes, ... }: let
|
||||
mkHome = user: home: modules: inputs.home-manager.lib.homeManagerConfiguration {
|
||||
mkHome = user: home: inputs: modules: inputs.home-manager.lib.homeManagerConfiguration {
|
||||
inherit pkgs;
|
||||
modules = modules ++ [{
|
||||
home.username = user;
|
||||
home.homeDirectory = home;
|
||||
home-manager.sharedModules = [
|
||||
sops-nix.homeManagerModules.sops
|
||||
inputs.sops-nix.homeManagerModules.sops
|
||||
];
|
||||
}];
|
||||
extraSpecialArgs = {
|
||||
@ -228,8 +247,13 @@
|
||||
};
|
||||
};
|
||||
in {
|
||||
pbsds = mkHome "pbsds" "/home/pbsds" [ ./users/pbsds/home ];
|
||||
pbsds-gnome = mkHome "pbsds" "/home/pbsds" [ ./users/pbsds/home/gnome.nix ];
|
||||
# TODO: pvv
|
||||
pbsds-2305 = mkHome "pbsds" "/home/pbsds" inputs-2305 [ ./users/pbsds/home ];
|
||||
pbsds-2311 = mkHome "pbsds" "/home/pbsds" inputs-2311 [ ./users/pbsds/home ];
|
||||
pbsds = mkHome "pbsds" "/home/pbsds" inputs-edge [ ./users/pbsds/home ];
|
||||
pbsds-gnome-2305 = mkHome "pbsds" "/home/pbsds" inputs-2305 [ ./users/pbsds/home/gnome.nix ];
|
||||
pbsds-gnome-2311 = mkHome "pbsds" "/home/pbsds" inputs-2311 [ ./users/pbsds/home/gnome.nix ];
|
||||
pbsds-gnome = mkHome "pbsds" "/home/pbsds" inputs-edge [ ./users/pbsds/home/gnome.nix ];
|
||||
});
|
||||
|
||||
devShells = forAllSystems ({ pkgs, flakes, ... }: let
|
||||
|
Loading…
Reference in New Issue
Block a user