-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Luka Leer <[email protected]>
- Loading branch information
Showing
6 changed files
with
126 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# Based on https://github.com/gitattributes/gitattributes | ||
|
||
# Auto detect text files and perform LF normalization | ||
* text=auto | ||
|
||
# The above will handle all files NOT found below | ||
|
||
# Tool configuration | ||
## Git | ||
.gitattributes text | ||
.gitignore text | ||
|
||
## Others | ||
.editorconfig text | ||
.env.example text | ||
|
||
# Documents | ||
## Plain text | ||
*.md text | ||
|
||
# Media | ||
## Audio | ||
*.flac binary | ||
*.ogg binary | ||
|
||
## Fonts | ||
*.eot binary | ||
*.ttf binary | ||
*.woff binary | ||
|
||
## Graphics | ||
*.png binary | ||
*.jpg binary | ||
*.svg text | ||
|
||
## Video | ||
*.mkv binary | ||
*.webm binary | ||
|
||
# Data | ||
*.json text | ||
*.yaml text | ||
*.toml text | ||
secret/**/*.yaml text diff=sopsdiffer | ||
|
||
# Code | ||
*.ps1 text eol=crlf | ||
*.sh text eol=lf | ||
*.py text |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Based on https://github.com/github/gitignore | ||
|
||
# Secrets | ||
settings.nix |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,73 +45,52 @@ | |
}; | ||
}; | ||
|
||
outputs = | ||
inputs@{ ... }: | ||
let | ||
systemSettings = { | ||
architecture = "x86_64-linux"; | ||
secureBoot = false; | ||
timezone = "Europe/Amsterdam"; | ||
defaultLocale = "en_GB.UTF-8"; | ||
extraLocaleSettings = { | ||
LC_ADDRESS = "nl_NL.UTF-8"; | ||
LC_IDENTIFICATION = "nl_NL.UTF-8"; | ||
LC_MEASUREMENT = "nl_NL.UTF-8"; | ||
LC_MONETARY = "nl_NL.UTF-8"; | ||
LC_NAME = "nl_NL.UTF-8"; | ||
LC_NUMERIC = "nl_NL.UTF-8"; | ||
LC_PAPER = "nl_NL.UTF-8"; | ||
LC_TELEPHONE = "nl_NL.UTF-8"; | ||
LC_TIME = "nl_NL.UTF-8"; | ||
outputs = inputs@{ ... }: | ||
let | ||
settings = import ./settings.nix; | ||
alejandra = inputs.alejandra.defaultPackage.${settings.system.architecture}; | ||
in { | ||
formatter.${settings.system.architecture} = alejandra; | ||
|
||
nixosConfigurations = { | ||
${settings.system.name} = inputs.nixpkgs.lib.nixosSystem { | ||
system = settings.system.architecture; | ||
specialArgs = { | ||
inherit inputs; | ||
inherit settings; | ||
}; | ||
}; | ||
userSettings = { | ||
username = "mahtaran"; | ||
name = "Luka"; | ||
email = "[email protected]"; | ||
editor = "nano"; | ||
}; | ||
in | ||
{ | ||
formatter.${systemSettings.architecture} = inputs.alejandra.defaultPackage.${systemSettings.architecture}; | ||
modules = [ | ||
{ nix.settings.experimental-features = ["nix-command" "flakes"]; } | ||
inputs.disko.nixosModules.disko | ||
inputs.lanzaboote.nixosModules.lanzaboote | ||
inputs.sops-nix.nixosModules.sops | ||
inputs.impermanence.nixosModules.impermanence | ||
inputs.nur.nixosModules.nur | ||
|
||
nixosConfigurations = { | ||
feanor = inputs.nixpkgs.lib.nixosSystem rec { | ||
system = systemSettings.architecture; | ||
specialArgs = { | ||
inherit inputs; | ||
inherit systemSettings userSettings; | ||
}; | ||
modules = [ | ||
inputs.disko.nixosModules.disko | ||
./module/disko.nix | ||
inputs.lanzaboote.nixosModules.lanzaboote | ||
inputs.sops-nix.nixosModules.sops | ||
inputs.impermanence.nixosModules.impermanence | ||
inputs.nur.nixosModules.nur | ||
./host/feanor/configuration.nix | ||
{ environment.systemPackages = [ inputs.alejandra.defaultPackage.${system} ]; } | ||
inputs.home-manager.nixosModules.home-manager | ||
( | ||
{ ... }: | ||
{ | ||
home-manager = { | ||
extraSpecialArgs = { | ||
inherit inputs; | ||
inherit systemSettings userSettings; | ||
}; | ||
useGlobalPkgs = true; | ||
useUserPackages = true; | ||
sharedModules = [ inputs.nur.hmModules.nur ]; | ||
./host/${settings.system.name}/configuration.nix | ||
{ environment.systemPackages = [ alejandra ]; } | ||
|
||
inputs.home-manager.nixosModules.home-manager | ||
( | ||
{ ... }: | ||
{ | ||
home-manager = { | ||
extraSpecialArgs = { | ||
inherit inputs; | ||
inherit settings; | ||
}; | ||
useGlobalPkgs = true; | ||
useUserPackages = true; | ||
sharedModules = [ inputs.nur.hmModules.nur ]; | ||
|
||
users = { | ||
${userSettings.username} = import ./user/${userSettings.username}/home.nix; | ||
}; | ||
users = { | ||
${settings.user.name} = import ./user/${settings.user.name}/home.nix; | ||
}; | ||
} | ||
) | ||
]; | ||
}; | ||
}; | ||
} | ||
) | ||
]; | ||
}; | ||
}; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ ... }: { | ||
system = { | ||
name = "feanor"; | ||
architecture = "x86_64-linux"; | ||
secureBoot = false; | ||
timezone = "Europe/Amsterdam"; | ||
defaultLocale = "en_GB.UTF-8"; | ||
extraLocaleSettings = { | ||
LC_ADDRESS = "nl_NL.UTF-8"; | ||
LC_IDENTIFICATION = "nl_NL.UTF-8"; | ||
LC_MEASUREMENT = "nl_NL.UTF-8"; | ||
LC_MONETARY = "nl_NL.UTF-8"; | ||
LC_NAME = "nl_NL.UTF-8"; | ||
LC_NUMERIC = "nl_NL.UTF-8"; | ||
LC_PAPER = "nl_NL.UTF-8"; | ||
LC_TELEPHONE = "nl_NL.UTF-8"; | ||
LC_TIME = "nl_NL.UTF-8"; | ||
}; | ||
}; | ||
user = { | ||
name = "mahtaran"; | ||
display = "Luka"; | ||
email = "[email protected]"; | ||
editor = "nano"; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,8 +2,7 @@ | |
config, | ||
pkgs, | ||
inputs, | ||
systemSettings, | ||
userSettings, | ||
settings, | ||
... | ||
}: { | ||
imports = [ | ||
|