Skip to content

Commit

Permalink
Add X1 Carbon
Browse files Browse the repository at this point in the history
  • Loading branch information
joinemm committed Jan 9, 2024
1 parent 882a206 commit 81051d0
Show file tree
Hide file tree
Showing 7 changed files with 84 additions and 27 deletions.
24 changes: 12 additions & 12 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@
specialArgs = {inherit inputs outputs;};
modules = [./hosts/unikie/configuration.nix];
};
X1 = inputs.nixpkgs.lib.nixosSystem {
x1 = inputs.nixpkgs.lib.nixosSystem {
specialArgs = {inherit inputs outputs;};
modules = [./hosts/X1/configuration.nix];
modules = [./hosts/x1/configuration.nix];
};
hetzner = inputs.nixpkgs.lib.nixosSystem {
specialArgs = {inherit inputs outputs;};
Expand Down
2 changes: 1 addition & 1 deletion home-modules/discord.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
})
];
xdg.configFile = {
"Vencord/themes/midnight.theme.css".text = ''
"Vencord/settings/quickCss.css".text = ''
@import url('https://refact0r.github.io/midnight-discord/midnight.css');
:root {
Expand Down
20 changes: 10 additions & 10 deletions hosts/X1/configuration.nix → hosts/x1/configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ in {
imports = lib.flatten [
(with outputs.nixosModules; [
(common {inherit user pkgs outputs;})
# (syncthing {inherit user config lib;})
(syncthing {inherit user config lib;})
(docker {inherit user;})
laptop
bluetooth
Expand Down Expand Up @@ -40,19 +40,19 @@ in {
};

networking = {
hostName = "buutti";
hostName = "x1";
# zfs requires hostId to be set.
hostId = "c08d7d71";
};

# services.syncthing = {
# settings.folders = {
# "code".enable = true;
# "notes".enable = true;
# "pictures".enable = true;
# "work".enable = true;
# };
# };
services.syncthing = {
settings.folders = {
"code".enable = true;
"notes".enable = true;
"pictures".enable = true;
"work".enable = true;
};
};

# services.tailscale.enable = true;

Expand Down
57 changes: 57 additions & 0 deletions hosts/x1/hardware-configuration.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# 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" "thunderbolt" "nvme" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];

fileSystems."/" =
{ device = "tank/root";
fsType = "zfs";
};

fileSystems."/home" =
{ device = "tank/home";
fsType = "zfs";
};

fileSystems."/nix" =
{ device = "tank/nix";
fsType = "zfs";
};

fileSystems."/var" =
{ device = "tank/var";
fsType = "zfs";
};

fileSystems."/tmp" =
{ device = "tank/tmp";
fsType = "zfs";
};

fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/DE7A-2CD6";
fsType = "vfat";
};

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.wlp0s20f3.useDHCP = lib.mkDefault true;

nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}
1 change: 0 additions & 1 deletion hosts/X1/home.nix → hosts/x1/home.nix
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ in {
ssh-personal
ssh-work
dunst
hidpi
rofi
discord
])
Expand Down
3 changes: 2 additions & 1 deletion modules/syncthing.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
enable = true;
group = "users";

dataDir = lib.mkDefault "/home/${user}/";
dataDir = lib.mkDefault "/home/${user}";
configDir = "/home/${user}/.config/syncthing";

openDefaultPorts = true;
Expand All @@ -24,6 +24,7 @@
"windows" = {id = "3D3Z5N4-JLIWTGO-IJFSPLG-VWEJNH6-WLQDBMH-UCIMAWB-ONWDSP6-7NCL7AU";};
"unikie" = {id = "J4ASID7-BTVUC22-MMVY2GJ-A6YIMQI-PMBRV7S-FIN7OTV-PNPCV62-6GY7AAF";};
"buutti" = {id = "WSCI2BT-CE75BLT-RLRMHDO-SARY35B-I7KGQ4I-2U6S6OP-IWAO6UH-MMOU7Q6";};
"x1" = {id = "HQZRDQW-EUEUGNR-M4X3NLQ-KSQXR27-UKTBJIE-GXXVN3K-AW7IW4D-ZHGKXQD";};
};
folders = let
dir = config.services.syncthing.dataDir;
Expand Down

0 comments on commit 81051d0

Please sign in to comment.