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.
|
4. [[https://nix.catppuccin.com/][catppuccin]] - nix module that allows everything to be catppuccin themed.
|
||||||
|
|
||||||
#+begin_src nix :tangle flake.nix :noweb tangle
|
#+begin_src nix :tangle flake.nix :noweb tangle
|
||||||
{
|
{
|
||||||
description = "Henrov's nixos configuration";
|
description = "Henrov's nixos configuration";
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||||
home-manager = {
|
home-manager = {
|
||||||
url = "github:nix-community/home-manager";
|
url = "github:nix-community/home-manager";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
emacs-overlay = {
|
emacs-overlay = {
|
||||||
url = "github:nix-community/emacs-overlay";
|
url = "github:nix-community/emacs-overlay";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
@@ -659,14 +659,18 @@ The inputs for my system's configuration are very simple
|
|||||||
catppuccin = {
|
catppuccin = {
|
||||||
url = "github:catppuccin/nix";
|
url = "github:catppuccin/nix";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
zen-browser = {
|
zen-browser = {
|
||||||
url = "github:youwen5/zen-browser-flake";
|
url = "github:youwen5/zen-browser-flake";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
hyprland-nix = {
|
||||||
|
url = "github:hyprwm/hyprland-nix";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
<<flake-outputs>>
|
<<flake-outputs>>
|
||||||
}
|
}
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
* Flake Output
|
* Flake Output
|
||||||
|
|||||||
+102
-98
@@ -1,106 +1,110 @@
|
|||||||
{
|
{
|
||||||
description = "Henrov's nixos configuration";
|
description = "Henrov's nixos configuration";
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||||
home-manager = {
|
home-manager = {
|
||||||
url = "github:nix-community/home-manager";
|
url = "github:nix-community/home-manager";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
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;
|
|
||||||
};
|
};
|
||||||
|
emacs-overlay = {
|
||||||
home-manager.backupFileExtension = "backup";
|
url = "github:nix-community/emacs-overlay";
|
||||||
home-manager.users.${user.username} = {
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
imports = [
|
|
||||||
./machines/${machine}/home.nix
|
|
||||||
catppuccin.homeModules.catppuccin
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
}
|
catppuccin = {
|
||||||
|
url = "github:catppuccin/nix";
|
||||||
catppuccin.nixosModules.catppuccin # theme
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
# end_script as a systemd service
|
zen-browser = {
|
||||||
({ lib, config, pkgs, ... }: {
|
url = "github:youwen5/zen-browser-flake";
|
||||||
systemd.user.services.endScript = lib.mkIf (builtins.pathExists ./assets/scripts/end_script.sh) {
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
description = "Run end script after Home Manager";
|
};
|
||||||
wantedBy = [ "multi-user.target" ];
|
hyprland-nix = {
|
||||||
after = [ "home-manager-activate.service" ];
|
url = "github:hyprwm/hyprland-nix";
|
||||||
serviceConfig.Type = "oneshot";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
script = ''
|
|
||||||
${./assets/scripts/end_script.sh}
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
})
|
|
||||||
];
|
|
||||||
|
|
||||||
specialArgs = {
|
|
||||||
hostname = machine;
|
|
||||||
inherit user;
|
|
||||||
inherit inputs;
|
|
||||||
flakeRoot.outPath= inputs.self;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}) machines
|
outputs = inputs@{
|
||||||
);
|
nixpkgs,
|
||||||
|
home-manager,
|
||||||
devShells.${user.system}.default = pkgs.mkShell {
|
emacs-overlay,
|
||||||
buildInputs = with pkgs; [
|
catppuccin,
|
||||||
nil
|
...
|
||||||
nixfmt-rfc-style
|
}:
|
||||||
|
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