diff --git a/configuration.nix b/configuration.nix index 6c749c1..fa94ff8 100644 --- a/configuration.nix +++ b/configuration.nix @@ -70,33 +70,14 @@ # Enable touchpad support (enabled default in most desktopManager). # services.libinput.enable = true; - # Define a user account. Don't forget to set a password with ‘passwd’. - users.users = { - theo = { - isNormalUser = true; - extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user. - packages = with pkgs; [ - lazygit - helix - yazi - - git - tree - just - fastfetch - - ashell - kitty - hyprlauncher - ]; - }; - guest = { - isNormalUser = true; - }; - }; programs.firefox.enable = true; + hardware.bluetooth = { + enable = true; + powerOnBoot = false; + }; + # List packages installed in system profile. # You can use https://search.nixos.org/ to find more packages (and options). environment.systemPackages = with pkgs; [ diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..820ef5f --- /dev/null +++ b/flake.lock @@ -0,0 +1,62 @@ +{ + "nodes": { + "home-manager": { + "inputs": { + "nixpkgs": "nixpkgs" + }, + "locked": { + "lastModified": 1789765459, + "narHash": "sha256-voJJ5IZR4w2149u2Jm/j2zifeWROlpZQ+JzmCQwjgn8=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "17903129f47656fa4d07e78ad87f6592ff4f2527", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "home-manager", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1788865024, + "narHash": "sha256-3YkAzvtt4LoE11IcBDzPshIF3fJ0aIoILqE7dAg8CLI=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "422d1ae605d7fcd9896412b37dc065c456c0eefb", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_2": { + "locked": { + "lastModified": 1789632929, + "narHash": "sha256-RjR8AyvGlWuw16XRj7C1YDEw4E27ciuyPeB2nDMzgTU=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "a32edd7654519351e48e80372a928df336394670", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "home-manager": "home-manager", + "nixpkgs": "nixpkgs_2" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..098d46a --- /dev/null +++ b/flake.nix @@ -0,0 +1,26 @@ +{ + description = "NixOS configuration"; + + inputs = { + nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; + home-manager.url = "github:nix-community/home-manager"; + }; + + outputs = inputs@{ nixpkgs, home-manager, ... }: { + nixosConfigurations = { + tnix = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + modules = [ + ./configuration.nix + home-manager.nixosModules.home-manager + { + home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; + home-manager.extraSpecialArgs = { inherit inputs; }; + home-manager.users.theo = ./home.nix; + } + ]; + }; + }; + }; +} diff --git a/home.nix b/home.nix new file mode 100644 index 0000000..d61616a --- /dev/null +++ b/home.nix @@ -0,0 +1,29 @@ +{ config, pkgs, ... }: +{ + users.users = { + theo = { + isNormalUser = true; + extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user. + packages = with pkgs; [ + lazygit + helix + yazi + + git + tree + just + fastfetch + + ashell + kitty + hyprlauncher + ]; + }; + }; + + home-manager.users.theo = { pkgs, ... }: { + home.packages = with pkgs; [ atool httpie ]; + programs.bash.enable = true; + home.stateVersion = "26.11"; + }; +} diff --git a/justfile b/justfile index 6cf2cc0..ae9b4c7 100644 --- a/justfile +++ b/justfile @@ -4,3 +4,6 @@ default: install: cp -r * /mnt/etc/nixos sudo nixos-install + +rebuild: + sudo nixos-rebuild switch --flake .#tnix --impure