Compare commits
2 commits
965f1afee7
...
75db7243e7
Author | SHA1 | Date | |
---|---|---|---|
Dmitry Voronin | 75db7243e7 | ||
Dmitry Voronin | 1a71b2cdc6 |
39
flake.nix
39
flake.nix
|
@ -148,39 +148,38 @@
|
|||
)
|
||||
);
|
||||
|
||||
# Nixos systems.
|
||||
nixosConfigurations = let
|
||||
# Function to create a host. It does basic setup, like adding common modules.
|
||||
mkHost = { system, hostname, modules }: let
|
||||
in nixpkgs.lib.nixosSystem {
|
||||
mkHost = { system, hostname, modules }: nixpkgs.lib.nixosSystem {
|
||||
# `Inherit` is just an alias for `system = system;`, which means that
|
||||
# keep the `system` argument as a property in a resulting set.
|
||||
inherit system;
|
||||
|
||||
# List of modules to use by defualt for all the hosts.
|
||||
modules = modules ++ [
|
||||
# There I put host-specific configurations.
|
||||
./host/${system}/${hostname}
|
||||
|
||||
modules = [
|
||||
# Make a device hostname match the one from this config.
|
||||
{ networking.hostName = hostname; }
|
||||
|
||||
# Specify current release version.
|
||||
{ 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.
|
||||
home-manager.nixosModules.home-manager
|
||||
|
||||
# Add Stylix module.
|
||||
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 = let
|
||||
|
@ -241,7 +240,7 @@
|
|||
inherit self inputs secret util pkgs pkgsStable pkgsMaster;
|
||||
inherit (self) const __findFile;
|
||||
};
|
||||
modules = modules ++ (self.findFiles ./config) ++ [
|
||||
modules = [
|
||||
./home/HomeManager.nix
|
||||
{
|
||||
home.hm = {
|
||||
|
@ -259,7 +258,10 @@
|
|||
{ nix.settings.experimental-features = [ "nix-command " "flakes" ]; }
|
||||
|
||||
inputs.stylix.homeManagerModules.stylix
|
||||
];
|
||||
] ++
|
||||
modules ++
|
||||
(self.findFiles ./config) ++
|
||||
(self.findFiles ./module);
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -303,7 +305,8 @@
|
|||
inherit (self) __findFile;
|
||||
inherit lib pkgs;
|
||||
})
|
||||
];
|
||||
] ++
|
||||
(self.findFiles ./module);
|
||||
|
||||
# SpecialArgs allows you to pass objects down to other configuration.
|
||||
extraSpecialArgs = {
|
||||
|
|
|
@ -27,6 +27,6 @@ in {
|
|||
text = (util.trimTabs ''
|
||||
# Read `man 5 sway` for a complete reference.
|
||||
include /etc/sway/config.d/*
|
||||
'') + swayRc + config.module.desktop.sway.extraConfig or "";
|
||||
'') + swayRc + config.module.desktop.sway.extraConfig;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,8 +1,4 @@
|
|||
{ ... }: {
|
||||
imports = [
|
||||
./Filesystem.nix
|
||||
];
|
||||
|
||||
home.nixos.enable = true;
|
||||
user = {
|
||||
dasha.enable = true;
|
||||
|
|
|
@ -1,8 +1,4 @@
|
|||
{ ... }: {
|
||||
imports = [
|
||||
./Filesystem.nix
|
||||
];
|
||||
|
||||
home.nixos.enable = true;
|
||||
user = {
|
||||
root.enable = true;
|
||||
|
|
|
@ -1,13 +1,4 @@
|
|||
{ config, ... }: {
|
||||
imports = [
|
||||
./Backup.nix
|
||||
./Container.nix
|
||||
./Filesystem.nix
|
||||
./Network.nix
|
||||
./Photoprocess.nix
|
||||
./YaMusicDownload.nix
|
||||
];
|
||||
|
||||
home.nixos.enable = true;
|
||||
user = {
|
||||
root.enable = true;
|
||||
|
|
|
@ -1,8 +1,4 @@
|
|||
{ ... }: {
|
||||
imports = [
|
||||
./Filesystem.nix
|
||||
];
|
||||
|
||||
home.nixos.enable = true;
|
||||
user = {
|
||||
dasha.enable = true;
|
||||
|
|
|
@ -1,8 +1,4 @@
|
|||
{ ... }: {
|
||||
imports = [
|
||||
./Fprint.nix
|
||||
];
|
||||
|
||||
# Keyd Print to Macro remap.
|
||||
services.keyd.keyboards.default.settings.main.print = "layer(layer_number)";
|
||||
|
||||
|
|
|
@ -1,29 +0,0 @@
|
|||
{ 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"
|
||||
# ];
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue