Skip to content

Commit

Permalink
🗑️ Clean up and remove ambiguity
Browse files Browse the repository at this point in the history
Signed-off-by: Luka Leer <[email protected]>
  • Loading branch information
mahtaran committed May 3, 2024
1 parent 99a0293 commit 8502607
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 45 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# Based on https://github.com/github/gitignore

# Secrets
settings.nix
26 changes: 12 additions & 14 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -45,19 +45,14 @@
};
};

outputs = inputs@{ ... }:
let
settings = import ./settings.nix;
alejandra = inputs.alejandra.defaultPackage.${settings.system.architecture};
in {
formatter.${settings.system.architecture} = alejandra;
outputs = inputs@{ ... }: {
formatter."x86_64-linux" = inputs.alejandra.defaultPackage."x86_64-linux";

nixosConfigurations = {
${settings.system.name} = inputs.nixpkgs.lib.nixosSystem {
system = settings.system.architecture;
nixosConfigurations = rec {
feanor = inputs.nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = {
inherit inputs;
inherit settings;
};
modules = [
{ nix.settings.experimental-features = ["nix-command" "flakes"]; }
Expand All @@ -67,8 +62,12 @@
inputs.impermanence.nixosModules.impermanence
inputs.nur.nixosModules.nur

./host/${settings.system.name}/configuration.nix
{ environment.systemPackages = [ alejandra ]; }
./host/feanor/configuration.nix
{
environment.systemPackages = [
inputs.alejandra.defaultPackage.${system}
];
}

inputs.home-manager.nixosModules.home-manager
(
Expand All @@ -77,14 +76,13 @@
home-manager = {
extraSpecialArgs = {
inherit inputs;
inherit settings;
};
useGlobalPkgs = true;
useUserPackages = true;
sharedModules = [ inputs.nur.hmModules.nur ];

users = {
${settings.user.name} = import ./user/${settings.user.name}/home.nix;
mahtaran = import ./user/mahtaran/home.nix;
};
};
}
Expand Down
5 changes: 2 additions & 3 deletions host/feanor/configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
lib,
pkgs,
inputs,
settings,
...
}: {
imports = [
Expand Down Expand Up @@ -32,7 +31,7 @@
};

boot = lib.mkMerge [
(lib.mkIf (settings.system.secureBoot) {
(lib.mkIf (builtins.pathExists /persist/etc/secureboot/keys) {
loader.systemd-boot.enable = lib.mkForce false;
lanzaboote = {
enable = true;
Expand All @@ -49,7 +48,7 @@
};
})

(lib.mkIf (!settings.system.secureBoot) {
(lib.mkIf (!builtins.pathExists /persist/etc/secureboot/keys) {
loader.systemd-boot.enable = true;
})

Expand Down
26 changes: 0 additions & 26 deletions settings.example.nix

This file was deleted.

1 change: 0 additions & 1 deletion user/mahtaran/home.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
config,
pkgs,
inputs,
settings,
...
}: {
imports = [
Expand Down

0 comments on commit 8502607

Please sign in to comment.