feat: init system & nix modules
This commit is contained in:
parent
b7d69e9fd0
commit
244c66c51c
8 changed files with 87 additions and 127 deletions
|
@ -20,23 +20,7 @@
|
|||
networking = {
|
||||
hostName = "hime";
|
||||
};
|
||||
|
||||
time.timeZone = "America/New_York";
|
||||
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
|
||||
i18n.extraLocaleSettings = {
|
||||
LC_ADDRESS = "en_US.UTF-8";
|
||||
LC_IDENTIFICATION = "en_US.UTF-8";
|
||||
LC_MEASUREMENT = "en_US.UTF-8";
|
||||
LC_MONETARY = "en_US.UTF-8";
|
||||
LC_NAME = "en_US.UTF-8";
|
||||
LC_NUMERIC = "en_US.UTF-8";
|
||||
LC_PAPER = "en_US.UTF-8";
|
||||
LC_TELEPHONE = "en_US.UTF-8";
|
||||
LC_TIME = "en_US.UTF-8";
|
||||
};
|
||||
|
||||
|
||||
services.xserver = {
|
||||
layout = "us";
|
||||
xkbVariant = "";
|
||||
|
@ -49,10 +33,6 @@
|
|||
};
|
||||
};
|
||||
|
||||
services.fstrim = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
virtualisation.docker.enable = true;
|
||||
users ={
|
||||
defaultUserShell = pkgs.nushell;
|
||||
|
@ -67,7 +47,6 @@
|
|||
};
|
||||
};
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
docker-compose
|
||||
|
@ -76,19 +55,4 @@
|
|||
nfs-utils
|
||||
];
|
||||
|
||||
nix = {
|
||||
package = pkgs.nixFlakes;
|
||||
extraOptions = ''
|
||||
experimental-features = nix-command flakes
|
||||
warn-dirty = false
|
||||
'';
|
||||
settings.auto-optimise-store = true;
|
||||
gc = {
|
||||
automatic = true;
|
||||
dates = "weekly";
|
||||
options = "--delete-older-than 7d";
|
||||
};
|
||||
};
|
||||
|
||||
system.stateVersion = "23.05";
|
||||
}
|
||||
|
|
|
@ -20,22 +20,6 @@
|
|||
hostName = "sutakku";
|
||||
};
|
||||
|
||||
time.timeZone = "America/New_York";
|
||||
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
|
||||
i18n.extraLocaleSettings = {
|
||||
LC_ADDRESS = "en_US.UTF-8";
|
||||
LC_IDENTIFICATION = "en_US.UTF-8";
|
||||
LC_MEASUREMENT = "en_US.UTF-8";
|
||||
LC_MONETARY = "en_US.UTF-8";
|
||||
LC_NAME = "en_US.UTF-8";
|
||||
LC_NUMERIC = "en_US.UTF-8";
|
||||
LC_PAPER = "en_US.UTF-8";
|
||||
LC_TELEPHONE = "en_US.UTF-8";
|
||||
LC_TIME = "en_US.UTF-8";
|
||||
};
|
||||
|
||||
services.xserver = {
|
||||
layout = "us";
|
||||
xkbVariant = "";
|
||||
|
@ -50,7 +34,6 @@
|
|||
extraGroups = [ "networkmanager" "wheel" ];
|
||||
};
|
||||
};
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
wget
|
||||
|
@ -65,20 +48,4 @@
|
|||
};
|
||||
|
||||
services.openssh.enable = true;
|
||||
|
||||
nix = {
|
||||
package = pkgs.nixFlakes;
|
||||
extraOptions = ''
|
||||
experimental-features = nix-command flakes
|
||||
warn-dirty = false
|
||||
'';
|
||||
settings.auto-optimise-store = true;
|
||||
gc = {
|
||||
automatic = true;
|
||||
dates = "weekly";
|
||||
options = "delete-older-than 7d";
|
||||
};
|
||||
};
|
||||
|
||||
system.stateVersion = "23.05";
|
||||
}
|
||||
|
|
|
@ -33,26 +33,7 @@
|
|||
hostName = "tsuki";
|
||||
};
|
||||
|
||||
time.timeZone = "America/New_York";
|
||||
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
|
||||
i18n.extraLocaleSettings = {
|
||||
LC_ADDRESS = "en_US.UTF-8";
|
||||
LC_IDENTIFICATION = "en_US.UTF-8";
|
||||
LC_MEASUREMENT = "en_US.UTF-8";
|
||||
LC_MONETARY = "en_US.UTF-8";
|
||||
LC_NAME = "en_US.UTF-8";
|
||||
LC_NUMERIC = "en_US.UTF-8";
|
||||
LC_PAPER = "en_US.UTF-8";
|
||||
LC_TELEPHONE = "en_US.UTF-8";
|
||||
LC_TIME = "en_US.UTF-8";
|
||||
};
|
||||
|
||||
services = {
|
||||
fstrim = {
|
||||
enable = true;
|
||||
};
|
||||
xserver = {
|
||||
enable = true;
|
||||
videoDrivers = [ "nvidia" ];
|
||||
|
@ -144,40 +125,4 @@
|
|||
nodePackages_latest.yaml-language-server
|
||||
python310Packages.python-lsp-server
|
||||
];
|
||||
|
||||
nix = {
|
||||
package = pkgs.nixFlakes;
|
||||
extraOptions = ''
|
||||
experimental-features = nix-command flakes
|
||||
warn-dirty = false
|
||||
'';
|
||||
gc = {
|
||||
automatic = true;
|
||||
dates = "weekly";
|
||||
options = "--delete-older-than 7d";
|
||||
};
|
||||
settings = {
|
||||
auto-optimise-store = true;
|
||||
builders-use-substitutes = true;
|
||||
substituters = [
|
||||
"https://hyprland.cachix.org"
|
||||
"https://cache.nixos.org"
|
||||
];
|
||||
trusted-public-keys = [
|
||||
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
|
||||
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
nixpkgs.config = {
|
||||
permittedInsecurePackages = [
|
||||
"qtwebkit-5.212.0-alpha4"
|
||||
"electron-12.2.3"
|
||||
];
|
||||
allowUnfree = true;
|
||||
};
|
||||
|
||||
system.stateVersion = "23.05";
|
||||
|
||||
}
|
||||
|
|
|
@ -8,6 +8,8 @@ name | description
|
|||
`fonts` | font handling
|
||||
`greetd` | login manager
|
||||
`networking` | common network configuration
|
||||
`nix` | common nix configuration
|
||||
`security` | stolen from [hlissner](https://github.com/hlissner)
|
||||
`swayidle` | idle manager daemon
|
||||
`system.nix` | commonly shared system settings
|
||||
`udevd` | fixes an issue when using `nixos-rebuild`, tracked [here](https://github.com/NixOS/nixpkgs/issues/180175)
|
|
@ -5,5 +5,7 @@
|
|||
./security.nix
|
||||
./udevd.nix
|
||||
./networking.nix
|
||||
./nix.nix
|
||||
./system.nix
|
||||
];
|
||||
}
|
||||
|
|
|
@ -3,13 +3,13 @@
|
|||
}: {
|
||||
networking = {
|
||||
networkmanager.enable = true;
|
||||
nameservers = [ "1.1.1.1" ];
|
||||
nameservers = [ "192.168.1.89" ];
|
||||
firewall = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
environment.etc = {
|
||||
"resolv.conf".text = "nameserver 1.1.1.1\n";
|
||||
"resolv.conf".text = "nameserver 192.168.1.89\n";
|
||||
};
|
||||
|
||||
services.tailscale = {
|
||||
|
|
46
modules/nix.nix
Normal file
46
modules/nix.nix
Normal file
|
@ -0,0 +1,46 @@
|
|||
{
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
|
||||
nixpkgs = {
|
||||
config = {
|
||||
allowUnfree = true;
|
||||
permittedInsecurePackages = [
|
||||
"qtwebkit-5.212.0-alpha4"
|
||||
"electron-12.2.3"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
nix = {
|
||||
package = pkgs.nixFlakes;
|
||||
extraOptions = ''
|
||||
experimental-features = nix-command flakes
|
||||
warn-dirty = false
|
||||
'';
|
||||
gc = {
|
||||
automatic = true;
|
||||
dates = "weekly";
|
||||
options = "--delete-older-than 7d";
|
||||
};
|
||||
settings = {
|
||||
auto-optimise-store = true;
|
||||
builders-use-substitutes = true;
|
||||
keep-derivations = true;
|
||||
keep-outputs = true;
|
||||
substituters = [
|
||||
"https://hyprland.cachix.org"
|
||||
"https://cache.nixos.org"
|
||||
];
|
||||
trusted-public-keys = [
|
||||
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
|
||||
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
system.autoUpgrade.enable = false;
|
||||
system.stateVersion = "23.05"; # no touchy
|
||||
|
||||
}
|
34
modules/system.nix
Normal file
34
modules/system.nix
Normal file
|
@ -0,0 +1,34 @@
|
|||
{
|
||||
...
|
||||
}: {
|
||||
|
||||
documentation = {
|
||||
enable = true;
|
||||
doc.enable = false;
|
||||
man.enable = true;
|
||||
dev.enable = false;
|
||||
};
|
||||
|
||||
services = {
|
||||
fstrim = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
time.timeZone = "America/New_York";
|
||||
|
||||
i18n = {
|
||||
defaultLocale = "en_US.UTF-8";
|
||||
extraLocaleSettings = {
|
||||
LC_ADDRESS = "en_US.UTF-8";
|
||||
LC_IDENTIFICATION = "en_US.UTF-8";
|
||||
LC_MEASUREMENT = "en_US.UTF-8";
|
||||
LC_MONETARY = "en_US.UTF-8";
|
||||
LC_NAME = "en_US.UTF-8";
|
||||
LC_NUMERIC = "en_US.UTF-8";
|
||||
LC_PAPER = "en_US.UTF-8";
|
||||
LC_TELEPHONE = "en_US.UTF-8";
|
||||
LC_TIME = "en_US.UTF-8";
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue