diff --git a/flake.lock b/flake.lock index afa3bfcb..5e5e2fc6 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,42 @@ { "nodes": { + "disko": { + "inputs": { + "nixpkgs": "nixpkgs" + }, + "locked": { + "lastModified": 1711934712, + "narHash": "sha256-sBDe+QmX/QohlnKeSEzrftcXyZL5FY09OMjZ59Rpyy4=", + "owner": "nix-community", + "repo": "disko", + "rev": "611c9ea53250f7bb22286b3d26872280a0e608f9", + "type": "github" + }, + "original": { + "id": "disko", + "type": "indirect" + } + }, + "disko-unstable": { + "inputs": { + "nixpkgs": [ + "nixpkgs-unstable" + ] + }, + "locked": { + "lastModified": 1711934712, + "narHash": "sha256-sBDe+QmX/QohlnKeSEzrftcXyZL5FY09OMjZ59Rpyy4=", + "owner": "nix-community", + "repo": "disko", + "rev": "611c9ea53250f7bb22286b3d26872280a0e608f9", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "disko", + "type": "github" + } + }, "home-manager": { "inputs": { "nixpkgs": [ @@ -71,7 +108,7 @@ "hyprcursor": "hyprcursor", "hyprland-protocols": "hyprland-protocols", "hyprlang": "hyprlang_2", - "nixpkgs": "nixpkgs", + "nixpkgs": "nixpkgs_2", "systems": "systems_2", "wlroots": "wlroots", "xdph": "xdph" @@ -181,16 +218,16 @@ }, "nixpkgs": { "locked": { - "lastModified": 1711523803, - "narHash": "sha256-UKcYiHWHQynzj6CN/vTcix4yd1eCu1uFdsuarupdCQQ=", + "lastModified": 1711715736, + "narHash": "sha256-9slQ609YqT9bT/MNX9+5k5jltL9zgpn36DpFB7TkttM=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "2726f127c15a4cc9810843b96cad73c7eb39e443", + "rev": "807c549feabce7eddbf259dbdcec9e0600a0660d", "type": "github" }, "original": { "owner": "NixOS", - "ref": "nixos-unstable", + "ref": "nixpkgs-unstable", "repo": "nixpkgs", "type": "github" } @@ -212,6 +249,22 @@ } }, "nixpkgs_2": { + "locked": { + "lastModified": 1711523803, + "narHash": "sha256-UKcYiHWHQynzj6CN/vTcix4yd1eCu1uFdsuarupdCQQ=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "2726f127c15a4cc9810843b96cad73c7eb39e443", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_3": { "locked": { "lastModified": 1711668574, "narHash": "sha256-u1dfs0ASQIEr1icTVrsKwg2xToIpn7ZXxW3RHfHxshg=", @@ -227,11 +280,13 @@ }, "root": { "inputs": { + "disko": "disko", + "disko-unstable": "disko-unstable", "home-manager": "home-manager", "home-manager-unstable": "home-manager-unstable", "hyprland": "hyprland", "nixos-hardware": "nixos-hardware", - "nixpkgs": "nixpkgs_2", + "nixpkgs": "nixpkgs_3", "nixpkgs-unstable": "nixpkgs-unstable" } }, diff --git a/flake.nix b/flake.nix index 26d3f2a4..5b6bf64c 100644 --- a/flake.nix +++ b/flake.nix @@ -20,6 +20,9 @@ inputs.nixpkgs.follows = "nixpkgs-unstable"; }; + disko-unstable.url = "github:nix-community/disko"; + disko-unstable.inputs.nixpkgs.follows = "nixpkgs-unstable"; + # Latest Hyprland hyprland.url = "github:hyprwm/Hyprland"; @@ -36,8 +39,8 @@ ]; }; - outputs = - inputs@{ nixpkgs-unstable, home-manager-unstable, nixos-hardware, ... }: { + outputs = inputs@{ nixpkgs, nixpkgs-unstable, home-manager + , home-manager-unstable, nixos-hardware, disko, disko-unstable, ... }: { homeConfigurations.aly = home-manager-unstable.lib.homeManagerConfiguration { @@ -88,6 +91,7 @@ system = "x86_64-linux"; specialArgs = { inherit inputs; }; modules = [ + disko-unstable.nixosModules.disko nixos-hardware.nixosModules.lenovo-thinkpad-t440p home-manager-unstable.nixosModules.home-manager ./hosts/rustboro diff --git a/homeManagerModules/desktopEnv/hypr/default.nix b/homeManagerModules/desktopEnv/hypr/default.nix index 08a43a74..c7ded25b 100644 --- a/homeManagerModules/desktopEnv/hypr/default.nix +++ b/homeManagerModules/desktopEnv/hypr/default.nix @@ -98,13 +98,14 @@ screenshot_folder = "~/Pictures/Screenshots"; screenshot_screen = "${screenshot} -m output -o ${screenshot_folder}"; - # Colors + # Color, themes, scaling border_primary = "ca9ee6ee"; border_secondary = "99d1dbee"; border_inactive = "303446aa"; drop_shadow = "1a1a1aee"; cursor_size = "24"; qt_platform_theme = "gtk"; + gdk_scale = "1.5"; in '' monitor = desc:BOE 0x0BCA,preferred,auto,1.566667 # lavaridge fw13 matte display @@ -123,7 +124,7 @@ } # toolkit-specific scale - env = GDK_SCALE,1.5 + env = GDK_SCALE,${gdk_scale} # Some default env vars. env = XCURSOR_SIZE,${cursor_size} diff --git a/hosts/rustboro/default.nix b/hosts/rustboro/default.nix index 5e2f836b..0d37b2b4 100644 --- a/hosts/rustboro/default.nix +++ b/hosts/rustboro/default.nix @@ -6,12 +6,15 @@ imports = [ ./hardware-configuration.nix # Include the results of the hardware scan. ./home.nix + ./disko.nix ]; # Bootloader. - boot.loader.grub.enable = true; - boot.loader.grub.device = "/dev/sda"; - boot.loader.grub.useOSProber = false; + boot.loader.grub = { + enable = true; + efiSupport = true; + efiInstallAsRemovable = true; + }; networking.hostName = "rustboro"; # Define your hostname. @@ -35,5 +38,8 @@ steam.enable = false; }; + users.users.aly.hashedPassword = + "$y$j9T$VdtiEyMOegHpcUwgmCVFD0$K8Ne6.zk//VJNq2zxVQ0xE0Wg3LohvAQd3Xm9aXdM15"; + system.stateVersion = "23.11"; # Did you read the comment? } diff --git a/hosts/rustboro/disko.nix b/hosts/rustboro/disko.nix new file mode 100644 index 00000000..2efc3db2 --- /dev/null +++ b/hosts/rustboro/disko.nix @@ -0,0 +1,36 @@ +{ + disko.devices = { + disk = { + main = { + type = "disk"; + device = "/dev/sda"; + content = { + type = "gpt"; + partitions = { + boot = { + size = "1M"; + type = "EF02"; # for grub MBR + }; + ESP = { + size = "512M"; + type = "EF00"; + content = { + type = "filesystem"; + format = "vfat"; + mountpoint = "/boot"; + }; + }; + root = { + size = "100%"; + content = { + type = "filesystem"; + format = "ext4"; + mountpoint = "/"; + }; + }; + }; + }; + }; + }; + }; +} diff --git a/hosts/rustboro/hardware-configuration.nix b/hosts/rustboro/hardware-configuration.nix index 72128048..68ecc84e 100644 --- a/hosts/rustboro/hardware-configuration.nix +++ b/hosts/rustboro/hardware-configuration.nix @@ -19,21 +19,7 @@ boot.kernelModules = [ "kvm-intel" ]; boot.extraModulePackages = [ ]; - fileSystems."/" = { - device = "/dev/disk/by-uuid/ac40bf74-91e3-4387-8125-6037b7fcd0d6"; - fsType = "ext4"; - }; - - 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..useDHCP`. networking.useDHCP = lib.mkDefault true; - # networking.interfaces.enp0s25.useDHCP = lib.mkDefault true; - # networking.interfaces.wlp3s0.useDHCP = lib.mkDefault true; - # networking.interfaces.wwp0s20u10c2i12.useDHCP = lib.mkDefault true; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; hardware.cpu.intel.updateMicrocode =