1
Fork 0
mirror of https://github.com/RGBCube/ncc synced 2025-07-29 19:17:45 +00:00

Use Nix Super and update lock

This commit is contained in:
RGBCube 2023-12-05 23:54:03 +03:00
parent 32fb6e372f
commit 2cc888498d
No known key found for this signature in database
3 changed files with 138 additions and 41 deletions

135
flake.lock generated
View file

@ -8,11 +8,11 @@
"rust-analyzer-src": "rust-analyzer-src"
},
"locked": {
"lastModified": 1701671019,
"narHash": "sha256-ctG01Syj/7TrfV4arc3qyN4a3mAvgXbivYrdXKqdL8U=",
"lastModified": 1701757414,
"narHash": "sha256-63epDkdiHYkiOLg061HsMK5Of4s4M4sUAWteZrkWynE=",
"owner": "nix-community",
"repo": "fenix",
"rev": "5e6667eda7fb055c0a8388172372fb89e5b33e05",
"rev": "3d2215d896636efe29b71c8b9b2857d3d093f9c9",
"type": "github"
},
"original": {
@ -21,6 +21,22 @@
"type": "github"
}
},
"flake-compat": {
"flake": false,
"locked": {
"lastModified": 1673956053,
"narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"homeManager": {
"inputs": {
"nixpkgs": [
@ -28,11 +44,11 @@
]
},
"locked": {
"lastModified": 1701676655,
"narHash": "sha256-wP8i7hO2aLNJhYoTK3kqoymaCLgt4QcwWcO8d/A1CjQ=",
"lastModified": 1701728041,
"narHash": "sha256-x0pyrI1vC8evVDxCxyO6olOyr4wlFg9+VS3C3p4xFYQ=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "948703f3e71f1332a0cb535ebaf5cb14946e3724",
"rev": "ac7216918cd65f3824ba7817dea8f22e61221eaf",
"type": "github"
},
"original": {
@ -50,11 +66,11 @@
"xdph": "xdph"
},
"locked": {
"lastModified": 1701661974,
"narHash": "sha256-oq9CVdLjH70QmgA8FZTqC/rhzCJJRZKbg5Q2jA4xnVw=",
"lastModified": 1701790877,
"narHash": "sha256-xNjSypJirandCE1/OLFwndGYhFdoSqcbjW77rVZ86uI=",
"owner": "hyprwm",
"repo": "Hyprland",
"rev": "68783d904d850df65887adb1bab7eff59943c1ac",
"rev": "37d7a8c64dfabfe81330c819c24fd6b13b292194",
"type": "github"
},
"original": {
@ -106,6 +122,60 @@
"type": "github"
}
},
"libgit2": {
"flake": false,
"locked": {
"lastModified": 1697646580,
"narHash": "sha256-oX4Z3S9WtJlwvj0uH9HlYcWv+x1hqp8mhXl7HsLu2f0=",
"owner": "libgit2",
"repo": "libgit2",
"rev": "45fd9ed7ae1a9b74b957ef4f337bc3c8b3df01b5",
"type": "github"
},
"original": {
"owner": "libgit2",
"repo": "libgit2",
"type": "github"
}
},
"lowdown-src": {
"flake": false,
"locked": {
"lastModified": 1633514407,
"narHash": "sha256-Dw32tiMjdK9t3ETl5fzGrutQTzh2rufgZV4A/BbxuD4=",
"owner": "kristapsdz",
"repo": "lowdown",
"rev": "d2c2b44ff6c27b936ec27358a2653caaef8f73b8",
"type": "github"
},
"original": {
"owner": "kristapsdz",
"repo": "lowdown",
"type": "github"
}
},
"nix-super": {
"inputs": {
"flake-compat": "flake-compat",
"libgit2": "libgit2",
"lowdown-src": "lowdown-src",
"nixpkgs": "nixpkgs_3",
"nixpkgs-regression": "nixpkgs-regression"
},
"locked": {
"lastModified": 1700941252,
"narHash": "sha256-2c8miJcsG24YEtXOSjvgW0ES1ND5DpY+ymGPq3S56YE=",
"owner": "privatevoid-net",
"repo": "nix-super",
"rev": "c076362db8b438c921d9bbe196ede50205f788c6",
"type": "github"
},
"original": {
"owner": "privatevoid-net",
"repo": "nix-super",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1700612854,
@ -122,6 +192,22 @@
"type": "github"
}
},
"nixpkgs-regression": {
"locked": {
"lastModified": 1643052045,
"narHash": "sha256-uGJ0VXIhWKGXxkeNnq4TvV3CIOkUJ3PAoLZ3HMzNVMw=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2",
"type": "github"
},
"original": {
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1683014792,
@ -140,11 +226,27 @@
},
"nixpkgs_3": {
"locked": {
"lastModified": 1701253981,
"narHash": "sha256-ztaDIyZ7HrTAfEEUt9AtTDNoCYxUdSd6NrRHaYOIxtk=",
"lastModified": 1700342017,
"narHash": "sha256-HaibwlWH5LuqsaibW3sIVjZQtEM/jWtOHX4Nk93abGE=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "e92039b55bcd58469325ded85d4f58dd5a4eaf58",
"rev": "decdf666c833a325cb4417041a90681499e06a41",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-23.05-small",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_4": {
"locked": {
"lastModified": 1701436327,
"narHash": "sha256-tRHbnoNI8SIM5O5xuxOmtSLnswEByzmnQcGGyNRjxsE=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "91050ea1e57e50388fa87a3302ba12d188ef723a",
"type": "github"
},
"original": {
@ -160,7 +262,8 @@
"homeManager": "homeManager",
"hyprland": "hyprland",
"hyprpicker": "hyprpicker",
"nixpkgs": "nixpkgs_3",
"nix-super": "nix-super",
"nixpkgs": "nixpkgs_4",
"themes": "themes",
"tools": "tools"
}
@ -168,11 +271,11 @@
"rust-analyzer-src": {
"flake": false,
"locked": {
"lastModified": 1701447636,
"narHash": "sha256-WaCcxLNAqo/FAK0QtYqweKCUVTGcbKpFIHClc+k2YlI=",
"lastModified": 1701721820,
"narHash": "sha256-fKcg/YWrCc2ZT4hUvx2bPd+xCTAnQYcd0oDI1cpN07U=",
"owner": "rust-lang",
"repo": "rust-analyzer",
"rev": "e402c494b7c7d94a37c6d789a216187aaf9ccd3e",
"rev": "2d66f6df252896cfbd7bd24be6ee0c124369b1b7",
"type": "github"
},
"original": {

View file

@ -1,15 +1,17 @@
{
description = "My NixOS configurations.";
description = "All my NixOS configurations.";
nixConfig = {
extra-substituters = ''
https://nix-community.cachix.org/
https://hyprland.cachix.org/
https://cache.privatevoid.net/
'';
extra-trusted-public-keys = ''
nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=
hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=
cache.privatevoid.net-1:SErQ8bvNWANeAvtsOESUwVYr2VJynfuc9JRwlzTTkVg=
'';
};
@ -18,6 +20,10 @@
url = "github:NixOS/nixpkgs/nixos-unstable";
};
nix-super = {
url = "github:privatevoid-net/nix-super";
};
homeManager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
@ -46,7 +52,7 @@
};
};
outputs = { nixpkgs, homeManager, tools, themes, fenix, ... } @ inputs: tools.eachDefaultLinuxArch (system: let
outputs = { nixpkgs, nix-super, homeManager, tools, themes, fenix, ... } @ inputs: tools.eachDefaultLinuxArch (system: let
pkgs = nixpkgs.legacyPackages.${system};
upkgs = {
@ -141,7 +147,10 @@
];
nixpkgs.config.allowUnfree = true;
nixpkgs.overlays = [ fenix.overlays.default ];
nixpkgs.overlays = [
fenix.overlays.default
nix-super.overlays.default
];
programs.nix-ld = enabled {};

View file

@ -1,33 +1,18 @@
#!/usr/bin/env nu
def complete [] {
ls machines
ls machines | get name | each { $in | str replace "machines/" "" }
}
def main --wrapped [
machine: string@complete = "" # The machine to build.
...arguments
] {
mut machine_ = $machine
let flags = $arguments | append [
"--option accept-flake-config true"
"--log-format internal-json"
"--impure"
]
let valid_machines = ls machines | where type == dir | get name | each { $in | str replace "machines/" "" }
if ($machine_ | is-empty) {
$machine_ = (input $"machine to build [($valid_machines | str join ', ')]: ")
if ($machine_ | is-empty) and ($valid_machines | length) == 1 {
$machine_ = ($valid_machines | get 0)
} else {
main ""
exit
}
}
if not ($machine_ in $valid_machines) {
main ""
exit
}
sudo --validate
sh -c $"sudo nixos-rebuild switch ($arguments | str join ' ') --log-format internal-json --impure --flake ('.#' + $machine) |& nom --json"
sudo sh -c $"nix system apply ('.#' + $machine) ($flags | str join ' ') |& nom --json"
}