Recreated nix files
This commit is contained in:
+323
-319
File diff suppressed because it is too large
Load Diff
@@ -644,14 +644,14 @@ The inputs for my system's configuration are very simple
|
||||
4. [[https://nix.catppuccin.com/][catppuccin]] - nix module that allows everything to be catppuccin themed.
|
||||
|
||||
#+begin_src nix :tangle flake.nix :noweb tangle
|
||||
{
|
||||
{
|
||||
description = "Henrov's nixos configuration";
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
emacs-overlay = {
|
||||
url = "github:nix-community/emacs-overlay";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
@@ -659,14 +659,18 @@ The inputs for my system's configuration are very simple
|
||||
catppuccin = {
|
||||
url = "github:catppuccin/nix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
zen-browser = {
|
||||
url = "github:youwen5/zen-browser-flake";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
hyprland-nix = {
|
||||
url = "github:hyprwm/hyprland-nix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
<<flake-outputs>>
|
||||
}
|
||||
}
|
||||
#+end_src
|
||||
|
||||
* Flake Output
|
||||
|
||||
+102
-98
@@ -1,106 +1,110 @@
|
||||
{
|
||||
description = "Henrov's nixos configuration";
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
emacs-overlay = {
|
||||
url = "github:nix-community/emacs-overlay";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
catppuccin = {
|
||||
url = "github:catppuccin/nix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
zen-browser = {
|
||||
url = "github:youwen5/zen-browser-flake";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
outputs = inputs@{
|
||||
nixpkgs,
|
||||
home-manager,
|
||||
emacs-overlay,
|
||||
catppuccin,
|
||||
...
|
||||
}:
|
||||
let
|
||||
user = import ./user.nix;
|
||||
lib = nixpkgs.lib;
|
||||
machines = [
|
||||
"traveldroid"
|
||||
];
|
||||
pkgs = import nixpkgs {
|
||||
inherit (user) system;
|
||||
};
|
||||
in
|
||||
{
|
||||
nixosConfigurations = builtins.listToAttrs (
|
||||
builtins.map (machine: {
|
||||
name = machine;
|
||||
value = lib.nixosSystem {
|
||||
modules = [
|
||||
# Start_script.nix
|
||||
({ lib, config, pkgs, ... }: {
|
||||
imports = [ ./start_script.nix ];
|
||||
})
|
||||
({ lib, ... }: {
|
||||
nixpkgs.overlays = [ emacs-overlay.overlays.default ];
|
||||
})
|
||||
./machines/${machine}/configuration.nix
|
||||
home-manager.nixosModules.home-manager
|
||||
{
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
|
||||
home-manager.extraSpecialArgs = {
|
||||
inherit user inputs;
|
||||
flakeRoot.outPath= inputs.self;
|
||||
description = "Henrov's nixos configuration";
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
home-manager.backupFileExtension = "backup";
|
||||
home-manager.users.${user.username} = {
|
||||
imports = [
|
||||
./machines/${machine}/home.nix
|
||||
catppuccin.homeModules.catppuccin
|
||||
];
|
||||
emacs-overlay = {
|
||||
url = "github:nix-community/emacs-overlay";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
}
|
||||
|
||||
catppuccin.nixosModules.catppuccin # theme
|
||||
|
||||
# end_script as a systemd service
|
||||
({ lib, config, pkgs, ... }: {
|
||||
systemd.user.services.endScript = lib.mkIf (builtins.pathExists ./assets/scripts/end_script.sh) {
|
||||
description = "Run end script after Home Manager";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
after = [ "home-manager-activate.service" ];
|
||||
serviceConfig.Type = "oneshot";
|
||||
script = ''
|
||||
${./assets/scripts/end_script.sh}
|
||||
'';
|
||||
};
|
||||
})
|
||||
];
|
||||
|
||||
specialArgs = {
|
||||
hostname = machine;
|
||||
inherit user;
|
||||
inherit inputs;
|
||||
flakeRoot.outPath= inputs.self;
|
||||
catppuccin = {
|
||||
url = "github:catppuccin/nix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
zen-browser = {
|
||||
url = "github:youwen5/zen-browser-flake";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
hyprland-nix = {
|
||||
url = "github:hyprwm/hyprland-nix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
}) machines
|
||||
);
|
||||
|
||||
devShells.${user.system}.default = pkgs.mkShell {
|
||||
buildInputs = with pkgs; [
|
||||
nil
|
||||
nixfmt-rfc-style
|
||||
outputs = inputs@{
|
||||
nixpkgs,
|
||||
home-manager,
|
||||
emacs-overlay,
|
||||
catppuccin,
|
||||
...
|
||||
}:
|
||||
let
|
||||
user = import ./user.nix;
|
||||
lib = nixpkgs.lib;
|
||||
machines = [
|
||||
"traveldroid"
|
||||
];
|
||||
pkgs = import nixpkgs {
|
||||
inherit (user) system;
|
||||
};
|
||||
};
|
||||
|
||||
in
|
||||
{
|
||||
nixosConfigurations = builtins.listToAttrs (
|
||||
builtins.map (machine: {
|
||||
name = machine;
|
||||
value = lib.nixosSystem {
|
||||
modules = [
|
||||
# Start_script.nix
|
||||
({ lib, config, pkgs, ... }: {
|
||||
imports = [ ./start_script.nix ];
|
||||
})
|
||||
({ lib, ... }: {
|
||||
nixpkgs.overlays = [ emacs-overlay.overlays.default ];
|
||||
})
|
||||
./machines/${machine}/configuration.nix
|
||||
home-manager.nixosModules.home-manager
|
||||
{
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
|
||||
home-manager.extraSpecialArgs = {
|
||||
inherit user inputs;
|
||||
flakeRoot.outPath= inputs.self;
|
||||
};
|
||||
|
||||
home-manager.backupFileExtension = "backup";
|
||||
home-manager.users.${user.username} = {
|
||||
imports = [
|
||||
./machines/${machine}/home.nix
|
||||
catppuccin.homeModules.catppuccin
|
||||
];
|
||||
};
|
||||
}
|
||||
|
||||
catppuccin.nixosModules.catppuccin # theme
|
||||
|
||||
# end_script as a systemd service
|
||||
({ lib, config, pkgs, ... }: {
|
||||
systemd.user.services.endScript = lib.mkIf (builtins.pathExists ./assets/scripts/end_script.sh) {
|
||||
description = "Run end script after Home Manager";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
after = [ "home-manager-activate.service" ];
|
||||
serviceConfig.Type = "oneshot";
|
||||
script = ''
|
||||
${./assets/scripts/end_script.sh}
|
||||
'';
|
||||
};
|
||||
})
|
||||
];
|
||||
|
||||
specialArgs = {
|
||||
hostname = machine;
|
||||
inherit user;
|
||||
inherit inputs;
|
||||
flakeRoot.outPath= inputs.self;
|
||||
};
|
||||
};
|
||||
}) machines
|
||||
);
|
||||
|
||||
devShells.${user.system}.default = pkgs.mkShell {
|
||||
buildInputs = with pkgs; [
|
||||
nil
|
||||
nixfmt-rfc-style
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user