This commit is contained in:
Daniel Flanagan 2023-08-02 13:53:09 -05:00
parent dc1c44633f
commit 15a7aefef0
5 changed files with 108 additions and 65 deletions

View file

@ -7,5 +7,5 @@
wayland.windowManager.sway = { wayland.windowManager.sway = {
enable = true; enable = true;
} };
} }

View file

@ -19,6 +19,27 @@
"url": "ssh://gitea@git.lyte.dev/lytedev/api.lyte.dev.git" "url": "ssh://gitea@git.lyte.dev/lytedev/api.lyte.dev.git"
} }
}, },
"disko": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1690739034,
"narHash": "sha256-roW02IaiQ3gnEEDMCDWL5YyN+C4nBf/te6vfL7rG0jk=",
"owner": "nix-community",
"repo": "disko",
"rev": "4015740375676402a2ee6adebc3c30ea625b9a94",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "master",
"repo": "disko",
"type": "github"
}
},
"flake-utils": { "flake-utils": {
"inputs": { "inputs": {
"systems": "systems" "systems": "systems"
@ -109,6 +130,7 @@
"root": { "root": {
"inputs": { "inputs": {
"api-lyte-dev": "api-lyte-dev", "api-lyte-dev": "api-lyte-dev",
"disko": "disko",
"home-manager": "home-manager", "home-manager": "home-manager",
"nixpkgs": "nixpkgs_2", "nixpkgs": "nixpkgs_2",
"sops-nix": "sops-nix" "sops-nix": "sops-nix"

View file

@ -18,6 +18,13 @@
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
disko = {
url = "github:nix-community/disko/master"; # NOTE: lock update!
# use the version of nixpkgs we specified above rather than the one HM would ordinarily use
inputs.nixpkgs.follows = "nixpkgs";
};
sops-nix = { sops-nix = {
url = "github:Mic92/sops-nix"; url = "github:Mic92/sops-nix";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
@ -47,6 +54,9 @@
system = "x86_64-linux"; system = "x86_64-linux";
specialArgs = { inherit inputs; }; specialArgs = { inherit inputs; };
modules = [ modules = [
inputs.disko.nixosModules.disko
./machines/thinker-disks.nix
{ _module.args.disks = [ "/dev/nvme0n1" ]; }
./machines/thinker.nix ./machines/thinker.nix
inputs.home-manager.nixosModules.home-manager inputs.home-manager.nixosModules.home-manager
inputs.sops-nix.nixosModules.sops inputs.sops-nix.nixosModules.sops

View file

@ -1,4 +1,5 @@
{ disks ? [ "/dev/vda" ], ... }: { { disks ? [ "/dev/vda" ], ... }: {
disko.devices = {
disk = { disk = {
vdb = { vdb = {
type = "disk"; type = "disk";
@ -10,7 +11,7 @@
label = "EFI"; label = "EFI";
name = "ESP"; name = "ESP";
size = "512M"; size = "512M";
type = "EF00" ; type = "EF00";
content = { content = {
type = "filesystem"; type = "filesystem";
format = "vfat"; format = "vfat";
@ -55,4 +56,5 @@
}; };
}; };
}; };
};
} }

View file

@ -8,7 +8,6 @@
imports = imports =
[ # Include the results of the hardware scan. [ # Include the results of the hardware scan.
./thinker-hardware.nix ./thinker-hardware.nix
"${builtins.fetchTarball "https://github.com/nix-community/disko/archive/master.tar.gz"}/module.nix"
]; ];
# Use the systemd-boot EFI boot loader. # Use the systemd-boot EFI boot loader.
@ -20,6 +19,20 @@
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
networking.networkmanager.enable = true; networking.networkmanager.enable = true;
security.polkit.enable = true;
security.rtkit.enable = true;
programs.fish.enable = true;
users.defaultUserShell = pkgs.fish;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
jack.enable = true;
};
# Set your time zone. # Set your time zone.
time.timeZone = "America/Chicago"; time.timeZone = "America/Chicago";
@ -28,19 +41,18 @@
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
# Select internationalisation properties. # Select internationalisation properties.
# i18n.defaultLocale = "en_US.UTF-8"; i18n.defaultLocale = "en_US.UTF-8";
# console = { console = {
# font = "Lat2-Terminus16"; font = "Lat2-Terminus16";
# keyMap = "us"; useXkbConfig = true;
# useXkbConfig = true; # use xkbOptions in tty. };
# };
# Enable the X11 windowing system. # Enable the X11 windowing system.
# services.xserver.enable = true; # services.xserver.enable = true;
# Configure keymap in X11 # Configure keymap in X11
services.xserver.layout = "us"; services.xserver.layout = "us";
services.xserver.xkbOptions = "caps:escape"; services.xserver.xkbOptions = "ctrl:nocaps";
# Enable CUPS to print documents. # Enable CUPS to print documents.
# services.printing.enable = true; # services.printing.enable = true;
@ -67,10 +79,9 @@
dtach dtach
exa exa
fd fd
fish
fwupd fwupd
git git
git-delta delta
helix helix
ripgrep ripgrep
sd sd
@ -97,9 +108,8 @@
dua dua
git-lfs git-lfs
libinput libinput
libinput-gesture libinput-gestures
brightnessctl brightnessctl
thunar
# TODO: my font? # TODO: my font?
noto-fonts noto-fonts
gimp gimp
@ -112,7 +122,6 @@
pulsemixer pulsemixer
pavucontrol pavucontrol
pamixer pamixer
libpulse
playerctl playerctl
# TODO: wireplumber? # TODO: wireplumber?
swaybg swaybg
@ -130,10 +139,15 @@
wget wget
]; ];
programs.thunar.enable = true;
services.tailscale = { services.tailscale = {
enable = true; enable = true;
}; };
environment.variables = {
EDITOR = "hx";
};
# Some programs need SUID wrappers, can be configured further or are # Some programs need SUID wrappers, can be configured further or are
# started in user sessions. # started in user sessions.
@ -154,11 +168,6 @@
# Or disable the firewall altogether. # Or disable the firewall altogether.
# networking.firewall.enable = false; # networking.firewall.enable = false;
# Copy the NixOS configuration file and link it from the resulting system
# (/run/current-system/configuration.nix). This is useful in case you
# accidentally delete configuration.nix.
system.copySystemConfiguration = true;
# This value determines the NixOS release from which the default # This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions # settings for stateful data, like file locations and database versions
# on your system were taken. It's perfectly fine and recommended to leave # on your system were taken. It's perfectly fine and recommended to leave