[nix] ALL HAIL THE FLAKEN!!!

This commit is contained in:
Alyxia Sother 2023-06-09 11:19:42 +02:00
parent bdabaa7546
commit 4ea89899ca
No known key found for this signature in database
GPG Key ID: 01E16C4E775A37E4
5 changed files with 116 additions and 0 deletions

3
nix/.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
example/
result
result/

69
nix/flake.lock Normal file
View File

@ -0,0 +1,69 @@
{
"nodes": {
"darwin": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1686210161,
"narHash": "sha256-cgP8P2Gk4WtOzd/Y7nEmweLpPOtMKVvHCIcq9zm9qMk=",
"owner": "lnl7",
"repo": "nix-darwin",
"rev": "40e4b85baac86969f94d6dba893aeae015c562c1",
"type": "github"
},
"original": {
"owner": "lnl7",
"repo": "nix-darwin",
"type": "github"
}
},
"home-manager": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1686265152,
"narHash": "sha256-ArdPMx2G2rWlnGlqfIV+efTKXcN7F3W0/b5XKYq7n8E=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "2bbfc3a78afb4ea60345a5660d8d4173da66c884",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "home-manager",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1686087926,
"narHash": "sha256-mXzfJpCCT7Vup2sC3rZPB/AbEW+uBjwT027XWm7R6rA=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "9ea6dd599d2781168e36486745b5d17e826ab015",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-23.05-darwin",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"darwin": "darwin",
"home-manager": "home-manager",
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

20
nix/flake.nix Normal file
View File

@ -0,0 +1,20 @@
{
description = "flake of the lyxer...";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-23.05-darwin";
home-manager.url = "github:nix-community/home-manager";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
# nix will normally use the nixpkgs defined in home-managers inputs, we only want one copy of nixpkgs though
darwin.url = "github:lnl7/nix-darwin";
darwin.inputs.nixpkgs.follows = "nixpkgs"; # ...
};
# add the inputs declared above to the argument attribute set
outputs = { self, nixpkgs, home-manager, darwin }: {
darwinConfigurations."alymac" = darwin.lib.darwinSystem {
system = "x86_64-darwin";
modules = [ ./hosts/alymac/default.nix ];
};
};
}

View File

@ -0,0 +1,24 @@
# hosts/YourHostName/default.nix
{ pkgs, ... }:
{
# Make sure the nix daemon always runs
services.nix-daemon.enable = true;
# Installs a version of nix, that dosen't need "experimental-features = nix-command flakes" in /etc/nix/nix.conf
# services.nix-daemon.package = pkgs.nixFlakes;
# if you use zsh (the default on new macOS installations),
# you'll need to enable this so nix-darwin creates a zshrc sourcing needed environment changes
programs.zsh.enable = true;
# bash is enabled by default
homebrew = {
enable = true;
onActivation = {
autoUpdate = true;
upgrade = true;
};
casks = [
"discord"
];
};
}