Compare commits

..

No commits in common. "75db7243e7fdfd23612c925b3a364cc5cc375605" and "965f1afee7273c5c5c36a5ccc1c529bad9ec847f" have entirely different histories.

24 changed files with 73 additions and 22 deletions

View file

@ -148,38 +148,39 @@
) )
); );
# Nixos systems.
nixosConfigurations = let nixosConfigurations = let
# Function to create a host. It does basic setup, like adding common modules. # Function to create a host. It does basic setup, like adding common modules.
mkHost = { system, hostname, modules }: nixpkgs.lib.nixosSystem { mkHost = { system, hostname, modules }: let
in nixpkgs.lib.nixosSystem {
# `Inherit` is just an alias for `system = system;`, which means that # `Inherit` is just an alias for `system = system;`, which means that
# keep the `system` argument as a property in a resulting set. # keep the `system` argument as a property in a resulting set.
inherit system; inherit system;
# List of modules to use by defualt for all the hosts. # List of modules to use by defualt for all the hosts.
modules = [ modules = modules ++ [
# There I put host-specific configurations.
./host/${system}/${hostname}
# Make a device hostname match the one from this config. # Make a device hostname match the one from this config.
{ networking.hostName = hostname; } { networking.hostName = hostname; }
# Specify current release version. # Specify current release version.
{ system.stateVersion = self.const.stateVersion; } { system.stateVersion = self.const.stateVersion; }
# Add modules.
{ imports = [ ./home/NixOs.nix ] ++
(self.findFiles ./config) ++
(self.findFiles ./container) ++
(self.findFiles ./module) ++
(self.findFiles ./overlay);
}
# Add Home Manager module. # Add Home Manager module.
home-manager.nixosModules.home-manager home-manager.nixosModules.home-manager
# Add Stylix module. # Add Stylix module.
stylix.nixosModules.stylix stylix.nixosModules.stylix
];
# HM config.
./home/NixOs.nix
] ++
modules ++
(self.findFiles ./host/${system}/${hostname}) ++
(self.findFiles ./config) ++
(self.findFiles ./container) ++
(self.findFiles ./module) ++
(self.findFiles ./system) ++
(self.findFiles ./overlay);
# SpecialArgs allows you to pass objects down to other NixOS modules. # SpecialArgs allows you to pass objects down to other NixOS modules.
specialArgs = let specialArgs = let
@ -240,7 +241,7 @@
inherit self inputs secret util pkgs pkgsStable pkgsMaster; inherit self inputs secret util pkgs pkgsStable pkgsMaster;
inherit (self) const __findFile; inherit (self) const __findFile;
}; };
modules = [ modules = modules ++ (self.findFiles ./config) ++ [
./home/HomeManager.nix ./home/HomeManager.nix
{ {
home.hm = { home.hm = {
@ -258,10 +259,7 @@
{ nix.settings.experimental-features = [ "nix-command " "flakes" ]; } { nix.settings.experimental-features = [ "nix-command " "flakes" ]; }
inputs.stylix.homeManagerModules.stylix inputs.stylix.homeManagerModules.stylix
] ++ ];
modules ++
(self.findFiles ./config) ++
(self.findFiles ./module);
}; };
}; };
@ -305,8 +303,7 @@
inherit (self) __findFile; inherit (self) __findFile;
inherit lib pkgs; inherit lib pkgs;
}) })
] ++ ];
(self.findFiles ./module);
# SpecialArgs allows you to pass objects down to other configuration. # SpecialArgs allows you to pass objects down to other configuration.
extraSpecialArgs = { extraSpecialArgs = {

View file

@ -27,6 +27,6 @@ in {
text = (util.trimTabs '' text = (util.trimTabs ''
# Read `man 5 sway` for a complete reference. # Read `man 5 sway` for a complete reference.
include /etc/sway/config.d/* include /etc/sway/config.d/*
'') + swayRc + config.module.desktop.sway.extraConfig; '') + swayRc + config.module.desktop.sway.extraConfig or "";
} }

View file

@ -1,4 +1,8 @@
{ ... }: { { ... }: {
imports = [
./Filesystem.nix
];
home.nixos.enable = true; home.nixos.enable = true;
user = { user = {
dasha.enable = true; dasha.enable = true;

View file

@ -1,4 +1,8 @@
{ ... }: { { ... }: {
imports = [
./Filesystem.nix
];
home.nixos.enable = true; home.nixos.enable = true;
user = { user = {
root.enable = true; root.enable = true;

View file

@ -1,4 +1,13 @@
{ config, ... }: { { config, ... }: {
imports = [
./Backup.nix
./Container.nix
./Filesystem.nix
./Network.nix
./Photoprocess.nix
./YaMusicDownload.nix
];
home.nixos.enable = true; home.nixos.enable = true;
user = { user = {
root.enable = true; root.enable = true;

View file

@ -1,4 +1,8 @@
{ ... }: { { ... }: {
imports = [
./Filesystem.nix
];
home.nixos.enable = true; home.nixos.enable = true;
user = { user = {
dasha.enable = true; dasha.enable = true;

View file

@ -1,4 +1,8 @@
{ ... }: { { ... }: {
imports = [
./Fprint.nix
];
# Keyd Print to Macro remap. # Keyd Print to Macro remap.
services.keyd.keyboards.default.settings.main.print = "layer(layer_number)"; services.keyd.keyboards.default.settings.main.print = "layer(layer_number)";

29
module/StrongSwan.nix Normal file
View file

@ -0,0 +1,29 @@
{ pkgs, lib, config, ... }: with lib; let
cfg = config.module.strongswan;
in {
options = {
module.strongswan.enable = mkEnableOption "StrongSwan Vpn support.";
};
config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [
networkmanager-l2tp
gnome.networkmanager-l2tp
# networkmanager_strongswan
# strongswan
# strongswanNM
];
networking.networkmanager.enableStrongSwan = true;
services.xl2tpd.enable = true;
services.strongswan = {
enable = true;
secrets = [
"ipsec.d/ipsec.nm-l2tp.secrets"
];
};
# NOTE: Try this if VPN ever breaks.
# systemd.tmpfiles.rules = [
# "L /etc/ipsec.secrets - - - - /etc/ipsec.d/ipsec.nm-l2tp.secrets"
# ];
};
}