flake: rewrite to use flake-parts

This commit is contained in:
Infinidoge 2023-07-28 15:30:10 -04:00
parent 728a071b52
commit 50debb5dec
21 changed files with 445 additions and 760 deletions

448
flake.lock generated
View file

@ -4,10 +4,10 @@
"inputs": { "inputs": {
"darwin": "darwin", "darwin": "darwin",
"home-manager": [ "home-manager": [
"home" "home-manager"
], ],
"nixpkgs": [ "nixpkgs": [
"nixos" "nixpkgs"
] ]
}, },
"locked": { "locked": {
@ -45,70 +45,10 @@
"type": "github" "type": "github"
} }
}, },
"beautysh": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs",
"poetry2nix": "poetry2nix"
},
"locked": {
"lastModified": 1641830469,
"narHash": "sha256-uhDmgNP/biOWe4FtOa6c2xZnREH+NP9rdrMm0LccRUk=",
"owner": "lovesegfault",
"repo": "beautysh",
"rev": "e85d9736927c0fcf2abb05cb3a2d8d9b4502a2eb",
"type": "github"
},
"original": {
"owner": "lovesegfault",
"repo": "beautysh",
"type": "github"
}
},
"blank": {
"locked": {
"lastModified": 1625557891,
"narHash": "sha256-O8/MWsPBGhhyPoPLHZAuoZiiHo9q6FLlEeIDEXuj6T4=",
"owner": "divnix",
"repo": "blank",
"rev": "5a5d2684073d9f563072ed07c871d577a6c614a8",
"type": "github"
},
"original": {
"owner": "divnix",
"repo": "blank",
"type": "github"
}
},
"bud": {
"inputs": {
"beautysh": "beautysh",
"devshell": [
"digga",
"devshell"
],
"nixpkgs": [
"nixos"
]
},
"locked": {
"lastModified": 1654190822,
"narHash": "sha256-B8z3stYaULNDBBjzJHrFHGgiJHrLqhBkxH+9u5iBP7E=",
"owner": "divnix",
"repo": "bud",
"rev": "0ff3e4e4b8791ea4d827bf5bfcac28cef060f209",
"type": "github"
},
"original": {
"owner": "divnix",
"repo": "bud",
"type": "github"
}
},
"crane": { "crane": {
"inputs": { "inputs": {
"flake-compat": "flake-compat_4", "flake-compat": "flake-compat_3",
"flake-utils": "flake-utils_8", "flake-utils": "flake-utils_4",
"nixpkgs": [ "nixpkgs": [
"universe-cli", "universe-cli",
"nixpkgs" "nixpkgs"
@ -153,18 +93,15 @@
}, },
"devshell": { "devshell": {
"inputs": { "inputs": {
"flake-utils": "flake-utils_2", "nixpkgs": "nixpkgs",
"nixpkgs": [ "systems": "systems"
"digga",
"nixpkgs"
]
}, },
"locked": { "locked": {
"lastModified": 1671489820, "lastModified": 1688380630,
"narHash": "sha256-qoei5HDJ8psd1YUPD7DhbHdhLIT9L2nadscp4Qk37uk=", "narHash": "sha256-8ilApWVb1mAi4439zS3iFeIT0ODlbrifm/fegWwgHjA=",
"owner": "numtide", "owner": "numtide",
"repo": "devshell", "repo": "devshell",
"rev": "5aa3a8039c68b4bf869327446590f4cdf90bb634", "rev": "f9238ec3d75cefbb2b42a44948c4e8fb1ae9a205",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -195,46 +132,9 @@
"type": "github" "type": "github"
} }
}, },
"digga": {
"inputs": {
"darwin": [
"blank"
],
"deploy": [
"blank"
],
"devshell": "devshell",
"flake-compat": "flake-compat",
"flake-utils": "flake-utils_3",
"flake-utils-plus": "flake-utils-plus",
"home-manager": [
"home"
],
"nixlib": [
"nixos"
],
"nixpkgs": [
"nixos"
],
"nixpkgs-unstable": "nixpkgs-unstable"
},
"locked": {
"lastModified": 1674665318,
"narHash": "sha256-k3soI+AnNz+9WRU64qv23arssUjnYSwXdJXsPEiFu9I=",
"owner": "divnix",
"repo": "digga",
"rev": "0595ae70cdb5ccf1ab031199fe98551c4b378bd9",
"type": "github"
},
"original": {
"owner": "divnix",
"repo": "digga",
"type": "github"
}
},
"emacs-overlay": { "emacs-overlay": {
"inputs": { "inputs": {
"flake-utils": "flake-utils_5", "flake-utils": "flake-utils",
"nixpkgs": "nixpkgs_2" "nixpkgs": "nixpkgs_2"
}, },
"locked": { "locked": {
@ -254,7 +154,7 @@
"fenix": { "fenix": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
"nixos" "nixpkgs"
], ],
"rust-analyzer-src": "rust-analyzer-src" "rust-analyzer-src": "rust-analyzer-src"
}, },
@ -275,11 +175,11 @@
"flake-compat": { "flake-compat": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1668681692, "lastModified": 1673956053,
"narHash": "sha256-Ht91NGdewz8IQLtWZ9LCeNXMSXHUss+9COoqu6JLmXU=", "narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=",
"owner": "edolstra", "owner": "edolstra",
"repo": "flake-compat", "repo": "flake-compat",
"rev": "009399224d5e398d03b22badca40a37ac85412a1", "rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -320,23 +220,27 @@
"type": "github" "type": "github"
} }
}, },
"flake-compat_4": { "flake-parts": {
"flake": false, "inputs": {
"nixpkgs-lib": [
"nixpkgs"
]
},
"locked": { "locked": {
"lastModified": 1673956053, "lastModified": 1688466019,
"narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=", "narHash": "sha256-VeM2akYrBYMsb4W/MmBo1zmaMfgbL4cH3Pu8PGyIwJ0=",
"owner": "edolstra", "owner": "hercules-ci",
"repo": "flake-compat", "repo": "flake-parts",
"rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9", "rev": "8e8d955c22df93dbe24f19ea04f47a74adbdc5ec",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "edolstra", "owner": "hercules-ci",
"repo": "flake-compat", "repo": "flake-parts",
"type": "github" "type": "github"
} }
}, },
"flake-parts": { "flake-parts_2": {
"inputs": { "inputs": {
"nixpkgs-lib": [ "nixpkgs-lib": [
"universe-cli", "universe-cli",
@ -358,88 +262,6 @@
} }
}, },
"flake-utils": { "flake-utils": {
"locked": {
"lastModified": 1631561581,
"narHash": "sha256-3VQMV5zvxaVLvqqUrNz3iJelLw30mIVSfZmAaauM3dA=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "7e5bf3925f6fbdfaf50a2a7ca0be2879c4261d19",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils-plus": {
"inputs": {
"flake-utils": "flake-utils_4"
},
"locked": {
"lastModified": 1683999906,
"narHash": "sha256-LZprVmOTM+3iykh248bajobX9ludnMC/Ai5rOqimtFc=",
"owner": "ravensiris",
"repo": "flake-utils-plus",
"rev": "7a8d789d4d13e45d20e6826d7b2a1757d52f2e13",
"type": "github"
},
"original": {
"owner": "gytis-ivaskevicius",
"ref": "refs/pull/120/head",
"repo": "flake-utils-plus",
"type": "github"
}
},
"flake-utils_2": {
"locked": {
"lastModified": 1642700792,
"narHash": "sha256-XqHrk7hFb+zBvRg6Ghl+AZDq03ov6OshJLiSWOoX5es=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "846b2ae0fc4cc943637d3d1def4454213e203cba",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_3": {
"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"
}
},
"flake-utils_4": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1689068808,
"narHash": "sha256-6ixXo3wt24N/melDWjq70UuHQLxGV8jZvooRanIHXw0=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "919d646de7be200f3bf08cb76ae1f09402b6f9b4",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_5": {
"locked": { "locked": {
"lastModified": 1659877975, "lastModified": 1659877975,
"narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=", "narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=",
@ -454,7 +276,7 @@
"type": "github" "type": "github"
} }
}, },
"flake-utils_6": { "flake-utils_2": {
"inputs": { "inputs": {
"systems": "systems_2" "systems": "systems_2"
}, },
@ -472,7 +294,7 @@
"type": "github" "type": "github"
} }
}, },
"flake-utils_7": { "flake-utils_3": {
"inputs": { "inputs": {
"systems": "systems_3" "systems": "systems_3"
}, },
@ -490,7 +312,7 @@
"type": "github" "type": "github"
} }
}, },
"flake-utils_8": { "flake-utils_4": {
"inputs": { "inputs": {
"systems": "systems_4" "systems": "systems_4"
}, },
@ -508,7 +330,7 @@
"type": "github" "type": "github"
} }
}, },
"flake-utils_9": { "flake-utils_5": {
"inputs": { "inputs": {
"systems": "systems_6" "systems": "systems_6"
}, },
@ -558,6 +380,27 @@
"type": "github" "type": "github"
} }
}, },
"haumea": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1685133229,
"narHash": "sha256-FePm/Gi9PBSNwiDFq3N+DWdfxFq0UKsVVTJS3cQPn94=",
"owner": "nix-community",
"repo": "haumea",
"rev": "34dd58385092a23018748b50f9b23de6266dffc2",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "v0.2.2",
"repo": "haumea",
"type": "github"
}
},
"hlissner-dotfiles": { "hlissner-dotfiles": {
"inputs": { "inputs": {
"agenix": "agenix_2", "agenix": "agenix_2",
@ -565,7 +408,7 @@
"home-manager": "home-manager", "home-manager": "home-manager",
"nixos-hardware": "nixos-hardware", "nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs_3", "nixpkgs": "nixpkgs_3",
"nixpkgs-unstable": "nixpkgs-unstable_2" "nixpkgs-unstable": "nixpkgs-unstable"
}, },
"locked": { "locked": {
"lastModified": 1663596637, "lastModified": 1663596637,
@ -581,26 +424,6 @@
"type": "github" "type": "github"
} }
}, },
"home": {
"inputs": {
"nixpkgs": [
"nixos"
]
},
"locked": {
"lastModified": 1690027126,
"narHash": "sha256-DeUhQQxbu41Qn0uHyNazPBiTJ0lNsf26ThFopWBRRnM=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "76dd6c66190db0d46ac6b3ca816cc17b581df42c",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "home-manager",
"type": "github"
}
},
"home-manager": { "home-manager": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@ -624,6 +447,26 @@
"type": "github" "type": "github"
} }
}, },
"home-manager_2": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1690476848,
"narHash": "sha256-PSmzyuEbMxEn2uwwLYUN2l1psoJXb7jm/kfHD12Sq0k=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "8d243f7da13d6ee32f722a3f1afeced150b6d4da",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "home-manager",
"type": "github"
}
},
"impermanence": { "impermanence": {
"locked": { "locked": {
"lastModified": 1684264534, "lastModified": 1684264534,
@ -641,11 +484,11 @@
}, },
"latest": { "latest": {
"locked": { "locked": {
"lastModified": 1690052557, "lastModified": 1690569970,
"narHash": "sha256-dkqqefnFa5iQWckSNLtumYdtk0Sn7wQfbUcCAl6TJzo=", "narHash": "sha256-Lf1LLHyi+hajpj3dJqjMRgLMU2Fr++JEOdJyhBaxaWQ=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "2b616df6e4817c46160ae745f3b33f97e6b5ffec", "rev": "66ce081fafa2dca0038006ec7c6482d7a11d13d8",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -656,10 +499,10 @@
}, },
"nix-minecraft": { "nix-minecraft": {
"inputs": { "inputs": {
"flake-compat": "flake-compat_2", "flake-compat": "flake-compat",
"flake-utils": "flake-utils_6", "flake-utils": "flake-utils_2",
"nixpkgs": [ "nixpkgs": [
"nixos" "nixpkgs"
] ]
}, },
"locked": { "locked": {
@ -677,22 +520,6 @@
"type": "github" "type": "github"
} }
}, },
"nixos": {
"locked": {
"lastModified": 1690031011,
"narHash": "sha256-kzK0P4Smt7CL53YCdZCBbt9uBFFhE0iNvCki20etAf4=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "12303c652b881435065a98729eb7278313041e49",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixos-hardware": { "nixos-hardware": {
"locked": { "locked": {
"lastModified": 1663229557, "lastModified": 1663229557,
@ -725,8 +552,8 @@
}, },
"nixos-wsl": { "nixos-wsl": {
"inputs": { "inputs": {
"flake-compat": "flake-compat_3", "flake-compat": "flake-compat_2",
"flake-utils": "flake-utils_7", "flake-utils": "flake-utils_3",
"nixpkgs": "nixpkgs_4" "nixpkgs": "nixpkgs_4"
}, },
"locked": { "locked": {
@ -745,33 +572,21 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 0, "lastModified": 1677383253,
"narHash": "sha256-GGMupfk/lGzPBQ/dRrcQEhiFZ0F5KPg0j5Q4Fb5coxc=", "narHash": "sha256-UfpzWfSxkfXHnb4boXZNaKsAcUrZT9Hw+tao1oZxd08=",
"path": "/nix/store/r2bbhmlfvfpir9hp8fjs31kj13kwgwyl-source", "owner": "NixOS",
"type": "path" "repo": "nixpkgs",
"rev": "9952d6bc395f5841262b006fbace8dd7e143b634",
"type": "github"
}, },
"original": { "original": {
"id": "nixpkgs", "owner": "NixOS",
"type": "indirect" "ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
} }
}, },
"nixpkgs-unstable": { "nixpkgs-unstable": {
"locked": {
"lastModified": 1672791794,
"narHash": "sha256-mqGPpGmwap0Wfsf3o2b6qHJW1w2kk/I6cGCGIU+3t6o=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "9813adc7f7c0edd738c6bdd8431439688bb0cb3d",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-unstable_2": {
"locked": { "locked": {
"lastModified": 1663264531, "lastModified": 1663264531,
"narHash": "sha256-2ncO5chPXlTxaebDlhx7MhL0gOEIWxzSyfsl0r0hxQk=", "narHash": "sha256-2ncO5chPXlTxaebDlhx7MhL0gOEIWxzSyfsl0r0hxQk=",
@ -829,30 +644,19 @@
"type": "github" "type": "github"
} }
}, },
"poetry2nix": { "nixpkgs_5": {
"inputs": {
"flake-utils": [
"bud",
"beautysh",
"flake-utils"
],
"nixpkgs": [
"bud",
"beautysh",
"nixpkgs"
]
},
"locked": { "locked": {
"lastModified": 1633382856, "lastModified": 1690367991,
"narHash": "sha256-hYlet806M9xJj4yxf0g5fhDT2IEUVIMAl7sqIeZ8DUM=", "narHash": "sha256-2VwOn1l8y6+cu7zjNE8MgeGJNNz1eat1HwHrINeogFA=",
"owner": "nix-community", "owner": "NixOS",
"repo": "poetry2nix", "repo": "nixpkgs",
"rev": "705cbfa10e3d9bfed2e59e0256844ae3704dbd7e", "rev": "c9cf0708f00fbe553319258e48ca89ff9a413703",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nix-community", "owner": "NixOS",
"repo": "poetry2nix", "ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github" "type": "github"
} }
}, },
@ -892,23 +696,21 @@
"root": { "root": {
"inputs": { "inputs": {
"agenix": "agenix", "agenix": "agenix",
"blank": "blank", "devshell": "devshell",
"bud": "bud",
"digga": "digga",
"fenix": "fenix", "fenix": "fenix",
"flake-parts": "flake-parts",
"fork": "fork", "fork": "fork",
"haumea": "haumea",
"hlissner-dotfiles": "hlissner-dotfiles", "hlissner-dotfiles": "hlissner-dotfiles",
"home": "home", "home-manager": "home-manager_2",
"impermanence": "impermanence", "impermanence": "impermanence",
"latest": "latest", "latest": "latest",
"nix-minecraft": "nix-minecraft", "nix-minecraft": "nix-minecraft",
"nixos": "nixos",
"nixos-hardware": "nixos-hardware_2", "nixos-hardware": "nixos-hardware_2",
"nixos-wsl": "nixos-wsl", "nixos-wsl": "nixos-wsl",
"nixpkgs": "nixpkgs_5",
"private": "private", "private": "private",
"quick-nix-registry": "quick-nix-registry", "quick-nix-registry": "quick-nix-registry",
"stable": "stable",
"staging": "staging",
"universe-cli": "universe-cli" "universe-cli": "universe-cli"
} }
}, },
@ -958,7 +760,7 @@
}, },
"rust-overlay_2": { "rust-overlay_2": {
"inputs": { "inputs": {
"flake-utils": "flake-utils_9", "flake-utils": "flake-utils_5",
"nixpkgs": [ "nixpkgs": [
"universe-cli", "universe-cli",
"nixpkgs" "nixpkgs"
@ -978,38 +780,6 @@
"type": "github" "type": "github"
} }
}, },
"stable": {
"locked": {
"lastModified": 1689956312,
"narHash": "sha256-NV9yamMhE5jgz+ZSM2IgXeYqOvmGIbIIJ+AFIhfD7Ek=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "6da4bc6cb07cba1b8e53d139cbf1d2fb8061d967",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-23.05",
"repo": "nixpkgs",
"type": "github"
}
},
"staging": {
"locked": {
"lastModified": 1690050217,
"narHash": "sha256-TI+CWCORCtUgDuXvioOuoLio1JIq5eLGp133OVy3VuQ=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "cd7605a2b687970dcaf6df1eb2f667bfb68dc8ac",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "staging",
"repo": "nixpkgs",
"type": "github"
}
},
"systems": { "systems": {
"locked": { "locked": {
"lastModified": 1681028828, "lastModified": 1681028828,
@ -1104,9 +874,9 @@
"inputs": { "inputs": {
"crane": "crane", "crane": "crane",
"devshell": "devshell_2", "devshell": "devshell_2",
"flake-parts": "flake-parts", "flake-parts": "flake-parts_2",
"nixpkgs": [ "nixpkgs": [
"nixos" "nixpkgs"
], ],
"rust-overlay": "rust-overlay_2" "rust-overlay": "rust-overlay_2"
}, },

227
flake.nix
View file

@ -2,39 +2,32 @@
description = "Infinidoge's NixOS configuration"; description = "Infinidoge's NixOS configuration";
inputs = { inputs = {
# nixpkgs
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
latest.url = "github:nixos/nixpkgs";
fork.url = "github:Infinidoge/nixpkgs/combined/all";
# configuration components
private.url = "git+ssh://git@github.com/Infinidoge/universe-private"; private.url = "git+ssh://git@github.com/Infinidoge/universe-private";
universe-cli.url = "github:Infinidoge/universe-cli"; universe-cli.url = "github:Infinidoge/universe-cli";
universe-cli.inputs.nixpkgs.follows = "nixos"; universe-cli.inputs.nixpkgs.follows = "nixpkgs";
# --- DevOS Flake Inputs # nix libraries
# # --- Channels --- flake-parts.url = "github:hercules-ci/flake-parts";
stable.url = "github:nixos/nixpkgs/nixos-23.05"; flake-parts.inputs.nixpkgs-lib.follows = "nixpkgs";
nixos.url = "github:nixos/nixpkgs/nixos-unstable";
latest.url = "github:nixos/nixpkgs";
staging.url = "github:nixos/nixpkgs/staging";
fork.url = "github:Infinidoge/nixpkgs/combined/all";
# # --- Libraries --- haumea.url = "github:nix-community/haumea/v0.2.2";
digga.url = "github:divnix/digga"; haumea.inputs.nixpkgs.follows = "nixpkgs";
digga.inputs.nixpkgs.follows = "nixos";
digga.inputs.nixlib.follows = "nixos";
digga.inputs.home-manager.follows = "home";
digga.inputs.deploy.follows = "blank";
digga.inputs.darwin.follows = "blank";
blank.url = "github:divnix/blank";
digga.inputs.flake-utils-plus.url = "github:ravensiris/flake-utils-plus/ravensiris/fix-devshell-legacy-packages";
bud.url = "github:divnix/bud"; home-manager.url = "github:nix-community/home-manager";
bud.inputs.nixpkgs.follows = "nixos"; home-manager.inputs.nixpkgs.follows = "nixpkgs";
bud.inputs.devshell.follows = "digga/devshell";
home.url = "github:nix-community/home-manager";
home.inputs.nixpkgs.follows = "nixos";
agenix.url = "github:ryantm/agenix"; agenix.url = "github:ryantm/agenix";
agenix.inputs.nixpkgs.follows = "nixos"; agenix.inputs.nixpkgs.follows = "nixpkgs";
agenix.inputs.home-manager.follows = "home"; agenix.inputs.home-manager.follows = "home-manager";
devshell.url = "github:numtide/devshell";
nixos-hardware.url = "github:nixos/nixos-hardware"; nixos-hardware.url = "github:nixos/nixos-hardware";
@ -49,107 +42,85 @@
# --- Domain-Specific Flake Inputs # --- Domain-Specific Flake Inputs
# # --- Minecraft # # --- Minecraft
nix-minecraft.url = "github:Infinidoge/nix-minecraft/develop"; nix-minecraft.url = "github:Infinidoge/nix-minecraft/develop";
nix-minecraft.inputs.nixpkgs.follows = "nixos"; nix-minecraft.inputs.nixpkgs.follows = "nixpkgs";
# # --- Rust # # --- Rust
fenix.url = "github:nix-community/fenix"; fenix.url = "github:nix-community/fenix";
fenix.inputs.nixpkgs.follows = "nixos"; fenix.inputs.nixpkgs.follows = "nixpkgs";
}; };
outputs = outputs = inputs@{ flake-parts, nixpkgs, private, ... }: flake-parts.lib.mkFlake { inherit inputs; } ({ self, lib, ... }: {
{ self systems = [ "x86_64-linux" ];
, digga
, nixos debug = true;
, home
, agenix perSystem = { pkgs, system, ... }: {
, private _module.args.pkgs = import nixpkgs {
, ... inherit system;
}@inputs: config.allowUnfree = true;
digga.lib.mkFlake };
};
flake = {
lib = import ./lib { inherit (nixpkgs) lib; };
users = self.lib.rakeLeaves ./users;
nixosProfiles = self.lib.rakeLeaves ./profiles;
overlays = {
overrides = import ./overlays/overrides.nix inputs;
patches = import ./overlays/patches;
};
nixosConfigurations =
let
libOverlay = (lfinal: lprev: {
our = self.lib;
hlissner = inputs.hlissner-dotfiles.lib;
hm = inputs.home-manager.lib.hm;
});
in
lib.mapAttrs
(self.lib.mkHost {
specialArgs = {
profiles = self.nixosProfiles;
lib = nixpkgs.lib.extend libOverlay;
inherit private self inputs;
};
modules = [
self.users.root
self.users.infinidoge
{ {
inherit self inputs; nixpkgs.hostPlatform = "x86_64-linux";
system.configurationRevision = lib.mkIf (self ? rev) self.rev;
nixpkgs.overlays = [
(final: prev: {
lib = prev.lib.extend libOverlay;
})
self.overlays.packages
self.overlays.patches
self.overlays.overrides
channelsConfig = { allowUnfree = true; }; inputs.agenix.overlays.default
channels = {
nixos = {
imports = [ (digga.lib.importOverlays ./overlays) ];
overlays = [
# --- DevOS Overlays
agenix.overlays.default
./pkgs/default.nix
# --- Domain-Specific Overlays # --- Domain-Specific Overlays
inputs.nix-minecraft.overlay inputs.nix-minecraft.overlay
inputs.fenix.overlays.default inputs.fenix.overlays.default
inputs.universe-cli.overlays.default inputs.universe-cli.overlays.default
]; ];
}; home-manager =
stable = { };
latest = { };
staging = { };
fork = { };
};
lib = import ./lib { lib = digga.lib // nixos.lib; };
sharedOverlays = [
(final: prev: {
__dontExport = true;
lib = prev.lib.extend (lfinal: lprev: {
our = self.lib;
hlissner = inputs.hlissner-dotfiles.lib;
hm = home.lib.hm;
});
})
];
nixos = {
hostDefaults = {
system = "x86_64-linux";
channelName = "nixos";
imports = [ (digga.lib.importExportableModules ./modules) ];
modules = let users = digga.lib.rakeLeaves ./users; in [
# --- DevOS Modules ---
{ lib.our = self.lib; }
digga.nixosModules.bootstrapIso
digga.nixosModules.nixConfig
home.nixosModules.home-manager
agenix.nixosModules.age
./secrets
private.nixosModules.networking
# --- Library Modules ---
inputs.nixos-wsl.nixosModules.wsl
inputs.impermanence.nixosModules.impermanence
inputs.quick-nix-registry.nixosModules.local-registry
# --- Domain-Specific Modules ---
inputs.nix-minecraft.nixosModules.minecraft-servers
# --- Users ---
users.root
users.infinidoge
];
};
imports = [ (digga.lib.importHosts ./hosts) ];
importables = {
inherit private;
profiles = digga.lib.rakeLeaves ./profiles;
};
};
home =
let let
profiles = digga.lib.rakeLeaves ./users/profiles; profiles = self.lib.rakeLeaves ./users/profiles;
in in
{ {
imports = [ (digga.lib.importExportableModules ./users/modules) ]; useUserPackages = true;
modules = with profiles; [ useGlobalPkgs = true;
inputs.impermanence.nixosModules.home-manager.impermanence
sharedModules = [
inputs.impermanence.nixosModules.home-manager.impermanence
] ++ (with profiles; [
# Base Configuration # Base Configuration
xdg xdg
@ -166,15 +137,37 @@
starship starship
shells.all shells.all
tmux tmux
];
importables = { ]) ++ (self.lib.leaves ./users/modules);
inherit inputs profiles;
extraSpecialArgs = {
inherit profiles;
}; };
}; };
devshell = ./shell;
homeConfigurations = digga.lib.mkHomeConfigurations self.nixosConfigurations;
} }
;
# --- Universe Modules ---
./secrets
private.nixosModules.networking
# --- Library Modules ---
inputs.nixos-wsl.nixosModules.wsl
inputs.impermanence.nixosModules.impermanence
inputs.quick-nix-registry.nixosModules.local-registry
inputs.home-manager.nixosModules.home-manager
inputs.agenix.nixosModules.age
# --- Domain-Specific Modules ---
inputs.nix-minecraft.nixosModules.minecraft-servers
] ++ (self.lib.leaves ./modules);
})
(self.lib.flattenLeaves ./hosts);
};
imports = [
./pkgs
./shell
inputs.devshell.flakeModule
];
});
} }

View file

@ -26,5 +26,9 @@ rec {
sanitizeName = name: sanitizeName = name:
replaceStrings replaceStrings
[ "." ] [ "" ] [ "." ] [ "" ]
(strings.sanitizeDerivationName (removePrefix "/" name)); (sanitizeDerivationName (removePrefix "/" name));
}) } // (
import ./digga.nix { inherit lib; }
) // (
import ./hosts.nix { inherit lib; }
))

128
lib/digga.nix Normal file
View file

@ -0,0 +1,128 @@
{ lib }:
# Importers from digga: https://github.com/divnix/digga/blob/main/src/importers.nix
let
flattenTree =
/*
*
Synopsis: flattenTree _tree_
Flattens a _tree_ of the shape that is produced by rakeLeaves.
Output Format:
An attrset with names in the spirit of the Reverse DNS Notation form
that fully preserve information about grouping from nesting.
Example input:
```
{
a = {
b = {
c = <path>;
};
};
}
```
Example output:
```
{
"a.b.c" = <path>;
}
```
*
*/
tree:
let
op = sum: path: val:
let
pathStr = builtins.concatStringsSep "." path; # dot-based reverse DNS notation
in
if builtins.isPath val
then
# builtins.trace "${toString val} is a path"
(sum
// {
"${pathStr}" = val;
})
else if builtins.isAttrs val
then
# builtins.trace "${builtins.toJSON val} is an attrset"
# recurse into that attribute set
(recurse sum path val)
else
# ignore that value
# builtins.trace "${toString path} is something else"
sum;
recurse = sum: path: val:
builtins.foldl'
(sum: key: op sum (path ++ [ key ]) val.${key})
sum
(builtins.attrNames val);
in
recurse { } [ ] tree;
rakeLeaves =
/*
*
Synopsis: rakeLeaves _path_
Recursively collect the nix files of _path_ into attrs.
Output Format:
An attribute set where all `.nix` files and directories with `default.nix` in them
are mapped to keys that are either the file with .nix stripped or the folder name.
All other directories are recursed further into nested attribute sets with the same format.
Example file structure:
```
./core/default.nix
./base.nix
./main/dev.nix
./main/os/default.nix
```
Example output:
```
{
core = ./core;
base = base.nix;
main = {
dev = ./main/dev.nix;
os = ./main/os;
};
}
```
*
*/
dirPath:
let
seive = file: type:
# Only rake `.nix` files or directories
(type == "regular" && lib.hasSuffix ".nix" file) || (type == "directory");
collect = file: type: {
name = lib.removeSuffix ".nix" file;
value =
let
path = dirPath + "/${file}";
in
if
(type == "regular")
|| (type == "directory" && builtins.pathExists (path + "/default.nix"))
then path
# recurse on directories that don't contain a `default.nix`
else rakeLeaves path;
};
files = lib.filterAttrs seive (builtins.readDir dirPath);
in
lib.filterAttrs (n: v: v != { }) (lib.mapAttrs' collect files);
flattenLeaves = dir: flattenTree (rakeLeaves dir);
in
{
inherit rakeLeaves flattenTree flattenLeaves;
leaves = dir: builtins.attrValues (flattenLeaves dir);
}

12
lib/hosts.nix Normal file
View file

@ -0,0 +1,12 @@
{ lib }:
{
mkHost = attrs@{ modules ? [ ], ... }: name: path: lib.nixosSystem (attrs // {
modules = [
{
networking.hostName = lib.mkDefault name;
}
(import path)
] ++ attrs.modules;
});
}

View file

@ -24,7 +24,17 @@ with lib;
optimise.automatic = true; optimise.automatic = true;
registry =
let
flakes = filterAttrs (n: v: v ? outputs) inputs;
in
builtins.mapAttrs (_n: v: { flake = v; }) flakes;
extraOptions = '' extraOptions = ''
extra-experimental-features = flakes nix-command
extra-substituters = https://nrdxp.cachix.org https://nix-community.cachix.org
extra-trusted-public-keys = nrdxp.cachix.org-1:Fc5PSqY2Jm1TrWfm88l6cvGWwz3s93c6IOifQWnhNW4= nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=
min-free = 536870912 min-free = 536870912
keep-outputs = true keep-outputs = true
keep-derivations = true keep-derivations = true

View file

@ -10,6 +10,7 @@
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
universe-cli universe-cli
agenix
bat bat
binutils binutils
btrfs-progs btrfs-progs

View file

@ -19,6 +19,8 @@ with lib;
cpu.amd.updateMicrocode = mkDefault config.hardware.enableRedistributableFirmware; cpu.amd.updateMicrocode = mkDefault config.hardware.enableRedistributableFirmware;
}; };
users.mutableUsers = false;
boot = { boot = {
# Make tmp volatile, using tmpfs is speedy on SSD systems # Make tmp volatile, using tmpfs is speedy on SSD systems
# Redundant on opt-in state systems # Redundant on opt-in state systems

View file

@ -1,21 +1,13 @@
channels: final: prev: { inputs: final: prev:
let
mkPkgs = channel: channel.legacyPackages.${final.system};
__dontExport = true; # overrides clutter up actual creations latest = mkPkgs inputs.latest;
fork = mkPkgs inputs.fork;
inherit (channels.latest) in
# discord-canary {
kmscon inherit (latest)
prismlauncher
; ;
inherit (channels.fork)
# https://nixpk.gs/pr-tracker.html?pr=244591
firefox-devedition
;
inherit (channels.stable)
hydrus
;
qtile = final.qtile-unstable;
} }

View file

@ -1,22 +0,0 @@
{
"qtile": {
"cargoLocks": null,
"date": "2023-03-31",
"extract": null,
"name": "qtile",
"passthru": null,
"pinned": false,
"src": {
"deepClone": false,
"fetchSubmodules": false,
"leaveDotGit": false,
"name": null,
"owner": "qtile",
"repo": "qtile",
"rev": "e88537fbcce9e8e0de3349c566de4fda9a225e96",
"sha256": "sha256-FEiI7T4whhClb8nCrk+CxlihyMVuM3c6EcnmttPszAU=",
"type": "github"
},
"version": "e88537fbcce9e8e0de3349c566de4fda9a225e96"
}
}

View file

@ -1,16 +0,0 @@
# This file was generated by nvfetcher, please do not modify it manually.
{ fetchgit, fetchurl, fetchFromGitHub, dockerTools }:
{
qtile = {
pname = "qtile";
version = "e88537fbcce9e8e0de3349c566de4fda9a225e96";
src = fetchFromGitHub ({
owner = "qtile";
repo = "qtile";
rev = "e88537fbcce9e8e0de3349c566de4fda9a225e96";
fetchSubmodules = false;
sha256 = "sha256-FEiI7T4whhClb8nCrk+CxlihyMVuM3c6EcnmttPszAU=";
});
date = "2023-03-31";
};
}

11
pkgs/all-packages.nix Normal file
View file

@ -0,0 +1,11 @@
{ pkgs }:
{
hexagon = pkgs.callPackage ./hexagon.nix { };
mcaselector = pkgs.callPackage ./mcaselector.nix { };
nix-modrinth-prefetch = pkgs.callPackage ./nix-modrinth-prefetch.nix { };
olympus = pkgs.callPackage ./olympus.nix { };
setris = pkgs.callPackage ./setris.nix { };
sim65 = pkgs.callPackage ./sim65.nix { };
substituteSubset = pkgs.callPackage ./substitute-subset.nix { };
unbted = pkgs.callPackage ./unbted.nix { };
}

View file

@ -1,15 +1,13 @@
final: prev: { { self, lib, ... }:
# keep sources this first {
sources = prev.callPackage (import ./_sources/generated.nix) { }; perSystem = { pkgs, ... }:
# then, call packages with `final.callPackage` let
allPackages = import ./all-packages.nix { inherit pkgs; };
in
{
packages = lib.filterAttrs (_: v: lib.isDerivation v) allPackages;
legacyPackages = lib.filterAttrs (_: v: !(lib.isDerivation v)) allPackages;
};
hexagon = final.callPackage ./hexagon.nix { }; flake.overlays.packages = final: prev: (import ./all-packages.nix { pkgs = prev; });
mcaselector = final.callPackage ./mcaselector.nix { };
nix-modrinth-prefetch = final.callPackage ./nix-modrinth-prefetch.nix { };
olympus = final.callPackage ./olympus.nix { };
qtile-unstable = final.callPackage ./qtile.nix { source = final.sources.qtile; };
setris = final.callPackage ./setris.nix { };
sim65 = final.callPackage ./sim65.nix { };
substituteSubset = final.callPackage ./substitute-subset.nix { };
unbted = final.callPackage ./unbted.nix { };
} }

View file

@ -30,7 +30,7 @@ let
}; };
in in
buildFHSUserEnv { buildFHSUserEnv {
name = "olympus"; inherit (olympus) name;
runScript = "${olympus}/opt/olympus/olympus"; runScript = "${olympus}/opt/olympus/olympus";
targetPkgs = pkgs: [ targetPkgs = pkgs: [
pkgs.freetype pkgs.freetype

View file

@ -1,22 +0,0 @@
diff --git a/libqtile/core/lifecycle.py b/libqtile/core/lifecycle.py
index 0d4d119d..c37d1799 100644
--- a/libqtile/core/lifecycle.py
+++ b/libqtile/core/lifecycle.py
@@ -25,7 +25,7 @@ class LifeCycle:
def _atexit(self) -> None:
if self.behavior is Behavior.RESTART:
- argv = [sys.executable] + sys.argv
+ argv = sys.argv
if "--no-spawn" not in argv:
argv.append("--no-spawn")
argv = [s for s in argv if not s.startswith("--with-state")]
@@ -33,7 +33,7 @@ class LifeCycle:
argv.append("--with-state=" + self.state_file)
logger.warning("Restarting Qtile with os.execv(...)")
# No other code will execute after the following line does
- os.execv(sys.executable, argv)
+ os.execv(sys.argv[0], argv)
elif self.behavior is Behavior.TERMINATE:
logger.warning("Qtile will now terminate")
elif self.behavior is Behavior.NONE:

View file

@ -1,90 +0,0 @@
{ lib
, fetchFromGitHub
, python3
, python3Packages
, mypy
, glib
, pango
, pkg-config
, libinput
, libxkbcommon
, wayland
, wlroots
, xcbutilcursor
, source
}:
let
unwrapped = python3Packages.buildPythonPackage rec {
inherit (source) pname src;
version = "0.0.0+${source.version}";
patches = [
./patches/qtile-fix-restart.patch # https://github.com/NixOS/nixpkgs/issues/139568
];
postPatch = ''
substituteInPlace libqtile/pangocffi.py \
--replace libgobject-2.0.so.0 ${glib.out}/lib/libgobject-2.0.so.0 \
--replace libpangocairo-1.0.so.0 ${pango.out}/lib/libpangocairo-1.0.so.0 \
--replace libpango-1.0.so.0 ${pango.out}/lib/libpango-1.0.so.0
substituteInPlace libqtile/backend/x11/xcursors.py \
--replace libxcb-cursor.so.0 ${xcbutilcursor.out}/lib/libxcb-cursor.so.0
'';
SETUPTOOLS_SCM_PRETEND_VERSION = version;
nativeBuildInputs = [
pkg-config
] ++ (with python3Packages; [
setuptools-scm
]);
propagatedBuildInputs = with python3Packages; [
xcffib
(cairocffi.override { withXcffib = true; })
setuptools
python-dateutil
dbus-python
dbus-next
mpd2
psutil
pyxdg
pygobject3
pywayland
pywlroots
xkbcommon
];
buildInputs = [
libinput
wayland
wlroots
libxkbcommon
];
# for `qtile check`, needs `stubtest` and `mypy` commands
makeWrapperArgs = [
"--suffix PATH : ${lib.makeBinPath [ mypy ]}"
];
doCheck = false; # Requires X server #TODO this can be worked out with the existing NixOS testing infrastructure.
meta = with lib; {
homepage = "http://www.qtile.org/";
license = licenses.mit;
description = "A small, flexible, scriptable tiling window manager written in Python";
platforms = platforms.linux;
maintainers = with maintainers; [ kamilchm ];
};
};
in
(python3.withPackages (_: [ unwrapped ])).overrideAttrs (_: {
# otherwise will be exported as "env", this restores `nix search` behavior
name = "${unwrapped.pname}-${unwrapped.version}";
# export underlying qtile package
passthru = { inherit unwrapped; };
# restore original qtile attrs
inherit (unwrapped) pname version meta;
})

View file

@ -1,4 +0,0 @@
# nvfetcher toml
[qtile]
src.git = "https://github.com/qtile/qtile.git"
fetch.github = "qtile/qtile"

View file

@ -1,6 +1,24 @@
{ self, inputs, ... }: { self, lib, ... }:
{ {
exportedModules = [ perSystem = { pkgs, ... }: {
./devos.nix devshells.default =
let
pythonEnv = (pkgs.python310.withPackages (p: with p; [
pkgs.qtile.passthru.unwrapped
]));
in
{
devshell.packages = [
pythonEnv
]; ];
env = [
{
name = "PYTHONPATH";
value = "${pythonEnv}/${pythonEnv.sitePackages}";
}
];
};
};
} }

View file

@ -1,67 +0,0 @@
{ pkgs, extraModulesPath, inputs, ... }:
let
hooks = import ./hooks;
pkgWithCategory = category: package: { inherit package category; };
linter = pkgWithCategory "linter";
docs = pkgWithCategory "docs";
devos = pkgWithCategory "devos";
pythonEnv = pkgs.python310.withPackages (p: with p; [
pkgs.qtile.passthru.unwrapped
]);
in
{
_file = toString ./.;
imports = [ "${extraModulesPath}/git/hooks.nix" ];
git = { inherit hooks; };
# tempfix: remove when merged https://github.com/numtide/devshell/pull/123
devshell.startup.load_profiles = pkgs.lib.mkForce (pkgs.lib.noDepEntry ''
# PATH is devshell's exorbitant privilige:
# fence against its pollution
_PATH=''${PATH}
# Load installed profiles
for file in "$DEVSHELL_DIR/etc/profile.d/"*.sh; do
# If that folder doesn't exist, bash loves to return the whole glob
[[ -f "$file" ]] && source "$file"
done
# Exert exorbitant privilige and leave no trace
export PATH=''${_PATH}
unset _PATH
'');
devshell.packages = [
pythonEnv
];
commands = with pkgs; [
(devos nixUnstable)
(devos agenix)
{
category = "devos";
name = pkgs.nvfetcher.pname;
help = pkgs.nvfetcher.meta.description;
command = "cd $PRJ_ROOT/pkgs; ${pkgs.nvfetcher}/bin/nvfetcher -c ./sources.toml $@";
}
(linter nixpkgs-fmt)
(linter editorconfig-checker)
# (docs python3Packages.grip) too many deps
(docs mdbook)
]
++ lib.optional
(system != "i686-linux")
(devos cachix)
;
env = [
{
name = "PYTHONPATH";
value = "${pythonEnv}/${pythonEnv.sitePackages}";
}
];
}

View file

@ -1,4 +0,0 @@
{
enable = true;
pre-commit.text = builtins.readFile ./pre-commit.sh;
}

View file

@ -1,29 +0,0 @@
#!/usr/bin/env bash
if git rev-parse --verify HEAD >/dev/null 2>&1
then
against=HEAD
else
# Initial commit: diff against an empty tree object
against=$(${git}/bin/git hash-object -t tree /dev/null)
fi
diff="git diff-index --name-only --cached $against --diff-filter d"
nix_files=($($diff -- '*.nix'))
all_files=($($diff))
# Format staged nix files.
if [[ -n "${nix_files[@]}" ]]; then
nixpkgs-fmt "${nix_files[@]}" \
&& git add "${nix_files[@]}"
fi
# check editorconfig
editorconfig-checker -- "${all_files[@]}"
if [[ $? != '0' ]]; then
printf "%b\n" \
"\nCode is not aligned with .editorconfig" \
"Review the output and commit your fixes" >&2
exit 1
fi