feat: add nixos configuration for futomaki
This commit is contained in:
parent
ffa2e4014d
commit
8e3937caca
6 changed files with 155 additions and 26 deletions
30
flake.lock
30
flake.lock
|
@ -110,11 +110,11 @@
|
|||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1675681488,
|
||||
"narHash": "sha256-0E/oYpixC+joFk7UrY60TwZcdthzP2BXmJwne3Ni8ZI=",
|
||||
"lastModified": 1675918889,
|
||||
"narHash": "sha256-hy7re4F9AEQqwZxubct7jBRos6md26bmxnCjxf5utJA=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "13fdd3945d8a2da5e4afe35d8a629193a9680911",
|
||||
"rev": "49efda9011e8cdcd6c1aad30384cb1dc230c82fe",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -142,11 +142,11 @@
|
|||
},
|
||||
"nixpkgs-stable_2": {
|
||||
"locked": {
|
||||
"lastModified": 1676003493,
|
||||
"narHash": "sha256-D7al8mRCMBu6eOF62Nlx1jzCSU6odbBK/OJVynqnMHc=",
|
||||
"lastModified": 1675556398,
|
||||
"narHash": "sha256-5Gf5KlmFXfIGVQb2hmiiE7FQHoLd4UtEhIolLQvNB/A=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "8866a38d4d24542f2a355b6b2c7591a4bc78b343",
|
||||
"rev": "e32c33811815ca4a535a16faf1c83eeb4493145b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -158,11 +158,11 @@
|
|||
},
|
||||
"nixpkgs-unstable": {
|
||||
"locked": {
|
||||
"lastModified": 1675698036,
|
||||
"narHash": "sha256-BgsQkQewdlQi8gapJN4phpxkI/FCE/2sORBaFcYbp/A=",
|
||||
"lastModified": 1675758091,
|
||||
"narHash": "sha256-7gFSQbSVAFUHtGCNHPF7mPc5CcqDk9M2+inlVPZSneg=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "1046c7b92e908a1202c0f1ba3fc21d19e1cf1b62",
|
||||
"rev": "747927516efcb5e31ba03b7ff32f61f6d47e7d87",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -190,11 +190,11 @@
|
|||
},
|
||||
"nixpkgs_3": {
|
||||
"locked": {
|
||||
"lastModified": 1656817495,
|
||||
"narHash": "sha256-QEWkUBH4gu6ntNkF+9xIqDM22bto4PB+LSHIL6oWFpM=",
|
||||
"lastModified": 1675523619,
|
||||
"narHash": "sha256-jHvkAwkbAj1s0O5riHMghSDHh9iz8AwLTbXQuVQKQcg=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "db43c2a1ac04fdb1879f2fdca037fcd027a92dd5",
|
||||
"rev": "5a211d5e8d18b20b5a2b22157266cc00f8c4f3b9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -206,11 +206,11 @@
|
|||
},
|
||||
"nur": {
|
||||
"locked": {
|
||||
"lastModified": 1676069077,
|
||||
"narHash": "sha256-HXLX921XdhFCnnBK4HLMKxZLn/qBsO+2OB3QfogVEmw=",
|
||||
"lastModified": 1676087160,
|
||||
"narHash": "sha256-el2tNbWUhpz0IBoORS144xjMTi9WIqbQWRBmrsF4M64=",
|
||||
"owner": "nix-community",
|
||||
"repo": "NUR",
|
||||
"rev": "c5a4f3ce0d13892cb778b936e72633f045470d62",
|
||||
"rev": "1ddd5cf5cc7215ea63f1dee09016b53cc79034e5",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
29
flake.nix
29
flake.nix
|
@ -42,6 +42,35 @@
|
|||
};
|
||||
in
|
||||
{
|
||||
nixosConfigurations = {
|
||||
"futomaki" = nixpkgs.lib.nixosSystem rec {
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
home-manager.nixosModules.home-manager
|
||||
./machines/futomaki
|
||||
|
||||
({config, ...}: {
|
||||
config = {
|
||||
nixpkgs.overlays = [
|
||||
overlay-unstable
|
||||
(import ./packages/default.nix)
|
||||
];
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
home-manager = {
|
||||
useGlobalPkgs = true;
|
||||
users.winston.imports = [./home.nix];
|
||||
extraSpecialArgs = {
|
||||
nur = nur.nixosModules.nur;
|
||||
sops = sops.homeManagerModules.sops;
|
||||
flakePath = "/home/winston/.config/nixpkgs";
|
||||
machine.personal = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
})
|
||||
];
|
||||
};
|
||||
};
|
||||
darwinConfigurations = {
|
||||
"sashimi-slicer" = darwin.lib.darwinSystem rec {
|
||||
system = "aarch64-darwin";
|
||||
|
|
2
justfile
2
justfile
|
@ -4,7 +4,7 @@ switch: secret-stage && secret-unstage
|
|||
|
||||
[linux]
|
||||
switch: secret-stage && secret-unstage
|
||||
nixos-rebuild switch --flake .
|
||||
sudo nixos-rebuild switch --flake .
|
||||
|
||||
secret-stage:
|
||||
git add -f modules/secrets.nix
|
||||
|
|
|
@ -29,8 +29,8 @@ in {
|
|||
nixpkgs.config.allowUnfree = true;
|
||||
programs.nix-ld.enable = true;
|
||||
|
||||
imports = [./hardware-configuration.nix];
|
||||
environment.systemPackages = [];
|
||||
imports = [./hardware.nix];
|
||||
environment.systemPackages = with pkgs; [xarchiver];
|
||||
|
||||
boot = {
|
||||
kernelPackages = pkgs.linuxPackages_6_1;
|
||||
|
@ -56,7 +56,7 @@ in {
|
|||
};
|
||||
|
||||
networking = {
|
||||
hostName = "copium";
|
||||
hostName = "futomaki";
|
||||
networkmanager.enable = true;
|
||||
firewall.enable = true;
|
||||
};
|
||||
|
@ -66,6 +66,13 @@ in {
|
|||
|
||||
programs.dconf.enable = true;
|
||||
programs.steam.enable = true;
|
||||
programs.thunar = {
|
||||
enable = true;
|
||||
plugins = with pkgs.xfce; [
|
||||
thunar-archive-plugin
|
||||
thunar-volman
|
||||
];
|
||||
};
|
||||
|
||||
security.polkit.enable = true;
|
||||
systemd = {
|
||||
|
@ -112,11 +119,10 @@ in {
|
|||
libinput.enable = true;
|
||||
windowManager.i3 = {
|
||||
enable = true;
|
||||
package = pkgs.i3-gaps;
|
||||
package = pkgs.unstable.i3;
|
||||
extraPackages = with pkgs; [
|
||||
dmenu
|
||||
pavucontrol
|
||||
pcmanfm
|
||||
xclip
|
||||
xdotool
|
||||
];
|
||||
|
@ -125,16 +131,14 @@ in {
|
|||
};
|
||||
};
|
||||
|
||||
virtualisation.docker.enable = true;
|
||||
|
||||
users.users."${mainUser}" = {
|
||||
extraGroups = ["wheel"];
|
||||
isNormalUser = true;
|
||||
openssh.authorizedKeys.keys = ["ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILm0O46zW/XfVOSwz0okRWYeOAg+wCVkCtCAoVTpZsOh"];
|
||||
packages = [pkgs.zsh];
|
||||
shell = pkgs.zsh;
|
||||
};
|
||||
|
||||
system = {
|
||||
copySystemConfiguration = true;
|
||||
stateVersion = "22.11";
|
||||
};
|
||||
system.stateVersion = "22.11";
|
||||
}
|
74
machines/futomaki/hardware.nix
Normal file
74
machines/futomaki/hardware.nix
Normal file
|
@ -0,0 +1,74 @@
|
|||
# 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 = ["nvme" "xhci_pci" "ahci" "usb_storage" "sd_mod"];
|
||||
boot.initrd.kernelModules = ["dm-snapshot"];
|
||||
boot.kernelModules = ["kvm-amd"];
|
||||
boot.extraModulePackages = [];
|
||||
|
||||
boot.initrd.luks.devices = {
|
||||
luksroot = {
|
||||
device = "/dev/disk/by-uuid/170cdc3f-2b04-4123-93ea-5e03136f6548";
|
||||
preLVM = true;
|
||||
allowDiscards = true;
|
||||
};
|
||||
};
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/894ceea3-0596-4652-89fd-772fbb82474c";
|
||||
fsType = "btrfs";
|
||||
options = ["subvol=root" "compress=zstd"];
|
||||
};
|
||||
|
||||
fileSystems."/home" = {
|
||||
device = "/dev/disk/by-uuid/894ceea3-0596-4652-89fd-772fbb82474c";
|
||||
fsType = "btrfs";
|
||||
options = ["subvol=home" "compress=zstd"];
|
||||
};
|
||||
|
||||
fileSystems."/nix" = {
|
||||
device = "/dev/disk/by-uuid/894ceea3-0596-4652-89fd-772fbb82474c";
|
||||
fsType = "btrfs";
|
||||
options = ["subvol=nix" "compress=zstd" "noatime"];
|
||||
};
|
||||
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/D3BE-5F94";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
swapDevices = [
|
||||
{device = "/dev/disk/by-uuid/72a4ce61-6cb8-4996-9966-83de91a49b6c";}
|
||||
];
|
||||
|
||||
# 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.enp37s0.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
# high-resolution display
|
||||
hardware.video.hidpi.enable = lib.mkDefault true;
|
||||
|
||||
# fuck you, nvidia
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
services.xserver.videoDrivers = ["nvidia"];
|
||||
hardware.opengl.enable = true;
|
||||
hardware.nvidia.modesetting.enable = true;
|
||||
# Optionally, you may need to select the appropriate driver version for your specific GPU.
|
||||
hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.stable;
|
||||
}
|
|
@ -11,6 +11,7 @@ in {
|
|||
packages = with pkgs; [
|
||||
blueberry
|
||||
libnotify
|
||||
noisetorch
|
||||
pavucontrol
|
||||
];
|
||||
};
|
||||
|
@ -121,11 +122,32 @@ in {
|
|||
fade = true;
|
||||
backend = "glx";
|
||||
vSync = true;
|
||||
shadow = riced;
|
||||
settings = {
|
||||
animations = true;
|
||||
animation-exclude = [
|
||||
"window_type = 'dock'"
|
||||
"window_type = 'desktop'"
|
||||
];
|
||||
|
||||
animation-for-open-window = "zoom";
|
||||
animation-for-unmap-window = "zoom";
|
||||
|
||||
animation-for-prev-tag = "zoom";
|
||||
animation-for-next-tag = "zoom";
|
||||
|
||||
enable-fading-prev-tag = true;
|
||||
enable-fading-next-tag = true;
|
||||
|
||||
blur = lib.mkIf riced {
|
||||
method = "dual_kawase";
|
||||
};
|
||||
blur-background-exclude = [
|
||||
"window_type = 'dock'"
|
||||
"window_type = 'desktop'"
|
||||
"_NET_WM_NAME@:s *?= 'Discover Voice'"
|
||||
"_NET_WM_NAME@:s *?= 'Discover Text'"
|
||||
];
|
||||
};
|
||||
};
|
||||
redshift = {
|
||||
|
|
Loading…
Reference in a new issue