aboutsummaryrefslogtreecommitdiff
path: root/nixos/configuration.nix
blob: 80f254ecec9b7184926945dd3ed759a557f6233e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
# This is your system's configuration file.
# Use this to configure your system environment (it replaces /etc/nixos/configuration.nix)
{
  inputs,
  lib,
  config,
  pkgs,
  ...
}: {
  imports = [
    ./variables.nix
    #./greetd-sway.nix
    ./nvidia.nix
    ./fonts.nix
    ./services/laptop.preset.nix
    ./hardware-configuration.nix
  ];
  #boot.kernelPackages = pkgs.linuxPackages_latest;
  boot.supportedFilesystems = ["ntfs"];
  security.pam.services.hyprlock = {};
  hardware.bluetooth = {
    enable = true;
    powerOnBoot = true;
  };
  systemd.user.services.mpris-proxy = {
    description = "Mpris proxy";
    after = ["network.target" "sound.target"];
    wantedBy = ["default.target"];
    serviceConfig.ExecStart = "${pkgs.bluez}/bin/mpris-proxy";
  };
  boot.loader = {
    efi.canTouchEfiVariables = true;
    grub = {
      enable = true;
      useOSProber = true;
      efiSupport = true;
      fsIdentifier = "label";
      devices = ["nodev"];
      extraEntries = ''
        	menuentry "Reboot" {
        		reboot
        	}
        menuentry "Poweroff" {
        	halt
        }
      '';
    };
  };
  services.displayManager.sddm = {
    enable = true;
    wayland.enable = true;
  };
  #systemd.user.services.kanshi = {
  #	description = "kanshi daemon";
  #	serviceConfig = {
  #		Type = "simple";
  #		ExecStart = ''${pkgs.kanshi}/bin/kanshi -c kanshi_config_file'';
  #	};
  #};

  security.polkit.enable = true;
  services.gnome.gnome-keyring.enable = true;
  #programs.sway = {
  #	enable = true;
  #	wrapperFeatures.gtk = true;
  #};
  programs.hyprland.enable = true; # enables Hyprland DM.
  nixpkgs = {
    overlays = [
    ];
    config = {
      allowUnfree = true;
    };
  };

  nix = let
    flakeInputs = lib.filterAttrs (_: lib.isType "flake") inputs;
  in {
    settings = {
      experimental-features = "nix-command flakes";
      flake-registry = "";
      nix-path = config.nix.nixPath;
    };
    channel.enable = false;
    registry = lib.mapAttrs (_: flake: {inherit flake;}) flakeInputs;
    nixPath = lib.mapAttrsToList (n: _: "${n}=flake:${n}") flakeInputs;
  };
  networking = {
    hostName = "${config.myHostName}";
    networkmanager.enable = true;
  };
  users.users = {
    "${config.myUserName}" = {
      initialPassword = "stevenpassword";
      isNormalUser = true;
      openssh.authorizedKeys.keys = [
      ];
      packages = with pkgs; [
        nh
      ];
      extraGroups = ["wheel" "input"];
    };
  };
  services.openssh = {
    enable = true;
    settings = {
      PermitRootLogin = "no";
      PasswordAuthentication = false;
    };
  };
  services.automatic-timezoned.enable = true;
  # https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
  system.stateVersion = "24.05";
}