Compare commits
2 Commits
7dcd4ccc3b
...
5119d85da6
Author | SHA1 | Date |
---|---|---|
Jill | 5119d85da6 | |
Jill | 3277f36f7c |
|
@ -31,9 +31,12 @@ in {
|
|||
settings = {
|
||||
experimental-features = [ "nix-command" "flakes" ];
|
||||
auto-optimise-store = true;
|
||||
substituters = ["https://nix-community.cachix.org"];
|
||||
keep-outputs = true;
|
||||
keep-derivations = true;
|
||||
substituters = [ "https://nix-community.cachix.org" "https://nixpkgs-wayland.cachix.org" ];
|
||||
trusted-public-keys = [
|
||||
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||
"nixpkgs-wayland.cachix.org-1:3lwxaILxMRkVhehr5StQprHdEo4IrE8sRho9R9HOLYA="
|
||||
];
|
||||
};
|
||||
};
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
# apps
|
||||
vivaldi telegram-desktop onlyoffice-bin mpv
|
||||
# compatilibility
|
||||
wine
|
||||
wine64
|
||||
# misc
|
||||
cowsay file which tree gnused yt-dlp
|
||||
];
|
||||
|
|
|
@ -0,0 +1,76 @@
|
|||
{ lib, pkgs, inputs, config, ... }:
|
||||
let
|
||||
nixpkgs = inputs.nixpkgs;
|
||||
in {
|
||||
nix.registry.nixpkgs = {
|
||||
from = {
|
||||
id = "nixpkgs";
|
||||
type = "indirect";
|
||||
};
|
||||
to = lib.mkForce {
|
||||
path = "${nixpkgs}";
|
||||
type = "path";
|
||||
};
|
||||
};
|
||||
|
||||
systemd.tmpfiles.rules = [
|
||||
"d /root/.nix-defexpr 0755 root root - -"
|
||||
"L+ /root/.nix-defexpr/nixos - - - - ${nixpkgs}"
|
||||
"L+ /root/.nix-defexpr/nixpkgs - - - - ${nixpkgs}"
|
||||
];
|
||||
|
||||
# Provide compatibility layer for non-flake utils
|
||||
environment.etc."nixos/compat/default.nix".text = ''
|
||||
{ ... }:
|
||||
|
||||
let
|
||||
nixpkgs = import ${nixpkgs} {};
|
||||
in
|
||||
nixpkgs
|
||||
'';
|
||||
|
||||
environment.etc."nixos/compat/nixos/default.nix".text = ''
|
||||
{ ... }:
|
||||
|
||||
let
|
||||
current = import ${inputs.self};
|
||||
in
|
||||
current.nixosConfigurations."${config.networking.hostName}"
|
||||
'';
|
||||
|
||||
environment.etc."nixos/configuration.nix".text = ''
|
||||
nix = {
|
||||
nixPath = [ "nixpkgs=${nixpkgs}" ];
|
||||
};
|
||||
|
||||
system.name = "${config.networking.hostName}";
|
||||
system.stateVersion = "${config.system.stateVersion}";
|
||||
'';
|
||||
|
||||
environment.etc."nixos/current".source = inputs.self;
|
||||
environment.etc."nixos/nixpkgs".source = nixpkgs;
|
||||
environment.etc."nixos/options.json".source =
|
||||
if config.documentation.nixos.enable
|
||||
then "${config.system.build.manual.optionsJSON}/share/doc/nixos/options.json"
|
||||
else
|
||||
pkgs.writeTextFile {
|
||||
name = "options.json";
|
||||
text = "{}";
|
||||
};
|
||||
|
||||
environment.etc."nixos/system-packages".text =
|
||||
let
|
||||
packages = builtins.map (p: "${p.name}") config.environment.systemPackages;
|
||||
sorted = builtins.sort (a: b: lib.toLower a < lib.toLower b) (lib.unique packages);
|
||||
formatted = builtins.concatStringsSep "\n" sorted;
|
||||
in
|
||||
formatted;
|
||||
|
||||
environment.extraInit = ''
|
||||
export NIX_PATH="nixpkgs=${nixpkgs}"
|
||||
'';
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
nixos-option
|
||||
];
|
||||
}
|
Loading…
Reference in New Issue