fix nixgl non-nixos stuff again

This commit is contained in:
Daniel Olsen 2022-09-09 02:49:19 +02:00
parent 772a233815
commit 9639108c53
4 changed files with 87 additions and 50 deletions

View File

@ -3,11 +3,11 @@
"crane": { "crane": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1654444508, "lastModified": 1661875961,
"narHash": "sha256-4OBvQ4V7jyt7afs6iKUvRzJ1u/9eYnKzVQbeQdiamuY=", "narHash": "sha256-f1h/2c6Teeu1ofAHWzrS8TwBPcnN+EEu+z1sRVmMQTk=",
"owner": "ipetkov", "owner": "ipetkov",
"repo": "crane", "repo": "crane",
"rev": "db5482bf225acc3160899124a1df5a617cfa27b5", "rev": "d9f394e4e20e97c2a60c3ad82c2b6ef99be19e24",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -41,11 +41,11 @@
"devshell": { "devshell": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1655976588, "lastModified": 1660811669,
"narHash": "sha256-VreHyH6ITkf/1EX/8h15UqhddJnUleb0HgbC3gMkAEQ=", "narHash": "sha256-V6lmsaLNFz41myppL0yxglta92ijkSvpZ+XVygAh+bU=",
"owner": "numtide", "owner": "numtide",
"repo": "devshell", "repo": "devshell",
"rev": "899ca4629020592a13a46783587f6e674179d1db", "rev": "c2feacb46ee69949124c835419861143c4016fb5",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -58,57 +58,52 @@
"inputs": { "inputs": {
"alejandra": [ "alejandra": [
"helix", "helix",
"nixCargoIntegration", "nci",
"nixpkgs" "nixpkgs"
], ],
"crane": "crane", "crane": "crane",
"devshell": [ "devshell": [
"helix", "helix",
"nixCargoIntegration", "nci",
"devshell" "devshell"
], ],
"flake-utils-pre-commit": [ "flake-utils-pre-commit": [
"helix", "helix",
"nixCargoIntegration", "nci",
"nixpkgs" "nixpkgs"
], ],
"gomod2nix": [ "gomod2nix": [
"helix", "helix",
"nixCargoIntegration", "nci",
"nixpkgs" "nixpkgs"
], ],
"mach-nix": [ "mach-nix": [
"helix", "helix",
"nixCargoIntegration", "nci",
"nixpkgs" "nixpkgs"
], ],
"nixpkgs": [ "nixpkgs": [
"helix", "helix",
"nixCargoIntegration", "nci",
"nixpkgs"
],
"node2nix": [
"helix",
"nixCargoIntegration",
"nixpkgs" "nixpkgs"
], ],
"poetry2nix": [ "poetry2nix": [
"helix", "helix",
"nixCargoIntegration", "nci",
"nixpkgs" "nixpkgs"
], ],
"pre-commit-hooks": [ "pre-commit-hooks": [
"helix", "helix",
"nixCargoIntegration", "nci",
"nixpkgs" "nixpkgs"
] ]
}, },
"locked": { "locked": {
"lastModified": 1655975833, "lastModified": 1662176993,
"narHash": "sha256-g8sdfuglIZ24oWVbntVzniNTJW+Z3n9DNL9w9Tt+UCE=", "narHash": "sha256-Sy7DsGAveDUFBb6YDsUSYZd/AcXfP/MOMIwMt/NgY84=",
"owner": "nix-community", "owner": "nix-community",
"repo": "dream2nix", "repo": "dream2nix",
"rev": "4e75e665ec3a1cddae5266bed0dd72fce0b74a23", "rev": "809bc5940214744eb29778a9a0b03f161979c1b2",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -119,11 +114,26 @@
}, },
"flake-utils": { "flake-utils": {
"locked": { "locked": {
"lastModified": 1637014545, "lastModified": 1656928814,
"narHash": "sha256-26IZAc5yzlD9FlDT54io1oqG/bBoyka+FJk5guaX4x4=", "narHash": "sha256-RIFfgBuKz6Hp89yRr7+NR5tzIAbn52h8vT6vXkYjZoM=",
"owner": "numtide", "owner": "numtide",
"repo": "flake-utils", "repo": "flake-utils",
"rev": "bba5dcc8e0b20ab664967ad83d24d64cb64ec4f4", "rev": "7e2a3b3dfd9af950a856d66b0a7d01e3c18aa249",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_2": {
"locked": {
"lastModified": 1659877975,
"narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -134,18 +144,18 @@
}, },
"helix": { "helix": {
"inputs": { "inputs": {
"nixCargoIntegration": "nixCargoIntegration", "nci": "nci",
"nixpkgs": [ "nixpkgs": [
"unstable" "unstable"
], ],
"rust-overlay": "rust-overlay" "rust-overlay": "rust-overlay"
}, },
"locked": { "locked": {
"lastModified": 1659453202, "lastModified": 1662645858,
"narHash": "sha256-dCoACB8THPLgCZtbP4AzX+l/pzhUK078zo9mQGTvFUQ=", "narHash": "sha256-KvZpyPfugKwis6lKQpuZYFkqa3HGjfqaRIfRO+qxH/E=",
"owner": "helix-editor", "owner": "helix-editor",
"repo": "helix", "repo": "helix",
"rev": "69f84e25165d62d0f38bcc80bf9108f9c0802cad", "rev": "5ab85283e944b9b0409c70953c7655b9c5f84067",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -175,7 +185,7 @@
"type": "github" "type": "github"
} }
}, },
"nixCargoIntegration": { "nci": {
"inputs": { "inputs": {
"devshell": "devshell", "devshell": "devshell",
"dream2nix": "dream2nix", "dream2nix": "dream2nix",
@ -189,11 +199,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1656453541, "lastModified": 1662177071,
"narHash": "sha256-ZCPVnS6zJOZJvIlwU3rKR8MBVm6A3F4/0mA7G1lQ3D0=", "narHash": "sha256-x6XF//RdZlw81tFAYM1TkjY+iQIpyMCWZ46r9o4wVQY=",
"owner": "yusdacra", "owner": "yusdacra",
"repo": "nix-cargo-integration", "repo": "nix-cargo-integration",
"rev": "9eb74345b30cd2e536d9dac9d4435d3c475605c7", "rev": "65270dea87bb82fc02102a15221677eea237680e",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -202,13 +212,34 @@
"type": "github" "type": "github"
} }
}, },
"nixgl": {
"inputs": {
"flake-utils": "flake-utils_2",
"nixpkgs": [
"nixos-2205"
]
},
"locked": {
"lastModified": 1661367362,
"narHash": "sha256-Qc8MXcV+YCPREu8kk6oggk23ZBKLqeQRAIsLbHEviPE=",
"owner": "guibou",
"repo": "nixGL",
"rev": "7165ffbccbd2cf4379b6cd6d2edd1620a427e5ae",
"type": "github"
},
"original": {
"owner": "guibou",
"repo": "nixGL",
"type": "github"
}
},
"nixos-2205": { "nixos-2205": {
"locked": { "locked": {
"lastModified": 1659342832, "lastModified": 1662099760,
"narHash": "sha256-ePnxG4hacRd6oZMk+YeCSYMNUnHCe+qPLI0/+VaTu48=", "narHash": "sha256-MdZLCTJPeHi/9fg6R9fiunyDwP3XHJqDd51zWWz9px0=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "e43cf1748462c81202a32b26294e9f8eefcc3462", "rev": "67e45078141102f45eff1589a831aeaa3182b41e",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -220,11 +251,11 @@
}, },
"nur": { "nur": {
"locked": { "locked": {
"lastModified": 1659483824, "lastModified": 1662661687,
"narHash": "sha256-dJutEz8UQBi+g9GMBPJXnx54xn0Ow1a/JGV9Gxd9jpw=", "narHash": "sha256-ze1bQpIad0S7ofPBteBfl+E4e7FQ87PQFyrZT5QI2VY=",
"owner": "nix-community", "owner": "nix-community",
"repo": "NUR", "repo": "NUR",
"rev": "3902a6de021f928e2d0f4b71565853507a525bd1", "rev": "cbd713ef9bb050c5859466d97dc692c29e4e5195",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -238,6 +269,7 @@
"dan": "dan", "dan": "dan",
"helix": "helix", "helix": "helix",
"home-manager-2205": "home-manager-2205", "home-manager-2205": "home-manager-2205",
"nixgl": "nixgl",
"nixos-2205": "nixos-2205", "nixos-2205": "nixos-2205",
"nur": "nur", "nur": "nur",
"unstable": "unstable" "unstable": "unstable"
@ -252,11 +284,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1655779671, "lastModified": 1662087605,
"narHash": "sha256-6feeiGa6fb7ZPVHR71uswkmN1701TAJpwYQA8QffmRk=", "narHash": "sha256-Gpf2gp2JenKGf+TylX/YJpttY2bzsnvAMLdLaxoZRyU=",
"owner": "oxalica", "owner": "oxalica",
"repo": "rust-overlay", "repo": "rust-overlay",
"rev": "8159585609a772b041cce6019d5c21d240709244", "rev": "60c2cfaa8b90ed8cebd18b214fac8682dcf222dd",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -267,11 +299,11 @@
}, },
"unstable": { "unstable": {
"locked": { "locked": {
"lastModified": 1659464610, "lastModified": 1662096612,
"narHash": "sha256-X67Sbnn4lbo+RFWDjlG9oJsSWE6zg4S+LuQ5TLB2lCo=", "narHash": "sha256-R+Q8l5JuyJryRPdiIaYpO5O3A55rT+/pItBrKcy7LM4=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "f310f24f0d4cd5e8660ccde49e8cbd8dbf0295fa", "rev": "21de2b973f9fee595a7a1ac4693efff791245c34",
"type": "github" "type": "github"
}, },
"original": { "original": {

View File

@ -19,9 +19,12 @@
helix.url = "github:helix-editor/helix"; helix.url = "github:helix-editor/helix";
helix.inputs.nixpkgs.follows = "unstable"; helix.inputs.nixpkgs.follows = "unstable";
nixgl.url = "github:guibou/nixGL";
nixgl.inputs.nixpkgs.follows = "nixos-2205";
}; };
outputs = {self, home-manager-2205, unstable, nur, dan, ... }@inputs: outputs = {self, home-manager-2205, unstable, nur, dan, nixgl, ... }@inputs:
let let
nixlib = unstable.lib; nixlib = unstable.lib;
@ -62,6 +65,7 @@
helix = inputs.helix.packages.${prev.system}.helix; helix = inputs.helix.packages.${prev.system}.helix;
}) })
nur.overlay nur.overlay
nixgl.overlay
]; ];
homeActivations = nixlib.genAttrs allMachines (machine: self.homeConfigurations.${machine}.activationPackage); homeActivations = nixlib.genAttrs allMachines (machine: self.homeConfigurations.${machine}.activationPackage);

View File

@ -1,7 +1,7 @@
{ config, lib, pkgs, overlays, ... }: { config, lib, pkgs, overlays, ... }:
{ {
nixpkgs.overlays = overlays; nixpkgs.overlays = overlays;
#nixpkgs.config.allowUnfreePredicate = (pkg: true); nixpkgs.config.allowUnfreePredicate = (pkg: true);
imports = [ ../profiles ]; imports = [ ../profiles ];
@ -11,6 +11,7 @@
wlan = null; wlan = null;
secondary-fs = null; secondary-fs = null;
}; };
profiles.base.enable = true; profiles.base.enable = true;
profiles.base.plus = false; profiles.base.plus = false;
profiles.gui.enable = true; profiles.gui.enable = true;

View File

@ -3,7 +3,7 @@
let let
cfg = config.profiles.xsession; cfg = config.profiles.xsession;
non-nixos = config.profiles.non-nixos; non-nixos = config.profiles.non-nixos;
mkGL = program: "${lib.strings.optionalString non-nixos.enable "nixGL "}${program}"; mkGL = program: "${lib.strings.optionalString non-nixos.enable "${pkgs.nixgl.auto.nixGLDefault}/bin/nixGL "}${program}";
in in
{ {
imports = [ ./dunstrc.nix ./terminal.nix ./polybar.nix ]; imports = [ ./dunstrc.nix ./terminal.nix ./polybar.nix ];
@ -46,7 +46,7 @@ in
i3.enable = true; i3.enable = true;
i3.config = { i3.config = {
modifier = "Mod4"; modifier = "Mod4";
terminal = "kitty"; terminal = "${pkgs.kitty}/bin/kitty";
keybindings = let keybindings = let
modifier = config.xsession.windowManager.i3.config.modifier; modifier = config.xsession.windowManager.i3.config.modifier;
in lib.mkOptionDefault { in lib.mkOptionDefault {
@ -118,7 +118,7 @@ in
platformTheme = "gtk"; platformTheme = "gtk";
}; };
xsession.windowManager.command = lib.mkIf non-nixos.enable (lib.mkForce "nixGL ${config.xsession.windowManager.i3.package}/bin/i3"); xsession.windowManager.command = lib.mkIf non-nixos.enable (lib.mkForce "${pkgs.nixgl.auto.nixGLDefault}/bin/nixGL ${config.xsession.windowManager.i3.package}/bin/i3");
home.packages = [ home.packages = [
pkgs.brightnessctl pkgs.brightnessctl