mirror of
https://github.com/nmasur/dotfiles
synced 2024-10-18 21:59:02 +00:00
Compare commits
No commits in common. "67af160088d14ad6e07c5e19df2422270053dbf6" and "ac3d5e495c4deba836781dcb0f24d56ad760b66b" have entirely different histories.
67af160088
...
ac3d5e495c
21
flake.lock
21
flake.lock
@ -69,26 +69,6 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"disko": {
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs": [
|
|
||||||
"nixpkgs"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1677116397,
|
|
||||||
"narHash": "sha256-2OHwhv4k1SDEuNxhq+zluvrd5pbW8d4TP9NKW4B8iO8=",
|
|
||||||
"owner": "nix-community",
|
|
||||||
"repo": "disko",
|
|
||||||
"rev": "8fddb2fd721365fa77ff68b709539639d4dc65d7",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nix-community",
|
|
||||||
"repo": "disko",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"firefox-darwin": {
|
"firefox-darwin": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": "nixpkgs"
|
"nixpkgs": "nixpkgs"
|
||||||
@ -416,7 +396,6 @@
|
|||||||
"bufferline-nvim-src": "bufferline-nvim-src",
|
"bufferline-nvim-src": "bufferline-nvim-src",
|
||||||
"cmp-nvim-lsp-src": "cmp-nvim-lsp-src",
|
"cmp-nvim-lsp-src": "cmp-nvim-lsp-src",
|
||||||
"darwin": "darwin",
|
"darwin": "darwin",
|
||||||
"disko": "disko",
|
|
||||||
"firefox-darwin": "firefox-darwin",
|
"firefox-darwin": "firefox-darwin",
|
||||||
"home-manager": "home-manager",
|
"home-manager": "home-manager",
|
||||||
"nil": "nil",
|
"nil": "nil",
|
||||||
|
@ -29,12 +29,6 @@
|
|||||||
# Use official Firefox binary for macOS
|
# Use official Firefox binary for macOS
|
||||||
firefox-darwin.url = "github:bandithedoge/nixpkgs-firefox-darwin";
|
firefox-darwin.url = "github:bandithedoge/nixpkgs-firefox-darwin";
|
||||||
|
|
||||||
# Manage disk format and partitioning
|
|
||||||
disko = {
|
|
||||||
url = "github:nix-community/disko";
|
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
};
|
|
||||||
|
|
||||||
# Wallpapers
|
# Wallpapers
|
||||||
wallpapers = {
|
wallpapers = {
|
||||||
url = "gitlab:exorcist365/wallpapers";
|
url = "gitlab:exorcist365/wallpapers";
|
||||||
@ -152,8 +146,6 @@
|
|||||||
darwinConfigurations.lookingglass.config.home-manager.users."Noah.Masur".home;
|
darwinConfigurations.lookingglass.config.home-manager.users."Noah.Masur".home;
|
||||||
};
|
};
|
||||||
|
|
||||||
diskoConfigurations = { swan = import ./hosts/swan/disks.nix; };
|
|
||||||
|
|
||||||
# Package servers into images with a generator
|
# Package servers into images with a generator
|
||||||
packages = forAllSystems (system: {
|
packages = forAllSystems (system: {
|
||||||
|
|
||||||
|
@ -13,23 +13,5 @@ nixos-generators.nixosGenerate {
|
|||||||
users.extraUsers.root.openssh.authorizedKeys.keys = [
|
users.extraUsers.root.openssh.authorizedKeys.keys = [
|
||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIB+AbmjGEwITk5CK9y7+Rg27Fokgj9QEjgc9wST6MA3s"
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIB+AbmjGEwITk5CK9y7+Rg27Fokgj9QEjgc9wST6MA3s"
|
||||||
];
|
];
|
||||||
services.openssh = {
|
|
||||||
enable = true;
|
|
||||||
ports = [ 22 ];
|
|
||||||
allowSFTP = true;
|
|
||||||
settings = {
|
|
||||||
GatewayPorts = "no";
|
|
||||||
X11Forwarding = false;
|
|
||||||
PasswordAuthentication = false;
|
|
||||||
PermitRootLogin = "yes";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
environment.systemPackages =
|
|
||||||
with (import inputs.nixpkgs { inherit system; }); [
|
|
||||||
git
|
|
||||||
vim
|
|
||||||
wget
|
|
||||||
curl
|
|
||||||
];
|
|
||||||
}];
|
}];
|
||||||
}
|
}
|
||||||
|
@ -15,9 +15,7 @@ nixpkgs.lib.nixosSystem {
|
|||||||
(removeAttrs globals [ "mail.server" ])
|
(removeAttrs globals [ "mail.server" ])
|
||||||
wsl.nixosModules.wsl
|
wsl.nixosModules.wsl
|
||||||
home-manager.nixosModules.home-manager
|
home-manager.nixosModules.home-manager
|
||||||
disko.nixosModules.disko
|
|
||||||
{
|
{
|
||||||
disko.devices = import ./disks.nix;
|
|
||||||
server = true;
|
server = true;
|
||||||
gui.enable = false;
|
gui.enable = false;
|
||||||
theme = { colors = (import ../../colorscheme/gruvbox).dark; };
|
theme = { colors = (import ../../colorscheme/gruvbox).dark; };
|
||||||
@ -39,11 +37,11 @@ nixpkgs.lib.nixosSystem {
|
|||||||
boot.zfs.enabled = true;
|
boot.zfs.enabled = true;
|
||||||
boot.kernelPackages =
|
boot.kernelPackages =
|
||||||
config.boot.zfs.package.latestCompatibleLinuxPackages;
|
config.boot.zfs.package.latestCompatibleLinuxPackages;
|
||||||
# boot.zfs.extraPools = [ "mypool" ];
|
boot.zfs.extraPools = [ "mypool" ];
|
||||||
# services.zfs.autoScrub.enable = true;
|
services.zfs.autoScrub.enable = true;
|
||||||
# services.zfs.autoScrub.interval = "daily";
|
services.zfs.autoScrub.interval = "daily";
|
||||||
|
|
||||||
# services.nfs.server.enable = true;
|
services.nfs.server.enable = true;
|
||||||
|
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
{
|
{ bootDisk, storageDisks ? [ "/dev/vdb" "/dev/vdc" ], ... }: {
|
||||||
disk = {
|
disk = {
|
||||||
boot = {
|
boot = {
|
||||||
type = "disk";
|
type = "disk";
|
||||||
device = "/dev/nvme0n1";
|
device = "/dev/whatever";
|
||||||
content = {
|
content = {
|
||||||
type = "table";
|
type = "table";
|
||||||
format = "gpt";
|
format = "gpt";
|
||||||
@ -36,45 +36,9 @@
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
sda = {
|
a = {
|
||||||
type = "disk";
|
type = "disk";
|
||||||
device = "/dev/sda";
|
device = builtins.elemAt storageDisks 1;
|
||||||
content = {
|
|
||||||
type = "table";
|
|
||||||
format = "gpt";
|
|
||||||
partitions = [{
|
|
||||||
type = "partition";
|
|
||||||
name = "zfs";
|
|
||||||
start = "128MiB";
|
|
||||||
end = "100%";
|
|
||||||
content = {
|
|
||||||
type = "zfs";
|
|
||||||
pool = "tank";
|
|
||||||
};
|
|
||||||
}];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
sdb = {
|
|
||||||
type = "disk";
|
|
||||||
device = "/dev/sdb";
|
|
||||||
content = {
|
|
||||||
type = "table";
|
|
||||||
format = "gpt";
|
|
||||||
partitions = [{
|
|
||||||
type = "partition";
|
|
||||||
name = "zfs";
|
|
||||||
start = "128MiB";
|
|
||||||
end = "100%";
|
|
||||||
content = {
|
|
||||||
type = "zfs";
|
|
||||||
pool = "tank";
|
|
||||||
};
|
|
||||||
}];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
sdc = {
|
|
||||||
type = "disk";
|
|
||||||
device = "/dev/sdc";
|
|
||||||
content = {
|
content = {
|
||||||
type = "table";
|
type = "table";
|
||||||
format = "gpt";
|
format = "gpt";
|
||||||
@ -146,21 +110,21 @@
|
|||||||
# mountpoint = "/ext4onzfs";
|
# mountpoint = "/ext4onzfs";
|
||||||
# };
|
# };
|
||||||
# };
|
# };
|
||||||
# encrypted = {
|
encrypted = {
|
||||||
# zfs_type = "filesystem";
|
zfs_type = "filesystem";
|
||||||
# size = "20M";
|
size = "20M";
|
||||||
# options = {
|
options = {
|
||||||
# mountpoint = "none";
|
mountpoint = "none";
|
||||||
# encryption = "aes-256-gcm";
|
encryption = "aes-256-gcm";
|
||||||
# keyformat = "passphrase";
|
keyformat = "passphrase";
|
||||||
# keylocation = "file:///tmp/secret.key";
|
keylocation = "file:///tmp/secret.key";
|
||||||
# };
|
};
|
||||||
# };
|
};
|
||||||
# "encrypted/test" = {
|
"encrypted/test" = {
|
||||||
# zfs_type = "filesystem";
|
zfs_type = "filesystem";
|
||||||
# size = "2M";
|
size = "2M";
|
||||||
# mountpoint = "/zfs_crypted";
|
mountpoint = "/zfs_crypted";
|
||||||
# };
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -1,29 +0,0 @@
|
|||||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
|
||||||
# and may be overwritten by future invocations. Please make changes
|
|
||||||
# to /etc/nixos/configuration.nix instead.
|
|
||||||
{ config, lib, pkgs, modulesPath, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
|
||||||
|
|
||||||
boot.initrd.availableKernelModules =
|
|
||||||
[ "xhci_pci" "ahci" "nvme" "usb_storage" "sd_mod" ];
|
|
||||||
boot.initrd.kernelModules = [ ];
|
|
||||||
boot.kernelModules = [ "kvm-intel" ];
|
|
||||||
boot.extraModulePackages = [ ];
|
|
||||||
|
|
||||||
swapDevices = [ ];
|
|
||||||
|
|
||||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
|
||||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
|
||||||
# still possible to use this option, but it's recommended to use it in conjunction
|
|
||||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
|
||||||
networking.useDHCP = lib.mkDefault true;
|
|
||||||
# networking.interfaces.enp0s31f6.useDHCP = lib.mkDefault true;
|
|
||||||
# networking.interfaces.wlp3s0.useDHCP = lib.mkDefault true;
|
|
||||||
|
|
||||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
|
||||||
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
|
|
||||||
hardware.cpu.intel.updateMicrocode =
|
|
||||||
lib.mkDefault config.hardware.enableRedistributableFirmware;
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user