Add nix-alien for NixOS-related configurations

This commit is contained in:
Gabriel Arazas 2022-01-12 10:45:06 +08:00
parent 7db21c9fc5
commit 3d2076dabb
3 changed files with 146 additions and 5 deletions

128
flake.lock generated
View File

@ -97,6 +97,36 @@
} }
}, },
"flake-utils_3": { "flake-utils_3": {
"locked": {
"lastModified": 1638122382,
"narHash": "sha256-sQzZzAbvKEqN9s0bzWuYmRaA03v40gaJ4+iL1LXjaeI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "74f7e4319258e287b0f9cb95426c9853b282730b",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_4": {
"locked": {
"lastModified": 1638122382,
"narHash": "sha256-sQzZzAbvKEqN9s0bzWuYmRaA03v40gaJ4+iL1LXjaeI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "74f7e4319258e287b0f9cb95426c9853b282730b",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_5": {
"locked": { "locked": {
"lastModified": 1637014545, "lastModified": 1637014545,
"narHash": "sha256-26IZAc5yzlD9FlDT54io1oqG/bBoyka+FJk5guaX4x4=", "narHash": "sha256-26IZAc5yzlD9FlDT54io1oqG/bBoyka+FJk5guaX4x4=",
@ -172,6 +202,49 @@
"type": "github" "type": "github"
} }
}, },
"nix-alien": {
"inputs": {
"flake-utils": "flake-utils_3",
"nixpkgs": [
"nixpkgs"
],
"poetry2nix": "poetry2nix"
},
"locked": {
"lastModified": 1639575084,
"narHash": "sha256-m5OFkwadjdyBOUZakhXiFH5HVqwbg2B5j/7GryhzMDU=",
"owner": "thiagokokada",
"repo": "nix-alien",
"rev": "11a6d4aa3096e2982e3204bbf89ca42205617c5c",
"type": "github"
},
"original": {
"owner": "thiagokokada",
"repo": "nix-alien",
"type": "github"
}
},
"nix-ld": {
"inputs": {
"nixpkgs": [
"nixpkgs"
],
"utils": "utils"
},
"locked": {
"lastModified": 1637574694,
"narHash": "sha256-UHYvqGnsU4h5/Kt3gbiRbaMcN7hJ8u7ey8t4qO8maUI=",
"owner": "Mic92",
"repo": "nix-ld",
"rev": "6faa38511602d9c1c5ae44eaa0fc531e4b657576",
"type": "github"
},
"original": {
"owner": "Mic92",
"repo": "nix-ld",
"type": "github"
}
},
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1640871638, "lastModified": 1640871638,
@ -205,6 +278,21 @@
} }
}, },
"nixpkgs_3": { "nixpkgs_3": {
"locked": {
"lastModified": 1641910925,
"narHash": "sha256-XBtRhGGBpuQxGo1aQPZpUmX+pfhAKC65XZbFOVtGILc=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "dea335ea03b6f9cb2bb156bd8801fa0a9d619f16",
"type": "github"
},
"original": {
"owner": "NixOS",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_4": {
"locked": { "locked": {
"lastModified": 1641016545, "lastModified": 1641016545,
"narHash": "sha256-JMNwvnBzG0RjGG3eH27Y5/GlJ9ryeCdGJfqGbqxnmZY=", "narHash": "sha256-JMNwvnBzG0RjGG3eH27Y5/GlJ9ryeCdGJfqGbqxnmZY=",
@ -235,6 +323,25 @@
"type": "github" "type": "github"
} }
}, },
"poetry2nix": {
"inputs": {
"flake-utils": "flake-utils_4",
"nixpkgs": "nixpkgs_3"
},
"locked": {
"lastModified": 1639522248,
"narHash": "sha256-LNIVOj0SvJ0XCqaD3EW712yPUQkD5MWjC0vmJCV1oxc=",
"owner": "nix-community",
"repo": "poetry2nix",
"rev": "c8cadfffd9589b393f010f40aede44434302e845",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "poetry2nix",
"type": "github"
}
},
"root": { "root": {
"inputs": { "inputs": {
"agenix": "agenix", "agenix": "agenix",
@ -243,14 +350,16 @@
"flake-utils": "flake-utils", "flake-utils": "flake-utils",
"home-manager": "home-manager", "home-manager": "home-manager",
"neovim-nightly-overlay": "neovim-nightly-overlay", "neovim-nightly-overlay": "neovim-nightly-overlay",
"nixpkgs": "nixpkgs_3", "nix-alien": "nix-alien",
"nix-ld": "nix-ld",
"nixpkgs": "nixpkgs_4",
"nur": "nur", "nur": "nur",
"rust-overlay": "rust-overlay" "rust-overlay": "rust-overlay"
} }
}, },
"rust-overlay": { "rust-overlay": {
"inputs": { "inputs": {
"flake-utils": "flake-utils_3", "flake-utils": "flake-utils_5",
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"
] ]
@ -268,6 +377,21 @@
"repo": "rust-overlay", "repo": "rust-overlay",
"type": "github" "type": "github"
} }
},
"utils": {
"locked": {
"lastModified": 1610051610,
"narHash": "sha256-U9rPz/usA1/Aohhk7Cmc2gBrEEKRzcW4nwPWMPwja4Y=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "3982c9903e93927c2164caa727cd3f6a0e6d14cc",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
} }
}, },
"root": "root", "root": "root",

View File

@ -14,6 +14,12 @@
nur.url = "github:nix-community/NUR"; nur.url = "github:nix-community/NUR";
nur.inputs.nixpkgs.follows = "nixpkgs"; nur.inputs.nixpkgs.follows = "nixpkgs";
# Running unpatched binaries on NixOS! :O
nix-ld.url = "github:Mic92/nix-ld";
nix-ld.inputs.nixpkgs.follows = "nixpkgs";
nix-alien.url = "github:thiagokokada/nix-alien";
nix-alien.inputs.nixpkgs.follows = "nixpkgs";
# Managing your secrets. # Managing your secrets.
agenix.url = "github:ryantm/agenix"; agenix.url = "github:ryantm/agenix";
agenix.inputs.nixpkgs.follows = "nixpkgs"; agenix.inputs.nixpkgs.follows = "nixpkgs";
@ -92,8 +98,11 @@
# Stallman-senpai will be disappointed. # Stallman-senpai will be disappointed.
nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfree = true;
# Extend nixpkgs with our own package set. # Extend nixpkgs with our overlays except for the NixOS-focused modules
nixpkgs.overlays = overlays; # here.
nixpkgs.overlays = overlays ++ [
inputs.nix-alien.overlay
];
# Please clean your temporary crap. # Please clean your temporary crap.
boot.cleanTmpDir = true; boot.cleanTmpDir = true;

View File

@ -1,7 +1,7 @@
# This is where extra desktop goodies can be found. # This is where extra desktop goodies can be found.
# As a note, this is not where you set the aesthetics of your graphical sessions. # As a note, this is not where you set the aesthetics of your graphical sessions.
# That can be found in the `themes` module. # That can be found in the `themes` module.
{ config, options, lib, pkgs, ... }: { inputs, config, options, lib, pkgs, ... }:
let cfg = config.profiles.desktop; let cfg = config.profiles.desktop;
in { in {
@ -24,6 +24,7 @@ in {
}; };
}; };
imports = [ inputs.nix-ld.nixosModules.nix-ld ];
config = lib.mkIf cfg.enable (lib.mkMerge [ config = lib.mkIf cfg.enable (lib.mkMerge [
({ ({
# Enable Flatpak for additional options for installing desktop applications. # Enable Flatpak for additional options for installing desktop applications.
@ -36,6 +37,13 @@ in {
# Enable font-related options for more smoother and consistent experience. # Enable font-related options for more smoother and consistent experience.
fonts.enableDefaultFonts = true; fonts.enableDefaultFonts = true;
# Run unpatched binaries with these!
environment.systemPackages = with pkgs; [
nix-alien
nix-index
nix-index-update
];
}) })
(lib.mkIf cfg.audio.enable { (lib.mkIf cfg.audio.enable {